00001 #ifndef RANSAC_LINE_2D_HPP
00002 #define RANSAC_LINE_2D_HPP
00003
00004 #include "model3d/ransac.hpp"
00005 #include "model3d/point2D.hpp"
00006 #include "model3d/line2D.hpp"
00007
00008
00009 namespace jafar {
00011 namespace model3d {
00012
00017 class RansacLine2D: public RANSAC<Line2D>
00018 {
00019 public:
00020 RansacLine2D();
00021 ~RansacLine2D();
00022
00023
00024
00025 void fitSampleModel(std::vector<unsigned int>& sample_data_indices,
00026 Line2D& model);
00027
00028 double distance(const Line2D& model, unsigned int unIndex);
00029
00030 bool isDegenerate(std::vector<unsigned int>& sample_data_indices);
00031
00032
00036 void setData(std::vector<Point2D>* pPoints,
00037 std::vector<int>* dataIndices);
00038
00039
00040
00045 std::vector<Point2D>* m_pPoints;
00046
00048 std::vector<int>* m_pDataIndices;
00049 };
00050
00051 }
00052 }
00053
00054
00055 #endif // RANSAC_LINE_2D_HPP