Skip to content
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

Merged
merged 1 commit into from
Sep 17, 2019

Conversation

taketwo
Copy link
Member

@taketwo taketwo commented Sep 13, 2019

No description provided.

Copy link
Member

@kunaltyagi kunaltyagi left a 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
Copy link
Member

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

Copy link
Member Author

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] =
Copy link
Member

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.

Copy link
Member Author

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_];
Copy link
Member

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

Copy link
Member Author

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.

Copy link
Member

@kunaltyagi kunaltyagi Sep 16, 2019

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?

Copy link
Member Author

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.

@taketwo
Copy link
Member Author

taketwo commented Sep 17, 2019

Removed doxygen comments from the top of ".cpp" files, everything else is the same.

Copy link
Member

@SergioRAgostinho SergioRAgostinho left a 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.

@taketwo taketwo merged commit e001a73 into PointCloudLibrary:master Sep 17, 2019
@taketwo taketwo deleted the format-stereo branch September 17, 2019 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants