43 #include <pcl/registration/correspondence_rejection.h>
44 #include <pcl/memory.h>
47 namespace registration {
53 template <
typename Po
intT>
64 using Ptr = shared_ptr<CorrespondenceRejectorSampleConsensus<PointT>>;
65 using ConstPtr = shared_ptr<const CorrespondenceRejectorSampleConsensus<PointT>>;
97 inline PointCloudConstPtr
const
113 inline PointCloudConstPtr
const
192 inline Eigen::Matrix4f
272 #include <pcl/registration/impl/correspondence_rejection_sample_consensus.hpp>
void getInliersIndices(pcl::Indices &inlier_indices)
Get the inlier indices found by the correspondence rejector.
shared_ptr< const CorrespondenceRejector > ConstPtr
double getInlierThreshold()
Get the maximum distance between corresponding points.
shared_ptr< PointCloud< PointT > > Ptr
shared_ptr< CorrespondenceRejector > Ptr
PointCloudPtr input_transformed_
CorrespondenceRejector represents the base class for correspondence rejection methods ...
shared_ptr< const ::pcl::PCLPointCloud2 > ConstPtr
void setTargetPoints(pcl::PCLPointCloud2::ConstPtr cloud2) override
Method for setting the target cloud.
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
CorrespondenceRejectorSampleConsensus()
Empty constructor.
const std::string & getClassName() const
Get a string representation of the name of this class.
pcl::Indices inlier_indices_
Eigen::Matrix4f getBestTransformation()
Get the best transformation after RANSAC rejection.
PointCloudConstPtr target_
int getMaximumIterations()
Get the maximum number of iterations.
void applyRejection(pcl::Correspondences &correspondences) override
Apply the rejection algorithm.
virtual void setInputTarget(const PointCloudConstPtr &cloud)
Provide a target point cloud dataset (must contain XYZ data!)
void setMaximumIterations(int max_iterations)
Set the maximum number of iterations.
PointCloudConstPtr const getInputSource()
Get a pointer to the input point cloud dataset target.
void setInlierThreshold(double threshold)
Set the maximum distance between corresponding points.
IndicesAllocator<> Indices
Type used for indices in PCL.
Eigen::Matrix4f best_transformation_
PointCloudConstPtr input_
PointCloud represents the base class in PCL for storing collections of 3D points. ...
CorrespondenceRejectorSampleConsensus implements a correspondence rejection using Random Sample Conse...
bool requiresTargetPoints() const override
See if this rejector requires a target cloud.
PointCloudConstPtr const getInputTarget()
Get a pointer to the input point cloud dataset target.
void fromPCLPointCloud2(const pcl::PCLPointCloud2 &msg, pcl::PointCloud< PointT > &cloud, const MsgFieldMap &field_map, const std::uint8_t *msg_data)
Convert a PCLPointCloud2 binary data blob into a pcl::PointCloud object using a field_map...
CorrespondencesConstPtr input_correspondences_
The input correspondences.
shared_ptr< const PointCloud< PointT > > ConstPtr
virtual void setInputSource(const PointCloudConstPtr &cloud)
Provide a source point cloud dataset (must contain XYZ data!)
void setSaveInliers(bool s)
Set whether to save inliers or not.
std::string rejection_name_
The name of the rejection method.
std::vector< pcl::Correspondence, Eigen::aligned_allocator< pcl::Correspondence > > Correspondences
bool requiresSourcePoints() const override
See if this rejector requires source points.
bool getSaveInliers()
Get whether the rejector is configured to save inliers.
void getRemainingCorrespondences(const pcl::Correspondences &original_correspondences, pcl::Correspondences &remaining_correspondences) override
Get a list of valid correspondences after rejection from the original set of correspondences.
~CorrespondenceRejectorSampleConsensus() override=default
Empty destructor.
bool getRefineModel() const
Get the internal refine parameter value as set by the user using setRefineModel.
void setRefineModel(const bool refine)
Specify whether the model should be refined internally using the variance of the inliers.
void setSourcePoints(pcl::PCLPointCloud2::ConstPtr cloud2) override
Blob method for setting the source cloud.