public class AssignOverlappingObjects extends Object
ObjectMask
s.
As arbitrary naming, these sets are termed left and right.
An assignment is one-to-one mapping between the first set and the second, borrowing terminology from the assignment problem.
Not all objects must be mapped. An object may only be mapped to maximally one object in the other set.
The Hungarian Algorithm is used to determine the assignment, based upon an overlap function between the corresponding objects. The assignments are chosen to maximize total overlap.
Constructor and Description |
---|
AssignOverlappingObjects(FeatureEvaluator<FeatureInputPairObjects> featureEvaluator,
boolean flatten) |
Modifier and Type | Method and Description |
---|---|
OverlappingObjects |
createAssignment(ObjectCollection left,
ObjectCollection right,
double maxAcceptedCost,
Dimensions dimensions)
Creates an assignment from the objects in
left to those in right . |
CostMatrix<ObjectMask> |
getCosts()
A matrix linking the overlap between each
ObjectMask to each other, respectively as
rows and columns. |
public AssignOverlappingObjects(FeatureEvaluator<FeatureInputPairObjects> featureEvaluator, boolean flatten)
public OverlappingObjects createAssignment(ObjectCollection left, ObjectCollection right, double maxAcceptedCost, Dimensions dimensions) throws FeatureCalculationException
left
to those in right
.
See the class documentation for the algorithm involved.
left
- the left objects.right
- the right objects.maxAcceptedCost
- an upper-maximum cost, above which a mapping will be disallowed
between objects.dimensions
- the dimensions of the scene in which all objects reside.FeatureCalculationException
- if overlap cannot be calculated.public CostMatrix<ObjectMask> getCosts()
ObjectMask
to each other, respectively as
rows and columns.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.