Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #ifndef PCL_REGISTRATION_CORRESPONDENCE_ESTIMATION_NORMAL_SHOOTING_H_
00042 #define PCL_REGISTRATION_CORRESPONDENCE_ESTIMATION_NORMAL_SHOOTING_H_
00043
00044 #include <pcl/registration/correspondence_types.h>
00045 #include <pcl/registration/correspondence_estimation.h>
00046
00047 namespace pcl
00048 {
00049 namespace registration
00050 {
00077 template <typename PointSource, typename PointTarget, typename NormalT, typename Scalar = float>
00078 class CorrespondenceEstimationNormalShooting : public CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>
00079 {
00080 public:
00081 typedef boost::shared_ptr<CorrespondenceEstimationNormalShooting<PointSource, PointTarget, NormalT, Scalar> > Ptr;
00082 typedef boost::shared_ptr<const CorrespondenceEstimationNormalShooting<PointSource, PointTarget, NormalT, Scalar> > ConstPtr;
00083
00084 using CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::initCompute;
00085 using CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::initComputeReciprocal;
00086 using CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::input_transformed_;
00087 using PCLBase<PointSource>::deinitCompute;
00088 using PCLBase<PointSource>::input_;
00089 using PCLBase<PointSource>::indices_;
00090 using CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::getClassName;
00091 using CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::point_representation_;
00092 using CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::target_indices_;
00093
00094 typedef typename pcl::search::KdTree<PointTarget> KdTree;
00095 typedef typename pcl::search::KdTree<PointTarget>::Ptr KdTreePtr;
00096
00097 typedef pcl::PointCloud<PointSource> PointCloudSource;
00098 typedef typename PointCloudSource::Ptr PointCloudSourcePtr;
00099 typedef typename PointCloudSource::ConstPtr PointCloudSourceConstPtr;
00100
00101 typedef pcl::PointCloud<PointTarget> PointCloudTarget;
00102 typedef typename PointCloudTarget::Ptr PointCloudTargetPtr;
00103 typedef typename PointCloudTarget::ConstPtr PointCloudTargetConstPtr;
00104
00105 typedef pcl::PointCloud<NormalT> PointCloudNormals;
00106 typedef typename PointCloudNormals::Ptr NormalsPtr;
00107 typedef typename PointCloudNormals::ConstPtr NormalsConstPtr;
00108
00114 CorrespondenceEstimationNormalShooting ()
00115 : source_normals_ ()
00116 , source_normals_transformed_ ()
00117 , k_ (10)
00118 {
00119 corr_name_ = "CorrespondenceEstimationNormalShooting";
00120 }
00121
00123 virtual ~CorrespondenceEstimationNormalShooting () {}
00124
00128 inline void
00129 setSourceNormals (const NormalsConstPtr &normals) { source_normals_ = normals; }
00130
00133 inline NormalsConstPtr
00134 getSourceNormals () const { return (source_normals_); }
00135
00141 void
00142 determineCorrespondences (pcl::Correspondences &correspondences,
00143 double max_distance = std::numeric_limits<double>::max ());
00144
00152 virtual void
00153 determineReciprocalCorrespondences (pcl::Correspondences &correspondences,
00154 double max_distance = std::numeric_limits<double>::max ());
00155
00161 inline void
00162 setKSearch (unsigned int k) { k_ = k; }
00163
00168 inline void
00169 getKSearch () const { return (k_); }
00170
00171 protected:
00172
00173 using CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::corr_name_;
00174 using CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::tree_;
00175 using CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::tree_reciprocal_;
00176 using CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::target_;
00177
00179 bool
00180 initCompute ();
00181
00182 private:
00183
00185 NormalsConstPtr source_normals_;
00186
00188 NormalsPtr source_normals_transformed_;
00189
00191 unsigned int k_;
00192 };
00193 }
00194 }
00195
00196 #include <pcl/registration/impl/correspondence_estimation_normal_shooting.hpp>
00197
00198 #endif