23 #include<opencv2/opencv.hpp> 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);
101 #endif // INITIALIZER_H
void FindFundamental(vector< bool > &vbInliers, float &score, cv::Mat &F21)
void DecomposeE(const cv::Mat &E, cv::Mat &R1, cv::Mat &R2, cv::Mat &t)
vector< cv::KeyPoint > mvKeys1
cv::Mat ComputeF21(const vector< cv::Point2f > &vP1, const vector< cv::Point2f > &vP2)
int CheckRT(const cv::Mat &R, const cv::Mat &t, const vector< cv::KeyPoint > &vKeys1, const vector< cv::KeyPoint > &vKeys2, const vector< Match > &vMatches12, vector< bool > &vbInliers, const cv::Mat &K, vector< cv::Point3f > &vP3D, float th2, vector< bool > &vbGood, float ¶llax)
float CheckFundamental(const cv::Mat &F21, vector< bool > &vbMatchesInliers, float sigma)
vector< vector< size_t > > mvSets
void Normalize(const vector< cv::KeyPoint > &vKeys, vector< cv::Point2f > &vNormalizedPoints, cv::Mat &T)
void Triangulate(const cv::KeyPoint &kp1, const cv::KeyPoint &kp2, const cv::Mat &P1, const cv::Mat &P2, cv::Mat &x3D)
float CheckHomography(const cv::Mat &H21, const cv::Mat &H12, vector< bool > &vbMatchesInliers, float sigma)
Initializer(const Frame &ReferenceFrame, float sigma=1.0, int iterations=200)
vector< bool > mvbMatched1
bool ReconstructH(vector< bool > &vbMatchesInliers, cv::Mat &H21, cv::Mat &K, cv::Mat &R21, cv::Mat &t21, vector< cv::Point3f > &vP3D, vector< bool > &vbTriangulated, float minParallax, int minTriangulated)
cv::Mat ComputeH21(const vector< cv::Point2f > &vP1, const vector< cv::Point2f > &vP2)
bool Initialize(const Frame &CurrentFrame, const vector< int > &vMatches12, cv::Mat &R21, cv::Mat &t21, vector< cv::Point3f > &vP3D, vector< bool > &vbTriangulated)
vector< cv::KeyPoint > mvKeys2
vector< Match > mvMatches12
bool ReconstructF(vector< bool > &vbMatchesInliers, cv::Mat &F21, cv::Mat &K, cv::Mat &R21, cv::Mat &t21, vector< cv::Point3f > &vP3D, vector< bool > &vbTriangulated, float minParallax, int minTriangulated)
void FindHomography(vector< bool > &vbMatchesInliers, float &score, cv::Mat &H21)