Add a new variant of detectMultiScale with output arguments 'objects' and 'numDetections'; factor most of detectMultiScale's code into 2 protected methods

This commit is contained in:
Peter Minin
2013-06-14 04:25:17 +04:00
parent e16af9bdc9
commit 7d70399d72
3 changed files with 96 additions and 37 deletions

View File

@@ -189,6 +189,7 @@ CascadeClassifier::detectMultiScale
Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.
.. ocv:function:: void CascadeClassifier::detectMultiScale( const Mat& image, vector<Rect>& objects, double scaleFactor=1.1, int minNeighbors=3, int flags=0, Size minSize=Size(), Size maxSize=Size())
.. ocv:function:: void CascadeClassifier::detectMultiScale( const Mat& image, vector<Rect>& objects, vector<int>& numDetections, double scaleFactor=1.1, int minNeighbors=3, int flags=0, Size minSize=Size(), Size maxSize=Size())
.. ocv:pyfunction:: cv2.CascadeClassifier.detectMultiScale(image[, scaleFactor[, minNeighbors[, flags[, minSize[, maxSize]]]]]) -> objects
.. ocv:pyfunction:: cv2.CascadeClassifier.detectMultiScale(image[, scaleFactor[, minNeighbors[, flags[, minSize[, maxSize[, outputRejectLevels]]]]]]) -> objects, rejectLevels, levelWeights
@@ -201,6 +202,8 @@ Detects objects of different sizes in the input image. The detected objects are
:param objects: Vector of rectangles where each rectangle contains the detected object, the rectangles may be partially outside the original image.
:param numDetections: Vector 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.
:param scaleFactor: Parameter specifying how much the image size is reduced at each image scale.
:param minNeighbors: Parameter specifying how many neighbors each candidate rectangle should have to retain it.