41#ifndef PCL_REGISTRATION_IMPL_CORRESPONDENCE_ESTIMATION_NORMAL_SHOOTING_H_
42#define PCL_REGISTRATION_IMPL_CORRESPONDENCE_ESTIMATION_NORMAL_SHOOTING_H_
44#include <pcl/common/copy_point.h>
48namespace registration {
50template <
typename Po
intSource,
typename Po
intTarget,
typename NormalT,
typename Scalar>
55 if (!source_normals_) {
56 PCL_WARN(
"[pcl::registration::%s::initCompute] Datasets containing normals for "
57 "source have not been given!\n",
58 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 double min_dist = std::numeric_limits<double>::max();
106 Eigen::Vector3d N(normal.normal_x, normal.normal_y, normal.normal_z);
107 Eigen::Vector3d
V(
pt.x,
pt.y,
pt.z);
108 Eigen::Vector3d C = N.cross(
V);
111 double dist = C.dot(C);
130 for (
const auto&
idx_i : (*indices_)) {
135 double min_dist = std::numeric_limits<double>::max();
151 Eigen::Vector3d N(normal.normal_x, normal.normal_y, normal.normal_z);
152 Eigen::Vector3d
V(
pt.x,
pt.y,
pt.z);
153 Eigen::Vector3d C = N.cross(
V);
156 double dist = C.dot(C);
175template <
typename Po
intSource,
typename Po
intTarget,
typename NormalT,
typename Scalar>
186 if (!initComputeReciprocal())
189 correspondences.resize(indices_->size());
208 for (
const auto&
idx_i : (*indices_)) {
213 double min_dist = std::numeric_limits<double>::max();
224 Eigen::Vector3d N(normal.normal_x, normal.normal_y, normal.normal_z);
225 Eigen::Vector3d
V(
pt.x,
pt.y,
pt.z);
226 Eigen::Vector3d C = N.cross(
V);
229 double dist = C.dot(C);
240 tree_reciprocal_->nearestKSearch(
257 for (
const auto&
idx_i : (*indices_)) {
262 double min_dist = std::numeric_limits<double>::max();
278 Eigen::Vector3d N(normal.normal_x, normal.normal_y, normal.normal_z);
279 Eigen::Vector3d
V(
pt.x,
pt.y,
pt.z);
280 Eigen::Vector3d C = N.cross(
V);
283 double dist = C.dot(C);
294 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.
Abstract CorrespondenceEstimationBase class.
void determineReciprocalCorrespondences(pcl::Correspondences &correspondences, double max_distance=std::numeric_limits< double >::max()) override
Determine the reciprocal correspondences between input and target cloud.
void determineCorrespondences(pcl::Correspondences &correspondences, double max_distance=std::numeric_limits< double >::max()) override
Determine the correspondences between input and target cloud.
bool initCompute()
Internal computation initialization.
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,...
A point structure representing normal coordinates and the surface curvature estimate.