public final class OpenCVGrouping extends Object implements DetectionFilter<Rectangle,ObjectIntPair<Rectangle>>
Modifier and Type | Field and Description |
---|---|
static float |
DEFAULT_EPS
The default eps value for determining whether two rectangles overlap
enough to be considered as being of the same group.
|
static int |
DEFAULT_MINIMUM_SUPPORT
The default value for the minimum number of rectangles required within a
group.
|
Constructor and Description |
---|
OpenCVGrouping()
Construct a new
OpenCVGrouping with the default values of
DEFAULT_EPS for the eps and DEFAULT_MINIMUM_SUPPORT for
the support. |
OpenCVGrouping(float eps,
int minSupport)
Construct a new
OpenCVGrouping with the given parameters. |
OpenCVGrouping(int minSupport)
Construct a new
OpenCVGrouping with the given minimum support
number. |
Modifier and Type | Method and Description |
---|---|
List<ObjectIntPair<Rectangle>> |
apply(List<Rectangle> input)
Perform the filtering operation on the input and return the output.
|
public static final float DEFAULT_EPS
public static final int DEFAULT_MINIMUM_SUPPORT
public OpenCVGrouping(float eps, int minSupport)
OpenCVGrouping
with the given parameters.eps
- The eps value for determining whether two rectangles overlap
enough to be considered as being of the same group.minSupport
- The minimum number of rectangles required within a group.
Groups with less than this number of rectangles will be
removed.public OpenCVGrouping(int minSupport)
OpenCVGrouping
with the given minimum support
number. The DEFAULT_EPS
value is used for the eps.minSupport
- The minimum number of rectangles required within a group.
Groups with less than this number of rectangles will be
removed.public OpenCVGrouping()
OpenCVGrouping
with the default values of
DEFAULT_EPS
for the eps and DEFAULT_MINIMUM_SUPPORT
for
the support.public List<ObjectIntPair<Rectangle>> apply(List<Rectangle> input)
DetectionFilter
apply
in interface DetectionFilter<Rectangle,ObjectIntPair<Rectangle>>
input
- the input detections