org.opencv.objdetect
public class Objdetect extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
CASCADE_DO_CANNY_PRUNING |
static int |
CASCADE_DO_ROUGH_SEARCH |
static int |
CASCADE_FIND_BIGGEST_OBJECT |
static int |
CASCADE_SCALE_IMAGE |
Constructor and Description |
---|
Objdetect() |
Modifier and Type | Method and Description |
---|---|
static void |
groupRectangles(MatOfRect rectList,
MatOfInt weights,
int groupThreshold)
Groups the object candidate rectangles.
|
static void |
groupRectangles(MatOfRect rectList,
MatOfInt weights,
int groupThreshold,
double eps)
Groups the object candidate rectangles.
|
public static final int CASCADE_DO_CANNY_PRUNING
public static final int CASCADE_DO_ROUGH_SEARCH
public static final int CASCADE_FIND_BIGGEST_OBJECT
public static final int CASCADE_SCALE_IMAGE
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.
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.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.
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.