Main MRPT website > C++ reference for MRPT 1.9.9
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-2018, 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/img/CImage.h>
14 
15 #include <mrpt/vision/types.h>
16 
17 namespace mrpt
18 {
19 namespace vision
20 {
21 /** \addtogroup chessboard_calib
22  @{ */
23 
24 /** Look for the corners of a chessboard in the image using one of two different
25  *methods.
26  *
27  * The search algorithm will be OpenCV's function cvFindChessboardCorners or
28  *its improved
29  * version published by M. Rufli, D. Scaramuzza, and R. Siegwart. See:
30  *http://robotics.ethz.ch/~scaramuzza/Davide_Scaramuzza_files/Research/OcamCalib_Tutorial.htm
31  * and the papers:
32  * - 1. Scaramuzza, D., Martinelli, A. and Siegwart, R. (2006), A Toolbox
33  *for
34  *Easily Calibrating Omnidirectional Cameras, Proceedings of the IEEE/RSJ
35  *International Conference on Intelligent Robots and Systems (IROS 2006),
36  *Beijing, China, October 2006.
37  * - 2. Scaramuzza, D., Martinelli, A. and Siegwart, R., (2006). "A
38  *Flexible
39  *Technique for Accurate Omnidirectional Camera Calibration and Structure from
40  *Motion", Proceedings of IEEE International Conference of Vision Systems
41  *(ICVS'06), New York, January 5-7, 2006.
42  * - 3. Rufli, M., Scaramuzza, D., and Siegwart, R. (2008), Automatic
43  *Detection of Checkerboards on Blurred and Distorted Images, Proceedings of
44  *the IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS
45  *2008), Nice, France, September 2008.
46  *
47  * After detecting the corners with either method, it's called
48  *"cvFindCornerSubPix" to achieve subpixel accuracy.
49  *
50  * \param cornerCoords [OUT] The pixel coordinates of all the corners.
51  * \param check_size_x [IN] The number of squares, in the X direction
52  * \param check_size_y [IN] The number of squares, in the Y direction
53  * \param normalize_image [IN] Whether to normalize the image before detection
54  * \param useScaramuzzaMethod [IN] Whether to use the alternative, more robust
55  *method by M. Rufli, D. Scaramuzza, and R. Siegwart.
56  *
57  * \return true on success
58  *
59  * \sa findMultipleChessboardsCorners,
60  *mrpt::vision::checkerBoardCameraCalibration, drawChessboardCorners
61  */
63  const mrpt::img::CImage& img,
64  std::vector<mrpt::img::TPixelCoordf>& cornerCoords,
65  unsigned int check_size_x, unsigned int check_size_y,
66  bool normalize_image = true, bool useScaramuzzaMethod = false);
67 
68 /** Look for the corners of one or more chessboard/checkerboards in the image.
69  * This method uses an improved version of OpenCV's cvFindChessboardCorners
70  *published
71  * by M. Rufli, D. Scaramuzza, and R. Siegwart. See:
72  *http://robotics.ethz.ch/~scaramuzza/Davide_Scaramuzza_files/Research/OcamCalib_Tutorial.htm
73  * and the papers:
74  * - 1. Scaramuzza, D., Martinelli, A. and Siegwart, R. (2006), A Toolbox
75  *for
76  *Easily Calibrating Omnidirectional Cameras, Proceedings of the IEEE/RSJ
77  *International Conference on Intelligent Robots and Systems (IROS 2006),
78  *Beijing, China, October 2006.
79  * - 2. Scaramuzza, D., Martinelli, A. and Siegwart, R., (2006). "A
80  *Flexible
81  *Technique for Accurate Omnidirectional Camera Calibration and Structure from
82  *Motion", Proceedings of IEEE International Conference of Vision Systems
83  *(ICVS'06), New York, January 5-7, 2006.
84  * - 3. Rufli, M., Scaramuzza, D., and Siegwart, R. (2008), Automatic
85  *Detection of Checkerboards on Blurred and Distorted Images, Proceedings of
86  *the IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS
87  *2008), Nice, France, September 2008.
88  *
89  * That method has been extended in this MRPT implementation to automatically
90  *detect a
91  * number of different checkerboards in the same image.
92  *
93  * \param cornerCoords [OUT] A vector of N vectors of pixel coordinates, for
94  *each of the N chessboards detected.
95  * \param check_size_x [IN] The number of squares, in the X direction
96  * \param check_size_y [IN] The number of squares, in the Y direction
97  *
98  *
99  * \sa mrpt::vision::checkerBoardCameraCalibration, drawChessboardCorners
100  */
102  const mrpt::img::CImage& img,
103  std::vector<std::vector<mrpt::img::TPixelCoordf>>& cornerCoords,
104  unsigned int check_size_x, unsigned int check_size_y);
105 
106 /** @} */
107 }
108 }
109 #endif
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CKalmanFilterCapable.h:30
mrpt::vision::findMultipleChessboardsCorners
void findMultipleChessboardsCorners(const mrpt::img::CImage &img, std::vector< std::vector< mrpt::img::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.
Definition: checkerboard_find_corners.cpp:135
mrpt::img::CImage
A class for storing images as grayscale or RGB bitmaps.
Definition: img/CImage.h:130
img
GLint GLvoid * img
Definition: glext.h:3763
mrpt::vision::findChessboardCorners
bool findChessboardCorners(const mrpt::img::CImage &img, std::vector< mrpt::img::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.
Definition: checkerboard_find_corners.cpp:35
CImage.h
types.h



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST