Maximum Density Filter
Points are only considered for rejection if they exceed a density threshold, otherwise they are preserved. The single parameter of this filter sets the maximum density that should be obtained in the output point cloud. Points are randomly rejected such that this maximum density is obtained as closely as possible.
1 PM::DataPointsFilter* maxDensitySubsample(2 PM::get().DataPointsFilterRegistrar.create(3 "MaxDensityDataPointsFilter",4 map_list_of5 ("maxDensity", toParam(30))6 )7 );
Surface Normal Filter
The surface normal to each point is estimated by finding a number of neighboring points and taking the eigen-vector corresponding to the smallest eigen-value of all neighboring points. Remark that that given a surface, the normal vector can point in two possible directions.
This filter has no impact on cloudpoints, but has output.
PM::DataPointsFilter* densityFilter( PM::get().DataPointsFilterRegistrar.create( "SurfaceNormalDataPointsFilter", map_list_of ("knn", "10") //Number of neighboring points (including the point itself) to consider when extracting surface normal ("epsilon", "5") //Approximation used in nearest neighbor search ("keepNormals", "0") //Add the normal vector to descriptors ("keepDensities", "1") //Add point cloud density to descriptors ));
Random Sampling Filter
它只保留输入点云固定比例的点
PM::DataPointsFilter* randSubsample( PM::get().DataPointsFilterRegistrar.create( "RandomSamplingDataPointsFilter", map_list_of ("prob", toParam(probToKeep)) //Probability that a point is kept (1/decimation factor) ));