public class SingleNddCeddImageSearcher extends AbstractImageSearcher
| 限定符和类型 | 字段和说明 |
|---|---|
protected GlobalFeature |
cachedInstance |
protected java.util.TreeSet<SimpleResult> |
docs |
protected java.util.ArrayList<double[]> |
featureCache |
protected boolean |
isCaching |
protected java.util.logging.Logger |
logger |
protected double |
maxDistance |
protected org.apache.lucene.index.IndexReader |
reader |
protected boolean |
useSimilarityScore |
| 构造器和说明 |
|---|
SingleNddCeddImageSearcher(org.apache.lucene.index.IndexReader reader)
Creates a new ImageSearcher for searching just one single image based on CEDD from a RAM cached data set.
|
SingleNddCeddImageSearcher(org.apache.lucene.index.IndexReader reader,
boolean approximate)
Creates a new ImageSearcher for searching just one single image based on CEDD from a RAM cached data set.
|
SingleNddCeddImageSearcher(org.apache.lucene.index.IndexReader reader,
boolean approximate,
java.lang.Class descriptorClass,
java.lang.String fieldName)
Eventually to be used with other LireFeature classes.
|
| 限定符和类型 | 方法和说明 |
|---|---|
ImageDuplicates |
findDuplicates(org.apache.lucene.index.IndexReader reader)
Identifies duplicates in the database.
|
SimpleResult |
findMostSimilar(GlobalFeature globalFeature) |
SimpleResult[] |
findMostSimilar(GlobalFeature[] globalFeatures) |
SimpleResult[] |
findMostSimilar(GlobalFeature[] globalFeatures,
int offset,
int length) |
protected double |
findSimilar(org.apache.lucene.index.IndexReader reader,
GlobalFeature globalFeature) |
protected double |
getDistance(org.apache.lucene.document.Document document,
GlobalFeature globalFeature)
Main similarity method called for each and every document in the index.
|
protected void |
init(org.apache.lucene.index.IndexReader reader) |
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.
|
java.lang.String |
toString() |
relevanceFeedback, searchprotected java.util.logging.Logger logger
protected GlobalFeature cachedInstance
protected boolean isCaching
protected java.util.ArrayList<double[]> featureCache
protected org.apache.lucene.index.IndexReader reader
protected java.util.TreeSet<SimpleResult> docs
protected double maxDistance
protected boolean useSimilarityScore
public SingleNddCeddImageSearcher(org.apache.lucene.index.IndexReader reader)
reader - the index reader pointing to the index. It will be cached first, so changes will not be reflected in this instance.public SingleNddCeddImageSearcher(org.apache.lucene.index.IndexReader reader,
boolean approximate)
reader - the index reader pointing to the index. It will be cached first, so changes will not be reflected in this instance.approximate - set to true if you want to trade accuracy to speed, setting to true is faster (~ double speed), but less accuratepublic SingleNddCeddImageSearcher(org.apache.lucene.index.IndexReader reader,
boolean approximate,
java.lang.Class descriptorClass,
java.lang.String fieldName)
reader - approximate - descriptorClass - protected void init(org.apache.lucene.index.IndexReader reader)
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 occursprotected double findSimilar(org.apache.lucene.index.IndexReader reader,
GlobalFeature globalFeature)
throws java.io.IOException
reader - globalFeature - java.io.IOExceptionpublic SimpleResult findMostSimilar(GlobalFeature globalFeature) throws java.io.IOException
java.io.IOExceptionpublic SimpleResult[] findMostSimilar(GlobalFeature[] globalFeatures) throws java.io.IOException
java.io.IOExceptionpublic SimpleResult[] findMostSimilar(GlobalFeature[] globalFeatures, int offset, int length) throws java.io.IOException
java.io.IOExceptionprotected double getDistance(org.apache.lucene.document.Document document,
GlobalFeature globalFeature)
document - globalFeature - public 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 java.lang.String toString()
toString 在类中 java.lang.Object