OpenCV for Unity 2.6.3
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.10.0/index.html ) for the details of the argument of the method.
Loading...
Searching...
No Matches
OpenCVForUnity.ObjdetectModule.CascadeClassifier Class Reference

Cascade classifier class for object detection. More...

Inheritance diagram for OpenCVForUnity.ObjdetectModule.CascadeClassifier:
OpenCVForUnity.DisposableOpenCVObject OpenCVForUnity.DisposableOpenCVObject OpenCVForUnity.DisposableOpenCVObject OpenCVForUnity.DisposableObject OpenCVForUnity.DisposableObject OpenCVForUnity.DisposableObject

Public Member Functions

IntPtr getNativeObjAddr ()
 
 CascadeClassifier ()
 
 CascadeClassifier (string filename)
 Loads a classifier from a file.
 
bool empty ()
 Checks whether the classifier has been loaded.
 
bool load (string filename)
 Loads a classifier from a file.
 
void detectMultiScale (Mat image, MatOfRect objects, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize)
 Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.
 
void detectMultiScale (Mat image, MatOfRect objects, double scaleFactor, int minNeighbors, int flags, Size minSize)
 Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.
 
void detectMultiScale (Mat image, MatOfRect objects, double scaleFactor, int minNeighbors, int flags)
 Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.
 
void detectMultiScale (Mat image, MatOfRect objects, double scaleFactor, int minNeighbors)
 Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.
 
void detectMultiScale (Mat image, MatOfRect objects, double scaleFactor)
 Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.
 
void detectMultiScale (Mat image, MatOfRect objects)
 Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.
 
void detectMultiScale2 (Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize)
 
void detectMultiScale2 (Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors, int flags, Size minSize)
 
void detectMultiScale2 (Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors, int flags)
 
void detectMultiScale2 (Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors)
 
void detectMultiScale2 (Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor)
 
void detectMultiScale2 (Mat image, MatOfRect objects, MatOfInt numDetections)
 
void detectMultiScale3 (Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize, bool outputRejectLevels)
 
void detectMultiScale3 (Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize)
 
void detectMultiScale3 (Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags, Size minSize)
 
void detectMultiScale3 (Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags)
 
void detectMultiScale3 (Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors)
 
void detectMultiScale3 (Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor)
 
void detectMultiScale3 (Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights)
 
bool isOldFormatCascade ()
 
Size getOriginalWindowSize ()
 
int getFeatureType ()
 
void detectMultiScale (Mat image, MatOfRect objects, double scaleFactor, int minNeighbors, int flags, in Vec2d minSize, in Vec2d maxSize)
 Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.
 
void detectMultiScale (Mat image, MatOfRect objects, double scaleFactor, int minNeighbors, int flags, in Vec2d minSize)
 Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.
 
void detectMultiScale2 (Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors, int flags, in Vec2d minSize, in Vec2d maxSize)
 
void detectMultiScale2 (Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors, int flags, in Vec2d minSize)
 
void detectMultiScale3 (Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags, in Vec2d minSize, in Vec2d maxSize, bool outputRejectLevels)
 
void detectMultiScale3 (Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags, in Vec2d minSize, in Vec2d maxSize)
 
void detectMultiScale3 (Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags, in Vec2d minSize)
 
Vec2d getOriginalWindowSizeAsVec2d ()
 
void detectMultiScale (Mat image, MatOfRect objects, double scaleFactor, int minNeighbors, int flags, in(double width, double height) minSize, in(double width, double height) maxSize)
 Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.
 
void detectMultiScale (Mat image, MatOfRect objects, double scaleFactor, int minNeighbors, int flags, in(double width, double height) minSize)
 Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.
 
void detectMultiScale2 (Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors, int flags, in(double width, double height) minSize, in(double width, double height) maxSize)
 
void detectMultiScale2 (Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors, int flags, in(double width, double height) minSize)
 
void detectMultiScale3 (Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags, in(double width, double height) minSize, in(double width, double height) maxSize, bool outputRejectLevels)
 
void detectMultiScale3 (Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags, in(double width, double height) minSize, in(double width, double height) maxSize)
 
void detectMultiScale3 (Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags, in(double width, double height) minSize)
 
double double height getOriginalWindowSizeAsValueTuple ()
 
- Public Member Functions inherited from OpenCVForUnity.DisposableObject
void Dispose ()
 
void ThrowIfDisposed ()
 

Static Public Member Functions

static CascadeClassifier __fromPtr__ (IntPtr addr)
 
static bool convert (string oldcascade, string newcascade)
 
