|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectanalysis.Histogram
public class Histogram
Considers a bitmap and produces a simple histogram, giving, for each pixel byte value, the number of pixels in the bitmap having that value. Currently creates a separate histogram for each color.
| Field Summary | |
|---|---|
private long[] |
blue
|
private boolean |
chiSquaredComputed
|
private double |
chiSquaredP
|
private double |
chiSquaredS
|
private long[] |
green
|
private long[] |
red
|
| Constructor Summary | |
|---|---|
Histogram(Bitmap bitmap)
Creates a Histogram for the specified bitmap over all pixels |
|
Histogram(Bitmap bitmap,
int startX,
int startY,
int endX,
int endY)
Creates a Histogram for the specified bitmap over the range of pixels specified, including all of every row between startY and endY, and only those portions of the startY and endY rows after startX and before startY, respectively, inclusive. |
|
| Method Summary | |
|---|---|
private void |
countPixel(Pixel pixel)
|
double |
getChiSquaredP()
Returns the ChiSquared p-value for this histogram. |
double |
getChiSquaredS()
Returns the ChiSquared S-value for this histogram. |
static void |
printComparison(Histogram a,
Histogram b,
boolean color)
|
void |
printHistogram(boolean color)
|
private static void |
printHistogram(java.lang.String colorName,
long[]... arrays)
|
private void |
runChiSquaredTest()
Runs the ChiSquared test on this distribution if it has not already been run. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private long[] red
private long[] blue
private long[] green
private double chiSquaredS
private double chiSquaredP
private boolean chiSquaredComputed
| Constructor Detail |
|---|
public Histogram(Bitmap bitmap)
bitmap -
public Histogram(Bitmap bitmap,
int startX,
int startY,
int endX,
int endY)
bitmap - startX - startY - endX - endY - | Method Detail |
|---|
private void countPixel(Pixel pixel)
public void printHistogram(boolean color)
grayscale - true to print all three histogram colors, false to
print only one (grayscale)
public static void printComparison(Histogram a,
Histogram b,
boolean color)
private static void printHistogram(java.lang.String colorName,
long[]... arrays)
private void runChiSquaredTest()
public double getChiSquaredS()
public double getChiSquaredP()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||