SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
F2FTransform.h
Go to the documentation of this file.
1 
2 #ifndef F2FTRANSFORM
3 #define F2FTRANSFORM
4 
5 #include <opencv2/opencv.hpp>
6 
7 #include <WAIHelper.h>
8 #include <WAIFrame.h>
9 #include <Eigen/Core>
10 
12 {
13 public:
14  static void opticalFlowMatch(const cv::Mat& f1Gray,
15  const cv::Mat& f2Gray,
16  std::vector<cv::Point2f>& p1,
17  std::vector<cv::Point2f>& p2,
18  std::vector<uchar>& inliers,
19  std::vector<float>& err);
20 
21  static float filterPoints(const std::vector<cv::Point2f>& p1,
22  const std::vector<cv::Point2f>& p2,
23  std::vector<cv::Point2f>& goodP1,
24  std::vector<cv::Point2f>& goodP2,
25  std::vector<uchar>& inliers,
26  std::vector<float>& err);
27 
28  static bool estimateRot(const cv::Mat K,
29  std::vector<cv::Point2f>& p1,
30  std::vector<cv::Point2f>& p2,
31  float& yaw,
32  float& pitch,
33  float& roll);
34 
35  static bool estimateRotXYZ(const cv::Mat& K,
36  const std::vector<cv::Point2f>& p1,
37  const std::vector<cv::Point2f>& p2,
38  float& xAngRAD,
39  float& yAngRAD,
40  float& zAngRAD,
41  std::vector<uchar>& inliers);
42 
43  static bool estimateRotXY(const cv::Mat& K,
44  const std::vector<cv::Point2f>& p1,
45  const std::vector<cv::Point2f>& p2,
46  float& xAngRAD,
47  float& yAngRAD,
48  const float zAngRAD,
49  std::vector<uchar>& inliers);
50 
51  static void eulerToMat(float xAngRAD, float yAngRAD, float zAngRAD, cv::Mat& Rx, cv::Mat& Ry, cv::Mat& Rz);
52 
53 private:
54  static cv::Mat eigen2cv(Eigen::Matrix3f m);
55 };
56 
57 #endif
#define WAI_API
Definition: WAIHelper.h:36