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



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020