|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectno.hiof.imagepr.features.Histogram
A Histogram represents the histogram of an IntensityImage. The histogram of an image contains the amount of pixels of each value in the interval 0-255. (This class could easily be extended to accept other intervals of pixel values).
This class is adopted to version 2 of the API by Per-Olav Rus�s
| Constructor Summary | |
Histogram(short[][] matrix)
Set the matrix with pixel values and calculate the histogram. |
|
| Method Summary | |
double[] |
calcCumNormHistogram()
Calculate the cumulative normalized histogram. |
double[] |
calcNormHistogram()
Calculate and return the normalized histogram for the image. |
void |
draw(boolean cumulative,
java.awt.Graphics g,
int x0,
int y0,
int height,
int space)
Draw the histogram of the image. |
IntensityImage |
drawHistogram(boolean cumulative)
Draw the histogram of the image on an IntensityImage. |
IntensityImage |
drawHistogram(boolean cumulative,
int height,
int space)
Draw the histogram of the image on an IntensityImage with a given height and spacing between the bars. |
int[] |
getHistogram()
Get the histogram as an integer array. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Histogram(short[][] matrix)
matrix - The matrix| Method Detail |
public int[] getHistogram()
public double[] calcNormHistogram()
public double[] calcCumNormHistogram()
public IntensityImage drawHistogram(boolean cumulative)
cumulative - Set to true for cumulative histogram.
public IntensityImage drawHistogram(boolean cumulative,
int height,
int space)
cumulative - Set to true for cumulative histogram.height - The heigth of the histogram.space - The space between the bars of the histogram.
public void draw(boolean cumulative,
java.awt.Graphics g,
int x0,
int y0,
int height,
int space)
g - The Graphics object to draw the histogram on.x0 - The horizonal coordinate of the histogram.y0 - The vertical coordinate of the histogram.height - The heigth of the histogram.space - The space between the bars of the histogram.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||