public abstract class AbstractComputeColorHistogram extends Object implements ComputeColorHistogram
Constructor and Description |
---|
AbstractComputeColorHistogram() |
Modifier and Type | Method and Description |
---|---|
double[] |
computeColorHistogram(File file,
File mask)
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.
|
public double[] computeColorHistogram(File file, File mask) throws IOException
ComputeColorHistogram
computeColorHistogram
in interface ComputeColorHistogram
file
- File namemask
- Mask file (optional)IOException
- on file read errors.protected abstract int getNumBins()
protected abstract int getBinForColor(int rgb)
rgb
- Pixel color value