public class MetricSpaces
extends java.lang.Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
MetricSpaces.Parameters
For storing the parameters per feature.
|
static class |
MetricSpaces.Result |
| 构造器和说明 |
|---|
MetricSpaces() |
| 限定符和类型 | 方法和说明 |
|---|---|
static java.lang.String |
generateBoostedQuery(GlobalFeature feature,
int queryLength)
Creates a text String to be used for search based on the reference points using term boosting instead of repetition.
|
static java.lang.String |
generateHashString(GlobalFeature feature)
Convenience method for
generateHashString(GlobalFeature, int). |
static java.lang.String |
generateHashString(GlobalFeature feature,
int queryLength)
Creates a text String to be used for indexing and search based on the reference points.
|
static void |
indexReferencePoints(java.lang.Class globalFeatureClass,
int numberOfReferencePoints,
int lenghtOfPostingList,
java.io.File inFile,
java.io.File outFile)
Index reference points for use with a specific feature.
|
static MetricSpaces.Parameters |
loadReferencePoints(java.io.File referencePoints)
Init with a single file.
|
static void |
main(java.lang.String[] args) |
static boolean |
supportsFeature(GlobalFeature feature) |
public static void main(java.lang.String[] args)
public static void indexReferencePoints(java.lang.Class globalFeatureClass,
int numberOfReferencePoints,
int lenghtOfPostingList,
java.io.File inFile,
java.io.File outFile)
throws java.io.IOException,
java.lang.IllegalAccessException,
java.lang.InstantiationException
globalFeatureClass - The feature class to be used, eg. CEDD, PHOG, etc.numberOfReferencePoints - the number of reference points, eg. 5000lenghtOfPostingList - the length of the posting list, ie. how many reference points per image are stored.inFile - the file containing the image data, one image path per lineoutFile - the output of processing.java.io.IOExceptionjava.lang.IllegalAccessExceptionjava.lang.InstantiationExceptionpublic static MetricSpaces.Parameters loadReferencePoints(java.io.File referencePoints) throws java.io.IOException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException
indexReferencePoints(Class, int, int, File, File). Note that you can load multiple files, one for each
feature. If you load more than one per feature class, they will be overwritten.referencePoints - is the outFile from the method indexReferencePoints(Class, int, int, File, File)java.io.IOExceptionjava.lang.ClassNotFoundExceptionjava.lang.IllegalAccessExceptionjava.lang.InstantiationExceptionpublic static boolean supportsFeature(GlobalFeature feature)
public static java.lang.String generateHashString(GlobalFeature feature)
generateHashString(GlobalFeature, int).feature - feature the feature instance the string is generated for.public static java.lang.String generateHashString(GlobalFeature feature, int queryLength)
feature - the feature instance the string is generated for.queryLength - the length of the posting list. If 0, then it's set to the preset.public static java.lang.String generateBoostedQuery(GlobalFeature feature, int queryLength)
feature - the feature instance the string is generated for.queryLength - the length of the posting list. If 0, then it's set to the preset.