- Static Public Member Functions inherited from OpenCVForUnity.DisposableObject
static IntPtr ThrowIfNullIntPtr (IntPtr ptr)
 

Public Attributes

double width
 

Protected Member Functions

override void Dispose (bool disposing)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject
 DisposableOpenCVObject ()
 
 DisposableOpenCVObject (IntPtr ptr)
 
 DisposableOpenCVObject (bool isEnabledDispose)
 
 DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose)
 
override void Dispose (bool disposing)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableObject
 DisposableObject ()
 
 DisposableObject (bool isEnabledDispose)
 

Additional Inherited Members

- Package Attributes inherited from OpenCVForUnity.DisposableOpenCVObject
- Properties inherited from OpenCVForUnity.DisposableObject
bool IsDisposed [get, protected set]
 
bool IsEnabledDispose [get, set]
 

Detailed Description

Cascade classifier class for object detection.

Constructor & Destructor Documentation

◆ CascadeClassifier() [1/2]

OpenCVForUnity.ObjdetectModule.CascadeClassifier.CascadeClassifier ( )

◆ CascadeClassifier() [2/2]

OpenCVForUnity.ObjdetectModule.CascadeClassifier.CascadeClassifier ( string filename)

Loads a classifier from a file.

Parameters
filenameName of the file from which the classifier is loaded.

Member Function Documentation

◆ __fromPtr__()

static CascadeClassifier OpenCVForUnity.ObjdetectModule.CascadeClassifier.__fromPtr__ ( IntPtr addr)
static

◆ convert()

static bool OpenCVForUnity.ObjdetectModule.CascadeClassifier.convert ( string oldcascade,
string newcascade )
static

◆ detectMultiScale() [1/10]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale ( Mat image,
MatOfRect objects )

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

Parameters
imageMatrix of the type CV_8U containing an image where objects are detected.
objectsVector of rectangles where each rectangle contains the detected object, the rectangles may be partially outside the original image.
scaleFactorParameter specifying how much the image size is reduced at each image scale.
minNeighborsParameter specifying how many neighbors each candidate rectangle should have to retain it.
flagsParameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. It is not used for a new cascade.
minSizeMinimum possible object size. Objects smaller than that are ignored.
maxSizeMaximum possible object size. Objects larger than that are ignored. If maxSize == minSize model is evaluated on single scale.

◆ detectMultiScale() [2/10]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale ( Mat image,
MatOfRect objects,
double scaleFactor )

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

Parameters
imageMatrix of the type CV_8U containing an image where objects are detected.
objectsVector of rectangles where each rectangle contains the detected object, the rectangles may be partially outside the original image.
scaleFactorParameter specifying how much the image size is reduced at each image scale.
minNeighborsParameter specifying how many neighbors each candidate rectangle should have to retain it.
flagsParameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. It is not used for a new cascade.
minSizeMinimum possible object size. Objects smaller than that are ignored.
maxSizeMaximum possible object size. Objects larger than that are ignored. If maxSize == minSize model is evaluated on single scale.

◆ detectMultiScale() [3/10]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale ( Mat image,
MatOfRect objects,
double scaleFactor,
int minNeighbors )

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

Parameters
imageMatrix of the type CV_8U containing an image where objects are detected.
objectsVector of rectangles where each rectangle contains the detected object, the rectangles may be partially outside the original image.
scaleFactorParameter specifying how much the image size is reduced at each image scale.
minNeighborsParameter specifying how many neighbors each candidate rectangle should have to retain it.
flagsParameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. It is not used for a new cascade.
minSizeMinimum possible object size. Objects smaller than that are ignored.
maxSizeMaximum possible object size. Objects larger than that are ignored. If maxSize == minSize model is evaluated on single scale.

◆ detectMultiScale() [4/10]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale ( Mat image,
MatOfRect objects,
double scaleFactor,
int minNeighbors,
int flags )

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

Parameters
imageMatrix of the type CV_8U containing an image where objects are detected.
objectsVector of rectangles where each rectangle contains the detected object, the rectangles may be partially outside the original image.
scaleFactorParameter specifying how much the image size is reduced at each image scale.
minNeighborsParameter specifying how many neighbors each candidate rectangle should have to retain it.
flagsParameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. It is not used for a new cascade.
minSizeMinimum possible object size. Objects smaller than that are ignored.
maxSizeMaximum possible object size. Objects larger than that are ignored. If maxSize == minSize model is evaluated on single scale.

◆ detectMultiScale() [5/10]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale ( Mat image,
MatOfRect objects,
double scaleFactor,
int minNeighbors,
int flags,
in Vec2d minSize )

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

