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 #ifndef PCL_POSES_FROM_MATCHES_H_
00039 #define PCL_POSES_FROM_MATCHES_H_
00040
00041 #include <pcl/pcl_macros.h>
00042 #include <pcl/correspondence.h>
00043
00044 namespace pcl
00045 {
00051 class PCL_EXPORTS PosesFromMatches
00052 {
00053 public:
00054
00056 PosesFromMatches();
00058 ~PosesFromMatches();
00059
00060
00062 struct PCL_EXPORTS Parameters
00063 {
00064 Parameters() : max_correspondence_distance_error(0.2f) {}
00065 float max_correspondence_distance_error;
00066 };
00067
00069 struct PoseEstimate
00070 {
00071 PoseEstimate () :
00072 transformation (Eigen::Affine3f::Identity ()),
00073 score (0),
00074 correspondence_indices (0)
00075 {}
00076
00077 Eigen::Affine3f transformation;
00078 float score;
00079 std::vector<int> correspondence_indices;
00080
00081 struct IsBetter
00082 {
00083 bool operator()(const PoseEstimate& pe1, const PoseEstimate& pe2) const { return pe1.score>pe2.score;}
00084 };
00085 public:
00086 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
00087 };
00088
00089
00090 typedef std::vector<PoseEstimate, Eigen::aligned_allocator<PoseEstimate> > PoseEstimatesVector;
00091
00092
00093
00094
00095
00099 void
00100 estimatePosesUsing1Correspondence (
00101 const PointCorrespondences6DVector& correspondences,
00102 int max_no_of_results, PoseEstimatesVector& pose_estimates) const;
00103
00106 void
00107 estimatePosesUsing2Correspondences (
00108 const PointCorrespondences6DVector& correspondences,
00109 int max_no_of_tested_combinations, int max_no_of_results,
00110 PoseEstimatesVector& pose_estimates) const;
00111
00114 void
00115 estimatePosesUsing3Correspondences (
00116 const PointCorrespondences6DVector& correspondences,
00117 int max_no_of_tested_combinations, int max_no_of_results,
00118 PoseEstimatesVector& pose_estimates) const;
00119
00121 Parameters&
00122 getParameters () { return parameters_; }
00123
00124 protected:
00125
00126 Parameters parameters_;
00127
00128 };
00129
00130 }
00131
00132 #endif //#ifndef PCL_POSES_FROM_MATCHES_H_