SampleConsensusModelPlane::optimizeModelCoefficients error message unclear.
My Environment
- Operating System and version: Ubuntu 16.04.1
- Compiler: GCC 5.4.0
- PCL Version: 1.7.2
Current Behavior
pcl::SampleConsensusModelPlane::optimizeModelCoefficients prints Not enough inliers found to support a model (3)! Returning the same coefficients. when trying to optimize a plane model with 3 inliers.
Possible Solution
It makes sense to return if inliers.size() < 3 to avoid extra computation (as I assume the PCA approach will have the same plane coefficients as the initial calculation), but maybe the error could be more clear that a valid model was calculated from the inliers but couldn't be further refined.
Is this better?
I missed this a few days ago, but that looks good to me! I hope that will save someone else a bit of confusion in the future.