IMAGE
- Type of image in which the detection happensDETECTED_OBJECT
- The type of object emitted by the inner detectorFILTERED_OBJECT
- The type of object emitted by the filterpublic class FilteringObjectDetector<IMAGE extends Image<?,IMAGE>,DETECTED_OBJECT,FILTERED_OBJECT> extends Object implements ObjectDetector<IMAGE,FILTERED_OBJECT>
Constructor and Description |
---|
FilteringObjectDetector(ObjectDetector<IMAGE,DETECTED_OBJECT> detector,
DetectionFilter<DETECTED_OBJECT,FILTERED_OBJECT> filter)
Construct with the given detector and filter.
|
Modifier and Type | Method and Description |
---|---|
List<FILTERED_OBJECT> |
detect(IMAGE image)
Detect objects in the given image and return representations of them.
|
void |
setROI(Rectangle roi)
(Optional operation).
|
public FilteringObjectDetector(ObjectDetector<IMAGE,DETECTED_OBJECT> detector, DetectionFilter<DETECTED_OBJECT,FILTERED_OBJECT> filter)
detector
- the detectorfilter
- the filterpublic List<FILTERED_OBJECT> detect(IMAGE image)
ObjectDetector
If no objects are detected, null
or an empty list may be
returned.
detect
in interface ObjectDetector<IMAGE extends Image<?,IMAGE>,FILTERED_OBJECT>
image
- the image to detect the object in.null
if none are found.public void setROI(Rectangle roi)
ObjectDetector
Set the region of interest within the image to search for objects.
Setting to null
means to search the whole image.
setROI
in interface ObjectDetector<IMAGE extends Image<?,IMAGE>,FILTERED_OBJECT>
roi
- the region of interest