Parameters
imageMatrix of the type CV_8U containing an image where objects are detected.
objectsVector of rectangles where each rectangle contains the detected object, the rectangles may be partially outside the original image.
scaleFactorParameter specifying how much the image size is reduced at each image scale.
minNeighborsParameter specifying how many neighbors each candidate rectangle should have to retain it.
flagsParameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. It is not used for a new cascade.
minSizeMinimum possible object size. Objects smaller than that are ignored.
maxSizeMaximum possible object size. Objects larger than that are ignored. If maxSize == minSize model is evaluated on single scale.

◆ detectMultiScale() [6/10]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale ( Mat image,
MatOfRect objects,
double scaleFactor,
int minNeighbors,
int flags,
in Vec2d minSize,
in Vec2d maxSize )

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

Parameters
imageMatrix of the type CV_8U containing an image where objects are detected.
objectsVector of rectangles where each rectangle contains the detected object, the rectangles may be partially outside the original image.
scaleFactorParameter specifying how much the image size is reduced at each image scale.
minNeighborsParameter specifying how many neighbors each candidate rectangle should have to retain it.
flagsParameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. It is not used for a new cascade.
minSizeMinimum possible object size. Objects smaller than that are ignored.
maxSizeMaximum possible object size. Objects larger than that are ignored. If maxSize == minSize model is evaluated on single scale.

◆ detectMultiScale() [7/10]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale ( Mat image,
MatOfRect objects,
double scaleFactor,
int minNeighbors,
int flags,
in(double width, double height) minSize )

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

Parameters
imageMatrix of the type CV_8U containing an image where objects are detected.
objectsVector of rectangles where each rectangle contains the detected object, the rectangles may be partially outside the original image.
scaleFactorParameter specifying how much the image size is reduced at each image scale.
minNeighborsParameter specifying how many neighbors each candidate rectangle should have to retain it.
flagsParameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. It is not used for a new cascade.
minSizeMinimum possible object size. Objects smaller than that are ignored.
maxSizeMaximum possible object size. Objects larger than that are ignored. If maxSize == minSize model is evaluated on single scale.

◆ detectMultiScale() [8/10]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale ( Mat image,
MatOfRect objects,
double scaleFactor,
int minNeighbors,
int flags,
in(double width, double height) minSize,
in(double width, double height) maxSize )

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

Parameters
imageMatrix of the type CV_8U containing an image where objects are detected.
objectsVector of rectangles where each rectangle contains the detected object, the rectangles may be partially outside the original image.
scaleFactorParameter specifying how much the image size is reduced at each image scale.
minNeighborsParameter specifying how many neighbors each candidate rectangle should have to retain it.
flagsParameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. It is not used for a new cascade.
minSizeMinimum possible object size. Objects smaller than that are ignored.
maxSizeMaximum possible object size. Objects larger than that are ignored. If maxSize == minSize model is evaluated on single scale.

◆ detectMultiScale() [9/10]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale ( Mat image,
MatOfRect objects,
double scaleFactor,
int minNeighbors,
int flags,
Size minSize )

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

Parameters
imageMatrix of the type CV_8U containing an image where objects are detected.
objectsVector of rectangles where each rectangle contains the detected object, the rectangles may be partially outside the original image.
scaleFactorParameter specifying how much the image size is reduced at each image scale.
minNeighborsParameter specifying how many neighbors each candidate rectangle should have to retain it.
flagsParameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. It is not used for a new cascade.
minSizeMinimum possible object size. Objects smaller than that are ignored.
maxSizeMaximum possible object size. Objects larger than that are ignored. If maxSize == minSize model is evaluated on single scale.

◆ detectMultiScale() [10/10]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale ( Mat image,
MatOfRect objects,
double scaleFactor,
int minNeighbors,
int flags,
Size minSize,
Size maxSize )

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

Parameters
imageMatrix of the type CV_8U containing an image where objects are detected.
objectsVector of rectangles where each rectangle contains the detected object, the rectangles may be partially outside the original image.
scaleFactorParameter specifying how much the image size is reduced at each image scale.
minNeighborsParameter specifying how many neighbors each candidate rectangle should have to retain it.
flagsParameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. It is not used for a new cascade.
minSizeMinimum possible object size. Objects smaller than that are ignored.
maxSizeMaximum possible object size. Objects larger than that are ignored. If maxSize == minSize model is evaluated on single scale.

