|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectalgorithm.matching.OSBfinalMatching
public class OSBfinalMatching
Compute the final matching between two skeletons by applying OSBv5 in
multiple iterations.
The advantage of OSBfinalMatching over HungarianAlgorithm is
that it is able to skip elements in the cost matrix. But this advantage come
with the requirement that the end nodes have to be ordered in a meaningful
way to apply the OSB function.
Thus, the end nodes are ordered according to their path length to the two start nodes. Based on this order, the cost matrix can be built. Of course the process has to be repeated for all combinations of end nodes.
| Field Summary | |
|---|---|
private org.apache.log4j.Logger |
logger
logger instance |
private SkeletonObject |
so1
the first skeleton to be matched |
private SkeletonObject |
so2
the second skeleton to be matched |
| Constructor Summary | |
|---|---|
OSBfinalMatching(SkeletonObject so1,
SkeletonObject so2)
Constructor. |
|
| Method Summary | |
|---|---|
MatchList |
computeAssignments(double[][] costs,
Config config)
Compute the assignments for the given cost matrix. |
private double[][] |
getCostMatrix(double[][] costs,
java.util.List<SkeletonNode> orderedEndnodes1,
java.util.List<SkeletonNode> orderedEndnodes2,
PossibleMatchList possibleMatchings)
Get the matching cost matrix as input for OSB function. |
private PossibleMatchList |
getPossibleMatchings(double[][] costs)
Get all "imaginary" matchings that are possible. |
private java.util.List<SkeletonNode> |
orderEndNodes(SkeletonObject so,
SkeletonNode node)
Order the skeleton's end nodes according to their distance to the specified node, measured by the length of the skeleton path between the two nodes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private SkeletonObject so1
private SkeletonObject so2
private org.apache.log4j.Logger logger
| Constructor Detail |
|---|
public OSBfinalMatching(SkeletonObject so1,
SkeletonObject so2)
so1 - first skeleton to be matchedso2 - second skeleton to be matched| Method Detail |
|---|
public MatchList computeAssignments(double[][] costs,
Config config)
throws InvalidWeightFunctionGivenException,
InvalidSkeletonException
MatchingAlgorithm
computeAssignments in interface MatchingAlgorithmcosts - the cost matrixconfig - the configuration parameters for this algorithm
InvalidWeightFunctionGivenException
InvalidSkeletonException
private double[][] getCostMatrix(double[][] costs,
java.util.List<SkeletonNode> orderedEndnodes1,
java.util.List<SkeletonNode> orderedEndnodes2,
PossibleMatchList possibleMatchings)
throws InvalidSkeletonException
costs - the original cost matrixorderedEndnodes1 - - the list of end nodes of so1, ordered according to their
distance to the first start node (which is the first entry in
the parameter orderedEndnodes1orderedEndnodes2 - - the list of end nodes of so2, ordered according to their
distance to the second start node (which is the first entry in
the parameter orderedEndnodes2possibleMatchings - - the list of all possible matchings in the two skeletons
InvalidSkeletonException - if one of the skeletons seems to be broken
private java.util.List<SkeletonNode> orderEndNodes(SkeletonObject so,
SkeletonNode node)
throws InvalidSkeletonException
so - the skeleton objectnode - the "start node"
InvalidSkeletonExceptionprivate PossibleMatchList getPossibleMatchings(double[][] costs)
costs - original cost matrix
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||