forked from MasteringOpenCV/code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindCameraMatrices.h
executable file
·48 lines (41 loc) · 1.73 KB
/
FindCameraMatrices.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*****************************************************************************
* ExploringSfMWithOpenCV
******************************************************************************
* by Roy Shilkrot, 5th Dec 2012
* http://www.morethantechnical.com/
******************************************************************************
* Ch4 of the book "Mastering OpenCV with Practical Computer Vision Projects"
* Copyright Packt Publishing 2012.
* http://www.packtpub.com/cool-projects-with-opencv/book
*****************************************************************************/
#pragma once
#include <opencv2/core/core.hpp>
#include <opencv2/features2d/features2d.hpp>
#include "Common.h"
//#undef __SFM__DEBUG__
bool CheckCoherentRotation(cv::Mat_<double>& R);
bool TestTriangulation(const std::vector<CloudPoint>& pcloud, const cv::Matx34d& P, std::vector<uchar>& status);
cv::Mat GetFundamentalMat( const std::vector<cv::KeyPoint>& imgpts1,
const std::vector<cv::KeyPoint>& imgpts2,
std::vector<cv::KeyPoint>& imgpts1_good,
std::vector<cv::KeyPoint>& imgpts2_good,
std::vector<cv::DMatch>& matches
#ifdef __SFM__DEBUG__
,const cv::Mat& = cv::Mat(), const cv::Mat& = cv::Mat()
#endif
);
bool FindCameraMatrices(const cv::Mat& K,
const cv::Mat& Kinv,
const cv::Mat& distcoeff,
const std::vector<cv::KeyPoint>& imgpts1,
const std::vector<cv::KeyPoint>& imgpts2,
std::vector<cv::KeyPoint>& imgpts1_good,
std::vector<cv::KeyPoint>& imgpts2_good,
cv::Matx34d& P,
cv::Matx34d& P1,
std::vector<cv::DMatch>& matches,
std::vector<CloudPoint>& outCloud
#ifdef __SFM__DEBUG__
,const cv::Mat& = cv::Mat(), const cv::Mat& = cv::Mat()
#endif
);