Method DetectMultiScale
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
DetectMultiScale(Mat, double, int, HaarDetectionTypes, Size?, Size?)
Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.
public virtual Rect[] DetectMultiScale(Mat image, double scaleFactor = 1.1, int minNeighbors = 3, HaarDetectionTypes flags = (HaarDetectionTypes)0, Size? minSize = null, Size? maxSize = null)
Parameters
imageMatMatrix of the type CV_8U containing an image where objects are detected.
scaleFactordoubleParameter specifying how much the image size is reduced at each image scale.
minNeighborsintParameter specifying how many neighbors each candidate rectangle should have to retain it.
flagsHaarDetectionTypesParameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. It is not used for a new cascade.
minSizeSize?Minimum possible object size. Objects smaller than that are ignored.
maxSizeSize?Maximum possible object size. Objects larger than that are ignored.
Returns
- Rect[]
Vector of rectangles where each rectangle contains the detected object.
DetectMultiScale(Mat, out int[], out double[], double, int, HaarDetectionTypes, Size?, Size?, bool)
Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.
public virtual Rect[] DetectMultiScale(Mat image, out int[] rejectLevels, out double[] levelWeights, double scaleFactor = 1.1, int minNeighbors = 3, HaarDetectionTypes flags = (HaarDetectionTypes)0, Size? minSize = null, Size? maxSize = null, bool outputRejectLevels = false)
Parameters
imageMatMatrix of the type CV_8U containing an image where objects are detected.
rejectLevelsint[]levelWeightsdouble[]scaleFactordoubleParameter specifying how much the image size is reduced at each image scale.
minNeighborsintParameter specifying how many neighbors each candidate rectangle should have to retain it.
flagsHaarDetectionTypesParameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. It is not used for a new cascade.
minSizeSize?Minimum possible object size. Objects smaller than that are ignored.
maxSizeSize?Maximum possible object size. Objects larger than that are ignored.
outputRejectLevelsbool
Returns
- Rect[]
Vector of rectangles where each rectangle contains the detected object.