Class ReduceElements<T>

Object
org.anchoranalysis.bean.AnchorBean<ReduceElements<T>>
org.anchoranalysis.image.inference.bean.segment.reduce.ReduceElements<T>
Type Parameters:
T - the element-type that exists in the collection (with confidence)
Direct Known Subclasses:
ReduceElementsGreedy

public abstract class ReduceElements<T>
extends AnchorBean<ReduceElements<T>>
Reduces the number or spatial-extent of elements by favoring higher-confidence elements over lower-confidence elements.
Author:
Owen Feehan
  • Constructor Details

  • Method Details

    • reduce

      public abstract ReductionOutcome<LabelledWithConfidence<T>> reduce​(List<LabelledWithConfidence<T>> elements, org.anchoranalysis.spatial.box.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 all elements 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.