◆ detectMultiScale2() [1/10]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale2 ( Mat image,
MatOfRect objects,
MatOfInt numDetections )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
imageMatrix of the type CV_8U containing an image where objects are detected.
objectsVector of rectangles where each rectangle contains the detected object, the rectangles may be partially outside the original image.
numDetectionsVector of detection numbers for the corresponding objects. An object's number of detections is the number of neighboring positively classified rectangles that were joined together to form the object.
scaleFactorParameter specifying how much the image size is reduced at each image scale.
minNeighborsParameter specifying how many neighbors each candidate rectangle should have to retain it.
flagsParameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. It is not used for a new cascade.
minSizeMinimum possible object size. Objects smaller than that are ignored.
maxSizeMaximum possible object size. Objects larger than that are ignored. If maxSize == minSize model is evaluated on single scale.

◆ detectMultiScale2() [2/10]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale2 ( Mat image,
MatOfRect objects,
MatOfInt numDetections,
double scaleFactor )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
imageMatrix of the type CV_8U containing an image where objects are detected.
objectsVector of rectangles where each rectangle contains the detected object, the rectangles may be partially outside the original image.
numDetectionsVector of detection numbers for the corresponding objects. An object's number of detections is the number of neighboring positively classified rectangles that were joined together to form the object.
scaleFactorParameter specifying how much the image size is reduced at each image scale.
minNeighborsParameter specifying how many neighbors each candidate rectangle should have to retain it.
flagsParameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. It is not used for a new cascade.
minSizeMinimum possible object size. Objects smaller than that are ignored.
maxSizeMaximum possible object size. Objects larger than that are ignored. If maxSize == minSize model is evaluated on single scale.

◆ detectMultiScale2() [3/10]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale2 ( Mat image,
MatOfRect objects,
MatOfInt numDetections,
double scaleFactor,
int minNeighbors )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
imageMatrix of the type CV_8U containing an image where objects are detected.
objectsVector of rectangles where each rectangle contains the detected object, the rectangles may be partially outside the original image.
numDetectionsVector of detection numbers for the corresponding objects. An object's number of detections is the number of neighboring positively classified rectangles that were joined together to form the object.
scaleFactorParameter specifying how much the image size is reduced at each image scale.
minNeighborsParameter specifying how many neighbors each candidate rectangle should have to retain it.
flagsParameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. It is not used for a new cascade.
minSizeMinimum possible object size. Objects smaller than that are ignored.
maxSizeMaximum possible object size. Objects larger than that are ignored. If maxSize == minSize model is evaluated on single scale.

◆ detectMultiScale2() [4/10]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale2 ( Mat image,
MatOfRect objects,
MatOfInt numDetections,
double scaleFactor,
int minNeighbors,
int flags )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
imageMatrix of the type CV_8U containing an image where objects are detected.
objectsVector of rectangles where each rectangle contains the detected object, the rectangles may be partially outside the original image.
numDetectionsVector of detection numbers for the corresponding objects. An object's number of detections is the number of neighboring positively classified rectangles that were joined together to form the object.
scaleFactorParameter specifying how much the image size is reduced at each image scale.
minNeighborsParameter specifying how many neighbors each candidate rectangle should have to retain it.
flagsParameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. It is not used for a new cascade.
minSizeMinimum possible object size. Objects smaller than that are ignored.
maxSizeMaximum possible object size. Objects larger than that are ignored. If maxSize == minSize model is evaluated on single scale.

◆ detectMultiScale2() [5/10]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale2 ( Mat image,
MatOfRect objects,
MatOfInt numDetections,
double scaleFactor,
int minNeighbors,
int flags,
in Vec2d minSize )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
imageMatrix of the type CV_8U containing an image where objects are detected.
objectsVector of rectangles where each rectangle contains the detected object, the rectangles may be partially outside the original image.
numDetectionsVector of detection numbers for the corresponding objects. An object's number of detections is the number of neighboring positively classified rectangles that were joined together to form the object.
scaleFactorParameter specifying how much the image size is reduced at each image scale.
minNeighborsParameter specifying how many neighbors each candidate rectangle should have to retain it.
flagsParameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. It is not used for a new cascade.
minSizeMinimum possible object size. Objects smaller than that are ignored.
maxSizeMaximum possible object size. Objects larger than that are ignored. If maxSize == minSize model is evaluated on single scale.

