Go to the documentation of this file.
22 #include <mrpt/examples_config.h>
24 MRPT_EXAMPLES_BASE_DIRECTORY +
string (
"vision_checkerboard_detectors/" );
35 if (!
img .loadFromFile(
myDataDir +
string (
"test_1_checkerboard_9x6.jpg" )))
36 throw std::runtime_error(
"Can't load demo image!" );
39 vector<TPixelCoordf> cornerCoords;
40 const unsigned int checkerboard_size_x = 6;
41 const unsigned int checkerboard_size_y = 9;
44 timlog.
enter (
"findChessboardCorners [OpenCV]" );
48 img , cornerCoords, checkerboard_size_x, checkerboard_size_y,
53 timlog.
leave (
"findChessboardCorners [OpenCV]" );
58 cornerCoords, checkerboard_size_x, checkerboard_size_y);
60 timlog.
enter (
"findChessboardCorners [Scaramuzza]" );
64 img , cornerCoords, checkerboard_size_x, checkerboard_size_y,
69 timlog.
leave (
"findChessboardCorners [Scaramuzza]" );
74 cornerCoords, checkerboard_size_x, checkerboard_size_y);
80 win1.showImage(img_detect1);
83 win2.showImage(img_detect2);
89 while (win1.isOpen() && win2.isOpen())
91 std::this_thread::sleep_for(10ms);
105 catch (std::exception& e)
107 std::cout <<
"MRPT exception caught: " << e.what() << std::endl;
112 printf(
"Untyped exception!!" );
A versatile "profiler" that logs the time spent within each pair of calls to enter(X)-leave(X),...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
void enter(const char *func_name)
Start of a named section.
void TestCheckerboardDetectors()
void dumpAllStats(const size_t column_width=80) const
Dump all stats through the COutputLogger interface.
void clear(bool deep_clear=false)
Resets all stats.
double leave(const char *func_name)
End of a named section.
This class creates a window as a graphical user interface (GUI) for displaying images to the user.
Classes for creating GUI windows for 2D and 3D visualization.
A class for storing images as grayscale or RGB bitmaps.
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.
GLsizei const GLchar ** string
bool drawChessboardCorners(std::vector< TPixelCoordf > &cornerCoords, unsigned int check_size_x, unsigned int check_size_y, unsigned int lines_width=1, unsigned int circles_radius=4)
Draw onto this image the detected corners of a chessboard.
This namespace provides a OS-independent interface to many useful functions: filenames manipulation,...
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