23 #include<opencv2/opencv.hpp> 33 typedef pair<int,int> Match;
38 Initializer(
const Frame &ReferenceFrame,
float sigma = 1.0,
int iterations = 200);
42 bool Initialize(
const Frame &CurrentFrame,
const vector<int> &vMatches12,
43 cv::Mat &R21, cv::Mat &t21, vector<cv::Point3f> &vP3D, vector<bool> &vbTriangulated);
48 void FindHomography(vector<bool> &vbMatchesInliers,
float &score, cv::Mat &H21);
49 void FindFundamental(vector<bool> &vbInliers,
float &score, cv::Mat &F21);
51 cv::Mat ComputeH21(
const vector<cv::Point2f> &vP1,
const vector<cv::Point2f> &vP2);
52 cv::Mat ComputeF21(
const vector<cv::Point2f> &vP1,
const vector<cv::Point2f> &vP2);
54 float CheckHomography(
const cv::Mat &H21,
const cv::Mat &H12, vector<bool> &vbMatchesInliers,
float sigma);
56 float CheckFundamental(
const cv::Mat &F21, vector<bool> &vbMatchesInliers,
float sigma);
58 bool ReconstructF(vector<bool> &vbMatchesInliers, cv::Mat &F21, cv::Mat &K,
59 cv::Mat &R21, cv::Mat &t21, vector<cv::Point3f> &vP3D, vector<bool> &vbTriangulated,
float minParallax,
int minTriangulated);
61 bool ReconstructH(vector<bool> &vbMatchesInliers, cv::Mat &H21, cv::Mat &K,
62 cv::Mat &R21, cv::Mat &t21, vector<cv::Point3f> &vP3D, vector<bool> &vbTriangulated,
float minParallax,
int minTriangulated);
64 void Triangulate(
const cv::KeyPoint &kp1,
const cv::KeyPoint &kp2,
const cv::Mat &P1,
const cv::Mat &P2, cv::Mat &x3D);
66 void Normalize(
const vector<cv::KeyPoint> &vKeys, vector<cv::Point2f> &vNormalizedPoints, cv::Mat &T);
68 int CheckRT(
const cv::Mat &R,
const cv::Mat &t,
const vector<cv::KeyPoint> &vKeys1,
const vector<cv::KeyPoint> &vKeys2,
69 const vector<Match> &vMatches12, vector<bool> &vbInliers,
70 const cv::Mat &K, vector<cv::Point3f> &vP3D,
float th2, vector<bool> &vbGood,
float ¶llax);
72 void DecomposeE(
const cv::Mat &E, cv::Mat &R1, cv::Mat &R2, cv::Mat &t);
76 vector<cv::KeyPoint> mvKeys1;
79 vector<cv::KeyPoint> mvKeys2;
82 vector<Match> mvMatches12;
83 vector<bool> mvbMatched1;
89 float mSigma, mSigma2;
95 vector<vector<size_t> > mvSets;
101 #endif // INITIALIZER_H
Definition: Converter.cpp:24
Definition: Initializer.h:31