OpenCV 2.4.2

org.opencv.objdetect
Class Objdetect

java.lang.Object
  extended by org.opencv.objdetect.Objdetect

public class Objdetect
extends java.lang.Object


Field Summary
static int CASCADE_DO_CANNY_PRUNING
           
static int CASCADE_DO_ROUGH_SEARCH
           
static int CASCADE_FIND_BIGGEST_OBJECT
           
static int CASCADE_SCALE_IMAGE
           
 
Constructor Summary
Objdetect()
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

Objdetect

public Objdetect()
Method Detail

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 weights
groupThreshold - 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 weights
groupThreshold - 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

Official OpenCV 2.4 Documentation