Loads the classifier from file. The previous content is destroyed.
Loads a classifier from a file. The previous content is destroyed.
:param filename:Name of file from which classifier will be load. File may contain as old haar classifier (trained by haartraining application) or new cascade classifier (trained traincascade application).
:param filename:Name of the file from which the classifier is loaded. The file may contain an old HAAR classifier (trained by the haartraining application) or new cascade classifier trained traincascade application.
Sets the image for detection (called by detectMultiScale at each image level).
Sets an image for detection, which is called by ``detectMultiScale`` at each image level.
:param feval:Pointer to feature evaluator which is used for computing features.
:param feval:Pointer to the feature evaluator that is used for computing features.
:param image:Matrix of type ``CV_8UC1`` containing the image in which to compute the features.
:param image:Matrix of the type ``CV_8UC1`` containing an image where the features are computed.
..index:: CascadeClassifier::runAt
@ -264,15 +263,14 @@ CascadeClassifier::runAt
----------------------------
..c:function:: int CascadeClassifier::runAt( Ptr<FeatureEvaluator>\& feval, Point pt )
Runs the detector at the specified point (the image that the detector is working with should be set by setImage).
Runs the detector at the specified point. Use ``setImage`` to set the image that the detector is working with.
:param feval:Feature evaluator which is used for computing features.
:param feval:Feature evaluator that is used for computing features.
:param pt:The upper left point of window in which the features will be computed. Size of the window is equal to size of training images.
:param pt:Upper left point of the window where the features are computed. Size of the window is equal to the size of training images.
Returns:
1 - if cascade classifier detects object in the given location.
-si - otherwise. si is an index of stage which first predicted that given window is a background image.
The function returns 1 if the cascade classifier detects an object in the given location.
Otherwise, it returns ``si``, which is an index of the stage that first predicted that the given window is a background image.??
..index:: groupRectangles
@ -280,14 +278,14 @@ groupRectangles
-------------------
..c:function:: void groupRectangles(vector<Rect>\& rectList, int groupThreshold, double eps=0.2)
Groups the object candidate rectangles
Groups the object candidate rectangles.
:param rectList:The input/output vector of rectangles. On output there will be retained and grouped rectangles
:param rectList:Input/output vector of rectangles. Output vector includes retained and grouped rectangles.??
:param groupThreshold:The minimum possible number of rectangles, minus 1, in a group of rectangles to retain it.
:param groupThreshold:Minimum possible number of rectangles minus 1. The threshold is used in a group of rectangles to retain it.??
:param eps:The relative difference between sides of the rectangles to merge them into a group
:param eps:Relative difference between sides of the rectangles to merge them into a group.
The function is a wrapper for a generic function
:func:`partition` . It clusters all the input rectangles using the rectangle equivalence criteria, that combines rectangles that have similar sizes and similar locations (the similarity is defined by ``eps`` ). When ``eps=0`` , no clustering is done at all. If
:math:`\texttt{eps}\rightarrow +\inf` , all the rectangles will be put in one cluster. Then, the small clusters, containing less than or equal to ``groupThreshold`` rectangles, will be rejected. In each other cluster the average rectangle will be computed and put into the output rectangle list.
The function is a wrapper for the generic function
:ref:`partition` . It clusters all the input rectangles using the rectangle equivalence criteria that combines rectangles with similar sizes and similar locations (the similarity is defined by ``eps`` ). When ``eps=0`` , no clustering is done at all. If
:math:`\texttt{eps}\rightarrow +\inf` , all the rectangles are put in one cluster. Then, the small clusters containing less than or equal to ``groupThreshold`` rectangles are rejected. In each other cluster, the average rectangle is computed and put into the output rectangle list.