-
-
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
Allow user to apply arbitrary constraint on models in sample consensus #4260
Conversation
@@ -571,6 +586,9 @@ namespace pcl | |||
{ | |||
return ((*rng_gen_) ()); | |||
} | |||
|
|||
/** \brief A user defined function that takes model coefficients and returns whether the model is acceptable or not. */ | |||
std::function<bool(const Eigen::VectorXf &)> is_model_valid_user_defined_; |
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.
Note: ABI breakage
The check is in non-critical code. Tagging @PointCloudLibrary/maintainers to answer the following:
|
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.
Please provide a scenario where this would be useful. The code LGTM. Use of function-pointer would restrict the usability and since this is not hot path, 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.
Edited the main comment to reflect the use-case.
I used a
std::function
to makeSACModel
more versatile. This allows:SampleConsensusModelNormalPerpendicularPlane
, similar toSampleConsensusModelNormalParallelPlane