public class SegmentedObjects extends Object
Each object has an associated confidence score, and an associated class-label.
Internally, objects are partitioned by class-label.
Constructor and Description |
---|
SegmentedObjects(List<LabelledWithConfidence<MultiScaleObject>> objects,
SegmentedBackground background,
ExecutionTimeRecorder executionTimeRecorder)
Create for a collection of objects with potentially differing labels.
|
SegmentedObjects(String classLabel,
Collection<WithConfidence<MultiScaleObject>> objects,
SegmentedBackground background,
ExecutionTimeRecorder executionTimeRecorder)
Create for a collection of objects with an identical label.
|
Modifier and Type | Method and Description |
---|---|
DualScale<SegmentedObjectsAtScale> |
getObjects()
The segmented-objects, at two different scales.
|
Optional<WithConfidence<MultiScaleObject>> |
highestConfidence()
The object-mask with the highest confidence.
|
boolean |
isEmpty()
Whether no segmented objects exist.
|
SegmentedObjects |
reduce(ReduceElements<ObjectMask> reduce,
boolean separateEachLabel,
ExecutionTimeRecorder executionTimeRecorder)
Reduces the segmented-objects, applying a reduction algorithm separately to each
object-class.
|
int |
size()
The total number of segmented objects.
|
public SegmentedObjects(String classLabel, Collection<WithConfidence<MultiScaleObject>> objects, SegmentedBackground background, ExecutionTimeRecorder executionTimeRecorder)
classLabel
- the label that applies to each object in objects
.objects
- the objects with label classLabel
.background
- background-images used for visualizing the segmentation, at two respective
scales.executionTimeRecorder
- records the execution-time of particular operations.public SegmentedObjects(List<LabelledWithConfidence<MultiScaleObject>> objects, SegmentedBackground background, ExecutionTimeRecorder executionTimeRecorder)
objects
- the objects that are the result of the segmentation, with associated
confidence and labels.background
- background-images used for visualizing the segmentation, at two respective
scales.executionTimeRecorder
- records the execution-time of particular operations.public SegmentedObjects reduce(ReduceElements<ObjectMask> reduce, boolean separateEachLabel, ExecutionTimeRecorder executionTimeRecorder) throws OperationFailedException
reduce
- the algorithm used to reduce each object-class.separateEachLabel
- if true, each label is reduced separately. if false, all labels are
reduced together.executionTimeRecorder
- records the execution-time of particular operations.SegmentedObjects
with the reduce
algorithm applied to each
object-class, reusing the existing objects.OperationFailedException
- if the reduction fails on any object-class.public Optional<WithConfidence<MultiScaleObject>> highestConfidence()
Optional.empty()
if no objects exist.public int size()
public boolean isEmpty()
public DualScale<SegmentedObjectsAtScale> getObjects()
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.