4 |
jakw |
1 |
#ifndef RECONSTRUCTOR_H
|
|
|
2 |
#define RECONSTRUCTOR_H
|
|
|
3 |
|
|
|
4 |
#include "SMCalibrationParams.h"
|
|
|
5 |
|
|
|
6 |
#include <opencv2/opencv.hpp>
|
|
|
7 |
|
|
|
8 |
class Triangulator {
|
|
|
9 |
public:
|
|
|
10 |
Triangulator(SMCalibrationParams _calibration, unsigned int frameWidth, unsigned int frameHeight);
|
|
|
11 |
SMCalibrationParams getCalibration(){return calibration;}
|
|
|
12 |
~Triangulator(){}
|
|
|
13 |
// Reconstruction
|
|
|
14 |
void triangulate(cv::Mat &up, cv::Mat &vp, cv::Mat &mask, cv::Mat &shading, cv::Mat &pointCloud);
|
|
|
15 |
private:
|
|
|
16 |
void triangulateFromUp(cv::Mat &up, cv::Mat &xyz);
|
|
|
17 |
void triangulateFromVp(cv::Mat &vp, cv::Mat &xyz);
|
|
|
18 |
void triangulateFromUpVp(cv::Mat &up, cv::Mat &vp, cv::Mat &xyz);
|
|
|
19 |
SMCalibrationParams calibration;
|
|
|
20 |
cv::Mat determinantTensor;
|
|
|
21 |
cv::Mat uc, vc;
|
|
|
22 |
cv::Mat lensMap1, lensMap2;
|
|
|
23 |
};
|
|
|
24 |
|
|
|
25 |
#endif
|