cbr.bin
Class MakeIdx

java.lang.Object
  extended bycbr.bin.MakeIdx

public class MakeIdx
extends Object

Command line tool for generating picture indexes based on the CCV algorithm.

Version:
"$Id: MakeIdx.java 1913 2007-08-08 02:41:53Z jpeters $"
Author:
Volker Roth

Field Summary
static String DESCR
           
protected  PicsFinder finder_
           
protected  ArgsParser p_
           
protected  PicsSource source_
           
protected  PicsStore store_
           
 
Constructor Summary
MakeIdx()
           
 
Method Summary
protected  void addPictures()
          Imports pictures from a directory into the index.
protected  void dumpThreads()
           
protected  void find(File file)
          Finds the images in the index that are most similar to the image in the given file.
protected  void findAll(File[] files)
          Finds all images that match the images in the given files.
protected  void init()
          Initializes an index.
 void list()
           
static void main(String[] argv)
           
protected  void rank(File file)
           
protected  void rank(File file, int index)
          Finds the images most similar to the image in the given file, and prints the rank of the image in the result set based on the image name.
protected  void rankAll(File[] files)
          Ranks all images that match the images in the given files.
 void run(String[] argv)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DESCR

public static final String DESCR
See Also:
Constant Field Values

p_

protected ArgsParser p_

store_

protected PicsStore store_

source_

protected PicsSource source_

finder_

protected PicsFinder finder_
Constructor Detail

MakeIdx

public MakeIdx()
Method Detail

main

public static void main(String[] argv)

init

protected void init()
             throws Exception
Initializes an index. With option -init, the index is created. Any previous data in the index is lost.

Throws:
Exception

find

protected void find(File file)
             throws IOException,
                    ImageException,
                    InterruptedException
Finds the images in the index that are most similar to the image in the given file.

Parameters:
file - The image file with the query image.
Throws:
IOException
ImageException
InterruptedException

findAll

protected void findAll(File[] files)
                throws IOException,
                       ImageException,
                       InterruptedException
Finds all images that match the images in the given files.

Parameters:
files - The image files.
Throws:
IOException
ImageException
InterruptedException

rank

protected void rank(File file)
             throws IOException,
                    ImageException,
                    InterruptedException
Throws:
IOException
ImageException
InterruptedException

rank

protected void rank(File file,
                    int index)
             throws IOException,
                    ImageException,
                    InterruptedException
Finds the images most similar to the image in the given file, and prints the rank of the image in the result set based on the image name. If the query image name is not equal to one name in the result set then the maximum rank 11 is printed.

Parameters:
file - The image file with the query image.
index - The index that is printed before the rank.
Throws:
IOException
ImageException
InterruptedException

rankAll

protected void rankAll(File[] files)
                throws IOException,
                       ImageException,
                       InterruptedException
Ranks all images that match the images in the given files.

Parameters:
files - The image files.
Throws:
IOException
ImageException
InterruptedException

addPictures

protected void addPictures()
                    throws Exception
Imports pictures from a directory into the index. A file "ls.txt" with a sorted list of names of pictures must be given in the directory from which pictures are imported.

Throws:
Exception

dumpThreads

protected void dumpThreads()

list

public void list()
          throws Exception
Throws:
Exception

run

public void run(String[] argv)
         throws Exception
Throws:
Exception


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.