00001 /* +---------------------------------------------------------------------------+ 00002 | The Mobile Robot Programming Toolkit (MRPT) C++ library | 00003 | | 00004 | http://mrpt.sourceforge.net/ | 00005 | | 00006 | Copyright (C) 2005-2009 University of Malaga | 00007 | | 00008 | This software was written by the Machine Perception and Intelligent | 00009 | Robotics Lab, University of Malaga (Spain). | 00010 | Contact: Jose-Luis Blanco <jlblanco@ctima.uma.es> | 00011 | | 00012 | This file is part of the MRPT project. | 00013 | | 00014 | MRPT is free software: you can redistribute it and/or modify | 00015 | it under the terms of the GNU General Public License as published by | 00016 | the Free Software Foundation, either version 3 of the License, or | 00017 | (at your option) any later version. | 00018 | | 00019 | MRPT is distributed in the hope that it will be useful, | 00020 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 00021 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 00022 | GNU General Public License for more details. | 00023 | | 00024 | You should have received a copy of the GNU General Public License | 00025 | along with MRPT. If not, see <http://www.gnu.org/licenses/>. | 00026 | | 00027 +---------------------------------------------------------------------------+ */ 00028 #ifndef CCamModel_H 00029 #define CCamModel_H 00030 00031 #include <mrpt/math/CMatrixTemplateNumeric.h> 00032 #include <mrpt/math/CVectorTemplate.h> 00033 #include <mrpt/utils/CConfigFile.h> 00034 #include <mrpt/system/os.h> 00035 00036 namespace mrpt 00037 { 00038 namespace vision 00039 { 00042 struct MRPTDLLIMPEXP TCamera{ 00043 double d; 00044 unsigned int nrows; 00045 unsigned int ncols; 00046 double cx; 00047 double cy; 00048 double k1; 00049 double k2; 00050 double f; 00051 }; 00052 00056 class MRPTDLLIMPEXP CCamModel 00057 { 00058 protected: 00059 vision::TCamera cam; 00060 00061 public: 00064 CCamModel(); 00067 CCamModel(const std::string &file); 00068 00071 double cam_d()const {return cam.d;} 00074 unsigned int cam_nrows()const {return cam.nrows;} 00075 00078 unsigned int cam_ncols()const {return cam.ncols;} 00079 00082 double cam_cx()const {return cam.cx;} 00083 00086 double cam_cy()const {return cam.cy;} 00087 00090 double cam_k1()const {return cam.k1;} 00091 00094 double cam_k2()const {return cam.k2;} 00095 00098 double cam_f()const {return cam.f;} 00099 00102 void jacob_undistor_fm(const math::CVectorDouble &uvd, math::CMatrixDouble &J_undist); 00103 00106 math::CMatrixDouble jacob_undistor(double &col , double &row ); 00107 00110 void distort_a_point(const math::CVectorDouble &uvu, math::CVectorDouble &uvd); 00111 00115 void undistort_point(double &col,double &row); 00116 00117 }; // end class 00118 00119 } // end namespace 00120 } // end namespace 00121 #endif //__CCamModel_H
Page generated by Doxygen 1.5.7.1 for MRPT 0.6.5 SVN: at Mon Feb 23 13:24:51 EST 2009 |