C# Class OpenCvSharp.CascadeClassifier

Cascade classifier class for object detection.
Inheritance: OpenCvSharp.DisposableCvObject
Afficher le fichier Open project: shimat/opencvsharp Class Usage Examples

Méthodes publiques

Méthode Description
CascadeClassifier ( ) : System

Default constructor

CascadeClassifier ( string fileName ) : System

Loads a classifier from a file.

DetectMultiScale ( OpenCvSharp.Mat image, double scaleFactor = 1.1, int minNeighbors = 3, HaarDetectionType flags, Size minSize = null, Size maxSize = null ) : Rect[]

Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.

DetectMultiScale ( OpenCvSharp.Mat image, int &rejectLevels, double &levelWeights, double scaleFactor = 1.1, int minNeighbors = 3, HaarDetectionType flags, Size minSize = null, Size maxSize = null, bool outputRejectLevels = false ) : Rect[]

Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.

Empty ( ) : bool

Checks whether the classifier has been loaded.

GetFeatureType ( ) : int

GetOriginalWindowSize ( ) : Size

IsOldFormatCascade ( ) : bool

Load ( string fileName ) : bool

Loads a classifier from a file.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

Method Details

CascadeClassifier() public méthode

Default constructor
public CascadeClassifier ( ) : System
Résultat System

CascadeClassifier() public méthode

Loads a classifier from a file.
public CascadeClassifier ( string fileName ) : System
fileName string Name of the file from which the classifier is loaded.
Résultat System

DetectMultiScale() public méthode

Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.
public DetectMultiScale ( OpenCvSharp.Mat image, double scaleFactor = 1.1, int minNeighbors = 3, HaarDetectionType flags, Size minSize = null, Size maxSize = null ) : Rect[]
image OpenCvSharp.Mat Matrix of the type CV_8U containing an image where objects are detected.
scaleFactor double Parameter specifying how much the image size is reduced at each image scale.
minNeighbors int Parameter specifying how many neighbors each candidate rectangle should have to retain it.
flags HaarDetectionType Parameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. /// It is not used for a new cascade.
minSize Size Minimum possible object size. Objects smaller than that are ignored.
maxSize Size Maximum possible object size. Objects larger than that are ignored.
Résultat Rect[]

DetectMultiScale() public méthode

Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.
public DetectMultiScale ( OpenCvSharp.Mat image, int &rejectLevels, double &levelWeights, double scaleFactor = 1.1, int minNeighbors = 3, HaarDetectionType flags, Size minSize = null, Size maxSize = null, bool outputRejectLevels = false ) : Rect[]
image OpenCvSharp.Mat Matrix of the type CV_8U containing an image where objects are detected.
rejectLevels int
levelWeights double
scaleFactor double Parameter specifying how much the image size is reduced at each image scale.
minNeighbors int Parameter specifying how many neighbors each candidate rectangle should have to retain it.
flags HaarDetectionType Parameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. /// It is not used for a new cascade.
minSize Size Minimum possible object size. Objects smaller than that are ignored.
maxSize Size Maximum possible object size. Objects larger than that are ignored.
outputRejectLevels bool
Résultat Rect[]

Dispose() protected méthode

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool /// If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. /// If false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed. ///
Résultat void

Empty() public méthode

Checks whether the classifier has been loaded.
public Empty ( ) : bool
Résultat bool

GetFeatureType() public méthode

public GetFeatureType ( ) : int
Résultat int

GetOriginalWindowSize() public méthode

public GetOriginalWindowSize ( ) : Size
Résultat Size

IsOldFormatCascade() public méthode

public IsOldFormatCascade ( ) : bool
Résultat bool

Load() public méthode

Loads a classifier from a file.
public Load ( string fileName ) : bool
fileName string Name of the file from which the classifier is loaded. /// The file may contain an old HAAR classifier trained by the haartraining application /// or a new cascade classifier trained by the traincascade application.
Résultat bool