28#ifndef UTIL3D_CORRESPONDENCES_H_
29#define UTIL3D_CORRESPONDENCES_H_
31#include <rtabmap/core/rtabmap_core_export.h>
33#include <pcl/point_cloud.h>
34#include <pcl/point_types.h>
35#include <opencv2/core/version.hpp>
36#if CV_MAJOR_VERSION < 5
37#include <opencv2/features2d/features2d.hpp>
39#include <opencv2/features.hpp>
70 const std::multimap<int, pcl::PointXYZ> & words2,
71 pcl::PointCloud<pcl::PointXYZ> & cloud1,
72 pcl::PointCloud<pcl::PointXYZ> & cloud2);
96 const std::multimap<int, pcl::PointXYZ> & words2,
97 pcl::PointCloud<pcl::PointXYZ> & cloud1,
98 pcl::PointCloud<pcl::PointXYZ> & cloud2);
127 const cv::Mat & depthImage1,
128 const cv::Mat & depthImage2,
132 pcl::PointCloud<pcl::PointXYZ> & cloud1,
133 pcl::PointCloud<pcl::PointXYZ> & cloud2);
153 const pcl::PointCloud<pcl::PointXYZ> & cloud1,
154 const pcl::PointCloud<pcl::PointXYZ> & cloud2,
155 pcl::PointCloud<pcl::PointXYZ> & inliers1,
156 pcl::PointCloud<pcl::PointXYZ> & inliers2);
170 const pcl::PointCloud<pcl::PointXYZRGB> & cloud1,
171 const pcl::PointCloud<pcl::PointXYZRGB> & cloud2,
172 pcl::PointCloud<pcl::PointXYZ> & inliers1,
173 pcl::PointCloud<pcl::PointXYZ> & inliers2);
187 const std::multimap<int, pcl::PointXYZ> & wordsB);
207void RTABMAP_CORE_EXPORT
filterMaxDepth(pcl::PointCloud<pcl::PointXYZ> & inliers1,
208 pcl::PointCloud<pcl::PointXYZ> & inliers2,
211 bool removeDuplicates);
230 const std::multimap<int, cv::KeyPoint> & wordsA,
231 const std::multimap<int, cv::KeyPoint> & wordsB,
232 std::list<std::pair<cv::Point2f, cv::Point2f> > & pairs);
251 const std::multimap<int, cv::Point3f> & words1,
252 const std::multimap<int, cv::Point3f> & words2,
253 std::vector<cv::Point3f> & inliers1,
254 std::vector<cv::Point3f> & inliers2,
256 std::vector<int> * uniqueCorrespondences = 0);
274 const std::map<int, cv::Point3f> & words1,
275 const std::map<int, cv::Point3f> & words2,
276 std::vector<cv::Point3f> & inliers1,
277 std::vector<cv::Point3f> & inliers2,
279 std::vector<int> * correspondences = 0);
void RTABMAP_CORE_EXPORT findCorrespondences(const std::multimap< int, cv::KeyPoint > &wordsA, const std::multimap< int, cv::KeyPoint > &wordsB, std::list< std::pair< cv::Point2f, cv::Point2f > > &pairs)
Finds 2D point correspondences between two sets of keypoints based on matching word IDs.
void RTABMAP_CORE_EXPORT extractXYZCorrespondences(const std::multimap< int, pcl::PointXYZ > &words1, const std::multimap< int, pcl::PointXYZ > &words2, pcl::PointCloud< pcl::PointXYZ > &cloud1, pcl::PointCloud< pcl::PointXYZ > &cloud2)
Extracts 3D point correspondences between two sets of labeled 3D points.
void RTABMAP_CORE_EXPORT filterMaxDepth(pcl::PointCloud< pcl::PointXYZ > &inliers1, pcl::PointCloud< pcl::PointXYZ > &inliers2, float maxDepth, char depthAxis, bool removeDuplicates)
Filters pairs of 3D points by maximum depth along a specified axis and optionally removes duplicates.
void RTABMAP_CORE_EXPORT extractXYZCorrespondencesRANSAC(const std::multimap< int, pcl::PointXYZ > &words1, const std::multimap< int, pcl::PointXYZ > &words2, pcl::PointCloud< pcl::PointXYZ > &cloud1, pcl::PointCloud< pcl::PointXYZ > &cloud2)
Extracts reliable 3D point correspondences between two sets of labeled 3D points using RANSAC filteri...
int RTABMAP_CORE_EXPORT countUniquePairs(const std::multimap< int, pcl::PointXYZ > &wordsA, const std::multimap< int, pcl::PointXYZ > &wordsB)
Counts the number of unique 3D point correspondences between two sets of word-indexed features.