Image Component Library (ICL)
|
Utility class wrapping OpenCV's cvFindChessboardCorners. More...
#include <CheckerboardDetector.h>
Classes | |
struct | Checkerboard |
Internally used and returned result structure. More... | |
Public Member Functions | |
CheckerboardDetector () | |
Default constructor (creates a null instance) | |
CheckerboardDetector (const utils::Size &size) | |
Constructor with given checkerboard size. | |
~CheckerboardDetector () | |
Destructor. | |
void | init (const utils::Size &size) |
for deferred initialization | |
bool | isNull () const |
returns whether this instance has been initilialized yet | |
const Checkerboard & | detect (const core::Img8u &image) |
detects the defined checkerboard in the given image | |
Private Member Functions | |
void | init_properties () |
intializes configurable properties internally | |
Private Attributes | |
Data * | m_data |
internal data data |
Utility class wrapping OpenCV's cvFindChessboardCorners.
The CheckerboardDetector wrappes OpenCV's cvFindChessboardCorners and provides a flag to optionally optimize the detected corners using cvFindCornerSubPix
Default constructor (creates a null instance)
icl::cv::CheckerboardDetector::CheckerboardDetector | ( | const utils::Size & | size | ) |
Constructor with given checkerboard size.
Please note: the checkerboard size given relates to the inner checkerboard corners that are expected. So if the checkerboard has 5 by 5 fields, i.e. the first row is like BWBWB (Black/White), then you have to pass a size of 4x4
Destructor.
const Checkerboard& icl::cv::CheckerboardDetector::detect | ( | const core::Img8u & | image | ) |
detects the defined checkerboard in the given image
The image can have any format, but internally is is always converted to gray (if it is not of formatGray). If optSubPix was set in either the constructor or in init, the returned corners are automatically optimized using cvFindCornerSubPix
void icl::cv::CheckerboardDetector::init | ( | const utils::Size & | size | ) |
for deferred initialization
Please note: the checkerboard size given relates to the inner checkerboard corners that are expected. So if the checkerboard has 5 by 5 fields, i.e. the first row is like BWBWB (Black/White), then you have to pass a size of 4x4
void icl::cv::CheckerboardDetector::init_properties | ( | ) | [private] |
intializes configurable properties internally
bool icl::cv::CheckerboardDetector::isNull | ( | ) | const |
returns whether this instance has been initilialized yet
Data* icl::cv::CheckerboardDetector::m_data [private] |
internal data data
internal data pointer