CVB.Net 14.0
ClassifierFactory Class Reference

Object that aggregates the learning parameters and produces a ShapeFinder2 classifier More...

Public Member Functions

Classifier Learn (ImagePlane plane, Point2D position, Rect teachWindow, IEnumerable< Point2D > dontCarePoints)
 Create a ShapeFinder2 classifier from the input image plane . More...
 
Classifier Learn (ImagePlane plane, Point2D position, Rect teachWindow)
 Create a ShapeFinder2 classifier from the input image plane . If the input plane has overlay information, then this overlay information will be extracted and used as don't care points. More...
 
Classifier Learn (ImagePlane plane, Point2D position, Angle angleOffset, double scaleFactor, Rect teachWindow)
 Create a ShapeFinder2 classifier from the input image plane . If the input plane has overlay information, then this overlay information will be extracted and used as don't care points. More...
 
Classifier Learn (ImagePlane plane, Point2D position, Angle angleOffset, double scaleFactor, Rect teachWindow, IEnumerable< Point2D > dontCarePoints)
 Create a ShapeFinder2 classifier from the input More...
 

Static Public Attributes

static readonly ValueRange< AngleRotationRangeMax = new ValueRange<Angle>(Angle.FromDegrees(-180.0), Angle.FromDegrees(180.0))
 The maximum range of rotations (in degrees) that may be set on the learner.
 
static readonly ValueRange< double > ScaleRangeMax = new ValueRange<double>(0.66, 1.50)
 The maximum range of scales that may be set on the learner.
 
const int FeatureCountMin = 10
 Minimum number of features a classifier must have.
 
const int ContrastThresholdMin = 1
 Minimum contrast for features eligible for entering the classifier.
 

Properties

ValueRange< AngleRotationRange [get, set]
 Range of rotations that the classifier should be able to cover. Bigger ranges will cause higher processing time. More...
 
ValueRange< double > ScaleRange [get, set]
 Range of rotations that the classifier should be able to cover. Bigger ranges will cause higher processing time. Angles are measured in degrees. More...
 
int FeatureCount [get, set]
 Minimum number of features the result classifier should have More...
 
int ContrastThreshold [get, set]
 Minimum contrast a feature must have to enter into the classifier. More...
 
int MaxCoarseLayerScale [get, set]
 Maximum exponent of the scale factor between the coarse layer (used for feature search) and the image. The scale factor is determined by 2^scale, e.g. for MaxCoarseLayerScale = 3, the scale factor is 2^3 = More...
 
int ProfileSize [get, set]
 Profile size gives the number of profile points to be used for correlation around each feature. With the default value of 1, only the feature locations will be used for the optional correlation steps during a ShapeFinder2 search. When set to values > 1 a number of additional points on a line perpendicular to the edge through the feature will be used. Only odd values are valid here. The spacing of the additional points is controlled by the ProfileDelta property. More...
 
int ProfileDelta [get, set]
 Distance (in pixels) between adjacent profile points. This value only has an effect if the ProfileSize property is > 1. More...
 

Detailed Description

Object that aggregates the learning parameters and produces a ShapeFinder2 classifier

Member Function Documentation

◆ Learn() [1/4]

Classifier Learn ( ImagePlane  plane,
Point2D  position,
Angle  angleOffset,
double  scaleFactor,
Rect  teachWindow 
)

Create a ShapeFinder2 classifier from the input image plane . If the input plane has overlay information, then this overlay information will be extracted and used as don't care points.

Parameters
planeimage plane to create the classifier from
positionposition in the input image at which to extract the classifier
teachWindowteach window for the classifier learning process relative to position
angleOffsetinitial rotation of the object; this angle will be added to the measured angle of the found object(s) at the end of the search function
scaleFactorinitial scale factor of the object; this scale factor will be multiplied with the measured scale factor of the found object(s) at the end of the search function
Returns
the newly created classifier
Exceptions
ArgumentNullExceptionIf the Parent of the plane parameter is null
ObjectDisposedExceptionIf the Parent of plane has already been disposed
CvbExceptionwhen trying to learn a classifier from an image plane that does not have the data type 8 bits per pixel unsigned, or if an unspecific error occurs

◆ Learn() [2/4]

Classifier Learn ( ImagePlane  plane,
Point2D  position,
Angle  angleOffset,
double  scaleFactor,
Rect  teachWindow,
IEnumerable< Point2D dontCarePoints 
)

Create a ShapeFinder2 classifier from the input

