-
Notifications
You must be signed in to change notification settings - Fork 0
/
SolvePnP_Matrix.h
43 lines (35 loc) · 1.47 KB
/
SolvePnP_Matrix.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
#ifndef SolvePnP_Matrix_H
#define SolvePnP_Matrix_H
#include <io.h>
#include <string>
#include <vector>
#include "opencv.hpp"
#include <QDebug>
#include <QString>
#include <QTreeWidget>
#include <QFrame>
#include "FileLib.h"
#include <Dense>
#include <QObject>
using namespace cv;
using namespace Eigen;
void pose_estimation_3d23d_SVD(const vector<Point3d>& pts1, //3DµãÈÝÆ÷
const vector<Point3d>& pts2,
Eigen::Matrix3d& R, Eigen::Vector3d& T);
void PCAalignmentTransMatCal(vector<Matrix<double, 3, 1>> SorceMat,
vector<Matrix<double, 3, 1>> DstMat,
Matrix<double, 3, 3>& ExR, Matrix<double, 3, 1>& ExT);
Matrix<double, 4, 1> CameraZeroCal(Matrix<double, 3, 4> RTMat, Matrix<double, 4, 1>& ZeroDot);
Matrix<double, 4, 1> CameraFocusCal(Matrix<double, 3, 4> RTMat, Matrix<double, 4, 1>& FocusDot, double Focus);
class MyDistortProcess
{
public:
static void myUndistortPoints(const std::vector<cv::Point3d> &src, std::vector<cv::Point3d> &dst,
const cv::Mat & cameraMatrix, const cv::Mat & distortionCoeff);
static void myDistortPoints(const std::vector<cv::Point3d> &src, std::vector<cv::Point3d> &dst,
const cv::Mat & cameraMatrix, const cv::Mat & distortionCoeff);
static void DistortCorrectMatrix(vector<Matrix<double, 1, 3>> &OriP, const cv::Mat & cameraMatrix, const cv::Mat & distortionCoeff);
static void DistortCorrectMatrix(Matrix<double, 1, 3> &OriP, const cv::Mat & cameraMatrix, const cv::Mat & distortionCoeff);
private:
};
#endif //