struct mp2p_icp_filters::FilterPlaneSegmentation::Parameters¶
Overview¶
#include <FilterPlaneSegmentation.h> struct Parameters: public mp2p_icp_filters::PlaneSegmentationParams { // fields std::string input_pointcloud_layer = mp2p_icp::metric_map_t::PT_LAYER_RAW; std::string output_layer_planes; std::string output_layer_others; std::string plane_id_field; bool store_planes = true; bool clear_previous_planes = true; double voxel_size = 0.10; uint32_t normal_knn = 16; double normal_radius = 0.50; double normal_agreement_deg = 10.0; double distance_threshold = 0.03; double inlier_distance = 0.08; double max_thickness = 0.04; double min_area = 2.0; uint32_t min_points = 100; double merge_normal_deg = 3.0; double merge_offset = 0.05; double merge_max_gap = 0.50; mrpt::math::TPoint3D viewpoint = {0, 0, 0}; std::size_t parallelization_grain_size = 4096; // methods void load_from_yaml( const mrpt::containers::yaml& c, FilterPlaneSegmentation& parent ); };
Fields¶
std::string output_layer_planes
Optional output layer for the points of all planes
std::string output_layer_others
Optional output layer for the points not on any plane
std::string plane_id_field
Optional name of the per-point plane id field (uint16)
bool store_planes = true
Append the planes to metric_map_t::planes
bool clear_previous_planes = true
Empty metric_map_t::planes first (only if store_planes)
double voxel_size = 0.10
Sampling resolution [m]: the cloud is reduced to one representative (the mean) per voxel for normal estimation and region growing, and the area of each plane is measured on an in-plane grid of this size. Parallel surfaces closer than about this distance cannot be told apart.
uint32_t normal_knn = 16
Neighbors (including the point itself) used to estimate the normal of each representative. They also define the region growing graph.
double normal_radius = 0.50
Neighbors farther than this are ignored [m]. Larger values bridge the gaps between rings of sparse LiDAR scans.
double normal_agreement_deg = 10.0
Region growing: maximum angle between a representative’s normal and the normal of the region it joins [deg].
double distance_threshold = 0.03
Region growing: a representative joins a region if its distance to the current plane of the region is below three times the noise measured in the region, but never less than this [m] (nor more than inlier_distance). Keep it below half the distance between parallel surfaces that must stay apart.
double inlier_distance = 0.08
Final refinement: an input point is an inlier of its plane if its distance to the refined plane is at most this [m]. Make it wider than any systematic error (e.g. a per-beam range offset) to be measured against the plane, or those points are excluded from it, but narrower than the gap to a parallel surface that is not itself a plane.
double max_thickness = 0.04
Planes whose RMS inlier distance is larger are rejected [m]. Also the flatness that a merged pair must keep.
double min_area = 2.0
Planes with a covered area smaller than this are rejected [m2].
uint32_t min_points = 100
Planes with fewer inliers than this are rejected.
double merge_normal_deg = 3.0
Merging: two segments merge only if their normals agree within this angle [deg], …
double merge_offset = 0.05
… the centroid of the smaller one lies within this distance of the plane of the larger one [m], …
double merge_max_gap = 0.50
… and they are spatially adjacent: some representatives of both lie within (roughly) this distance [m].
mrpt::math::TPoint3D viewpoint = {0, 0, 0}
Normals are oriented to point towards this point (i.e. the viewpoint is on the positive side, n.v > d). For a map, the origin is usually the first sensor pose.
std::size_t parallelization_grain_size = 4096
When TBB is enabled, the grain size for parallel loops.