Parameters
planeplane in the input image from which to create the classifier
positionposition in the input image at which to extract the classifier
teachWindowteach window for the classifier learning process relative to position
angleOffsetinitial rotation of the object; this angle will be added to the measured angle of the found object(s) at the end of the search function
scaleFactorinitial scale factor of the object; this scale factor will be multiplied with the measured scale factor of the found object(s) at the end of the search function
dontCarePointslist of points relative to position from which no features for the classifier should be extracted

; an empty list or null handle is acceptable here if no don't care points are to be used

Returns
the newly created classifier
Exceptions
ArgumentNullExceptionIf the Parent of the plane parameter is null
ObjectDisposedExceptionIf the Parent of plane has already been disposed
CvbExceptionwhen trying to learn a classifier from an image plane that does not have the data type 8 bits per pixel unsigned, or if an unspecific error occurs

◆ Learn() [3/4]

Classifier Learn ( ImagePlane  plane,
Point2D  position,
Rect  teachWindow 
)

Create a ShapeFinder2 classifier from the input image plane . If the input plane has overlay information, then this overlay information will be extracted and used as don't care points.

Parameters
planeimage plane to create the classifier from
positionposition in the input image at which to extract the classifier
teachWindowteach window for the classifier learning process relative to position
Returns
the newly created classifier
Exceptions
ArgumentNullExceptionIf the Parent of the plane parameter is null
ObjectDisposedExceptionIf the Parent of plane has already been disposed
CvbExceptionwhen trying to learn a classifier from an image plane that does not have the data type 8 bits per pixel unsigned, or if an unspecific error occurs

◆ Learn() [4/4]

Classifier Learn ( ImagePlane  plane,
Point2D  position,
Rect  teachWindow,
IEnumerable< Point2D dontCarePoints 
)

Create a ShapeFinder2 classifier from the input image plane .

Parameters
planeimage plane to create the classifier from
positionposition in the input image at which to extract the classifier
teachWindowteach window for the classifier learning process relative to position
dontCarePointslist of points relative to position from which no features for the classifier should be extracted

; an empty list or null handle is acceptable here if no don't care points are to be used

Returns
the newly created classifier
Exceptions
ArgumentNullExceptionIf the Parent of the plane parameter is null
ObjectDisposedExceptionIf the Parent of plane has already been disposed
CvbExceptionwhen trying to learn a classifier from an image plane that does not have the data type 8 bits per pixel unsigned, or if an unspecific error occurs

Property Documentation

◆ ContrastThreshold

int ContrastThreshold
getset

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

Exceptions
ArgumentOutOfRangeExceptionIf the contrast threshold is below the minimum defined by ContrastThresholdMin

◆ FeatureCount

int FeatureCount
getset

Minimum number of features the result classifier should have

Exceptions
ArgumentOutOfRangeExceptionIf the feature count is below the minimum defined by FeatureCountMin

◆ MaxCoarseLayerScale

int MaxCoarseLayerScale
getset

Maximum exponent of the scale factor between the coarse layer (used for feature search) and the image. The scale factor is determined by 2^scale, e.g. for MaxCoarseLayerScale = 3, the scale factor is 2^3 =

  1. When set to -1 (default) the coarse layer scale will be determined automatically by ShapeFinder2 depending on the image size and number features that were extracted.
Exceptions
ArgumentOutOfRangeExceptionIf the scale is less than -1

◆ ProfileDelta

int ProfileDelta
getset

Distance (in pixels) between adjacent profile points. This value only has an effect if the ProfileSize property is > 1.

Exceptions
ArgumentOutOfRangeExceptionIf the ProfileDelta is less than 1

◆ ProfileSize

int ProfileSize
getset

Profile size gives the number of profile points to be used for correlation around each feature. With the default value of 1, only the feature locations will be used for the optional correlation steps during a ShapeFinder2 search. When set to values > 1 a number of additional points on a line perpendicular to the edge through the feature will be used. Only odd values are valid here. The spacing of the additional points is controlled by the ProfileDelta property.

Exceptions
ArgumentOutOfRangeExceptionIf the ProfileSize is less than 1
ArgumentExceptionIf the ProfileSize is not an odd number

◆ RotationRange

ValueRange<Angle> RotationRange
getset

Range of rotations that the classifier should be able to cover. Bigger ranges will cause higher processing time.

Exceptions
ArgumentOutOfRangeExceptionIf the rotation range to be set exceeds the one defined in RotationRangeMax

◆ ScaleRange

ValueRange<double> ScaleRange
getset

Range of rotations that the classifier should be able to cover. Bigger ranges will cause higher processing time. Angles are measured in degrees.

Exceptions
ArgumentOutOfRangeExceptionIf the rotation range to be set exceeds the one defined in RotationRangeMax