◆ detectMultiScale2() [6/10]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale2 ( Mat image,
MatOfRect objects,
MatOfInt numDetections,
double scaleFactor,
int minNeighbors,
int flags,
in Vec2d minSize,
in Vec2d maxSize )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
imageMatrix of the type CV_8U containing an image where objects are detected.
objectsVector of rectangles where each rectangle contains the detected object, the rectangles may be partially outside the original image.
numDetectionsVector of detection numbers for the corresponding objects. An object's number of detections is the number of neighboring positively classified rectangles that were joined together to form the object.
scaleFactorParameter specifying how much the image size is reduced at each image scale.
minNeighborsParameter specifying how many neighbors each candidate rectangle should have to retain it.
flagsParameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. It is not used for a new cascade.
minSizeMinimum possible object size. Objects smaller than that are ignored.
maxSizeMaximum possible object size. Objects larger than that are ignored. If maxSize == minSize model is evaluated on single scale.

◆ detectMultiScale2() [7/10]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale2 ( Mat image,
MatOfRect objects,
MatOfInt numDetections,
double scaleFactor,
int minNeighbors,
int flags,
in(double width, double height) minSize )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
imageMatrix of the type CV_8U containing an image where objects are detected.
objectsVector of rectangles where each rectangle contains the detected object, the rectangles may be partially outside the original image.
numDetectionsVector of detection numbers for the corresponding objects. An object's number of detections is the number of neighboring positively classified rectangles that were joined together to form the object.
scaleFactorParameter specifying how much the image size is reduced at each image scale.
minNeighborsParameter specifying how many neighbors each candidate rectangle should have to retain it.
flagsParameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. It is not used for a new cascade.
minSizeMinimum possible object size. Objects smaller than that are ignored.
maxSizeMaximum possible object size. Objects larger than that are ignored. If maxSize == minSize model is evaluated on single scale.

◆ detectMultiScale2() [8/10]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale2 ( Mat image,
MatOfRect objects,
MatOfInt numDetections,
double scaleFactor,
int minNeighbors,
int flags,
in(double width, double height) minSize,
in(double width, double height) maxSize )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
imageMatrix of the type CV_8U containing an image where objects are detected.
objectsVector of rectangles where each rectangle contains the detected object, the rectangles may be partially outside the original image.
numDetectionsVector of detection numbers for the corresponding objects. An object's number of detections is the number of neighboring positively classified rectangles that were joined together to form the object.
scaleFactorParameter specifying how much the image size is reduced at each image scale.
minNeighborsParameter specifying how many neighbors each candidate rectangle should have to retain it.
flagsParameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. It is not used for a new cascade.
minSizeMinimum possible object size. Objects smaller than that are ignored.
maxSizeMaximum possible object size. Objects larger than that are ignored. If maxSize == minSize model is evaluated on single scale.

◆ detectMultiScale2() [9/10]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale2 ( Mat image,
MatOfRect objects,
MatOfInt numDetections,
double scaleFactor,
int minNeighbors,
int flags,
Size minSize )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
imageMatrix of the type CV_8U containing an image where objects are detected.
objectsVector of rectangles where each rectangle contains the detected object, the rectangles may be partially outside the original image.
numDetectionsVector of detection numbers for the corresponding objects. An object's number of detections is the number of neighboring positively classified rectangles that were joined together to form the object.
scaleFactorParameter specifying how much the image size is reduced at each image scale.
minNeighborsParameter specifying how many neighbors each candidate rectangle should have to retain it.
flagsParameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. It is not used for a new cascade.
minSizeMinimum possible object size. Objects smaller than that are ignored.
maxSizeMaximum possible object size. Objects larger than that are ignored. If maxSize == minSize model is evaluated on single scale.

◆ detectMultiScale2() [10/10]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale2 ( Mat image,
MatOfRect objects,
MatOfInt numDetections,
double scaleFactor,
int minNeighbors,
int flags,
Size minSize,
Size maxSize )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
imageMatrix of the type CV_8U containing an image where objects are detected.
objectsVector of rectangles where each rectangle contains the detected object, the rectangles may be partially outside the original image.
numDetectionsVector of detection numbers for the corresponding objects. An object's number of detections is the number of neighboring positively classified rectangles that were joined together to form the object.
scaleFactorParameter specifying how much the image size is reduced at each image scale.
minNeighborsParameter specifying how many neighbors each candidate rectangle should have to retain it.
flagsParameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. It is not used for a new cascade.
minSizeMinimum possible object size. Objects smaller than that are ignored.
maxSizeMaximum possible object size. Objects larger than that are ignored. If maxSize == minSize model is evaluated on single scale.

◆ detectMultiScale3() [1/13]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale3 ( Mat image,
MatOfRect objects,
MatOfInt rejectLevels,
MatOfDouble levelWeights )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function allows you to retrieve the final stage decision certainty of classification. For this, one needs to set outputRejectLevels on true and provide the rejectLevels and levelWeights parameter. For each resulting detection, levelWeights will then contain the certainty of classification at the final stage. This value can then be used to separate strong from weaker classifications.

