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/common/point_correspondence.h>
00042
00043 namespace pcl
00044 {
00045
00049 class PosesFromMatches
00050 {
00051 public:
00052
00054 PosesFromMatches();
00056 ~PosesFromMatches();
00057
00058
00060 struct Parameters
00061 {
00062 Parameters() : max_correspondence_distance_error(0.2f) {}
00063 float max_correspondence_distance_error;
00064 };
00065
00067 struct PoseEstimate
00068 {
00069 Eigen::Affine3f transformation;
00070 float score;
00071 std::vector<int> correspondence_indices;
00072 struct IsBetter {
00073 bool operator()(const PoseEstimate& pe1, const PoseEstimate& pe2) const { return pe1.score>pe2.score;}
00074 };
00075 public:
00076 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
00077 };
00078
00079
00080 typedef std::vector<PoseEstimate, Eigen::aligned_allocator<PoseEstimate> > PoseEstimatesVector;
00081
00082
00083
00084
00085
00089 void estimatePosesUsing1Correspondence(
00090 const PointCorrespondences6DVector& correspondences,
00091 int max_no_of_results, PoseEstimatesVector& pose_estimates) const;
00092
00095 void estimatePosesUsing2Correspondences(
00096 const PointCorrespondences6DVector& correspondences,
00097 int max_no_of_tested_combinations, int max_no_of_results,
00098 PoseEstimatesVector& pose_estimates) const;
00099
00102 void estimatePosesUsing3Correspondences(
00103 const PointCorrespondences6DVector& correspondences,
00104 int max_no_of_tested_combinations, int max_no_of_results,
00105 PoseEstimatesVector& pose_estimates) const;
00106
00107
00108 Parameters& getParameters() { return parameters_; }
00109
00110 protected:
00111
00112 Parameters parameters_;
00113
00114 };
00115
00116 }
00117
00118 #endif //#ifndef PCL_POSES_FROM_MATCHES_H_