retrieval
Class SearchThread

java.lang.Object
  extended by java.lang.Thread
      extended by retrieval.SearchThread
All Implemented Interfaces:
java.lang.Runnable

public class SearchThread
extends java.lang.Thread

A thread to handle the parsing of one skeleton and comparing it with PSGM to the query object (passed as "ready-to-use" skeleton object). The result is saved to a priority queue, passed by reference, automatically ordering all results of all concurrent threads according to their descending similarity.

See also SimilaritySearch.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private  java.lang.String category
          the category of the second skeleton objecz
private  Config config
          configuring algorithm
private  MatchList ml
          the correspondence list to hold the found matchings between the two skeleton objects.
private  java.lang.String objectfilename1
          the path to the shape image of the first skeleton object
private  java.lang.String objectfilename2
          the path to the shape image of the second skeleton object
private  SimilaritySearchResult result
          the result to hold meta data about the found result.
private  java.util.PriorityQueue<SimilaritySearchResult> results
          priority queue to store all found results in.
private  java.lang.String skeletonfilename1
          the path to the skeleton image of the first skeleton object
private  java.lang.String skeletonfilename2
          the path to the skeleton image of the second skeleton object
private  SkeletonObject so
          the query skeleton object to be compared
private  SkeletonObject so_flipped
          the query skeleton object, parsed from flipped image
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SearchThread(SkeletonObject so, SkeletonObject so_flipped, java.lang.String skeletonfilename1, java.lang.String objectfilename1, java.lang.String skeletonfilename2, java.lang.String objectfilename2, java.lang.String category, int nosp, double alpha, java.util.PriorityQueue<SimilaritySearchResult> results)
          create a new search thread.
 
Method Summary
 java.lang.String getObjectfilename1()
           
 java.lang.String getObjectfilename2()
           
 java.lang.String getSkeletonfilename1()
           
 java.lang.String getSkeletonfilename2()
           
 void run()
          Start the search thread.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

so

private final SkeletonObject so
the query skeleton object to be compared


so_flipped

private final SkeletonObject so_flipped
the query skeleton object, parsed from flipped image


skeletonfilename1

private final java.lang.String skeletonfilename1
the path to the skeleton image of the first skeleton object


objectfilename1

private final java.lang.String objectfilename1
the path to the shape image of the first skeleton object


skeletonfilename2

private final java.lang.String skeletonfilename2
the path to the skeleton image of the second skeleton object


objectfilename2

private final java.lang.String objectfilename2
the path to the shape image of the second skeleton object


category

private final java.lang.String category
the category of the second skeleton objecz


config

private Config config
configuring algorithm


ml

private MatchList ml
the correspondence list to hold the found matchings between the two skeleton objects.


result

private SimilaritySearchResult result
the result to hold meta data about the found result.


results

private final java.util.PriorityQueue<SimilaritySearchResult> results
priority queue to store all found results in.

Constructor Detail

SearchThread

public SearchThread(SkeletonObject so,
                    SkeletonObject so_flipped,
                    java.lang.String skeletonfilename1,
                    java.lang.String objectfilename1,
                    java.lang.String skeletonfilename2,
                    java.lang.String objectfilename2,
                    java.lang.String category,
                    int nosp,
                    double alpha,
                    java.util.PriorityQueue<SimilaritySearchResult> results)
             throws InvalidConfigParameterException
create a new search thread.

Parameters:
so - - the skeleton object for which the similarities are searched
so_flipped - - the skeleton object for which the similarities are searched, parsed from flipped image.
skeletonfilename1 - - the path to the skeleton image of the query skeleton object
objectfilename1 - - the path to the shape image of the query skeleton object
skeletonfilename2 - - the path to the skeleton image of the target skeleton object
objectfilename2 - - the path to the shape image of the target skeleton object
category - - the category of the second skeleton object
nosp - - the number of sample points
alpha - - the weight factor for path lengths
results - - the PriorityQueue to store all results in
Throws:
InvalidConfigParameterException
Method Detail

getSkeletonfilename2

public java.lang.String getSkeletonfilename2()
Returns:
the skeletonfilename2

getObjectfilename2

public java.lang.String getObjectfilename2()
Returns:
the objectfilename2

run

public void run()
Start the search thread. The second skeleton object, specified by the paths to skeleton and shape image, is parsed. Then, PSGM is applied to this second skeleton object and the query object. The result is saved to a priority queue, automatically ordering the results according to their similarity to the query object.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

getObjectfilename1

public java.lang.String getObjectfilename1()
Returns:
the objectfilename1

getSkeletonfilename1

public java.lang.String getSkeletonfilename1()
Returns:
the skeletonfilename1