org.imageterrier.structures.indexing
Class QuantiserIndex

java.lang.Object
  extended by org.imageterrier.structures.indexing.QuantiserIndex

public class QuantiserIndex
extends Object

An index structure for an vector quantiser (an OpenIMAJ Cluster) which can be used to quantise features into visual terms.

Author:
Jonathon Hare

Constructor Summary
QuantiserIndex(org.openimaj.ml.clustering.Cluster<?,?> quantiser)
          Construct a QuantiserIndex from an existing quantiser
QuantiserIndex(String path, String prefix)
          Construct a QuantiserIndex from a file
 
Method Summary
 org.openimaj.ml.clustering.Cluster<?,?> getQuantiser()
          Get the underlying vector quantiser
 void load(File file)
          Load a quantiser from a file
 void save(File file)
          Save the quantiser to the specified file
 void save(org.terrier.structures.Index index)
          Save the QuantiserIndex to the specified index
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuantiserIndex

public QuantiserIndex(String path,
                      String prefix)
               throws IOException
Construct a QuantiserIndex from a file

Parameters:
path - the path to the file
prefix - the prefix of the file name
Throws:
IOException

QuantiserIndex

public QuantiserIndex(org.openimaj.ml.clustering.Cluster<?,?> quantiser)
Construct a QuantiserIndex from an existing quantiser

Parameters:
quantiser - the quantiser
Method Detail

load

public void load(File file)
          throws IOException
Load a quantiser from a file

Parameters:
file -
Throws:
IOException

save

public void save(org.terrier.structures.Index index)
          throws IOException
Save the QuantiserIndex to the specified index

Parameters:
index -
Throws:
IOException

save

public void save(File file)
          throws IOException
Save the quantiser to the specified file

Parameters:
file - the file to save to
Throws:
IOException

getQuantiser

public org.openimaj.ml.clustering.Cluster<?,?> getQuantiser()
Get the underlying vector quantiser

Returns:
the vector quantiser


Copyright © 2011 The University of Southampton. All Rights Reserved.