MATLAB File Help: cv.groupRectangles Index
cv.groupRectangles

Groups the object candidate rectangles

rects = cv.groupRectangles(rects)
[rects,weights,levelWeights] = cv.groupRectangles(...)
[...] = cv.groupRectangles(..., 'OptionName', optionValue, ...)

Input

Output

Options

The function is a wrapper for the generic partition function. 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 Thresh rectangles are rejected. In each other cluster, the average rectangle is computed and put into the output rectangle list. The function also filters out small rectangles inside larger ones that have more hits.

The function is useful for non-max suppression of object detections.

See also