41#include <pcl/sample_consensus/sac_model_registration.h>
51 template <
typename Po
intT>
102 model_name_ =
"SampleConsensusModelRegistration2D";
116 std::vector<double> &distances)
const;
125 const double threshold,
136 const double threshold)
const;
146 inline Eigen::Matrix3f
148 {
return (projection_matrix_); }
217 Eigen::Matrix3f projection_matrix_;
224#include <pcl/sample_consensus/impl/sac_model_registration_2d.hpp>
Iterator class for point clouds with or without given indices.
PointCloud represents the base class in PCL for storing collections of 3D points.
SampleConsensusModel represents the base model class.
unsigned int sample_size_
The size of a sample from which the model is computed.
typename PointCloud::ConstPtr PointCloudConstPtr
IndicesPtr indices_
A pointer to the vector of point indices to use.
PointCloudConstPtr input_
A boost shared pointer to the point cloud data array.
virtual bool isModelValid(const Eigen::VectorXf &model_coefficients) const
Check whether a model is valid given the user constraints.
std::string model_name_
The model name.
unsigned int model_size_
The number of coefficients in the model.
typename PointCloud::Ptr PointCloudPtr
std::vector< double > error_sqr_dists_
A vector holding the distances to the computed model.
SampleConsensusModelRegistration2D defines a model for Point-To-Point registration outlier rejection ...
void selectWithinDistance(const Eigen::VectorXf &model_coefficients, const double threshold, Indices &inliers)
Select all the points which respect the given model coefficients as inliers.
typename pcl::SampleConsensusModel< PointT >::PointCloud PointCloud
SampleConsensusModelRegistration2D(const PointCloudConstPtr &cloud, const Indices &indices, bool random=false)
Constructor for base SampleConsensusModelRegistration2D.
typename pcl::SampleConsensusModel< PointT >::PointCloudPtr PointCloudPtr
typename pcl::SampleConsensusModel< PointT >::PointCloudConstPtr PointCloudConstPtr
void setProjectionMatrix(const Eigen::Matrix3f &projection_matrix)
Set the camera projection matrix.
Eigen::Matrix3f getProjectionMatrix() const
Get the camera projection matrix.
virtual std::size_t countWithinDistance(const Eigen::VectorXf &model_coefficients, const double threshold) const
Count all the points which respect the given model coefficients as inliers.
SampleConsensusModelRegistration2D(const PointCloudConstPtr &cloud, bool random=false)
Constructor for base SampleConsensusModelRegistration2D.
void computeSampleDistanceThreshold(const PointCloudConstPtr &)
Computes an "optimal" sample distance threshold based on the principal directions of the input cloud.
void computeSampleDistanceThreshold(const PointCloudConstPtr &, const Indices &)
Computes an "optimal" sample distance threshold based on the principal directions of the input cloud.
bool isSampleGood(const Indices &samples) const
Check if a sample of indices results in a good sample of points indices.
virtual ~SampleConsensusModelRegistration2D()
Empty destructor.
void getDistancesToModel(const Eigen::VectorXf &model_coefficients, std::vector< double > &distances) const
Compute all distances from the transformed points to their correspondences.
SampleConsensusModelRegistration defines a model for Point-To-Point registration outlier rejection.
std::map< index_t, index_t > correspondences_
Given the index in the original point cloud, give the matching original index in the target cloud.
IndicesPtr indices_tgt_
A pointer to the vector of target point indices to use.
PointCloudConstPtr target_
A boost shared pointer to the target point cloud data array.
double sample_dist_thresh_
Internal distance threshold used for the sample selection step.
void setInputCloud(const PointCloudConstPtr &cloud) override
Provide a pointer to the input dataset.
void computeOriginalIndexMapping()
Compute mappings between original indices of the input_/target_ clouds.
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
Defines functions, macros and traits for allocating and using memory.
IndicesAllocator<> Indices
Type used for indices in PCL.
Defines all the PCL and non-PCL macros used.
A point structure representing Euclidean xyz coordinates, and the RGB color.