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

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

public abstract class AbstractComputeColorHistogram
extends Object
implements ComputeColorHistogram

Abstract class for color histogram computation.


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 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.4.0 (2011-09-20_1324)