40#ifndef PCL_REGISTRATION_IMPL_CORRESPONDENCE_ESTIMATION_BACK_PROJECTION_HPP_
41#define PCL_REGISTRATION_IMPL_CORRESPONDENCE_ESTIMATION_BACK_PROJECTION_HPP_
43#include <pcl/common/copy_point.h>
47namespace registration {
49template <
typename Po
intSource,
typename Po
intTarget,
typename NormalT,
typename Scalar>
54 if (!source_normals_ || !target_normals_) {
55 PCL_WARN(
"[pcl::registration::%s::initCompute] Datasets containing normals for "
56 "source/target have not been given!\n",
57 getClassName().
c_str());
66template <
typename Po
intSource,
typename Po
intTarget,
typename NormalT,
typename Scalar>
74 correspondences.resize(indices_->size());
90 for (
const auto&
idx_i : (*indices_)) {
95 float min_dist = std::numeric_limits<float>::max();
101 (*source_normals_)[
idx_i].normal_y *
103 (*source_normals_)[
idx_i].normal_z *
125 for (
const auto&
idx_i : (*indices_)) {
130 float min_dist = std::numeric_limits<float>::max();
141 (*source_normals_)[
idx_i].normal_y *
143 (*source_normals_)[
idx_i].normal_z *
165template <
typename Po
intSource,
typename Po
intTarget,
typename NormalT,
typename Scalar>
175 if (!initComputeReciprocal())
178 correspondences.resize(indices_->size());
197 for (
const auto&
idx_i : (*indices_)) {
202 float min_dist = std::numeric_limits<float>::max();
208 (*source_normals_)[
idx_i].normal_y *
210 (*source_normals_)[
idx_i].normal_z *
224 tree_reciprocal_->nearestKSearch(
240 for (
const auto&
idx_i : (*indices_)) {
245 float min_dist = std::numeric_limits<float>::max();
256 (*source_normals_)[
idx_i].normal_y *
258 (*source_normals_)[
idx_i].normal_z *
272 tree_reciprocal_->nearestKSearch(
Iterator class for point clouds with or without given indices.
std::size_t size() const
Size of the range the iterator is going through.
bool initCompute()
Internal computation initialization.
virtual void determineReciprocalCorrespondences(pcl::Correspondences &correspondences, double max_distance=std::numeric_limits< double >::max())
Determine the reciprocal correspondences between input and target cloud.
void determineCorrespondences(pcl::Correspondences &correspondences, double max_distance=std::numeric_limits< double >::max())
Determine the correspondences between input and target cloud.
Abstract CorrespondenceEstimationBase class.
void copyPoint(const PointInT &point_in, PointOutT &point_out)
Copy the fields of a source point into a target point.
std::vector< pcl::Correspondence, Eigen::aligned_allocator< pcl::Correspondence > > Correspondences
Correspondence represents a match between two entities (e.g., points, descriptors,...