CVB++ 14.0
ClassifierFactory Class Referencefinal

ShapeFinder2 classifier factory object. More...

#include <cvb/shapefinder2/classifier_factory.hpp>

Public Member Functions

 ClassifierFactory () noexcept=default
 The object that holds methods for generating ShapeFinder classifier factory. More...
 
std::vector< int > GradientHistogram (const ImagePlane &plane, Rect< int > aoi, ShapeFinder2::GradientType gradient) const
 Calculate the gradient histogram. More...
 
ValueRange< AngleRotationRangeMax () const noexcept
 The maximum range of rotations (in degrees), that may be set on the learner. More...
 
ValueRange< AngleRotationRange () const noexcept
 Range of rotations, that the classifier should be able to cover. More...
 
void SetRotationRange (ValueRange< Angle > value)
 Range of rotations, that the classifier should be able to cover. More...
 
ValueRange< double > ScaleRangeMax () const noexcept
 The maximum range of scales, that may be set on the learner. More...
 
ValueRange< double > ScaleRange () const noexcept
 Range of scales, that the classifier should be able to cover. More...
 
void SetScaleRange (ValueRange< double > value)
 Range of scales, that the classifier should be able to cover. More...
 
int FeatureCount () const noexcept
 Minimum number of features the result classifier should have. More...
 
void SetFeatureCount (int value)
 Minimum number of features the result classifier should have. More...
 
int ContrastThreshold () const noexcept
 Minimum contrast a feature must have to enter into the classifier. More...
 
void SetContrastThreshold (int value)
 Minimum contrast a feature must have to enter into the classifier. More...
 
int MaxCoarseLayerScale () const noexcept
 Maximum exponent of the scale factor between the coarse layer and the image. More...
 
void SetMaxCoarseLayerScale (int value)
 Maximum exponent of the scale factor between the coarse layer and the image. More...
 
Cvb::ShapeFinder2::ContrastMode ContrastMode () const noexcept
 Contrast mode to be used for feature extraction. More...
 
void SetContrastMode (Cvb::ShapeFinder2::ContrastMode mode) noexcept
 Contrast mode to be used for feature extraction. More...
 
int ProfileSize () const noexcept
 Profile size gives the number of profile points to be used for correlation around each feature. More...
 
void SetProfileSize (int value)
 Profile size gives the number of profile points to be used for correlation around each feature. More...
 
int ProfileDelta () const noexcept
 Distance (in pixels) between adjacent profile points. More...
 
void SetProfileDelta (int value)
 Distance (in pixels) between adjacent profile points. More...
 
std::unique_ptr< ClassifierLearn (const ImagePlane &plane, Point2D< double > position, Rect< int > teachWindow, const std::vector< Point2D< int > > &dontCarePoints) const
 Creates a ShapeFinder2 classifier from plane 0 of the input image. More...
 
std::unique_ptr< ClassifierLearn (const ImagePlane &plane, Point2D< double > position, Rect< int > teachWindow) const
 Create a ShapeFinder2 classifier from plane 0 of the input image. More...
 
std::unique_ptr< ClassifierLearn (const ImagePlane &plane, Point2D< double > position, Angle angleOffset, double scaleFactor, Rect< int > teachWindow) const
 Create a ShapeFinder2 classifier from the input image. More...
 
std::unique_ptr< ClassifierLearn (const ImagePlane &plane, Point2D< double > position, Angle angleOffset, double scaleFactor, Rect< int > teachWindow, const std::vector< Point2D< int > > &dontCarePoints) const
 Create a ShapeFinder2 classifier from the input image. More...
 

Detailed Description

ShapeFinder2 classifier factory object.

Examples
ShapeFinder2/QtShapeFinder2.

Constructor & Destructor Documentation

◆ ClassifierFactory()

ClassifierFactory ( )
defaultnoexcept

The object that holds methods for generating ShapeFinder classifier factory.

Exceptions
Doesnot throw any exception.

Member Function Documentation

◆ ContrastMode()

Contrast mode to be used for feature extraction.

Returns
The contrast mode
Exceptions
Doesnot throw any exception.

◆ ContrastThreshold()

int ContrastThreshold ( ) const
inlinenoexcept

Minimum contrast a feature must have to enter into the classifier.

Returns
The minimum contrast
Exceptions
Doesnot throw any exception.

◆ FeatureCount()

int FeatureCount ( ) const
inlinenoexcept

Minimum number of features the result classifier should have.

Returns
The minimum number of features
Exceptions
Doesnot throw any exception.

◆ GradientHistogram()

std::vector< int > GradientHistogram ( const ImagePlane plane,
Rect< int >  aoi,
ShapeFinder2::GradientType  gradient 
) const
inline

Calculate the gradient histogram.

Parameters
[in]planeThe image plane in which to calculate the histogram.
[in]aoiThe area of interest in which to calculate the histogram.
[in]gradientThe gradient operator to calculate the histogram.
Returns
The calculated histogram
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Learn() [1/4]

std::unique_ptr< Classifier > Learn ( const ImagePlane plane,
Point2D< double >  position,
Angle  angleOffset,
double  scaleFactor,
Rect< int >  teachWindow 
) const
inline

Create a ShapeFinder2 classifier from the input image.

Parameters
[in]planeThe image plane to create the classifier from.
[in]positionThe position in the input image at which to extract the classifier.
[in]angleOffsetThe initial rotation of the object.
[in]scaleFactorThe initial scale factor of the object.
[in]teachWindowThe teach window for the classifier learning process relative to position.
Returns
The newly created classifier
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Learn() [2/4]

