Reputation: 9
The pcl_sample_consensus library holds SAmple Consensus (SAC) methods like RANSAC and models like planes and cylinders. I want to model 3D ellipse. I want to have model coefficients of 3D ellipse. Do you know any function to do it?
Upvotes: 0
Views: 690
Reputation: 15525
You can write your own class that inherits from class SampleConsensusModel, and then use that as a model.
An ellipse in 3d should be relatively similar to a circle in 3d, so you could copy the code of SampleConsensusModelCircle3d and modify it to have an Ellipse3d class instead of a Circle3d class.
Or if by "3d ellipse" you meant an ellipsoid, then you could copy the code from SampleConsensusModelSphere and modify it go have an Ellipsoid class.
You'd think someone would have done that already, but I wasn't able to find an Ellipse implementation of SampleConsensusModel with a google search. If you do end up implementing your own, or if you find that someone else implemented one already, please write an answer here!
Upvotes: 2