|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkoala.KoalaImage
public class KoalaImage
Class which encapsulates disturbingly common image operations.
Nested Class Summary | |
---|---|
static class |
KoalaImage.Blob
|
Field Summary | |
---|---|
static int |
BLACK
|
static int |
BLUE
|
static int |
GREEN
|
int |
height
|
int[] |
pixels
|
static int |
RED
|
static int |
WHITE
|
int |
width
|
Constructor Summary | |
---|---|
KoalaImage(java.awt.Image i)
Create a KoalaImage from a normal Image. |
|
KoalaImage(int[] px,
int width,
int height)
Create a KoalaImage from the specified pixel array. |
Method Summary | |
---|---|
void |
applyBlueThreshold(int blueThreshold,
double redWeight,
double greenWeight)
Apply a threshold to pick out the blue pixels. |
void |
applyGreenThreshold(int greenThreshold,
double blueWeight,
double redWeight)
Apply a threshold to pick out the green pixels. |
void |
applyRedThreshold(int redThreshold,
double blueWeight,
double greenWeight)
Apply a threshold to pick out the red pixels. |
void |
applyThreshold(java.awt.Color colour,
int[] colourLimits)
Apply a threshold to pick out an arbitrary colour. |
static int |
bluePart(int rgb)
Get the blue component of an RGB pixel. |
java.util.Vector<KoalaImage.Blob> |
getBlobs(java.awt.Color colour,
int blobThreshold,
int maxBlobs)
Label blobs (segments of contiguous colour) in the image of the specified colour and minimum size (blobThreshold). |
int[] |
getBlueHistogram()
Get the histogram of blue pixel values. |
int[] |
getGreenHistogram()
Get the histogram of green pixel values. |
KoalaImage.Blob |
getLargestBlob(java.awt.Color colour,
int blobThreshold)
Get the single largest blob in the image of the given colour and minimum size. |
int[] |
getRedHistogram()
Get the histogram of red pixel values. |
static int |
greenPart(int rgb)
Get the green component of an RGB pixel. |
boolean |
isAbnormal()
Heuristic to detect abnormal images. |
static int |
redPart(int rgb)
Get the red component of an RGB pixel. |
java.awt.image.BufferedImage |
toImage()
Convert this to a normal Image. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int RED
public static final int GREEN
public static final int BLUE
public static final int BLACK
public static final int WHITE
public final int[] pixels
public final int width
public final int height
Constructor Detail |
---|
public KoalaImage(java.awt.Image i)
public KoalaImage(int[] px, int width, int height)
Method Detail |
---|
public void applyRedThreshold(int redThreshold, double blueWeight, double greenWeight)
public void applyBlueThreshold(int blueThreshold, double redWeight, double greenWeight)
public void applyGreenThreshold(int greenThreshold, double blueWeight, double redWeight)
public void applyThreshold(java.awt.Color colour, int[] colourLimits)
public java.util.Vector<KoalaImage.Blob> getBlobs(java.awt.Color colour, int blobThreshold, int maxBlobs)
public KoalaImage.Blob getLargestBlob(java.awt.Color colour, int blobThreshold)
public boolean isAbnormal()
public int[] getRedHistogram()
public int[] getGreenHistogram()
public int[] getBlueHistogram()
public java.awt.image.BufferedImage toImage()
public static final int bluePart(int rgb)
public static final int greenPart(int rgb)
public static final int redPart(int rgb)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |