CVBpy 15.0
ClassifierFactory Class Reference

Classifier factory holds methods for generating ShapeFinder classifier factory. More...

Inherits object.

Public Member Functions

List[int] gradient_histogram (self, cvb.ImagePlane plane, cvb.Rect aoi, int gradient_type)
 Calculate the gradient histogram. More...
 
cvb.shapefinder2.Classifier learn (self, cvb.ImagePlane plane, cvb.Point2D position, cvb.Rect teach_window, Optional[cvb.Angle] angle_offset, Optional[float] scale_factor, Optional[List[cvb.Point2D]] dont_care_points)
 Creates a ShapeFinder2 classifier from plane 0 of the input image. More...
 

Properties

 contrast_mode = property
 int: Gets or sets the contrast mode to be used for feature extraction (see cvb.shapefinder2.ContrastMode).
 
 contrast_threshold = property
 int: Gets or sets the minimum contrast a feature must have to enter into the classifier.
 
 feature_count = property
 int: Gets or sets the minimum number of features the result classifier should have.
 
 max_coarse_layer_scale = property
 int: Gets or sets the maximum exponent of the scale factor between the coarse layer and the image.
 
 profile_delta = property
 int: Gets or sets the distance (in pixels) between adjacent profile points.
 
 profile_size = property
 int: Gets or sets the profile size which gives the number of profile points to be used for correlation around each feature.
 
 rotation_range = property
 cvb.AngleRange: Gets or sets the range of rotations, that the classifier should be able to cover.
 
 rotation_range_max = property
 cvb.Angle: The maximum range of rotations (in degrees), that may be set on the learner.
 
 scale_range = property
 cvb.NumberRange: Gets or sets the range of scales, that the classifier should be able to cover.
 
 scale_range_max = property
 cvb.NumberRange: The maximum range of scales, that may be set on the learner.
 

Detailed Description

Classifier factory holds methods for generating ShapeFinder classifier factory.

Instantiates a ClassifierFactory object.

Member Function Documentation

◆ gradient_histogram()

List[int] gradient_histogram (   self,
cvb.ImagePlane  plane,
cvb.Rect  aoi,
int  gradient_type 
)

Calculate the gradient histogram.

Parameters

plane : cvb.ImagePlane The image plane in which to calculate the histogram.

aoi : cvb.Rect The area of interest in which to calculate the histogram.

gradient_type : int The gradient operator to calculate the histogram (see cvb.shapefinder2.GradientType).

Returns

List[int] The calculated histogram.

◆ learn()

cvb.shapefinder2.Classifier learn (   self,
cvb.ImagePlane  plane,
cvb.Point2D  position,
cvb.Rect  teach_window,
Optional[cvb.Angle angle_offset,
Optional[float]  scale_factor,
Optional[List[cvb.Point2D]]  dont_care_points 
)

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

Parameters

plane : cvb.ImagePlane The plane in the input image from which to create the classifier.

position : cvb.Point2D The position in the input image at which to extract the classifier.

teach_window : cvb.Rect The teach window for the classifier learning process relative to position.

angle_offset : Optional[cvb.Angle] The initial rotation of the object (default 0.0 degrees).

scale_factor : Optional[float] The initial scale factor of the object (default 0.0).

dont_care_points : Optional[List[cvb.Point2D]] The list of points relative to position from which no features for the classifier should be extracted.

Returns

cvb.shapefinder2.Classifier The newly created classifier.