Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Private Attributes
icl::markers::QuadDetector Class Reference

Tool-class for detecting tilted quads in images. More...

#include <QuadDetector.h>

Inheritance diagram for icl::markers::QuadDetector:
icl::utils::Configurable icl::utils::Uncopyable

List of all members.

Public Types

enum  QuadColor { BlackOnly, WhiteOnly, BlackAndWhite }
 enum, that helps to specify what quads are searched in the threshold-result image More...
typedef std::vector
< utils::Point32f
PVec
 internal typedef for vector of points
typedef std::vector< PVecPVecVec
 internal typedef for vector of vector of points

Public Member Functions

 QuadDetector (QuadColor c=BlackOnly, bool dynamic=false, float minQRating=0.4)
 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::Img8ugetLastBinaryImage () const
 returns the last binary image that was produced internally
icl::cv::RegionDetectorgetRegionDetector ()
 returns the internal region detector instance
const PVecVecgetAllCorners () const
 returns all corners (const)
PVecVecgetAllCorners ()
 returns all corners
const PVecVecgetLongestCorners () const
 returns longest corners (const)
PVecVecgetLongestCorners ()
 returns longest corners
const PVecVecgetSecLongestCorners () const
 returns 2nd longest corners (const)
PVecVecgetSecLongestCorners ()
 returns 2nd longest corners
const PVecVecgetInterCorners () const
 return inter? conrners (const)
PVecVecgetInterCorners ()
 return inter? conrners
const PVecVecgetPerpCorners () const
 returns perpendicular corners (const)
PVecVecgetPerpCorners ()
 returns perpendicular corners
const PVecVecgetMirrorCorners () const
 returns mirror corners (const)
PVecVecgetMirrorCorners ()
 returns mirror corners (const)
std::vector< utils::Point32fcomputeCorners (const cv::ImageRegion &r) const
 computes corners for the given image region

Private Attributes

Data * data
 Internal data pointer (hidden)

Detailed Description

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.

General Information

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.

utils::Configurable interface

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


Member Typedef Documentation

internal typedef for vector of points

internal typedef for vector of vector of points


Member Enumeration Documentation

enum, that helps to specify what quads are searched in the threshold-result image

Enumerator:
BlackOnly 

only quads that are black (default, value 0)

WhiteOnly 

only quads that are white (value 255)

BlackAndWhite 

white and black quads


Constructor & Destructor Documentation

icl::markers::QuadDetector::QuadDetector ( QuadColor  c = BlackOnly,
bool  dynamic = false,
float  minQRating = 0.4 
)

Base constructor.

Parameters:
cthe detected quads binary value
dynamicif this is set to true, there will be a changable property for the quad color, otherwise, the initial value will remain fixed

Destructor.


Member Function Documentation

computes corners for the given image region

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

returns all corners (const)

returns all corners

return inter? conrners (const)

return inter? conrners

returns the last binary image that was produced internally

returns longest corners (const)

returns longest corners

returns mirror corners (const)

returns mirror corners (const)

returns perpendicular corners (const)

returns perpendicular corners

returns the internal region detector instance

returns 2nd longest corners (const)

returns 2nd longest corners


Member Data Documentation

Internal data pointer (hidden)


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines