Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.data.images
Class AbstractComputeColorHistogram

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.data.images.AbstractComputeColorHistogram
All Implemented Interfaces:
ComputeColorHistogram, Parameterizable
Direct Known Subclasses:
ComputeHSBColorHistogram, ComputeNaiveHSBColorHistogram, ComputeNaiveRGBColorHistogram

public abstract class AbstractComputeColorHistogram
extends AbstractLoggable
implements ComputeColorHistogram

Abstract class for color histogram computation.

Author:
Erich Schubert

Field Summary
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug, logger
 
Constructor Summary
AbstractComputeColorHistogram()
           
 
Method Summary
 double[] computeColorHistogram(File file)
          Compute a color histogram given a file name.
protected abstract  int getBinForColor(int rgb)
          Compute the bin number from a pixel color value.
protected abstract  int getNumBins()
          Get the number of bins.
 
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debugFine, debugFiner, debugFinest, exception, progress, verbose, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractComputeColorHistogram

public AbstractComputeColorHistogram()
Method Detail

computeColorHistogram

public double[] computeColorHistogram(File file)
                               throws IOException
Description copied from interface: ComputeColorHistogram
Compute a color histogram given a file name.

Specified by:
computeColorHistogram in interface ComputeColorHistogram
Parameters:
file - File name
Returns:
Color histogram
Throws:
IOException - on file read errors.

getNumBins

protected abstract int getNumBins()
Get the number of bins.

Returns:
Number of bins

getBinForColor

protected abstract int getBinForColor(int rgb)
Compute the bin number from a pixel color value.

Parameters:
rgb - Pixel color value
Returns:
Bin number

Release 0.3 (2010-03-31_1612)