Go to the documentation of this file.00001 #ifndef _Aruco_CameraParameters_H
00002 #define _Aruco_CameraParameters_H
00003 #include <opencv/cv.h>
00004 #include <string>
00005 using namespace std;
00006 namespace aruco
00007 {
00011 class CameraParameters
00012 {
00013 public:
00014
00015
00016 cv::Mat CameraMatrix;
00017
00018 cv::Mat Distorsion;
00019
00020 cv::Size CamSize;
00021
00024 CameraParameters() ;
00030 CameraParameters(cv::Mat cameraMatrix,cv::Mat distorsionCoeff,cv::Size size) throw(cv::Exception);
00033 CameraParameters(const CameraParameters &CI) ;
00034
00037 bool isValid()const {
00038 return CameraMatrix.rows!=0 && CameraMatrix.cols!=0 && Distorsion.rows!=0 && Distorsion.cols!=0 && CamSize.width!=-1 && CamSize.height!=-1;
00039 }
00042 CameraParameters & operator=(const CameraParameters &CI);
00045 void readFromFile(string path)throw(cv::Exception);
00048 void saveToFile(string path)throw(cv::Exception);
00049
00052 void readFromXMLFile(string filePath)throw(cv::Exception);
00053
00056 void resize(cv::Size size)throw(cv::Exception);
00057
00061 static cv::Point3f getCameraLocation(cv::Mat Rvec,cv::Mat Tvec);
00062
00063 };
00064
00065 }
00066 #endif
00067
00068