A code sample on how to use it efficiently can be found below:

Mat img;
vector<double> weights;
vector<int> levels;
vector<Rect> detections;
CascadeClassifier model("/path/to/your/model.xml");
model.detectMultiScale(img, detections, levels, weights, 1.1, 3, 0, Size(), Size(), true);
cerr << "Detection " << detections[0] << " with weight " << weights[0] << endl;
n-dimensional dense array class
Definition Mat_ValueTuple.cs:11
Template class for specifying the size of an image or rectangle.
Definition Size_Ex.cs:7
Cascade classifier class for object detection.
Definition CascadeClassifier_ValueTuple.cs:12

◆ detectMultiScale3() [2/13]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale3 ( Mat image,
MatOfRect objects,
MatOfInt rejectLevels,
MatOfDouble levelWeights,
double scaleFactor )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function allows you to retrieve the final stage decision certainty of classification. For this, one needs to set outputRejectLevels on true and provide the rejectLevels and levelWeights parameter. For each resulting detection, levelWeights will then contain the certainty of classification at the final stage. This value can then be used to separate strong from weaker classifications.

A code sample on how to use it efficiently can be found below:

Mat img;
vector<double> weights;
vector<int> levels;
vector<Rect> detections;
CascadeClassifier model("/path/to/your/model.xml");
model.detectMultiScale(img, detections, levels, weights, 1.1, 3, 0, Size(), Size(), true);
cerr << "Detection " << detections[0] << " with weight " << weights[0] << endl;

◆ detectMultiScale3() [3/13]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale3 ( Mat image,
MatOfRect objects,
MatOfInt rejectLevels,
MatOfDouble levelWeights,
double scaleFactor,
int minNeighbors )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function allows you to retrieve the final stage decision certainty of classification. For this, one needs to set outputRejectLevels on true and provide the rejectLevels and levelWeights parameter. For each resulting detection, levelWeights will then contain the certainty of classification at the final stage. This value can then be used to separate strong from weaker classifications.

A code sample on how to use it efficiently can be found below:

Mat img;
vector<double> weights;
vector<int> levels;
vector<Rect> detections;
CascadeClassifier model("/path/to/your/model.xml");
model.detectMultiScale(img, detections, levels, weights, 1.1, 3, 0, Size(), Size(), true);
cerr << "Detection " << detections[0] << " with weight " << weights[0] << endl;

◆ detectMultiScale3() [4/13]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale3 ( Mat image,
MatOfRect objects,
MatOfInt rejectLevels,
MatOfDouble levelWeights,
double scaleFactor,
int minNeighbors,
int flags )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function allows you to retrieve the final stage decision certainty of classification. For this, one needs to set outputRejectLevels on true and provide the rejectLevels and levelWeights parameter. For each resulting detection, levelWeights will then contain the certainty of classification at the final stage. This value can then be used to separate strong from weaker classifications.

A code sample on how to use it efficiently can be found below:

Mat img;
vector<double> weights;
vector<int> levels;
vector<Rect> detections;
CascadeClassifier model("/path/to/your/model.xml");
model.detectMultiScale(img, detections, levels, weights, 1.1, 3, 0, Size(), Size(), true);
cerr << "Detection " << detections[0] << " with weight " << weights[0] << endl;

◆ detectMultiScale3() [5/13]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale3 ( Mat image,
MatOfRect objects,
MatOfInt rejectLevels,
MatOfDouble levelWeights,
double scaleFactor,
int minNeighbors,
int flags,
in Vec2d minSize )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function allows you to retrieve the final stage decision certainty of classification. For this, one needs to set outputRejectLevels on true and provide the rejectLevels and levelWeights parameter. For each resulting detection, levelWeights will then contain the certainty of classification at the final stage. This value can then be used to separate strong from weaker classifications.

A code sample on how to use it efficiently can be found below:

Mat img;
vector<double> weights;
vector<int> levels;
vector<Rect> detections;
CascadeClassifier model("/path/to/your/model.xml");
model.detectMultiScale(img, detections, levels, weights, 1.1, 3, 0, Size(), Size(), true);
cerr << "Detection " << detections[0] << " with weight " << weights[0] << endl;

