net.semanticmetadata.lire
Class AbstractImageSearcher

java.lang.Object
  extended by net.semanticmetadata.lire.AbstractImageSearcher
All Implemented Interfaces:
ImageSearcher
Direct Known Subclasses:
CorrelogramImageSearcher, SimpleImageSearcher

public abstract class AbstractImageSearcher
extends java.lang.Object
implements ImageSearcher

Abstract ImageSearcher, which uses javax.imageio.ImageIO to create a BufferedImage from an InputStream.

This file is part of the Caliph and Emir project: http://www.SemanticMetadata.net
Date: 01.02.2006
Time: 00:13:16

Author:
Mathias Lux, mathias@juggle.at

Constructor Summary
AbstractImageSearcher()
           
 
Method Summary
 ImageSearchHits relevanceFeedback(ImageSearchHits originalSearch, java.util.Set<org.apache.lucene.document.Document> positives, java.util.Set<org.apache.lucene.document.Document> negatives)
          Modifies the given search by the provided positive and negative examples.
 ImageSearchHits search(java.io.InputStream image, org.apache.lucene.index.IndexReader reader)
          Searches for images similar to the given image.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.semanticmetadata.lire.ImageSearcher
findDuplicates, search, search
 

Constructor Detail

AbstractImageSearcher

public AbstractImageSearcher()
Method Detail

search

public ImageSearchHits search(java.io.InputStream image,
                              org.apache.lucene.index.IndexReader reader)
                       throws java.io.IOException
Searches for images similar to the given image. This simple implementation uses ImageSearcher.search(java.awt.image.BufferedImage,org.apache.lucene.index.IndexReader), the image is read using javax.imageio.ImageIO.

Specified by:
search in interface ImageSearcher
Parameters:
image - the example image to search for.
reader - the IndexReader which is used to dsearch through the images.
Returns:
a sorted list of hits.
Throws:
java.io.IOException - in case the image could not be read from stream.

relevanceFeedback

public ImageSearchHits relevanceFeedback(ImageSearchHits originalSearch,
                                         java.util.Set<org.apache.lucene.document.Document> positives,
                                         java.util.Set<org.apache.lucene.document.Document> negatives)
Description copied from interface: ImageSearcher
Modifies the given search by the provided positive and negative examples. This process follows the idea of relevance feedback.

Specified by:
relevanceFeedback in interface ImageSearcher
Returns: