48 namespace registration {
55 if (correspondences.empty())
58 double sum = 0, sq_sum = 0;
60 for (
const auto& correspondence : correspondences) {
61 sum += correspondence.distance;
62 sq_sum += correspondence.distance * correspondence.distance;
64 mean = sum /
static_cast<double>(correspondences.size());
65 double variance = (sq_sum - sum * sum /
static_cast<double>(correspondences.size())) /
66 static_cast<double>(correspondences.size() - 1);
67 stddev = sqrt(variance);
73 indices.resize(correspondences.size());
74 for (std::size_t i = 0; i < correspondences.size(); ++i)
75 indices[i] = correspondences[i].index_query;
81 indices.resize(correspondences.size());
82 for (std::size_t i = 0; i < correspondences.size(); ++i)
83 indices[i] = correspondences[i].index_match;
void getCorDistMeanStd(const pcl::Correspondences &correspondences, double &mean, double &stddev)
calculates the mean and standard deviation of descriptor distances from correspondences
void getMatchIndices(const pcl::Correspondences &correspondences, pcl::Indices &indices)
extracts the match indices
void getQueryIndices(const pcl::Correspondences &correspondences, pcl::Indices &indices)
extracts the query indices
std::vector< pcl::Correspondence, Eigen::aligned_allocator< pcl::Correspondence > > Correspondences
IndicesAllocator<> Indices
Type used for indices in PCL.