class mp2p_icp::Matcher_Adaptive
Overview
Pointcloud matcher: adaptive algorithm automatically discarding outliers, and creating point-to-plane, point-to-line, or point-to-point pairings.
Finds pairings between the local and global input metric maps.
By default, each local point layer is matched against the layer with the same name in the global map, unless specified otherwise in the base class member pt2pt_layer_matches. Refer to example configuration YAML files for example configurations.
#include <Matcher_Adaptive.h> class Matcher_Adaptive: public mp2p_icp::Matcher_Points_Base { public: // fields std::map<std::string, std::set<std::string>> pt2pt_layer_matches; bool allowMatchAlreadyMatchedPoints_ = false; bool allowMatchAlreadyMatchedGlobalPoints_ = false; std::optional<std::size_t> kdtree_leaf_max_points_; float bounding_box_intersection_check_epsilon_ = 0.20f; // construction Matcher_Adaptive(); Matcher_Adaptive( double ConfidenceInterval, double FirstToSecondDistanceMax, double AbsoluteMaxSearchDistance ); // methods virtual void initialize(const mrpt::containers::yaml& params); };
Inherited Members
public: // structs struct TransformedLocalPointCloud; // fields uint32_t runUpToIteration = 0; // methods Parameterizable& operator = (const Parameterizable&); Parameterizable& operator = (Parameterizable&&); virtual void initialize(const mrpt::containers::yaml& params); virtual bool match( const metric_map_t& pcGlobal, const metric_map_t& pcLocal, const mrpt::poses::CPose3D& localPose, const MatchContext& mc, MatchState& ms, Pairings& out ) const; virtual void initialize(const mrpt::containers::yaml& params);
Fields
std::map<std::string, std::set<std::string>> pt2pt_layer_matches
Explicit set of local point layers to match against each global point layer. If empty, each local layer is matched against the global layer with the identical name. This field can be loaded from a configuration file, see initialize().
Map is: layers[“globalLayer”] = {“localLayer1”, “localLayer2”, …};
bool allowMatchAlreadyMatchedPoints_ = false
Whether to allow matching local points that have been already matched by a former Matcher instance in the pipeline.
bool allowMatchAlreadyMatchedGlobalPoints_ = false
If false, global map points can be paired exclusively against one local point.
std::optional<std::size_t> kdtree_leaf_max_points_
Maximum number of points per tree node. Not set: nanoflann default.
float bounding_box_intersection_check_epsilon_ = 0.20f
The additional “margin” in all axes (x,y,z) that bounding box is enlarged for checking the feasibility of pairings to exist.
Methods
virtual void initialize(const mrpt::containers::yaml& params)
confidenceInterval: Inliers top-confidence interval. (0-1)firstToSecondDistanceMax: Maximum ratio between the 1st and 2nd closest pairing errors.absoluteMaxSearchDistance: Maximum neighbor search radius [meters]minimumCorrDist: Lower bound for the adaptive inliers distance [meters][optional]planeMinimumDistance: Maximum point-to-plane distance to accept a plane pairing [meters][optional]
The three distance parameters above accept dynamic formulas, e.g. “2.0*ADAPTIVE_THRESHOLD_SIGMA”.
Plus: the parameters of Matcher_Points_Base::initialize()