◆ detectMultiScale3() [6/13]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale3 ( Mat image,
MatOfRect objects,
MatOfInt rejectLevels,
MatOfDouble levelWeights,
double scaleFactor,
int minNeighbors,
int flags,
in Vec2d minSize,
in Vec2d maxSize )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function allows you to retrieve the final stage decision certainty of classification. For this, one needs to set outputRejectLevels on true and provide the rejectLevels and levelWeights parameter. For each resulting detection, levelWeights will then contain the certainty of classification at the final stage. This value can then be used to separate strong from weaker classifications.

A code sample on how to use it efficiently can be found below:

Mat img;
vector<double> weights;
vector<int> levels;
vector<Rect> detections;
CascadeClassifier model("/path/to/your/model.xml");
model.detectMultiScale(img, detections, levels, weights, 1.1, 3, 0, Size(), Size(), true);
cerr << "Detection " << detections[0] << " with weight " << weights[0] << endl;

◆ detectMultiScale3() [7/13]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale3 ( Mat image,
MatOfRect objects,
MatOfInt rejectLevels,
MatOfDouble levelWeights,
double scaleFactor,
int minNeighbors,
int flags,
in Vec2d minSize,
in Vec2d maxSize,
bool outputRejectLevels )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function allows you to retrieve the final stage decision certainty of classification. For this, one needs to set outputRejectLevels on true and provide the rejectLevels and levelWeights parameter. For each resulting detection, levelWeights will then contain the certainty of classification at the final stage. This value can then be used to separate strong from weaker classifications.

A code sample on how to use it efficiently can be found below:

Mat img;
vector<double> weights;
vector<int> levels;
vector<Rect> detections;
CascadeClassifier model("/path/to/your/model.xml");
model.detectMultiScale(img, detections, levels, weights, 1.1, 3, 0, Size(), Size(), true);
cerr << "Detection " << detections[0] << " with weight " << weights[0] << endl;

◆ detectMultiScale3() [8/13]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale3 ( Mat image,
MatOfRect objects,
MatOfInt rejectLevels,
MatOfDouble levelWeights,
double scaleFactor,
int minNeighbors,
int flags,
in(double width, double height) minSize )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function allows you to retrieve the final stage decision certainty of classification. For this, one needs to set outputRejectLevels on true and provide the rejectLevels and levelWeights parameter. For each resulting detection, levelWeights will then contain the certainty of classification at the final stage. This value can then be used to separate strong from weaker classifications.

A code sample on how to use it efficiently can be found below:

Mat img;
vector<double> weights;
vector<int> levels;
vector<Rect> detections;
CascadeClassifier model("/path/to/your/model.xml");
model.detectMultiScale(img, detections, levels, weights, 1.1, 3, 0, Size(), Size(), true);
cerr << "Detection " << detections[0] << " with weight " << weights[0] << endl;

◆ detectMultiScale3() [9/13]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale3 ( Mat image,
MatOfRect objects,
MatOfInt rejectLevels,
MatOfDouble levelWeights,
double scaleFactor,
int minNeighbors,
int flags,
in(double width, double height) minSize,
in(double width, double height) maxSize )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function allows you to retrieve the final stage decision certainty of classification. For this, one needs to set outputRejectLevels on true and provide the rejectLevels and levelWeights parameter. For each resulting detection, levelWeights will then contain the certainty of classification at the final stage. This value can then be used to separate strong from weaker classifications.

A code sample on how to use it efficiently can be found below:

Mat img;
vector<double> weights;
vector<int> levels;
vector<Rect> detections;
CascadeClassifier model("/path/to/your/model.xml");
model.detectMultiScale(img, detections, levels, weights, 1.1, 3, 0, Size(), Size(), true);
cerr << "Detection " << detections[0] << " with weight " << weights[0] << endl;

◆ detectMultiScale3() [10/13]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale3 ( Mat image,
MatOfRect objects,
MatOfInt rejectLevels,
MatOfDouble levelWeights,
double scaleFactor,
int minNeighbors,
int flags,
in(double width, double height) minSize,
in(double width, double height) maxSize,
bool outputRejectLevels )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function allows you to retrieve the final stage decision certainty of classification. For this, one needs to set outputRejectLevels on true and provide the rejectLevels and levelWeights parameter. For each resulting detection, levelWeights will then contain the certainty of classification at the final stage. This value can then be used to separate strong from weaker classifications.

A code sample on how to use it efficiently can be found below:

Mat img;
vector<double> weights;
vector<int> levels;
vector<Rect> detections;
CascadeClassifier model("/path/to/your/model.xml");
model.detectMultiScale(img, detections, levels, weights, 1.1, 3, 0, Size(), Size(), true);
cerr << "Detection " << detections[0] << " with weight " << weights[0] << endl;

