de.lmu.ifi.dbs.elki.data.images
Class AbstractComputeColorHistogram
java.lang.Object
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.
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 |
AbstractComputeColorHistogram
public AbstractComputeColorHistogram()
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