|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnao.CameraImage
public class CameraImage
Nested Class Summary | |
---|---|
static class |
CameraImage.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 | |
---|---|
CameraImage(java.awt.Image i)
Create a CameraImage from a normal Image. |
|
CameraImage(int[] px,
int width,
int height)
Create a CameraImage 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 |
applyGreyThreshold(int threshold)
Apply a threshold to get a black and white image. |
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. |
java.util.Vector<CameraImage.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). |
CameraImage.Blob |
getLargestBlob(java.awt.Color colour,
int blobThreshold)
Get the single largest blob in the image of the given colour and minimum size. |
java.awt.image.BufferedImage |
toImage()
Convert this to a normal Image. |
Methods inherited from class java.lang.Object |
---|
equals, 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 CameraImage(java.awt.Image i)
public CameraImage(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 applyGreyThreshold(int threshold)
public void applyThreshold(java.awt.Color colour, int[] colourLimits)
public java.util.Vector<CameraImage.Blob> getBlobs(java.awt.Color colour, int blobThreshold, int maxBlobs)
public CameraImage.Blob getLargestBlob(java.awt.Color colour, int blobThreshold)
public java.awt.image.BufferedImage toImage()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |