00001 /* +---------------------------------------------------------------------------+ 00002 | The Mobile Robot Programming Toolkit (MRPT) C++ library | 00003 | | 00004 | http://mrpt.sourceforge.net/ | 00005 | | 00006 | Copyright (C) 2005-2010 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 00029 #ifndef mrpt_vision_camera_calib_ba_H 00030 #define mrpt_vision_camera_calib_ba_H 00031 00032 #include <mrpt/utils/types.h> 00033 #include <mrpt/utils/TCamera.h> 00034 00035 #include <mrpt/vision/types.h> 00036 00037 #include <mrpt/vision/link_pragmas.h> 00038 00039 namespace mrpt 00040 { 00041 namespace vision 00042 { 00043 /** Optimizes the camera intrinsic and distortion parameters given a sequence of features tracked along a few consecutive frames. 00044 * This method allows calibrating a camera without a checkerboard or any other special pattern, just by moving the camera and tracking 00045 * random features. 00046 * 00047 * It internally implements a Bundle Adjustment (BA) over all the 3D features, 6D camera poses and camera parameters and 00048 * searches for the least-square error in the reprojected pixel errors. 00049 * 00050 * The "extra_params" field can optionally contain any of these parameters: 00051 * - "max_iters" : Maximum number of iterations to run the iterative optimization (default=1000) 00052 * - "verbose" : If set to !=0, will show verbose information (default=false) 00053 * 00054 * \return Returns the average pixel reprojection error with the final estimated parameters. 00055 */ 00056 double VISION_IMPEXP camera_calib_ba( 00057 const std::vector< std::vector<mrpt::utils::TPixelCoordf> > & in_tracked_feats, 00058 unsigned int camera_ncols, 00059 unsigned int camera_nrows, 00060 mrpt::utils::TCamera &out_optimal_params, 00061 TCamCalibBAResults &out_info, 00062 const mrpt::utils::TParametersDouble &extra_params = mrpt::utils::TParametersDouble() 00063 ); 00064 } 00065 } 00066 00067 #endif 00068
| Page generated by Doxygen 1.7.1 for MRPT 0.9.1 SVN:exported at Fri Aug 6 10:31:35 UTC 2010 |
