Groups the object candidate rectangles
[rects, weights] = hog.groupRectangles(rects, weights)
[...] = hog.groupRectangles(..., 'OptionName',optionValue, ...)
Input
- rects Input cell array of rectangles, where each rectangle
is represented as a 4-element vector
{[x,y,w,h], ...}
,
or a numeric Nx4/Nx1x4/1xNx4 array.
- weights Input vector of associated weights.
Output
- rects outupt updated rectangles. Grouped rectangles are
the average of all rectangles in that cluster.
- weights output updated weights. Corresponding grouped
weights are the maximum weights of all rectangles in that
cluster.
Options
- EPS Relative difference between sides of the rectangles to
merge them into a group. default 0.2
- GroupThreshold Minimum possible number of rectangles in a
group minus 1. The threshold is used on a group of
rectangles to decide whether to retain it or not. If less
than or equal to zero, no grouping is performed. default 1
(i.e only groups with two or more rectangles are kept).