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



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: c7a3bec24 Sun Mar 29 18:33:13 2020 +0200 at dom mar 29 18:50:38 CEST 2020