Main MRPT website > C++ reference
MRPT logo
chessboard_find_corners.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | The Mobile Robot Programming Toolkit (MRPT) C++ library |
3  | |
4  | http://www.mrpt.org/ |
5  | |
6  | Copyright (C) 2005-2012 University of Malaga |
7  | |
8  | This software was written by the Machine Perception and Intelligent |
9  | Robotics Lab, University of Malaga (Spain). |
10  | Contact: Jose-Luis Blanco <jlblanco@ctima.uma.es> |
11  | |
12  | This file is part of the MRPT project. |
13  | |
14  | MRPT is free software: you can redistribute it and/or modify |
15  | it under the terms of the GNU General Public License as published by |
16  | the Free Software Foundation, either version 3 of the License, or |
17  | (at your option) any later version. |
18  | |
19  | MRPT is distributed in the hope that it will be useful, |
20  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
21  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22  | GNU General Public License for more details. |
23  | |
24  | You should have received a copy of the GNU General Public License |
25  | along with MRPT. If not, see <http://www.gnu.org/licenses/>. |
26  | |
27  +---------------------------------------------------------------------------+ */
28 
29 #ifndef mrpt_vision_find_chessboard_H
30 #define mrpt_vision_find_chessboard_H
31 
32 #include <mrpt/utils/CImage.h>
33 
34 #include <mrpt/vision/types.h>
36 
37 namespace mrpt
38 {
39  namespace vision
40  {
41  /** \addtogroup chessboard_calib
42  @{ */
43 
44  /** Look for the corners of a chessboard in the image using one of two different methods.
45  *
46  * The search algorithm will be OpenCV's function cvFindChessboardCorners or its improved
47  * version published by M. Rufli, D. Scaramuzza, and R. Siegwart. See: http://robotics.ethz.ch/~scaramuzza/Davide_Scaramuzza_files/Research/OcamCalib_Tutorial.htm
48  * and the papers:
49  * - 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.
50  * - 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.
51  * - 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.
52  *
53  * After detecting the corners with either method, it's called "cvFindCornerSubPix" to achieve subpixel accuracy.
54  *
55  * \param cornerCoords [OUT] The pixel coordinates of all the corners.
56  * \param check_size_x [IN] The number of squares, in the X direction
57  * \param check_size_y [IN] The number of squares, in the Y direction
58  * \param normalize_image [IN] Whether to normalize the image before detection
59  * \param useScaramuzzaMethod [IN] Whether to use the alternative, more robust method by M. Rufli, D. Scaramuzza, and R. Siegwart.
60  *
61  * \return true on success
62  *
63  * \sa findMultipleChessboardsCorners, mrpt::vision::checkerBoardCameraCalibration, drawChessboardCorners
64  */
66  const mrpt::utils::CImage &img,
67  std::vector<TPixelCoordf> &cornerCoords,
68  unsigned int check_size_x,
69  unsigned int check_size_y,
70  bool normalize_image = true,
71  bool useScaramuzzaMethod = false );
72 
73  /** Look for the corners of one or more chessboard/checkerboards in the image.
74  * This method uses an improved version of OpenCV's cvFindChessboardCorners published
75  * by M. Rufli, D. Scaramuzza, and R. Siegwart. See: http://robotics.ethz.ch/~scaramuzza/Davide_Scaramuzza_files/Research/OcamCalib_Tutorial.htm
76  * and the papers:
77  * - 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.
78  * - 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.
79  * - 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.
80  *
81  * That method has been extended in this MRPT implementation to automatically detect a
82  * number of different checkerboards in the same image.
83  *
84  * \param cornerCoords [OUT] A vector of N vectors of pixel coordinates, for each of the N chessboards detected.
85  * \param check_size_x [IN] The number of squares, in the X direction
86  * \param check_size_y [IN] The number of squares, in the Y direction
87  *
88  *
89  * \sa mrpt::vision::checkerBoardCameraCalibration, drawChessboardCorners
90  */
92  const mrpt::utils::CImage &img,
93  std::vector<std::vector<TPixelCoordf> > &cornerCoords,
94  unsigned int check_size_x,
95  unsigned int check_size_y );
96 
97  /** @} */
98  }
99 }
100 #endif
101 



Page generated by Doxygen 1.8.3 for MRPT 0.9.6 SVN: at Fri Feb 15 22:05:02 EST 2013