-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply clang-format to stereo module #3344
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any thing wrong except the "please see" instead of \sa
or \see
and the c-style array of arrays.
* \ingroup stereo | ||
*/ | ||
/** \brief Adaptive Cost 2-pass Scanline Optimization Stereo Matching algorithm | ||
* implementation please see related documentation on stereo/stereo_matching.h |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks weird. Also doxygen has related functionality @see
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, indeed this docstring has no effect I think, at least I can not find it in the generated documentation. Will wipe it out.
if (bck[x + 1][d] < c_min) | ||
c_min = bck[x + 1][d]; | ||
|
||
bck[x][0] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might need to refactor this to be more understandable later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here :)
// int n = radius_ * 2 + 1; | ||
// int sad_max = std::numeric_limits<int>::max (); | ||
|
||
float** acc = new float*[width_]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use some smarter memory management? Even std::vector<std::vector<float>>
might help. There might be some 2D data-struct in PCL that I don't know about.
Same with the fwd
and bck
arrays. The code works, but seems fragile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would absolutely not admit any new code with such memory management. But I'm very hesitant to touch this... I have never used stereo
module and also I don't know how comprehensive its test coverage is. For me the risks of breaking out-weight the benefits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2D data-struct in PCL that I don't know about
Does one exist? What do other modules use? vector<vector<T>>
is not really a 2D matrix (nor is T**).
I don't know how comprehensive its test coverage is
Where are the tests? I didn't see a test/stereo
directory. Looks like there's no test coverage.
I'll create some tests and refactor this if it's ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does one exist? What do other modules use?
I think Eigen::MatrixXf
would be an appropriate choice here.
Where are the tests? I didn't see a
test/stereo
directory.
Indeed, no test coverage at all. Unfortunately PCL has a number of such dark dusty corners.
I'll create some tests and refactor this if it's ok?
Any contribution is welcome! That said, if you are willing to volunteer time, I believe there are more important things in PCL that need someone's attention.
949a02f
to
cc3c521
Compare
Removed doxygen comments from the top of ".cpp" files, everything else is the same. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides the comments on those very critical sections in which things slightly convoluted, nothing to say. Feel free to merge at your convenience.
No description provided.