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

Add: morphological filters operate on the z dimension (replaces #521) #533

Merged
merged 1 commit into from
Mar 17, 2014

Conversation

chambbj
Copy link
Contributor

@chambbj chambbj commented Feb 27, 2014

No description provided.

@taketwo
Copy link
Member

taketwo commented Feb 27, 2014

There is a note in every function:

Assumes unique indices.

What exactly do you mean by that?

@chambbj
Copy link
Contributor Author

chambbj commented Feb 27, 2014

@taketwo Honestly, this is a bit of a cut and paste from copyPointCloud. I can take out that note to avoid confusion.

@taketwo
Copy link
Member

taketwo commented Feb 27, 2014

I see, but that note is relevant only for functions with const std::vector<int> &indices parameter, which we don't have here.

@chambbj
Copy link
Contributor Author

chambbj commented Mar 2, 2014

@taketwo Same thing here. Just rebased and pushed once again.

@taketwo
Copy link
Member

taketwo commented Mar 2, 2014

I think we need one more rebase here to get the fixes introduced by #534.

@chambbj
Copy link
Contributor Author

chambbj commented Mar 2, 2014

@taketwo This one should be ready now, although Travis timed out on gcc.

@taketwo
Copy link
Member

taketwo commented Mar 2, 2014

Great! Let's wait some time just in case @jspricke has anything to add. Otherwise I am fine with merging this.

Eigen::Vector4f min_pt, max_pt;
pcl::getMinMax3D<PointT> (*cloud_in, pt_indices, min_pt, max_pt);

cloud_out.points[p_idx].z = min_pt.z ();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only change compared to morphologicalDilate, I would propose to merge both functions and give them a min/max parameter.

@chambbj
Copy link
Contributor Author

chambbj commented Mar 11, 2014

@jspricke If this looks better, I can squash, rebase with master, and push one last time.

@taketwo
Copy link
Member

taketwo commented Mar 11, 2014

For what it's worth, the order of arguments in TEST macro is supposed be the other way round, because in its current form 5 test cases each with 1 test are created:

50: [==========] Running 5 tests from 5 test cases.
50: [----------] Global test environment set-up.
50: [----------] 1 test from Dilate
50: [ RUN      ] Dilate.Morphological
50: [       OK ] Dilate.Morphological (0 ms)
50: [----------] 1 test from Dilate (0 ms total)
50: 
50: [----------] 1 test from Erode
50: [ RUN      ] Erode.Morphological
50: [       OK ] Erode.Morphological (0 ms)
50: [----------] 1 test from Erode (0 ms total)
50: 
50: [----------] 1 test from Open
50: [ RUN      ] Open.Morphological
50: [       OK ] Open.Morphological (0 ms)
50: [----------] 1 test from Open (0 ms total)
50: 
50: [----------] 1 test from Close
50: [ RUN      ] Close.Morphological
50: [       OK ] Close.Morphological (0 ms)
50: [----------] 1 test from Close (0 ms total)
50: 
50: [----------] 1 test from Unsupported
50: [ RUN      ] Unsupported.Morphological
50: [       OK ] Unsupported.Morphological (0 ms)
50: Morphological operator is not supported!
50: [----------] 1 test from Unsupported (0 ms total)
50: 
50: [----------] Global test environment tear-down
50: [==========] 5 tests from 5 test cases ran. (0 ms total)
50: [  PASSED  ] 5 tests.

whereas logically I would expect 1 test case ("Morphological") with 5 tests ("Dilate", "Erode", etc).

@chambbj
Copy link
Contributor Author

chambbj commented Mar 12, 2014

@taketwo Yeah, sure, I can fix this. The backwards interpretation is fairly commonplace throughout the filters tests for some reason.

@taketwo
Copy link
Member

taketwo commented Mar 12, 2014

I would admit that not only backwards interpretation in TEST macros, but also in EXPECT/ASSERT_xxx macros (where the expected value is supposed to go first) is common PCL. I guess one of the initial contributors was not aware of this, and later his mistake was replicated by others in dozens of tests... Well, this calls for a clean-up, of course.

@chambbj
Copy link
Contributor Author

chambbj commented Mar 12, 2014

@taketwo Pretty sure the failed job was a fluke. Can you initiate a restart of the build within Travis?

@taketwo
Copy link
Member

taketwo commented Mar 12, 2014

Can you initiate a restart of the build within Travis?

No, I have no control of that.

Pretty sure the failed job was a fluke.

Yeah, I wouldn't even bother restarting the job since the last time it was okay. Every now and then Travis dies building test executables. Some of the tests are indeed large and cover many PCL classes, so compilation turns to be a pretty memory-intensive process. Again, calls for a clean-up and splitting tests into multiple files.

@chambbj
Copy link
Contributor Author

chambbj commented Mar 14, 2014

@taketwo @jspricke Where do we stand on accepting this pull request? I've got a couple more that depend on it that I've been holding off on.

@taketwo
Copy link
Member

taketwo commented Mar 14, 2014

I am all pro, just waiting for @jspricke to comment.

@taketwo
Copy link
Member

taketwo commented Mar 17, 2014

Well, I think there won't be major objections anyways, and minor things we can patch later. I will merge so that we can move on with other PRs.

taketwo added a commit that referenced this pull request Mar 17, 2014
Add: morphological filters operate on the z dimension (replaces #521)
@taketwo taketwo merged commit 9e1e7f3 into PointCloudLibrary:master Mar 17, 2014
@chambbj chambbj deleted the morphological-filters-new branch March 17, 2014 12:31
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