// // Created by Scheaven on 2020/5/20. // #ifndef INC_01_COORDINATE_TRANSFORMATION_SWITCHER_UTIL_H #define INC_01_COORDINATE_TRANSFORMATION_SWITCHER_UTIL_H #include "opencv2/opencv.hpp" #pragma comment(lib, "opencv_core249.lib") #include #include #include #include #include #include "stdio.h" #include "stdlib.h" #include "con_target.h" #include "homography_util.h" using namespace std; class CoordSwitcher { private: vector inliers; vector> reg_points_vec; float s_homography[3][3]; // vector homography_vec; static SHomogtaphy* SHomogtaphy_pointer; static CoordSwitcher* instance; public: void initHomography(CamVec *CV_Reg); static CoordSwitcher* getInstance(CamVec *CV_Reg); CoordSwitcher(); CoordSwitcher(CamVec *CV_Reg); ~CoordSwitcher(); // 转换坐标 SPoint2f getTransPoint(const SPoint2f rightPoint, SMatrix& matrix); float compare(SPoint2f A, SPoint2f B, int h_index); float compare(float Ax, float Ay, float Bx, float By); }; #endif //INC_01_COORDINATE_TRANSFORMATION_SWITCHER_UTIL_H