JIGL
v1.6

jigl.image
Class ColorHistogram

java.lang.Object
  |
  +--jigl.image.ColorHistogram

public class ColorHistogram
extends Object

A Color Histogram is a 3-Dimensional array that contains the count for a ColorImage.


Field Summary
protected  int m_bbits
          The number of precision bits used for blue color
private  int m_bsize
          The range for blue color
protected  int[][][] m_data
          Store the data of histogram
protected  int m_gbits
          The number of precision bits used for green color
private  int m_gsize
          The range for green color
protected  int m_rbits
          The number of precision bits used for red color
private  int m_rsize
          The range for red color
 
Constructor Summary
ColorHistogram(ColorImage image)
          Default constructor.
ColorHistogram(ColorImage image, int rbits, int gbits, int bbits)
          Constructor.
 
Method Summary
 int count(int r, int g, int b)
          Returns the count of the colorHistogram at r g b
 float[] mean()
          Returns the mean of the entire ColorHistogram as an int[].
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_data

protected int[][][] m_data
Store the data of histogram


m_rbits

protected int m_rbits
The number of precision bits used for red color


m_gbits

protected int m_gbits
The number of precision bits used for green color


m_bbits

protected int m_bbits
The number of precision bits used for blue color


m_rsize

private int m_rsize
The range for red color


m_gsize

private int m_gsize
The range for green color


m_bsize

private int m_bsize
The range for blue color

Constructor Detail

ColorHistogram

public ColorHistogram(ColorImage image)
Default constructor. 5 bits of precision are used for each dimension. (32X32X32 array)


ColorHistogram

public ColorHistogram(ColorImage image,
                      int rbits,
                      int gbits,
                      int bbits)
Constructor. Array is (2^rbits)X(2^gbits)X(2^bbits) in size. Only values from 1 to 8 are valid.

Method Detail

count

public int count(int r,
                 int g,
                 int b)
Returns the count of the colorHistogram at r g b


mean

public float[] mean()
Returns the mean of the entire ColorHistogram as an int[].


JIGL
v1.6

Submit a bug or feature
Revised in May 2002 by Weiming Liu