|
Noether
0.0.0
|
Mesh modifier that fits a specifiable number of model primitives to the input mesh. More...
This modifier uses RANSAC to sequentially fit primitive models to the input mesh. When a valid model is identified, the inlier vertices are removed from the input mesh into a new sub-mesh. New primitive models are then fitted to the remainder of vertices in the input mesh until either 1) the maximum number of primitive models have been fitted 2) too few inliers remain in the input mesh, or 3) no more valid primitives can be fit to the input mesh.
#include <ransac_primitive_fit_modifier.h>

Public Member Functions | |
| RansacPrimitiveFitMeshModifier (float distance_threshold, unsigned min_vertices=1, int max_primitives=-1, unsigned max_iterations=100) | |
| Constructor. | |
| std::vector< pcl::PolygonMesh > | modify (const pcl::PolygonMesh &mesh) const override |
Protected Member Functions | |
| virtual std::shared_ptr< pcl::SampleConsensusModel< pcl::PointXYZ > > | createModel (const pcl::PolygonMesh &mesh) const =0 |
| Creates a sample consensus model for the primitive. | |
| virtual pcl::PolygonMesh | createSubMesh (const pcl::PolygonMesh &mesh, std::shared_ptr< const pcl::RandomSampleConsensus< pcl::PointXYZ > > ransac) const =0 |
| Creates a sub-mesh from the results of the model primitive fitting. | |
Protected Attributes | |
| float | distance_threshold_ |
| unsigned | min_vertices_ |
| int | max_primitives_ |
| unsigned | max_iterations_ |
Additional Inherited Members | |
Public Types inherited from noether::MeshModifier | |
| using | Ptr = std::unique_ptr< MeshModifier > |
| using | ConstPtr = std::unique_ptr< const MeshModifier > |
| noether::RansacPrimitiveFitMeshModifier::RansacPrimitiveFitMeshModifier | ( | float | distance_threshold, |
| unsigned | min_vertices = 1, |
||
| int | max_primitives = -1, |
||
| unsigned | max_iterations = 100 |
||
| ) |
| distance_threshold | Maximum distance (m) a point can be from the primitive model to be considered an inlier |
| min_vertices | Minimum number of vertices that a cluster (identfied as a primitive) must have |
| max_primitives | Maximum number of primitives to detect |
| max_iterations | Maximum number of RANSAC iterations to perform |
|
overridevirtual |
Reimplemented from noether::MeshModifier.
|
protectedpure virtual |
Implemented in noether::RansacPlaneProjectionMeshModifier, and noether::RansacCylinderProjectionMeshModifier.
|
protectedpure virtual |
| mesh | Full input mesh |
| ransac | RANSAC model after successful completion of the model primitive fit |
Implemented in noether::RansacCylinderProjectionMeshModifier, noether::RansacCylinderFitMeshModifier, and noether::RansacPlaneProjectionMeshModifier.