algorithm
Class PathSimilaritySkeletonGraphMatching

java.lang.Object
  extended by algorithm.PathSimilaritySkeletonGraphMatching

Deprecated. use Matching2D instead

@Deprecated
public class PathSimilaritySkeletonGraphMatching
extends java.lang.Object

Kind of a wrapper class for the usage of PSGM, the "real" execution class for the matching algorithm.

When using this class as a caller for PSGM, additional meta problems will be taken of:

After execution of the algorithm, the result is "cleaned": If one of the images seems to be flipped, the matchings are "translated back" to the original image. Also, if the two skeletons were reordered for the execution of the algorithm , they are reordered back.


Field Summary
private  org.apache.log4j.Logger logger
          Deprecated. logger instance
private  boolean reordered
          Deprecated. hold the information if the two skeletons were reordered for the algorithm, that is, so1 originally was the second skeleton, and the other way around.
private  SkeletonObject so1
          Deprecated. the first skeleton object (the one with lesser end nodes
private  SkeletonObject so1_flipped
          Deprecated. the first skeleton object, read from an image flipped horizontally
private  SkeletonObject so2
          Deprecated. the second skeleton object (the one with more end nodes
 
Constructor Summary
PathSimilaritySkeletonGraphMatching(SkeletonObject so1, SkeletonObject so1_flipped, SkeletonObject so2)
          Deprecated. Constructor.
PathSimilaritySkeletonGraphMatching(java.lang.String skeletonfilename1, java.lang.String objectfilename1, java.lang.String skeletonfilename2, java.lang.String objectfilename2)
          Deprecated. Constructor.
PathSimilaritySkeletonGraphMatching(java.lang.String skeletonfilename1, java.lang.String objectfilename1, java.lang.String skeletonfilename2, java.lang.String objectfilename2, boolean preprocess)
          Deprecated. Constructor.
 
Method Summary
 CleanMatchingResult go(Config config)
          Deprecated. Execute the PSGM algorithm.
private  void loadSkeletons(java.lang.String skeletonfilename1, java.lang.String objectfilename1, java.lang.String skeletonfilename2, java.lang.String objectfilename2)
          Deprecated. load both skeletons, specified by the filename.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

so1

private SkeletonObject so1
Deprecated. 
the first skeleton object (the one with lesser end nodes


so2

private SkeletonObject so2
Deprecated. 
the second skeleton object (the one with more end nodes


so1_flipped

private SkeletonObject so1_flipped
Deprecated. 
the first skeleton object, read from an image flipped horizontally


reordered

private boolean reordered
Deprecated. 
hold the information if the two skeletons were reordered for the algorithm, that is, so1 originally was the second skeleton, and the other way around.


logger

private final org.apache.log4j.Logger logger
Deprecated. 
logger instance

Constructor Detail

PathSimilaritySkeletonGraphMatching

public PathSimilaritySkeletonGraphMatching(java.lang.String skeletonfilename1,
                                           java.lang.String objectfilename1,
                                           java.lang.String skeletonfilename2,
                                           java.lang.String objectfilename2)
                                    throws java.io.IOException,
                                           InvalidSkeletonException,
                                           InvalidConfigParameterException
Deprecated. 
Constructor. This is the usual way to use this class,

Given the paths to two skeleton images and two shape images (all four must be binary images), the skeletons will automatically be parsed, reordered if need be, and the smaller skeleton is parsed again from the images flipped horizontally. *

Parameters:
skeletonfilename1 - - path to the first skeleton image
objectfilename1 - - path to the first shape image (belonging to skeletonfilename1)
skeletonfilename2 - - path to the second skeleton image
objectfilename2 - - path to the second skeleton image (belonging to skeletonfilename2)
Throws:
java.io.IOException - - if one or more of the images was not found
InvalidSkeletonException - - if one of the skeletons seems broken
InvalidConfigParameterException

PathSimilaritySkeletonGraphMatching

public PathSimilaritySkeletonGraphMatching(java.lang.String skeletonfilename1,
                                           java.lang.String objectfilename1,
                                           java.lang.String skeletonfilename2,
                                           java.lang.String objectfilename2,
                                           boolean preprocess)
                                    throws java.io.IOException,
                                           InvalidSkeletonException,
                                           InvalidConfigParameterException
Deprecated. 
Constructor. This is the usual way to use this class,

Given the paths to two skeleton images and two shape images (all four must be binary images), the skeletons will automatically be parsed, reordered if need be, and the smaller skeleton is parsed again from the images flipped horizontally. *

Parameters:
skeletonfilename1 - - path to the first skeleton image
objectfilename1 - - path to the first shape image (belonging to skeletonfilename1)
skeletonfilename2 - - path to the second skeleton image
objectfilename2 - - path to the second skeleton image (belonging to skeletonfilename2)
preprocess -
Throws:
java.io.IOException - - if one or more of the images was not found
InvalidSkeletonException - - if one of the skeletons seems broken
InvalidConfigParameterException

PathSimilaritySkeletonGraphMatching

public PathSimilaritySkeletonGraphMatching(SkeletonObject so1,
                                           SkeletonObject so1_flipped,
                                           SkeletonObject so2)
                                    throws InvalidSkeletonException,
                                           WrongUsageOfAlgorithmException
Deprecated. 
Constructor. Use this one only if you know what you are doing.

Given already parsed skeleton objects, execute the PSGM algorithm. Make sure that the preconditions are fullfilled for the two skeleton objects, i.e., the first skeleton object *must* have less or equal end nodes than the second skeleton object. The two skeleton objects are assumed not to have been reordered.

Parameters:
so1 - - the first skeleton object, *must* have less end nodes than the second object.
so1_flipped - - the first skeleton object, parsed from an image flipped horizontally
so2 - - the second skeleton object, *must* have more end nodes than the first object.
Throws:
InvalidSkeletonException - - if one of the skeletons seems broken
WrongUsageOfAlgorithmException - - if the specified first skeleton object has more end nodes than the second.
Method Detail

go

public CleanMatchingResult go(Config config)
                       throws InvalidSkeletonException,
                              InvalidWeightFunctionGivenException,
                              WrongUsageOfAlgorithmException,
                              InvalidConfigParameterException
Deprecated. 
Execute the PSGM algorithm. It is automatically executed twice for each skeleton pair: In case of reordered or flipped images, the results will be cleaned afterwards.

Parameters:
config - - the configuration parameters for this algorithm
Returns:
cleaned matching result for the two skeleton objects
Throws:
InvalidSkeletonException - - if one of the skeleton seems broken
InvalidWeightFunctionGivenException - - if no valid weight function could be extracted for HungarianAlgorithm
WrongUsageOfAlgorithmException
InvalidConfigParameterException

loadSkeletons

private void loadSkeletons(java.lang.String skeletonfilename1,
                           java.lang.String objectfilename1,
                           java.lang.String skeletonfilename2,
                           java.lang.String objectfilename2)
                    throws java.io.IOException,
                           InvalidSkeletonException,
                           InvalidConfigParameterException
Deprecated. 
load both skeletons, specified by the filename. The skeletons might get reordered in this function. Also, a flipped version of the "smaller" skeleton is parsed automatically.

Parameters:
skeletonfilename1 - - path to the first skeleton image
objectfilename1 - - path to the first shape image (belonging to skeletonfilename1)
skeletonfilename2 - - path to the second skeleton image
objectfilename2 - - path to the second skeleton image (belonging to skeletonfilename2)
Throws:
java.io.IOException - - if one of the image was not found
InvalidSkeletonException - - if one of the skeletons seems broken
InvalidConfigParameterException