00001 /* +---------------------------------------------------------------------------+ 00002 | The Mobile Robot Programming Toolkit (MRPT) C++ library | 00003 | | 00004 | http://mrpt.sourceforge.net/ | 00005 | | 00006 | Copyright (C) 2005-2011 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_find_chessboard_H 00030 #define mrpt_vision_find_chessboard_H 00031 00032 #include <mrpt/utils/CImage.h> 00033 00034 #include <mrpt/vision/link_pragmas.h> 00035 00036 namespace mrpt 00037 { 00038 namespace vision 00039 { 00040 /** @name Chessboard find corner functions 00041 @{ */ 00042 00043 /** Look for the corners of a chessboard in the image using one of two different methods. 00044 * 00045 * The search algorithm will be OpenCV's function cvFindChessboardCorners or its improved 00046 * version published by M. Rufli, D. Scaramuzza, and R. Siegwart. See: http://robotics.ethz.ch/~scaramuzza/Davide_Scaramuzza_files/Research/OcamCalib_Tutorial.htm 00047 * and the papers: 00048 * - 1. Scaramuzza, D., Martinelli, A. and Siegwart, R. (2006), A Toolbox for Easily Calibrating Omnidirectional Cameras, Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS 2006), Beijing, China, October 2006. 00049 * - 2. Scaramuzza, D., Martinelli, A. and Siegwart, R., (2006). "A Flexible Technique for Accurate Omnidirectional Camera Calibration and Structure from Motion", Proceedings of IEEE International Conference of Vision Systems (ICVS'06), New York, January 5-7, 2006. 00050 * - 3. Rufli, M., Scaramuzza, D., and Siegwart, R. (2008), Automatic Detection of Checkerboards on Blurred and Distorted Images, Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS 2008), Nice, France, September 2008. 00051 * 00052 * After detecting the corners with either method, it's called "cvFindCornerSubPix" to achieve subpixel accuracy. 00053 * 00054 * \param cornerCoords [OUT] The pixel coordinates of all the corners. 00055 * \param check_size_x [IN] The number of squares, in the X direction 00056 * \param check_size_y [IN] The number of squares, in the Y direction 00057 * \param normalize_image [IN] Whether to normalize the image before detection 00058 * \param useScaramuzzaMethod [IN] Whether to use the alternative, more robust method by M. Rufli, D. Scaramuzza, and R. Siegwart. 00059 * 00060 * \return true on success 00061 * 00062 * \sa findMultipleChessboardsCorners, mrpt::vision::checkerBoardCameraCalibration, drawChessboardCorners 00063 */ 00064 bool VISION_IMPEXP findChessboardCorners( 00065 const mrpt::utils::CImage &img, 00066 std::vector<TPixelCoordf> &cornerCoords, 00067 unsigned int check_size_x, 00068 unsigned int check_size_y, 00069 bool normalize_image = true, 00070 bool useScaramuzzaMethod = false ); 00071 00072 /** Look for the corners of one or more chessboard/checkerboards in the image. 00073 * This method uses an improved version of OpenCV's cvFindChessboardCorners published 00074 * by M. Rufli, D. Scaramuzza, and R. Siegwart. See: http://robotics.ethz.ch/~scaramuzza/Davide_Scaramuzza_files/Research/OcamCalib_Tutorial.htm 00075 * and the papers: 00076 * - 1. Scaramuzza, D., Martinelli, A. and Siegwart, R. (2006), A Toolbox for Easily Calibrating Omnidirectional Cameras, Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS 2006), Beijing, China, October 2006. 00077 * - 2. Scaramuzza, D., Martinelli, A. and Siegwart, R., (2006). "A Flexible Technique for Accurate Omnidirectional Camera Calibration and Structure from Motion", Proceedings of IEEE International Conference of Vision Systems (ICVS'06), New York, January 5-7, 2006. 00078 * - 3. Rufli, M., Scaramuzza, D., and Siegwart, R. (2008), Automatic Detection of Checkerboards on Blurred and Distorted Images, Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS 2008), Nice, France, September 2008. 00079 * 00080 * That method has been extended in this MRPT implementation to automatically detect a 00081 * number of different checkerboards in the same image. 00082 * 00083 * \param cornerCoords [OUT] A vector of N vectors of pixel coordinates, for each of the N chessboards detected. 00084 * \param check_size_x [IN] The number of squares, in the X direction 00085 * \param check_size_y [IN] The number of squares, in the Y direction 00086 * 00087 * 00088 * \sa mrpt::vision::checkerBoardCameraCalibration, drawChessboardCorners 00089 */ 00090 void VISION_IMPEXP findMultipleChessboardsCorners( 00091 const mrpt::utils::CImage &img, 00092 std::vector<std::vector<TPixelCoordf> > &cornerCoords, 00093 unsigned int check_size_x, 00094 unsigned int check_size_y ); 00095 00096 /** @} */ 00097 } 00098 } 00099 #endif 00100
Page generated by Doxygen 1.7.2 for MRPT 0.9.4 SVN: at Mon Jan 10 22:30:30 UTC 2011 |