icp.h
/*
* Software License Agreement (BSD License)
*
* Point Cloud Library (PCL) - www.pointclouds.org
* Copyright (c) 2010, Willow Garage, Inc.
* Copyright (c) 2012-, Open Perception, Inc.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of the copyright holder(s) nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
*
*/
#pragma once
// PCL includes
#include <pcl/registration/correspondence_estimation.h>
#include <pcl/registration/default_convergence_criteria.h>
#include <pcl/registration/registration.h>
#include <pcl/registration/transformation_estimation_point_to_plane_lls.h>
#include <pcl/registration/transformation_estimation_svd.h>
#include <pcl/registration/transformation_estimation_symmetric_point_to_plane_lls.h>
#include <pcl/memory.h> // for dynamic_pointer_cast, pcl::make_shared, shared_ptr
namespace pcl {
/** \brief @b IterativeClosestPoint provides a base implementation of the Iterative
* Closest Point algorithm. The transformation is estimated based on Singular Value
* Decomposition (SVD).
*
* The algorithm has several termination criteria:
*
* <ol>
* <li>Number of iterations has reached the maximum user imposed number of iterations
* (via \ref setMaximumIterations)</li> <li>The epsilon (difference) between the
* previous transformation and the current estimated transformation is smaller than an
* user imposed value (via \ref setTransformationEpsilon)</li> <li>The sum of Euclidean
* squared errors is smaller than a user defined threshold (via \ref
* setEuclideanFitnessEpsilon)</li>
* </ol>
*
*
* Usage example:
* \code
* IterativeClosestPoint<PointXYZ, PointXYZ> icp;
* // Set the input source and target
* icp.setInputSource (cloud_source);
* icp.setInputTarget (cloud_target);
*
* // Set the max correspondence distance to 5cm (e.g., correspondences with higher
* // distances will be ignored)
* icp.setMaxCorrespondenceDistance (0.05);
* // Set the maximum number of iterations (criterion 1)
* icp.setMaximumIterations (50);
* // Set the transformation epsilon (criterion 2)
* icp.setTransformationEpsilon (1e-8);
* // Set the euclidean distance difference epsilon (criterion 3)
* icp.setEuclideanFitnessEpsilon (1);
*
* // Perform the alignment
* icp.align (cloud_source_registered);
*
* // Obtain the transformation that aligned cloud_source to cloud_source_registered
* Eigen::Matrix4f transformation = icp.getFinalTransformation ();
* \endcode
*
* \author Radu B. Rusu, Michael Dixon
* \ingroup registration
*/
template <typename PointSource, typename PointTarget, typename Scalar = float>
class IterativeClosestPoint : public Registration<PointSource, PointTarget, Scalar> {
public:
using PointCloudSource =
typename Registration<PointSource, PointTarget, Scalar>::PointCloudSource;
using PointCloudSourcePtr = typename PointCloudSource::Ptr;
using PointCloudSourceConstPtr = typename PointCloudSource::ConstPtr;
using PointCloudTarget =
typename Registration<PointSource, PointTarget, Scalar>::PointCloudTarget;
using PointCloudTargetPtr = typename PointCloudTarget::Ptr;
using PointCloudTargetConstPtr = typename PointCloudTarget::ConstPtr;
using PointIndicesPtr = PointIndices::Ptr;
using PointIndicesConstPtr = PointIndices::ConstPtr;
using Ptr = shared_ptr<IterativeClosestPoint<PointSource, PointTarget, Scalar>>;
using ConstPtr =
shared_ptr<const IterativeClosestPoint<PointSource, PointTarget, Scalar>>;
using Registration<PointSource, PointTarget, Scalar>::reg_name_;
using Registration<PointSource, PointTarget, Scalar>::getClassName;
using Registration<PointSource, PointTarget, Scalar>::input_;
using Registration<PointSource, PointTarget, Scalar>::indices_;
using Registration<PointSource, PointTarget, Scalar>::target_;
using Registration<PointSource, PointTarget, Scalar>::nr_iterations_;
using Registration<PointSource, PointTarget, Scalar>::max_iterations_;
using Registration<PointSource, PointTarget, Scalar>::previous_transformation_;
using Registration<PointSource, PointTarget, Scalar>::final_transformation_;
using Registration<PointSource, PointTarget, Scalar>::transformation_;
using Registration<PointSource, PointTarget, Scalar>::transformation_epsilon_;
using Registration<PointSource, PointTarget, Scalar>::
transformation_rotation_epsilon_;
using Registration<PointSource, PointTarget, Scalar>::converged_;
using Registration<PointSource, PointTarget, Scalar>::corr_dist_threshold_;
using Registration<PointSource, PointTarget, Scalar>::inlier_threshold_;
using Registration<PointSource, PointTarget, Scalar>::min_number_correspondences_;
using Registration<PointSource, PointTarget, Scalar>::update_visualizer_;
using Registration<PointSource, PointTarget, Scalar>::euclidean_fitness_epsilon_;
using Registration<PointSource, PointTarget, Scalar>::correspondences_;
using Registration<PointSource, PointTarget, Scalar>::transformation_estimation_;
using Registration<PointSource, PointTarget, Scalar>::correspondence_estimation_;
using Registration<PointSource, PointTarget, Scalar>::correspondence_rejectors_;
typename pcl::registration::DefaultConvergenceCriteria<Scalar>::Ptr
convergence_criteria_;
using Matrix4 = typename Registration<PointSource, PointTarget, Scalar>::Matrix4;
/** \brief Empty constructor. */
IterativeClosestPoint()
: x_idx_offset_(0)
, y_idx_offset_(0)
, z_idx_offset_(0)
, nx_idx_offset_(0)
, ny_idx_offset_(0)
, nz_idx_offset_(0)
, use_reciprocal_correspondence_(false)
, source_has_normals_(false)
, target_has_normals_(false)
{
reg_name_ = "IterativeClosestPoint";
transformation_estimation_.reset(
new pcl::registration::
TransformationEstimationSVD<PointSource, PointTarget, Scalar>());
correspondence_estimation_.reset(
new pcl::registration::
CorrespondenceEstimation<PointSource, PointTarget, Scalar>);
convergence_criteria_.reset(
new pcl::registration::DefaultConvergenceCriteria<Scalar>(
nr_iterations_, transformation_, *correspondences_));
};
/**
* \brief Due to `convergence_criteria_` holding references to the class members,
* it is tricky to correctly implement its copy and move operations correctly. This
* can result in subtle bugs and to prevent them, these operations for ICP have
* been disabled.
*
* \todo: remove deleted ctors and assignments operations after resolving the issue
*/
IterativeClosestPoint(const IterativeClosestPoint&) = delete;
IterativeClosestPoint(IterativeClosestPoint&&) = delete;
IterativeClosestPoint&
operator=(const IterativeClosestPoint&) = delete;
IterativeClosestPoint&
operator=(IterativeClosestPoint&&) = delete;
/** \brief Empty destructor */
~IterativeClosestPoint() {}
/** \brief Returns a pointer to the DefaultConvergenceCriteria used by the
* IterativeClosestPoint class. This allows to check the convergence state after the
* align() method as well as to configure DefaultConvergenceCriteria's parameters not
* available through the ICP API before the align() method is called. Please note that
* the align method sets max_iterations_, euclidean_fitness_epsilon_ and
* transformation_epsilon_ and therefore overrides the default / set values of the
* DefaultConvergenceCriteria instance. \return Pointer to the IterativeClosestPoint's
* DefaultConvergenceCriteria.
*/
inline typename pcl::registration::DefaultConvergenceCriteria<Scalar>::Ptr
getConvergeCriteria()
{
return convergence_criteria_;
}
/** \brief Provide a pointer to the input source
* (e.g., the point cloud that we want to align to the target)
*
* \param[in] cloud the input point cloud source
*/
void
setInputSource(const PointCloudSourceConstPtr& cloud) override
{
Registration<PointSource, PointTarget, Scalar>::setInputSource(cloud);
const auto fields = pcl::getFields<PointSource>();
source_has_normals_ = false;
for (const auto& field : fields) {
if (field.name == "x")
x_idx_offset_ = field.offset;
else if (field.name == "y")
y_idx_offset_ = field.offset;
else if (field.name == "z")
z_idx_offset_ = field.offset;
else if (field.name == "normal_x") {
source_has_normals_ = true;
nx_idx_offset_ = field.offset;
}
else if (field.name == "normal_y") {
source_has_normals_ = true;
ny_idx_offset_ = field.offset;
}
else if (field.name == "normal_z") {
source_has_normals_ = true;
nz_idx_offset_ = field.offset;
}
}
}
/** \brief Provide a pointer to the input target
* (e.g., the point cloud that we want to align to the target)
*
* \param[in] cloud the input point cloud target
*/
void
setInputTarget(const PointCloudTargetConstPtr& cloud) override
{
Registration<PointSource, PointTarget, Scalar>::setInputTarget(cloud);
const auto fields = pcl::getFields<PointSource>();
target_has_normals_ = false;
for (const auto& field : fields) {
if (field.name == "normal_x" || field.name == "normal_y" ||
field.name == "normal_z") {
target_has_normals_ = true;
break;
}
}
}
/** \brief Set whether to use reciprocal correspondence or not
*
* \param[in] use_reciprocal_correspondence whether to use reciprocal correspondence
* or not
*/
inline void
setUseReciprocalCorrespondences(bool use_reciprocal_correspondence)
{
use_reciprocal_correspondence_ = use_reciprocal_correspondence;
}
/** \brief Obtain whether reciprocal correspondence are used or not */
inline bool
getUseReciprocalCorrespondences() const
{
return (use_reciprocal_correspondence_);
}
protected:
/** \brief Apply a rigid transform to a given dataset. Here we check whether
* the dataset has surface normals in addition to XYZ, and rotate normals as well.
* \param[in] input the input point cloud
* \param[out] output the resultant output point cloud
* \param[in] transform a 4x4 rigid transformation
* \note Can be used with cloud_in equal to cloud_out
*/
virtual void
transformCloud(const PointCloudSource& input,
PointCloudSource& output,
const Matrix4& transform);
/** \brief Rigid transformation computation method with initial guess.
* \param output the transformed input point cloud dataset using the rigid
* transformation found \param guess the initial guess of the transformation to
* compute
*/
void
computeTransformation(PointCloudSource& output, const Matrix4& guess) override;
/** \brief Looks at the Estimators and Rejectors and determines whether their
* blob-setter methods need to be called */
virtual void
determineRequiredBlobData();
/** \brief XYZ fields offset. */
std::size_t x_idx_offset_, y_idx_offset_, z_idx_offset_;
/** \brief Normal fields offset. */
std::size_t nx_idx_offset_, ny_idx_offset_, nz_idx_offset_;
/** \brief The correspondence type used for correspondence estimation. */
bool use_reciprocal_correspondence_;
/** \brief Internal check whether source dataset has normals or not. */
bool source_has_normals_;
/** \brief Internal check whether target dataset has normals or not. */
bool target_has_normals_;
/** \brief Checks for whether estimators and rejectors need various data */
bool need_source_blob_, need_target_blob_;
};
/** \brief @b IterativeClosestPointWithNormals is a special case of
* IterativeClosestPoint, that uses a transformation estimated based on
* Point to Plane distances by default.
*
* By default, this implementation uses the traditional point to plane objective
* and computes point to plane distances using the normals of the target point
* cloud. It also provides the option (through setUseSymmetricObjective) of
* using the symmetric objective function of [Rusinkiewicz 2019]. This objective
* uses the normals of both the source and target point cloud and has a similar
* computational cost to the traditional point to plane objective while also
* offering improved convergence speed and a wider basin of convergence.
*
* Note that this implementation not demean the point clouds which can lead
* to increased numerical error. If desired, a user can demean the point cloud,
* run iterative closest point, and composite the resulting ICP transformation
* with the translations from demeaning to obtain a transformation between
* the original point clouds.
*
* \author Radu B. Rusu, Matthew Cong
* \ingroup registration
*/
template <typename PointSource, typename PointTarget, typename Scalar = float>
class IterativeClosestPointWithNormals
: public IterativeClosestPoint<PointSource, PointTarget, Scalar> {
public:
using PointCloudSource = typename IterativeClosestPoint<PointSource,
PointTarget,
Scalar>::PointCloudSource;
using PointCloudTarget = typename IterativeClosestPoint<PointSource,
PointTarget,
Scalar>::PointCloudTarget;
using Matrix4 =
typename IterativeClosestPoint<PointSource, PointTarget, Scalar>::Matrix4;
using IterativeClosestPoint<PointSource, PointTarget, Scalar>::reg_name_;
using IterativeClosestPoint<PointSource, PointTarget, Scalar>::
transformation_estimation_;
using IterativeClosestPoint<PointSource, PointTarget, Scalar>::
correspondence_rejectors_;
using Ptr = shared_ptr<IterativeClosestPoint<PointSource, PointTarget, Scalar>>;
using ConstPtr =
shared_ptr<const IterativeClosestPoint<PointSource, PointTarget, Scalar>>;
/** \brief Empty constructor. */
IterativeClosestPointWithNormals()
{
reg_name_ = "IterativeClosestPointWithNormals";
setUseSymmetricObjective(false);
setEnforceSameDirectionNormals(true);
// correspondence_rejectors_.add
};
/** \brief Empty destructor */
virtual ~IterativeClosestPointWithNormals() {}
/** \brief Set whether to use a symmetric objective function or not
*
* \param[in] use_symmetric_objective whether to use a symmetric objective function or
* not
*/
inline void
setUseSymmetricObjective(bool use_symmetric_objective)
{
use_symmetric_objective_ = use_symmetric_objective;
if (use_symmetric_objective_) {
auto symmetric_transformation_estimation = pcl::make_shared<
pcl::registration::TransformationEstimationSymmetricPointToPlaneLLS<
PointSource,
PointTarget,
Scalar>>();
symmetric_transformation_estimation->setEnforceSameDirectionNormals(
enforce_same_direction_normals_);
transformation_estimation_ = symmetric_transformation_estimation;
}
else {
transformation_estimation_.reset(
new pcl::registration::TransformationEstimationPointToPlaneLLS<PointSource,
PointTarget,
Scalar>());
}
}
/** \brief Obtain whether a symmetric objective is used or not */
inline bool
getUseSymmetricObjective() const
{
return use_symmetric_objective_;
}
/** \brief Set whether or not to negate source or target normals on a per-point basis
* such that they point in the same direction. Only applicable to the symmetric
* objective function.
*
* \param[in] enforce_same_direction_normals whether to negate source or target
* normals on a per-point basis such that they point in the same direction.
*/
inline void
setEnforceSameDirectionNormals(bool enforce_same_direction_normals)
{
enforce_same_direction_normals_ = enforce_same_direction_normals;
auto symmetric_transformation_estimation = dynamic_pointer_cast<
pcl::registration::TransformationEstimationSymmetricPointToPlaneLLS<PointSource,
PointTarget,
Scalar>>(
transformation_estimation_);
if (symmetric_transformation_estimation)
symmetric_transformation_estimation->setEnforceSameDirectionNormals(
enforce_same_direction_normals_);
}
/** \brief Obtain whether source or target normals are negated on a per-point basis
* such that they point in the same direction or not */
inline bool
getEnforceSameDirectionNormals() const
{
return enforce_same_direction_normals_;
}
protected:
/** \brief Apply a rigid transform to a given dataset
* \param[in] input the input point cloud
* \param[out] output the resultant output point cloud
* \param[in] transform a 4x4 rigid transformation
* \note Can be used with cloud_in equal to cloud_out
*/
virtual void
transformCloud(const PointCloudSource& input,
PointCloudSource& output,
const Matrix4& transform);
/** \brief Type of objective function (asymmetric vs. symmetric) used for transform
* estimation */
bool use_symmetric_objective_;
/** \brief Whether or not to negate source and/or target normals such that they point
* in the same direction in the symmetric objective function */
bool enforce_same_direction_normals_;
};
} // namespace pcl
#include <pcl/registration/impl/icp.hpp>
pcl::IterativeClosestPoint
IterativeClosestPoint provides a base implementation of the Iterative Closest Point algorithm.
Definition: icp.h:97
pcl::IterativeClosestPoint::PointCloudSourceConstPtr
typename PointCloudSource::ConstPtr PointCloudSourceConstPtr
Definition: icp.h:102
pcl::IterativeClosestPoint::Matrix4
typename Registration< PointSource, PointTarget, Scalar >::Matrix4 Matrix4
Definition: icp.h:142
pcl::IterativeClosestPoint::y_idx_offset_
std::size_t y_idx_offset_
Definition: icp.h:299
pcl::IterativeClosestPoint::nz_idx_offset_
std::size_t nz_idx_offset_
Definition: icp.h:302
pcl::IterativeClosestPoint::use_reciprocal_correspondence_
bool use_reciprocal_correspondence_
The correspondence type used for correspondence estimation.
Definition: icp.h:305
pcl::IterativeClosestPoint::setUseReciprocalCorrespondences
void setUseReciprocalCorrespondences(bool use_reciprocal_correspondence)
Set whether to use reciprocal correspondence or not.
Definition: icp.h:260
pcl::IterativeClosestPoint::operator=
IterativeClosestPoint & operator=(const IterativeClosestPoint &)=delete
pcl::IterativeClosestPoint::PointCloudTargetConstPtr
typename PointCloudTarget::ConstPtr PointCloudTargetConstPtr
Definition: icp.h:107
pcl::IterativeClosestPoint::need_target_blob_
bool need_target_blob_
Definition: icp.h:313
pcl::IterativeClosestPoint::PointCloudTarget
typename Registration< PointSource, PointTarget, Scalar >::PointCloudTarget PointCloudTarget
Definition: icp.h:105
pcl::IterativeClosestPoint::ny_idx_offset_
std::size_t ny_idx_offset_
Definition: icp.h:302
pcl::IterativeClosestPoint::Ptr
shared_ptr< IterativeClosestPoint< PointSource, PointTarget, Scalar > > Ptr
Definition: icp.h:112
pcl::IterativeClosestPoint::need_source_blob_
bool need_source_blob_
Checks for whether estimators and rejectors need various data.
Definition: icp.h:313
pcl::IterativeClosestPoint::PointCloudTargetPtr
typename PointCloudTarget::Ptr PointCloudTargetPtr
Definition: icp.h:106
pcl::IterativeClosestPoint::PointCloudSource
typename Registration< PointSource, PointTarget, Scalar >::PointCloudSource PointCloudSource
Definition: icp.h:100
pcl::IterativeClosestPoint::convergence_criteria_
pcl::registration::DefaultConvergenceCriteria< Scalar >::Ptr convergence_criteria_
Definition: icp.h:141
pcl::IterativeClosestPoint::operator=
IterativeClosestPoint & operator=(IterativeClosestPoint &&)=delete
pcl::IterativeClosestPoint::getUseReciprocalCorrespondences
bool getUseReciprocalCorrespondences() const
Obtain whether reciprocal correspondence are used or not.
Definition: icp.h:267
pcl::IterativeClosestPoint::IterativeClosestPoint
IterativeClosestPoint()
Empty constructor.
Definition: icp.h:145
pcl::IterativeClosestPoint::setInputTarget
void setInputTarget(const PointCloudTargetConstPtr &cloud) override
Provide a pointer to the input target (e.g., the point cloud that we want to align to the target)
Definition: icp.h:240
pcl::IterativeClosestPoint::PointIndicesConstPtr
PointIndices::ConstPtr PointIndicesConstPtr
Definition: icp.h:110
pcl::IterativeClosestPoint::source_has_normals_
bool source_has_normals_
Internal check whether source dataset has normals or not.
Definition: icp.h:308
pcl::IterativeClosestPoint::transformCloud
virtual void transformCloud(const PointCloudSource &input, PointCloudSource &output, const Matrix4 &transform)
Apply a rigid transform to a given dataset.
Definition: icp.hpp:50
pcl::IterativeClosestPoint::determineRequiredBlobData
virtual void determineRequiredBlobData()
Looks at the Estimators and Rejectors and determines whether their blob-setter methods need to be cal...
Definition: icp.hpp:267
pcl::IterativeClosestPoint::nx_idx_offset_
std::size_t nx_idx_offset_
Normal fields offset.
Definition: icp.h:302
pcl::IterativeClosestPoint::~IterativeClosestPoint
~IterativeClosestPoint()
Empty destructor.
Definition: icp.h:184
pcl::IterativeClosestPoint::IterativeClosestPoint
IterativeClosestPoint(IterativeClosestPoint &&)=delete
pcl::IterativeClosestPoint::computeTransformation
void computeTransformation(PointCloudSource &output, const Matrix4 &guess) override
Rigid transformation computation method with initial guess.
Definition: icp.hpp:114
pcl::IterativeClosestPoint::PointIndicesPtr
PointIndices::Ptr PointIndicesPtr
Definition: icp.h:109
pcl::IterativeClosestPoint::getConvergeCriteria
pcl::registration::DefaultConvergenceCriteria< Scalar >::Ptr getConvergeCriteria()
Returns a pointer to the DefaultConvergenceCriteria used by the IterativeClosestPoint class.
Definition: icp.h:196
pcl::IterativeClosestPoint::IterativeClosestPoint
IterativeClosestPoint(const IterativeClosestPoint &)=delete
Due to convergence_criteria_ holding references to the class members, it is tricky to correctly imple...
pcl::IterativeClosestPoint::setInputSource
void setInputSource(const PointCloudSourceConstPtr &cloud) override
Provide a pointer to the input source (e.g., the point cloud that we want to align to the target)
Definition: icp.h:207
pcl::IterativeClosestPoint::target_has_normals_
bool target_has_normals_
Internal check whether target dataset has normals or not.
Definition: icp.h:310
pcl::IterativeClosestPoint::PointCloudSourcePtr
typename PointCloudSource::Ptr PointCloudSourcePtr
Definition: icp.h:101
pcl::IterativeClosestPoint::ConstPtr
shared_ptr< const IterativeClosestPoint< PointSource, PointTarget, Scalar > > ConstPtr
Definition: icp.h:114
pcl::IterativeClosestPoint::z_idx_offset_
std::size_t z_idx_offset_
Definition: icp.h:299
pcl::IterativeClosestPoint::x_idx_offset_
std::size_t x_idx_offset_
XYZ fields offset.
Definition: icp.h:299
pcl::IterativeClosestPointWithNormals
IterativeClosestPointWithNormals is a special case of IterativeClosestPoint, that uses a transformati...
Definition: icp.h:339
pcl::IterativeClosestPointWithNormals::ConstPtr
shared_ptr< const IterativeClosestPoint< PointSource, PointTarget, Scalar > > ConstPtr
Definition: icp.h:358
pcl::IterativeClosestPointWithNormals::IterativeClosestPointWithNormals
IterativeClosestPointWithNormals()
Empty constructor.
Definition: icp.h:361
pcl::IterativeClosestPointWithNormals::setUseSymmetricObjective
void setUseSymmetricObjective(bool use_symmetric_objective)
Set whether to use a symmetric objective function or not.
Definition: icp.h:378
pcl::IterativeClosestPointWithNormals::Ptr
shared_ptr< IterativeClosestPoint< PointSource, PointTarget, Scalar > > Ptr
Definition: icp.h:356
pcl::IterativeClosestPointWithNormals::PointCloudSource
typename IterativeClosestPoint< PointSource, PointTarget, Scalar >::PointCloudSource PointCloudSource
Definition: icp.h:343
pcl::IterativeClosestPointWithNormals::getUseSymmetricObjective
bool getUseSymmetricObjective() const
Obtain whether a symmetric objective is used or not.
Definition: icp.h:401
pcl::IterativeClosestPointWithNormals::use_symmetric_objective_
bool use_symmetric_objective_
Type of objective function (asymmetric vs.
Definition: icp.h:449
pcl::IterativeClosestPointWithNormals::setEnforceSameDirectionNormals
void setEnforceSameDirectionNormals(bool enforce_same_direction_normals)
Set whether or not to negate source or target normals on a per-point basis such that they point in th...
Definition: icp.h:414
pcl::IterativeClosestPointWithNormals::transformCloud
virtual void transformCloud(const PointCloudSource &input, PointCloudSource &output, const Matrix4 &transform)
Apply a rigid transform to a given dataset.
Definition: icp.hpp:309
pcl::IterativeClosestPointWithNormals::getEnforceSameDirectionNormals
bool getEnforceSameDirectionNormals() const
Obtain whether source or target normals are negated on a per-point basis such that they point in the ...
Definition: icp.h:430
pcl::IterativeClosestPointWithNormals::Matrix4
typename IterativeClosestPoint< PointSource, PointTarget, Scalar >::Matrix4 Matrix4
Definition: icp.h:348
pcl::IterativeClosestPointWithNormals::~IterativeClosestPointWithNormals
virtual ~IterativeClosestPointWithNormals()
Empty destructor.
Definition: icp.h:370
pcl::IterativeClosestPointWithNormals::enforce_same_direction_normals_
bool enforce_same_direction_normals_
Whether or not to negate source and/or target normals such that they point in the same direction in t...
Definition: icp.h:452
pcl::IterativeClosestPointWithNormals::PointCloudTarget
typename IterativeClosestPoint< PointSource, PointTarget, Scalar >::PointCloudTarget PointCloudTarget
Definition: icp.h:346
pcl::PointCloud< PointSource >
pcl::Registration
Registration represents the base registration class for general purpose, ICP-like methods.
Definition: registration.h:57
pcl::Registration::setInputSource
virtual void setInputSource(const PointCloudSourceConstPtr &cloud)
Provide a pointer to the input source (e.g., the point cloud that we want to align to the target)
Definition: registration.hpp:47
pcl::Registration< PointSource, PointTarget, float >::reg_name_
std::string reg_name_
The registration method name.
Definition: registration.h:558
pcl::Registration< PointSource, PointTarget, float >::transformation_
Matrix4 transformation_
The transformation matrix estimated by the registration method.
Definition: registration.h:586
pcl::Registration::setInputTarget
virtual void setInputTarget(const PointCloudTargetConstPtr &cloud)
Provide a pointer to the input target (e.g., the point cloud that we want to align the input source t...
Definition: registration.hpp:61
pcl::Registration< PointSource, PointTarget, float >::correspondence_estimation_
CorrespondenceEstimationPtr correspondence_estimation_
A CorrespondenceEstimation object, used to estimate correspondences between the source and the target...
Definition: registration.h:639
pcl::Registration< PointSource, PointTarget, float >::nr_iterations_
int nr_iterations_
The number of iterations the internal optimization ran for (used internally).
Definition: registration.h:568
pcl::Registration::Matrix4
Eigen::Matrix< Scalar, 4, 4 > Matrix4
Definition: registration.h:59
pcl::Registration< PointSource, PointTarget, float >::correspondences_
CorrespondencesPtr correspondences_
The set of correspondences determined at this ICP step.
Definition: registration.h:631
pcl::Registration< PointSource, PointTarget, float >::transformation_estimation_
TransformationEstimationPtr transformation_estimation_
A TransformationEstimation object, used to calculate the 4x4 rigid transformation.
Definition: registration.h:635
pcl::Registration< PointSource, PointTarget, float >::transformation_rotation_epsilon_
double transformation_rotation_epsilon_
The maximum rotation difference between two consecutive transformations in order to consider converge...
Definition: registration.h:600
pcl::Registration< PointSource, PointTarget, float >::correspondence_rejectors_
std::vector< CorrespondenceRejectorPtr > correspondence_rejectors_
The list of correspondence rejectors to use.
Definition: registration.h:642
pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >
pcl::registration::DefaultConvergenceCriteria
DefaultConvergenceCriteria represents an instantiation of ConvergenceCriteria, and implements the fol...
Definition: default_convergence_criteria.h:65
pcl::registration::DefaultConvergenceCriteria::Ptr
shared_ptr< DefaultConvergenceCriteria< Scalar > > Ptr
Definition: default_convergence_criteria.h:67
pcl::registration::TransformationEstimationPointToPlaneLLS
TransformationEstimationPointToPlaneLLS implements a Linear Least Squares (LLS) approximation for min...
Definition: transformation_estimation_point_to_plane_lls.h:64
pcl::registration::TransformationEstimationSymmetricPointToPlaneLLS
TransformationEstimationSymmetricPointToPlaneLLS implements a Linear Least Squares (LLS) approximatio...
Definition: transformation_estimation_symmetric_point_to_plane_lls.h:60
memory.h
Defines functions, macros and traits for allocating and using memory.
pcl::registration
Definition: convergence_criteria.h:46
pcl
Definition: convolution.h:46
pcl::make_shared
shared_ptr< T > make_shared(Args &&... args)
Returns a pcl::shared_ptr compliant with type T's allocation policy.
pcl::PointIndices::Ptr
shared_ptr< ::pcl::PointIndices > Ptr
Definition: PointIndices.h:13
pcl::PointIndices::ConstPtr
shared_ptr< const ::pcl::PointIndices > ConstPtr
Definition: PointIndices.h:14