org.opencv.objdetect
Class Objdetect
java.lang.Object
org.opencv.objdetect.Objdetect
public class Objdetect
- extends java.lang.Object
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CASCADE_DO_CANNY_PRUNING
public static final int CASCADE_DO_CANNY_PRUNING
- See Also:
- Constant Field Values
CASCADE_DO_ROUGH_SEARCH
public static final int CASCADE_DO_ROUGH_SEARCH
- See Also:
- Constant Field Values
CASCADE_FIND_BIGGEST_OBJECT
public static final int CASCADE_FIND_BIGGEST_OBJECT
- See Also:
- Constant Field Values
CASCADE_SCALE_IMAGE
public static final int CASCADE_SCALE_IMAGE
- See Also:
- Constant Field Values
Objdetect
public Objdetect()
groupRectangles
public static void groupRectangles(MatOfRect rectList,
MatOfInt weights,
int groupThreshold)
Groups the object candidate rectangles.
The function is a wrapper for the generic function "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 eps-> +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.
- Parameters:
rectList
- Input/output vector of rectangles. Output vector includes
retained and grouped rectangles. (The Python list is not modified in place.)weights
- a weightsgroupThreshold
- Minimum possible number of rectangles minus 1. The
threshold is used in a group of rectangles to retain it.- See Also:
- org.opencv.objdetect.Objdetect.groupRectangles
groupRectangles
public static void groupRectangles(MatOfRect rectList,
MatOfInt weights,
int groupThreshold,
double eps)
Groups the object candidate rectangles.
The function is a wrapper for the generic function "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 eps-> +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.
- Parameters:
rectList
- Input/output vector of rectangles. Output vector includes
retained and grouped rectangles. (The Python list is not modified in place.)weights
- a weightsgroupThreshold
- Minimum possible number of rectangles minus 1. The
threshold is used in a group of rectangles to retain it.eps
- Relative difference between sides of the rectangles to merge them
into a group.- See Also:
- org.opencv.objdetect.Objdetect.groupRectangles