#include <corner_detection.h>
Collaboration diagram for mimas::camera_calibration::corner_detection:

Public Types | |
| typedef boost::numeric::ublas::matrix< point_f > | MatrixPoint |
| a matrix of points | |
| typedef boost::numeric::ublas::matrix< pixel_f > | MatrixPixel |
| a matrix of pixels | |
| typedef boost::numeric::ublas::matrix< double > | Matrix |
| a matrix of doubles | |
| typedef rgba< unsigned char > | pixel_rgba |
| a pixel | |
Public Member Functions | |
| corner_detection (int size_x, int size_y, int size_window, pixel_rgba white, pixel_rgba black) | |
| Constructor. | |
| ~corner_detection (void) | |
| Destructor. | |
| void | findCorners (image< pixel_rgba > img, std::vector< pixel_f > pix, double min_corr) throw (mimasexception) |
| Finds the corners of an chessboard, given the 4 extreme corners. | |
| MatrixPixel | getCorners () |
| Returns the matrix of the found corners. | |
The algorithm, given the 4 extreme corners, computes an homography in order to get a first approximation of all the corners, and then searches for the corner in a square window around the approximation.
Definition at line 37 of file corner_detection.h.
| typedef boost::numeric::ublas::matrix< point_f > mimas::camera_calibration::corner_detection::MatrixPoint |
| typedef boost::numeric::ublas::matrix< pixel_f > mimas::camera_calibration::corner_detection::MatrixPixel |
| typedef boost::numeric::ublas::matrix< double > mimas::camera_calibration::corner_detection::Matrix |
| typedef rgba< unsigned char > mimas::camera_calibration::corner_detection::pixel_rgba |
| mimas::camera_calibration::corner_detection::corner_detection | ( | int | size_x, | |
| int | size_y, | |||
| int | size_window, | |||
| pixel_rgba | white, | |||
| pixel_rgba | black | |||
| ) |
Constructor.
Initializes the template of the cross for the correlation algorithm
| size_x | width of the chessboard (number of black squares) | |
| size_y | height of the chessboard (number of black squares) | |
| size_window | the size of the square to look for the corners (the parameter is half the size of an edge of the square) | |
| white | the value of a white pixel on the picture | |
| black | the value of a black pixel on the picture |
| mimas::camera_calibration::corner_detection::~corner_detection | ( | void | ) |
Destructor.
| void mimas::camera_calibration::corner_detection::findCorners | ( | image< pixel_rgba > | img, | |
| std::vector< pixel_f > | pix, | |||
| double | min_corr | |||
| ) | throw (mimasexception) |
Finds the corners of an chessboard, given the 4 extreme corners.
This function computes with the extrem corners an homography in order to get a first approximation of the corner locations, and uses the detection algorithm in a window around the approximed pixel, to get the accurate one.
| img | the mimas image | |
| pix | a std::vector of the 4 extreme corners | |
| min_corr | the minimum correlation to be calculated to assume that the result is accurate. 0.85 or 0.90 seem to be good values. |
| MatrixPixel mimas::camera_calibration::corner_detection::getCorners | ( | ) | [inline] |