ShapeFinder2 classifier object. More...
Inherits object.
Public Member Functions | |
cvb.Angle | angular_tolerance (self) |
Gets the acceptance parameter for feature gradient angles. More... | |
int | gradient_type (self) |
Gets the gradient type this classifier uses for feature extraction. More... | |
None | save (self, str file_name) |
Writes the classifier to a file. More... | |
List[cvb.shapefinder2.SearchResult] | search_all (self, cvb.ImagePlane plane, cvb.Rect aoi, int precision, float relative_threshold, int minimum_threshold, int coarse_locality, Optional[cvb.AngleRange] rotation_range, Optional[cvb.NumberRange] scale_range) |
Use this classifier to perform a ShapeFinder search on an image plane. More... | |
None | set_angular_tolerance (self, cvb.Angle angular_tolerance) |
Sets the acceptance parameter for feature gradient angles. More... | |
bool | use_cuda (self, int status) |
Set the flag to use CUDA if possible or to force not using CUDA. More... | |
cvb.Image | visualization (self, Optional[int] layer=-1) |
Creates and returns a color coded image representation of this ShapeFinder classifier. More... | |
Properties | |
coarse_features = property | |
List[cvb.Point2D]: The features the classifier uses on the coarsely granular level. | |
coarse_scale = property | |
int: Scale factor between the fine and the coarse feature level. | |
comment = property | |
str: Gets or sets the comment assigned to the classifier. | |
contrast_mode = property | |
int: Contrast mode for which this classifier has been created (see cvb.shapefinder2.ContrastMode). | |
contrast_threshold = property | |
int: Gets or sets the threshold for the gradient slope. | |
feature_count = property | |
int: Gets the number of features this classifier contains. | |
feature_window = property | |
cvb.Rect: Gets the feature window of this classifier. | |
file_name = property | |
str: Gets the name of the file, from which this classifier was loaded. | |
fine_features = property | |
List[cvb.Point2D]: The features the classifier uses on the finely granular level. | |
num_layers = property | |
int: Number of layers in the classifier. | |
rotation = property | |
cvb.AngleRange: Range of rotations for which this classifier has been generated. | |
rotation_step = property | |
float: Step size at which the rotations in the classifier have been generated. | |
scale = property | |
cvb.NumberRange: Range of scales for which this classifier has been generated. | |
scale_step = property | |
float: Step size at which the scales in the classifier have been generated. | |
training_window = property | |
cvb.Rect: Training window of the classes in the classifier relative to the anchor point. | |
ShapeFinder2 classifier object.
Creates a classifier object loading a classifier file.
file_name : str The file name.
cvb.Angle angular_tolerance | ( | self | ) |
int gradient_type | ( | self | ) |
Gets the gradient type this classifier uses for feature extraction.
int The gradient type (see cvb.shapefinder2.GradientType).
None save | ( | self, | |
str | file_name | ||
) |
Writes the classifier to a file.
file_name : str The file name to save the classifier.
List[cvb.shapefinder2.SearchResult] search_all | ( | self, | |
cvb.ImagePlane | plane, | ||
cvb.Rect | aoi, | ||
int | precision, | ||
float | relative_threshold, | ||
int | minimum_threshold, | ||
int | coarse_locality, | ||
Optional[cvb.AngleRange] | rotation_range, | ||
Optional[cvb.NumberRange] | scale_range | ||
) |
Use this classifier to perform a ShapeFinder search on an image plane.
plane : cvb.ImagePlane The image plane in which to use the classifier.
aoi : cvb.Rect The area of interest in the plane to search in.
precision : int The search mode to use (see cvb.shapefinder2.PrecisionMode).
relative_threshold : float The threshold used for eliminating less promising candidates in the edge model search step.
minimum_threshold : int The minimum gray value different that must be visible in the image before an edge location may be considered a feature.
coarse_locality : int The minimum distance between two results in the coarse layer during the edge model search.
rotation_range : Optional[cvb.AngleRange] The range of rotations to be reported.
scale_range : Optional[cvb.NumberRange] The range of scales to be reported.
List[cvb.shapefinder2.SearchResult] The list of all results that were found.
None set_angular_tolerance | ( | self, | |
cvb.Angle | angular_tolerance | ||
) |
Sets the acceptance parameter for feature gradient angles.
angular_tolerance : cvb.Angle The angular tolerance.
bool use_cuda | ( | self, | |
int | status | ||
) |
Set the flag to use CUDA if possible or to force not using CUDA.
status : int The CUDA status. If CudaStatus.ForceDisable CUDA won't be used in SF2Search. (see cvb.shapefinder2.CudaStatus).
bool True if status == CudaStatus.Default and a CUDA capable device is present, false otherwise.
cvb.Image visualization | ( | self, | |
Optional[int] | layer = -1 |
||
) |
Creates and returns a color coded image representation of this ShapeFinder classifier.
layer : Optional[int] The layer of the classifier to be visualized. A value of -1 superimposes all layers (default -1).
cvb.Image The image representation.