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>
69 typedef boost::shared_ptr<SampleConsensusModelRegistration2D>
Ptr;
70 typedef boost::shared_ptr<const SampleConsensusModelRegistration2D>
ConstPtr;
79 , projection_matrix_ (
Eigen::Matrix3f::Identity ())
94 const std::vector<int> &indices,
97 , projection_matrix_ (
Eigen::Matrix3f::Identity ())
101 model_name_ =
"SampleConsensusModelRegistration2D";
115 std::vector<double> &distances)
const;
124 const double threshold,
125 std::vector<int> &inliers);
135 const double threshold)
const;
142 { projection_matrix_ = projection_matrix; }
145 inline Eigen::Matrix3f
147 {
return (projection_matrix_); }
192 const std::vector<int>&)
216 Eigen::Matrix3f projection_matrix_;
219 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
223 #include <pcl/sample_consensus/impl/sac_model_registration_2d.hpp> 225 #endif // PCL_SAMPLE_CONSENSUS_MODEL_REGISTRATION_2D_H_ 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.
bool isSampleGood(const std::vector< int > &samples) const
Check if a sample of indices results in a good sample of points indices.
This file defines compatibility wrappers for low level I/O functions.
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.
unsigned int model_size_
The number of coefficients in the model.
Eigen::Matrix3f getProjectionMatrix() const
Get the camera projection matrix.
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.
virtual ~SampleConsensusModelRegistration2D()
Empty destructor.
void computeSampleDistanceThreshold(const PointCloudConstPtr &)
Computes an "optimal" sample distance threshold based on the principal directions of the input cloud.
SampleConsensusModel represents the base model class.
std::string model_name_
The model name.
pcl::PointCloud< PointT >::Ptr PointCloudPtr
virtual int countWithinDistance(const Eigen::VectorXf &model_coefficients, const double threshold) const
Count all the points which respect the given model coefficients as inliers.
SampleConsensusModelRegistration2D defines a model for Point-To-Point registration outlier rejection ...
void computeOriginalIndexMapping()
Compute mappings between original indices of the input_/target_ clouds.
PointCloud represents the base class in PCL for storing collections of 3D points.
pcl::PointCloud< PointT >::ConstPtr PointCloudConstPtr
pcl::SampleConsensusModel< PointT >::PointCloudPtr PointCloudPtr
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
unsigned int sample_size_
The size of a sample from which the model is computed.
boost::shared_ptr< SampleConsensusModelRegistration2D > Ptr