public class BitSamplingImageSearcher 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.| 构造器和说明 |
|---|
BitSamplingImageSearcher(int maximumHits,
GlobalFeature feature)
Creates a new searcher for BitSampling based hashes.
|
BitSamplingImageSearcher(int maximumHits,
GlobalFeature feature,
boolean useFastSearch)
Creates a new searcher for BitSampling based hashes.
|
BitSamplingImageSearcher(int maximumHits,
GlobalFeature feature,
int numHashedResults)
Creates a new searcher for BitSampling based hashes.
|
BitSamplingImageSearcher(int maximumHits,
java.lang.String featureFieldName,
java.lang.String hashesFieldName,
GlobalFeature feature)
Creates a new searcher for BitSampling based hashes.
|
BitSamplingImageSearcher(int maximumHits,
java.lang.String featureFieldName,
java.lang.String hashesFieldName,
GlobalFeature feature,
java.io.InputStream hashes) |
BitSamplingImageSearcher(int maximumHits,
java.lang.String featureFieldName,
java.lang.String hashesFieldName,
GlobalFeature feature,
java.io.InputStream hashes,
int numHashedResults) |
BitSamplingImageSearcher(int maximumHits,
java.lang.String featureFieldName,
java.lang.String hashesFieldName,
GlobalFeature feature,
int numHashedResults) |
| 限定符和类型 | 方法和说明 |
|---|---|
ImageDuplicates |
findDuplicates(org.apache.lucene.index.IndexReader reader)
Identifies duplicates in the database.
|
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.
|
relevanceFeedback, searchpublic BitSamplingImageSearcher(int maximumHits,
java.lang.String featureFieldName,
java.lang.String hashesFieldName,
GlobalFeature feature)
maximumHits - how many hits the searcher shall return.featureFieldName - the field hashFunctionsFileName of the feature.hashesFieldName - the field hashFunctionsFileName of the hashes.feature - an instance of the feature.public BitSamplingImageSearcher(int maximumHits,
GlobalFeature feature)
maximumHits - how many hits the searcher shall return.feature - an instance of the feature.public BitSamplingImageSearcher(int maximumHits,
GlobalFeature feature,
boolean useFastSearch)
maximumHits - how many hits the searcher shall return.feature - an instance of the feature.useFastSearch - if true it only uses a random sample of hashes for the query and speeds up the search significantly.public BitSamplingImageSearcher(int maximumHits,
GlobalFeature feature,
int numHashedResults)
maximumHits - how many hits the searcher shall return.feature - an instance of the feature.numHashedResults - the number of candidate results retrieved from the index before re-ranking.public BitSamplingImageSearcher(int maximumHits,
java.lang.String featureFieldName,
java.lang.String hashesFieldName,
GlobalFeature feature,
int numHashedResults)
public BitSamplingImageSearcher(int maximumHits,
java.lang.String featureFieldName,
java.lang.String hashesFieldName,
GlobalFeature feature,
java.io.InputStream hashes)
public BitSamplingImageSearcher(int maximumHits,
java.lang.String featureFieldName,
java.lang.String hashesFieldName,
GlobalFeature feature,
java.io.InputStream hashes,
int numHashedResults)
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.