RTAB-Map 0.23.10
Real-Time Appearance-Based Mapping
Loading...
Searching...
No Matches
Compute Variance and Correspondences of Two Point Clouds

Computes the geometric variance and number of valid correspondences between two point clouds. More...

Functions

void RTABMAP_CORE_EXPORT rtabmap::util3d::computeVarianceAndCorrespondences (const pcl::PointCloud< pcl::PointNormal >::ConstPtr &cloudA, const pcl::PointCloud< pcl::PointNormal >::ConstPtr &cloudB, double maxCorrespondenceDistance, double maxCorrespondenceAngle, double &variance, int &correspondencesOut, bool reciprocal)
 Compute with variance and correspondences of pcl::PointNormal point cloud type.
 
void RTABMAP_CORE_EXPORT rtabmap::util3d::computeVarianceAndCorrespondences (const pcl::PointCloud< pcl::PointXYZINormal >::ConstPtr &cloudA, const pcl::PointCloud< pcl::PointXYZINormal >::ConstPtr &cloudB, double maxCorrespondenceDistance, double maxCorrespondenceAngle, double &variance, int &correspondencesOut, bool reciprocal)
 Compute with variance and correspondences of pcl::PointXYZINormal point cloud type.
 
void RTABMAP_CORE_EXPORT rtabmap::util3d::computeVarianceAndCorrespondences (const pcl::PointCloud< pcl::PointXYZ >::ConstPtr &cloudA, const pcl::PointCloud< pcl::PointXYZ >::ConstPtr &cloudB, double maxCorrespondenceDistance, double &variance, int &correspondencesOut, bool reciprocal)
 Compute with variance and correspondences of pcl::PointXYZ point cloud type.
 
void RTABMAP_CORE_EXPORT rtabmap::util3d::computeVarianceAndCorrespondences (const pcl::PointCloud< pcl::PointXYZI >::ConstPtr &cloudA, const pcl::PointCloud< pcl::PointXYZI >::ConstPtr &cloudB, double maxCorrespondenceDistance, double &variance, int &correspondencesOut, bool reciprocal)
 Compute with variance and correspondences of pcl::PointXYZI point cloud type.
 

Detailed Description

Computes the geometric variance and number of valid correspondences between two point clouds.

This function estimates correspondences between two point clouds and computes a variance measure (based on squared median error) for the inlier correspondences. Optionally filters correspondences by normal alignment angle if the point cloud has normals.

The correspondence estimation uses PCL's reciprocal correspondence logic by default. The target and source clouds are automatically chosen based on their sizes (the larger becomes the target to ensure optimal matching behavior).

Parameters
cloudAFirst input point cloud (used interchangeably with cloudB for matching).
cloudBSecond input point cloud.
maxCorrespondenceDistanceMaximum allowable Euclidean distance between correspondences.
maxCorrespondenceAngleMaximum angle (in radians) between normals for correspondences to be considered valid. If ≤ 0, angle filtering is disabled.
[out]varianceOutput variance value (estimated using 2.1981 × median squared distance of inliers).
[out]correspondencesOutOutput number of correspondences that passed all filters (distance and optional angle).
reciprocalIf true, use reciprocal correspondences.
Note
This function chooses the target/source roles based on cloud size (the larger becomes the target).
The normal comparison is only applied if maxCorrespondenceAngle > 0.
The computed variance is based on a robust estimator using the median squared distance of correspondences.
See also
pcl::registration::CorrespondenceEstimation