-
-
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
Add: filter to remove locally maximal points in the z dimension #577
Conversation
* \param negative true if all points \e except the input indices will be returned, false otherwise | ||
*/ | ||
inline void | ||
setNegative (bool negative) { negative_ = negative; } |
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.
This duplicates (and hides) the same function in FilterIndices
. Any reason for having this (and getNegative
)?
@taketwo I've made the requested changes. Looks like Travis should pass as well. |
} | ||
|
||
// Find the local maximum in z dimension | ||
for (int k = 1; k < radius_indices.size(); ++k) // k = 1 is the first neighbor |
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.
Missing space here. And since you anyway will modify the line, we cloud change int
to size_t
to avoid compiler warnings.
I guess the algorithm may be accelerated quite a bit. Whenever you find a point that is the local maximum, you can safely exclude all of its neighbors from the processing queue because they are guaranteed not to be maximum in their region. That will save a number of radius searches. But that's more of a loud thinking. I think we could merge as is. |
It's a good thought and doesn't seem like a lot of work. Since I've got another update to make as it is, I'll go ahead and investigate this. |
@taketwo Just pushed the update to this one. Take a look when you get a chance. |
Add: filter to remove locally maximal points in the z dimension
Great, thank you! |
No description provided.