Image Component Library (ICL)
|
Tool-class for detecting tilted quads in images. More...
#include <QuadDetector.h>
Public Types | |
enum | QuadColor { BlackOnly, WhiteOnly, BlackAndWhite } |
enum, that helps to specify what quads are searched in the threshold-result image More... | |
Public Member Functions | |
QuadDetector (QuadColor c=BlackOnly, bool dynamic=false) | |
Base constructor. | |
~QuadDetector () | |
Destructor. | |
const std::vector< TiltedQuad > & | detect (const core::ImgBase *image) |
apply-method, that extracts quad-like structures in the input image | |
const core::Img8u & | getLastBinaryImage () const |
returns the last binary image that was produced internally | |
Private Attributes | |
Data * | data |
Internal data pointer (hidden) |
Tool-class for detecting tilted quads in images.
The quad detector combines usual steps that are used to find quad-like structures in input images.
The QuadDetector combines a local threshold preprocessor, optional further preprocessing steps such as median or morphological operations with an icl::cv::RegionDetector based search for regions with 4 corners.
The QuadDetector forwards the local-threshold and the RegionDetector options. It also adds some extra properties for the post-processing the local-threshold result image before it's passed to the region detector internally
icl::markers::QuadDetector::QuadDetector | ( | QuadColor | c = BlackOnly , |
bool | dynamic = false |
||
) |
Base constructor.
c | the detected quads binary value |
dynamic | if this is set to true, there will be a changable property for the quad color, otherwise, the initial value will remain fixed |
Destructor.
const std::vector<TiltedQuad>& icl::markers::QuadDetector::detect | ( | const core::ImgBase * | image | ) |
apply-method, that extracts quad-like structures in the input image
This method first applys a local threshold to the given input image, which results in a binary icl8u-image. This image is then optionally processed by a median and/or by some morphological operations
const core::Img8u& icl::markers::QuadDetector::getLastBinaryImage | ( | ) | const |
returns the last binary image that was produced internally
Data* icl::markers::QuadDetector::data [private] |
Internal data pointer (hidden)