C# Класс OpenCvSharp.CascadeClassifier

Cascade classifier class for object detection.
Наследование: OpenCvSharp.DisposableCvObject
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Clean up any resources being used.

Описание методов

CascadeClassifier() публичный Метод

Default constructor
public CascadeClassifier ( ) : System
Результат System

CascadeClassifier() публичный Метод

Loads a classifier from a file.
public CascadeClassifier ( string fileName ) : System
fileName string Name of the file from which the classifier is loaded.
Результат System

DetectMultiScale() публичный Метод

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.
Результат Rect[]

DetectMultiScale() публичный Метод

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
Результат Rect[]

Dispose() защищенный Метод

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. ///
Результат void

Empty() публичный Метод

Checks whether the classifier has been loaded.
public Empty ( ) : bool
Результат bool

GetFeatureType() публичный Метод

public GetFeatureType ( ) : int
Результат int

GetOriginalWindowSize() публичный Метод

public GetOriginalWindowSize ( ) : Size
Результат Size

IsOldFormatCascade() публичный Метод

public IsOldFormatCascade ( ) : bool
Результат bool

Load() публичный Метод

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.
Результат bool