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