38 #ifndef PCL_REGISTRATION_IMPL_INCREMENTAL_REGISTRATION_HPP_
39 #define PCL_REGISTRATION_IMPL_INCREMENTAL_REGISTRATION_HPP_
43 namespace registration {
45 template <
typename Po
intT,
typename Scalar>
47 : delta_transform_(
Matrix4::Identity()), abs_transform_(
Matrix4::Identity())
50 template <
typename Po
intT,
typename Scalar>
55 assert(registration_);
59 abs_transform_ = delta_transform_ = delta_estimate;
63 registration_->setInputSource(cloud);
64 registration_->setInputTarget(last_cloud_);
68 registration_->align(p, delta_estimate);
71 bool converged = registration_->hasConverged();
74 delta_transform_ = registration_->getFinalTransformation();
75 abs_transform_ *= delta_transform_;
82 template <
typename Po
intT,
typename Scalar>
86 return (delta_transform_);
89 template <
typename Po
intT,
typename Scalar>
93 return (abs_transform_);
96 template <
typename Po
intT,
typename Scalar>
101 delta_transform_ = abs_transform_ = Matrix4::Identity();
104 template <
typename Po
intT,
typename Scalar>
108 registration_ = registration;
PointCloud represents the base class in PCL for storing collections of 3D points.
void setRegistration(RegistrationPtr)
Set registration instance used to align clouds.
bool registerCloud(const PointCloudConstPtr &cloud, const Matrix4 &delta_estimate=Matrix4::Identity())
Register new point cloud incrementally.
Matrix4 getDeltaTransform() const
Get estimated transform between the last two registered clouds.
Matrix4 getAbsoluteTransform() const
Get estimated overall transform.
typename pcl::PointCloud< PointT >::ConstPtr PointCloudConstPtr
typename pcl::Registration< PointT, PointT, Scalar >::Ptr RegistrationPtr
void reset()
Reset incremental Registration without resetting registration_.
IncrementalRegistration()
typename pcl::Registration< PointT, PointT, Scalar >::Matrix4 Matrix4