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_); }
183 const std::vector<int> &indices)
207 Eigen::Matrix3f projection_matrix_;
210 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
214 #include <pcl/sample_consensus/impl/sac_model_registration_2d.hpp>
216 #endif // PCL_SAMPLE_CONSENSUS_MODEL_REGISTRATION_2D_H_
pcl::PointCloud< PointT >::Ptr PointCloudPtr
virtual int countWithinDistance(const Eigen::VectorXf &model_coefficients, const double threshold)
Count all the points which respect the given model coefficients as inliers.
SampleConsensusModelRegistration2D(const PointCloudConstPtr &cloud, const std::vector< int > &indices, bool random=false)
Constructor for base SampleConsensusModelRegistration2D.
void getDistancesToModel(const Eigen::VectorXf &model_coefficients, std::vector< double > &distances)
Compute all distances from the transformed points to their correspondences.
SampleConsensusModelRegistration defines a model for Point-To-Point registration outlier rejection...
pcl::SampleConsensusModel< PointT >::PointCloudConstPtr PointCloudConstPtr
pcl::SampleConsensusModel< PointT >::PointCloud PointCloud
bool isSampleGood(const std::vector< int > &samples) const
Check if a sample of indices results in a good sample of points indices.
void setProjectionMatrix(const Eigen::Matrix3f &projection_matrix)
Set the camera projection matrix.
Eigen::Matrix3f getProjectionMatrix() const
Get the camera projection matrix.
virtual void setInputCloud(const PointCloudConstPtr &cloud)
Provide a pointer to the input dataset.
boost::shared_ptr< SampleConsensusModelRegistration2D > Ptr
SampleConsensusModelRegistration2D(const PointCloudConstPtr &cloud, bool random=false)
Constructor for base SampleConsensusModelRegistration2D.
void computeSampleDistanceThreshold(const PointCloudConstPtr &cloud)
Computes an "optimal" sample distance threshold based on the principal directions of the input cloud...
void computeSampleDistanceThreshold(const PointCloudConstPtr &cloud, const std::vector< int > &indices)
Computes an "optimal" sample distance threshold based on the principal directions of the input cloud...
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 ~SampleConsensusModelRegistration2D()
Empty destructor.
A point structure representing Euclidean xyz coordinates, and the RGB color.
void computeOriginalIndexMapping()
Compute mappings between original indices of the input_/target_ clouds.
boost::shared_ptr< const SampleConsensusModelRegistration2D > ConstPtr
pcl::PointCloud< PointT >::ConstPtr PointCloudConstPtr
SampleConsensusModelRegistration2D defines a model for Point-To-Point registration outlier rejection ...
pcl::SampleConsensusModel< PointT >::PointCloudPtr PointCloudPtr