Class ReduceElements<T>
- Type Parameters:
T
- the element-type that exists in the collection (with confidence)
- Direct Known Subclasses:
ReduceElementsGreedy
,ThresholdConfidence
Reduces the number or spatial-extent of elements by favoring higher-confidence elements over
lower-confidence elements.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ReductionOutcome
<LabelledWithConfidence<T>> reduce
(List<LabelledWithConfidence<T>> elements, Extent extent, ExecutionTimeRecorder executionTimeRecorder) Reduce a list of elements (each with a confidence score and a label) to a smaller-list.Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
ReduceElements
public ReduceElements()
-
-
Method Details
-
reduce
public abstract ReductionOutcome<LabelledWithConfidence<T>> reduce(List<LabelledWithConfidence<T>> elements, Extent extent, ExecutionTimeRecorder executionTimeRecorder) throws OperationFailedException Reduce a list of elements (each with a confidence score and a label) to a smaller-list.It is not guaranteed that the resulting list will have fewer elements than the input list, but never more.
- Parameters:
elements
- proposed bounding-boxes with scores.extent
- an area in which allelements
must exclusively reside.executionTimeRecorder
- records the execution time of particular operations.- Returns:
- the outcome of the operation, indicating which elements are retained / removed / added.
- Throws:
OperationFailedException
- if anything goes wrong.
-