Main MRPT website > C++ reference for MRPT 1.5.7
chessboard_find_corners.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+ */
9 
10 #ifndef mrpt_vision_find_chessboard_H
11 #define mrpt_vision_find_chessboard_H
12 
13 #include <mrpt/utils/CImage.h>
14 
15 #include <mrpt/vision/types.h>
17 
18 namespace mrpt
19 {
20  namespace vision
21  {
22  /** \addtogroup chessboard_calib
23  @{ */
24 
25  /** Look for the corners of a chessboard in the image using one of two different methods.
26  *
27  * The search algorithm will be OpenCV's function cvFindChessboardCorners or its improved
28  * version published by M. Rufli, D. Scaramuzza, and R. Siegwart. See: http://robotics.ethz.ch/~scaramuzza/Davide_Scaramuzza_files/Research/OcamCalib_Tutorial.htm
29  * and the papers:
30  * - 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.
31  * - 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.
32  * - 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.
33  *
34  * After detecting the corners with either method, it's called "cvFindCornerSubPix" to achieve subpixel accuracy.
35  *
36  * \param cornerCoords [OUT] The pixel coordinates of all the corners.
37  * \param check_size_x [IN] The number of squares, in the X direction
38  * \param check_size_y [IN] The number of squares, in the Y direction
39  * \param normalize_image [IN] Whether to normalize the image before detection
40  * \param useScaramuzzaMethod [IN] Whether to use the alternative, more robust method by M. Rufli, D. Scaramuzza, and R. Siegwart.
41  *
42  * \return true on success
43  *
44  * \sa findMultipleChessboardsCorners, mrpt::vision::checkerBoardCameraCalibration, drawChessboardCorners
45  */
47  const mrpt::utils::CImage &img,
48  std::vector<mrpt::utils::TPixelCoordf> &cornerCoords,
49  unsigned int check_size_x,
50  unsigned int check_size_y,
51  bool normalize_image = true,
52  bool useScaramuzzaMethod = false );
53 
54  /** Look for the corners of one or more chessboard/checkerboards in the image.
55  * This method uses an improved version of OpenCV's cvFindChessboardCorners published
56  * by M. Rufli, D. Scaramuzza, and R. Siegwart. See: http://robotics.ethz.ch/~scaramuzza/Davide_Scaramuzza_files/Research/OcamCalib_Tutorial.htm
57  * and the papers:
58  * - 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.
59  * - 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.
60  * - 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.
61  *
62  * That method has been extended in this MRPT implementation to automatically detect a
63  * number of different checkerboards in the same image.
64  *
65  * \param cornerCoords [OUT] A vector of N vectors of pixel coordinates, for each of the N chessboards detected.
66  * \param check_size_x [IN] The number of squares, in the X direction
67  * \param check_size_y [IN] The number of squares, in the Y direction
68  *
69  *
70  * \sa mrpt::vision::checkerBoardCameraCalibration, drawChessboardCorners
71  */
73  const mrpt::utils::CImage &img,
74  std::vector<std::vector<mrpt::utils::TPixelCoordf> > &cornerCoords,
75  unsigned int check_size_x,
76  unsigned int check_size_y );
77 
78  /** @} */
79  }
80 }
81 #endif
82 
A class for storing images as grayscale or RGB bitmaps.
Definition: CImage.h:102
GLint GLvoid * img
Definition: glext.h:3645
void VISION_IMPEXP findMultipleChessboardsCorners(const mrpt::utils::CImage &img, std::vector< std::vector< mrpt::utils::TPixelCoordf > > &cornerCoords, unsigned int check_size_x, unsigned int check_size_y)
Look for the corners of one or more chessboard/checkerboards in the image.
bool VISION_IMPEXP findChessboardCorners(const mrpt::utils::CImage &img, std::vector< mrpt::utils::TPixelCoordf > &cornerCoords, unsigned int check_size_x, unsigned int check_size_y, bool normalize_image=true, bool useScaramuzzaMethod=false)
Look for the corners of a chessboard in the image using one of two different methods.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.



Page generated by Doxygen 1.9.1 for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at mar 26 may 2026 13:12:03 CEST