public class MetricSpacesImageSearcher extends AbstractImageSearcher
BitSampling
HashingMode. First a number of candidates is retrieved from the index, then the candidates are re-ranked.
The number of candidates can be tuned with the numHashedResults parameter in the constructor. The higher
this parameter, the better the results, but the slower the search.| 构造器和说明 |
|---|
MetricSpacesImageSearcher(int maximumHits,
java.io.File referencePointFile)
Creates a new searcher for MetricSpaces based indexed features.The field names are inferred from the entries in the reference point file.
|
MetricSpacesImageSearcher(int maximumHits,
java.io.File referencePointFile,
int numHashedResults)
Creates a new searcher for MetricSpaces based indexed features.
|
| 限定符和类型 | 方法和说明 |
|---|---|
ImageDuplicates |
findDuplicates(org.apache.lucene.index.IndexReader reader)
Identifies duplicates in the database.
|
int |
getNumHashesUsedForQuery() |
ImageSearchHits |
search(java.awt.image.BufferedImage image,
org.apache.lucene.index.IndexReader reader)
Searches for images similar to the given image.
|
ImageSearchHits |
search(org.apache.lucene.document.Document doc,
org.apache.lucene.index.IndexReader reader)
Searches for images similar to the given image, defined by the Document from the index.
|
void |
setNumHashesUsedForQuery(int numHashesUsedForQuery) |
relevanceFeedback, searchpublic MetricSpacesImageSearcher(int maximumHits,
java.io.File referencePointFile)
throws java.lang.IllegalAccessException,
java.lang.InstantiationException,
java.lang.ClassNotFoundException
maximumHits - how many hits the searcher shall return.referencePointFile - the file created by MetricSpacesjava.lang.IllegalAccessExceptionjava.lang.InstantiationExceptionjava.lang.ClassNotFoundExceptionMetricSpaces.indexReferencePoints(Class, int, int, File, File)public MetricSpacesImageSearcher(int maximumHits,
java.io.File referencePointFile,
int numHashedResults)
throws java.lang.IllegalAccessException,
java.lang.InstantiationException,
java.lang.ClassNotFoundException
maximumHits - how many hits the searcher shall return.referencePointFile - the file created by MetricSpacesnumHashedResults - the number of candidate results retrieved from the index before re-ranking.java.lang.IllegalAccessExceptionjava.lang.InstantiationExceptionjava.lang.ClassNotFoundExceptionMetricSpaces.indexReferencePoints(Class, int, int, File, File)public ImageSearchHits search(java.awt.image.BufferedImage image, org.apache.lucene.index.IndexReader reader) throws java.io.IOException
ImageSearcherimage - the example image to search for.reader - the IndexReader which is used to search through the images.java.io.IOException - in case exceptions in the reader occurspublic ImageSearchHits search(org.apache.lucene.document.Document doc, org.apache.lucene.index.IndexReader reader) throws java.io.IOException
ImageSearcherdoc - the example image to search for.reader - the IndexReader which is used to dsearch through the images.java.io.IOException - in case exceptions in the reader occurspublic ImageDuplicates findDuplicates(org.apache.lucene.index.IndexReader reader) throws java.io.IOException
ImageSearcherreader - the IndexReader which is used to dsearch through the images.java.io.IOException - in case the image could not be read from stream.public int getNumHashesUsedForQuery()
public void setNumHashesUsedForQuery(int numHashesUsedForQuery)