◆ detectMultiScale3() [11/13]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale3 ( Mat image,
MatOfRect objects,
MatOfInt rejectLevels,
MatOfDouble levelWeights,
double scaleFactor,
int minNeighbors,
int flags,
Size minSize )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function allows you to retrieve the final stage decision certainty of classification. For this, one needs to set outputRejectLevels on true and provide the rejectLevels and levelWeights parameter. For each resulting detection, levelWeights will then contain the certainty of classification at the final stage. This value can then be used to separate strong from weaker classifications.

A code sample on how to use it efficiently can be found below:

Mat img;
vector<double> weights;
vector<int> levels;
vector<Rect> detections;
CascadeClassifier model("/path/to/your/model.xml");
model.detectMultiScale(img, detections, levels, weights, 1.1, 3, 0, Size(), Size(), true);
cerr << "Detection " << detections[0] << " with weight " << weights[0] << endl;

◆ detectMultiScale3() [12/13]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale3 ( Mat image,
MatOfRect objects,
MatOfInt rejectLevels,
MatOfDouble levelWeights,
double scaleFactor,
int minNeighbors,
int flags,
Size minSize,
Size maxSize )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function allows you to retrieve the final stage decision certainty of classification. For this, one needs to set outputRejectLevels on true and provide the rejectLevels and levelWeights parameter. For each resulting detection, levelWeights will then contain the certainty of classification at the final stage. This value can then be used to separate strong from weaker classifications.

A code sample on how to use it efficiently can be found below:

Mat img;
vector<double> weights;
vector<int> levels;
vector<Rect> detections;
CascadeClassifier model("/path/to/your/model.xml");
model.detectMultiScale(img, detections, levels, weights, 1.1, 3, 0, Size(), Size(), true);
cerr << "Detection " << detections[0] << " with weight " << weights[0] << endl;

◆ detectMultiScale3() [13/13]

void OpenCVForUnity.ObjdetectModule.CascadeClassifier.detectMultiScale3 ( Mat image,
MatOfRect objects,
MatOfInt rejectLevels,
MatOfDouble levelWeights,
double scaleFactor,
int minNeighbors,
int flags,
Size minSize,
Size maxSize,
bool outputRejectLevels )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function allows you to retrieve the final stage decision certainty of classification. For this, one needs to set outputRejectLevels on true and provide the rejectLevels and levelWeights parameter. For each resulting detection, levelWeights will then contain the certainty of classification at the final stage. This value can then be used to separate strong from weaker classifications.

A code sample on how to use it efficiently can be found below:

Mat img;
vector<double> weights;
vector<int> levels;
vector<Rect> detections;
CascadeClassifier model("/path/to/your/model.xml");
model.detectMultiScale(img, detections, levels, weights, 1.1, 3, 0, Size(), Size(), true);
cerr << "Detection " << detections[0] << " with weight " << weights[0] << endl;

◆ Dispose()

override void OpenCVForUnity.ObjdetectModule.CascadeClassifier.Dispose ( bool disposing)
protectedvirtual

Reimplemented from OpenCVForUnity.DisposableObject.

◆ empty()

bool OpenCVForUnity.ObjdetectModule.CascadeClassifier.empty ( )

Checks whether the classifier has been loaded.

◆ getFeatureType()

int OpenCVForUnity.ObjdetectModule.CascadeClassifier.getFeatureType ( )

◆ getNativeObjAddr()

IntPtr OpenCVForUnity.ObjdetectModule.CascadeClassifier.getNativeObjAddr ( )

◆ getOriginalWindowSize()

Size OpenCVForUnity.ObjdetectModule.CascadeClassifier.getOriginalWindowSize ( )

◆ getOriginalWindowSizeAsValueTuple()

double double height OpenCVForUnity.ObjdetectModule.CascadeClassifier.getOriginalWindowSizeAsValueTuple ( )

◆ getOriginalWindowSizeAsVec2d()

Vec2d OpenCVForUnity.ObjdetectModule.CascadeClassifier.getOriginalWindowSizeAsVec2d ( )

◆ isOldFormatCascade()

bool OpenCVForUnity.ObjdetectModule.CascadeClassifier.isOldFormatCascade ( )

◆ load()

bool OpenCVForUnity.ObjdetectModule.CascadeClassifier.load ( string filename)

Loads a classifier from a file.

Parameters
filenameName 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.

Member Data Documentation

◆ width

double OpenCVForUnity.ObjdetectModule.CascadeClassifier.width

The documentation for this class was generated from the following files: