39 #ifndef PCL_SAMPLE_CONSENSUS_MODEL_REGISTRATION_2D_H_
40 #define PCL_SAMPLE_CONSENSUS_MODEL_REGISTRATION_2D_H_
42 #include <pcl/sample_consensus/sac_model_registration.h>
50 template <
typename Po
intT>
67 typedef boost::shared_ptr<SampleConsensusModelRegistration2D>
Ptr;
68 typedef boost::shared_ptr<const SampleConsensusModelRegistration2D>
ConstPtr;
77 , projection_matrix_ (
Eigen::Matrix3f::Identity ())
89 const std::vector<int> &indices,
92 , projection_matrix_ (
Eigen::Matrix3f::Identity ())
107 std::vector<double> &distances);
116 const double threshold,
117 std::vector<int> &inliers);
127 const double threshold);
134 { projection_matrix_ = projection_matrix; }
137 inline Eigen::Matrix3f
139 {
return (projection_matrix_); }
181 const std::vector<int>&)
205 Eigen::Matrix3f projection_matrix_;
208 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
212 #include <pcl/sample_consensus/impl/sac_model_registration_2d.hpp>
214 #endif // PCL_SAMPLE_CONSENSUS_MODEL_REGISTRATION_2D_H_
SampleConsensusModelRegistration defines a model for Point-To-Point registration outlier rejection...
void getDistancesToModel(const Eigen::VectorXf &model_coefficients, std::vector< double > &distances)
Compute all distances from the transformed points to their correspondences.
void selectWithinDistance(const Eigen::VectorXf &model_coefficients, const double threshold, std::vector< int > &inliers)
Select all the points which respect the given model coefficients as inliers.
virtual int countWithinDistance(const Eigen::VectorXf &model_coefficients, const double threshold)
Count all the points which respect the given model coefficients as inliers.
pcl::SampleConsensusModel< PointT >::PointCloud PointCloud
boost::shared_ptr< const SampleConsensusModelRegistration2D > ConstPtr
SampleConsensusModelRegistration2D(const PointCloudConstPtr &cloud, const std::vector< int > &indices, bool random=false)
Constructor for base SampleConsensusModelRegistration2D.
virtual void setInputCloud(const PointCloudConstPtr &cloud)
Provide a pointer to the input dataset.
Eigen::Matrix3f getProjectionMatrix() const
Get the camera projection matrix.
virtual ~SampleConsensusModelRegistration2D()
Empty destructor.
void computeSampleDistanceThreshold(const PointCloudConstPtr &)
Computes an "optimal" sample distance threshold based on the principal directions of the input cloud...
pcl::PointCloud< PointT >::Ptr PointCloudPtr
SampleConsensusModelRegistration2D defines a model for Point-To-Point registration outlier rejection ...
void computeOriginalIndexMapping()
Compute mappings between original indices of the input_/target_ clouds.
pcl::PointCloud< PointT >::ConstPtr PointCloudConstPtr
pcl::SampleConsensusModel< PointT >::PointCloudPtr PointCloudPtr
PointCloud represents the base class in PCL for storing collections of 3D points. ...
SampleConsensusModelRegistration2D(const PointCloudConstPtr &cloud, bool random=false)
Constructor for base SampleConsensusModelRegistration2D.
void computeSampleDistanceThreshold(const PointCloudConstPtr &, const std::vector< int > &)
Computes an "optimal" sample distance threshold based on the principal directions of the input cloud...
A point structure representing Euclidean xyz coordinates, and the RGB color.
void setProjectionMatrix(const Eigen::Matrix3f &projection_matrix)
Set the camera projection matrix.
pcl::SampleConsensusModel< PointT >::PointCloudConstPtr PointCloudConstPtr
bool isSampleGood(const std::vector< int > &samples) const
Check if a sample of indices results in a good sample of points indices.
boost::shared_ptr< SampleConsensusModelRegistration2D > Ptr