std::unique_ptr< Classifier > Learn ( const ImagePlane plane,
Point2D< double >  position,
Angle  angleOffset,
double  scaleFactor,
Rect< int >  teachWindow,
const std::vector< Point2D< int > > &  dontCarePoints 
) const
inline

Create a ShapeFinder2 classifier from the input image.

Parameters
[in]planeThe image plane to create the classifier from.
[in]positionThe position in the input image at which to extract the classifier.
[in]angleOffsetThe initial rotation of the object.
[in]scaleFactorThe initial scale factor of the object.
[in]teachWindowThe teach window for the classifier learning process relative to position.
[in]dontCarePointsThe list of points relative to position from which no features for the classifier should be extracted.
Returns
The newly created classifier
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Learn() [3/4]

std::unique_ptr< Classifier > Learn ( const ImagePlane plane,
Point2D< double >  position,
Rect< int >  teachWindow 
) const
inline

Create a ShapeFinder2 classifier from plane 0 of the input image.

Parameters
[in]planeThe plane in the input image from which to create the classifier.
[in]positionThe position in the input image at which to extract the classifier.
[in]teachWindowThe teach window for the classifier learning process relative to position.
Returns
The newly created classifier
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Learn() [4/4]

std::unique_ptr< Classifier > Learn ( const ImagePlane plane,
Point2D< double >  position,
Rect< int >  teachWindow,
const std::vector< Point2D< int > > &  dontCarePoints 
) const
inline

Creates a ShapeFinder2 classifier from plane 0 of the input image.

Parameters
[in]planeThe plane in the input image from which to create the classifier.
[in]positionThe position in the input image at which to extract the classifier.
[in]teachWindowThe teach window for the classifier learning process relative to position.
[in]dontCarePointsThe list of points relative to position from which no features for the classifier should be extracted.
Returns
The newly created classifier
Exceptions
Anyexception derived from std::exception including CvbException.
Examples
ShapeFinder2/QtShapeFinder2.

◆ MaxCoarseLayerScale()

int MaxCoarseLayerScale ( ) const
inlinenoexcept

Maximum exponent of the scale factor between the coarse layer and the image.

Returns
The maximum exponent of the scale factor
Exceptions
Doesnot throw any exception.

◆ ProfileDelta()

int ProfileDelta ( ) const
inlinenoexcept

Distance (in pixels) between adjacent profile points.

Returns
The profile delta
Exceptions
Doesnot throw any exception.

◆ ProfileSize()

int ProfileSize ( ) const
inlinenoexcept

Profile size gives the number of profile points to be used for correlation around each feature.

Returns
The profile size
Exceptions
Doesnot throw any exception.

◆ RotationRange()

ValueRange< Angle > RotationRange ( ) const
inlinenoexcept

Range of rotations, that the classifier should be able to cover.

Returns
The range of rotations
Exceptions
Doesnot throw any exception.

◆ RotationRangeMax()

ValueRange< Angle > RotationRangeMax ( ) const
inlinenoexcept

The maximum range of rotations (in degrees), that may be set on the learner.

Returns
The maximum range of rotations
Exceptions
Doesnot throw any exception.

◆ ScaleRange()

ValueRange< double > ScaleRange ( ) const
inlinenoexcept

Range of scales, that the classifier should be able to cover.

Returns
The range of scales
Exceptions
Doesnot throw any exception.

◆ ScaleRangeMax()

ValueRange< double > ScaleRangeMax ( ) const
inlinenoexcept

The maximum range of scales, that may be set on the learner.

Returns
The maximum range of scales
Exceptions
Doesnot throw any exception.

◆ SetContrastMode()

void SetContrastMode ( Cvb::ShapeFinder2::ContrastMode  mode)
inlinenoexcept

Contrast mode to be used for feature extraction.

Parameters
[in]modeThe contrast mode.
Exceptions
Doesnot throw any exception.

◆ SetContrastThreshold()

void SetContrastThreshold ( int  value)
inline

Minimum contrast a feature must have to enter into the classifier.

Parameters
[in]valueThe minimum contrast.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ SetFeatureCount()

void SetFeatureCount ( int  value)
inline

Minimum number of features the result classifier should have.

Parameters
[in]valueThe minimum number of features.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ SetMaxCoarseLayerScale()

void SetMaxCoarseLayerScale ( int  value)
inline

Maximum exponent of the scale factor between the coarse layer and the image.

Parameters
[in]valueThe maximum exponent of the scale factor.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ SetProfileDelta()

void SetProfileDelta ( int  value)
inline

Distance (in pixels) between adjacent profile points.

Parameters
[in]valueThe profile delta.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ SetProfileSize()

void SetProfileSize ( int  value)
inline

Profile size gives the number of profile points to be used for correlation around each feature.

Parameters
[in]valueThe profile size.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ SetRotationRange()

void SetRotationRange ( ValueRange< Angle value)
inline

Range of rotations, that the classifier should be able to cover.

Parameters
[in]valueThe minimum and maximum rotation range.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ SetScaleRange()

void SetScaleRange ( ValueRange< double >  value)
inline

Range of scales, that the classifier should be able to cover.

Parameters
[in]valueThe minimum and maximum scale range.
Exceptions
Anyexception derived from std::exception including CvbException.