28 #ifndef _Aruco_CameraParameters_H 29 #define _Aruco_CameraParameters_H 31 #include <opencv2/core/core.hpp> 55 CameraParameters(cv::Mat cameraMatrix, cv::Mat distorsionCoeff, cv::Size size)
throw(cv::Exception);
61 void setParams(cv::Mat cameraMatrix, cv::Mat distorsionCoeff, cv::Size size)
throw(cv::Exception);
69 return CameraMatrix.rows != 0 && CameraMatrix.cols != 0 && Distorsion.rows != 0 && Distorsion.cols != 0 && CamSize.width != -1 && CamSize.height != -1;
76 void readFromFile(
string path)
throw(cv::Exception);
79 void saveToFile(
string path,
bool inXML =
true)
throw(cv::Exception);
83 void readFromXMLFile(
string filePath)
throw(cv::Exception);
87 void resize(cv::Size size)
throw(cv::Exception);
92 static cv::Point3f getCameraLocation(cv::Mat Rvec, cv::Mat Tvec);
105 void glGetProjectionMatrix(cv::Size orgImgSize, cv::Size size,
double proj_matrix[16],
double gnear,
double gfar,
bool invert =
false)
throw(cv::Exception);
117 void OgreGetProjectionMatrix(cv::Size orgImgSize, cv::Size size,
double proj_matrix[16],
double gnear,
double gfar,
118 bool invert =
false)
throw(cv::Exception);
123 static cv::Mat getRTMatrix(
const cv::Mat &R_,
const cv::Mat &T_,
int forceType);
128 static void argConvGLcpara2(
double cparam[3][4],
int width,
int height,
double gnear,
double gfar,
double m[16],
bool invert)
throw(cv::Exception);
129 static int arParamDecompMat(
double source[3][4],
double cpara[3][4],
double trans[3][4])
throw(cv::Exception);
130 static double norm(
double a,
double b,
double c);
131 static double dot(
double a1,
double a2,
double a3,
double b1,
double b2,
double b3);
Parameters of the camera.