|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectretrieval.SimilaritySearch
public class SimilaritySearch
Execute a similarity search in the database.
The scenario is as follows:
There are many skeleton object data in the database (stored in
src/database/database.db), where the path to the shape image and the path to
the skeleton image are stored (so that proper SkeletonObject
instances can be created. The user might want to search for images in the
database that are similar to a given image.
SimilaritySearch takes as query input the "ready-to-use" query
skeleton object to be searched. It gets all database entries, parses the
skeletons defined by those entries and executes PSGM for each of
them, with reference to the specified query image.
All results are stored in a priority queue, in order according to the total costs to match the query and the target skeleton. The first entries in the queue are the most similar.
For example usages, see SearchGUI or SimilaritySearchTest
| Field Summary | |
|---|---|
private static org.apache.log4j.Logger |
logger
logger instance |
| Constructor Summary | |
|---|---|
SimilaritySearch()
|
|
| Method Summary | |
|---|---|
static java.util.PriorityQueue<SimilaritySearchResult> |
getSimilarities(java.lang.String database,
SkeletonObject so,
SkeletonObject so_flipped,
java.lang.String skeletonfilename,
java.lang.String objectfilename,
int nosp,
double alpha)
Given a skeleton object, this function searches the database in src/database/database.db, performes PSGM to the input skeleton
and all skeletons in the database and saves the results in the order of
their similarity in a priority queue. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static org.apache.log4j.Logger logger
| Constructor Detail |
|---|
public SimilaritySearch()
| Method Detail |
|---|
public static java.util.PriorityQueue<SimilaritySearchResult> getSimilarities(java.lang.String database,
SkeletonObject so,
SkeletonObject so_flipped,
java.lang.String skeletonfilename,
java.lang.String objectfilename,
int nosp,
double alpha)
throws java.lang.ClassNotFoundException,
java.sql.SQLException,
java.io.IOException,
InvalidSkeletonException,
WrongUsageOfAlgorithmException,
InvalidWeightFunctionGivenException,
InvalidConfigParameterException
PSGM to the input skeleton
and all skeletons in the database and saves the results in the order of
their similarity in a priority queue.
so - the query skeleton object to be searchednosp - the number of sample pointsalpha - the weight factor for path lengths. The higher alpha is, the
more important is that the path lengths are proportional.skeletonfilename - - the path to the skeleton image of the query skeletonobjectfilename - - the path to the shape image of the query skeleton
java.lang.ClassNotFoundException - if the JDBC driver was not found
java.sql.SQLException - if an error occured during access to the database
java.io.IOException - if one of the files was not found
InvalidSkeletonException - if a skeleton seems to be broken
WrongUsageOfAlgorithmException - if errors occured during the execution of the algorithm
InvalidWeightFunctionGivenException - if no valid weight function could be extracted for the
assignment algorithm
InvalidConfigParameterException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||