|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.generation5.vision.Filter
org.generation5.vision.GreyscaleFilter
This class converts an RGB colour to a greyscale image.
| Field Summary | |
static int |
BT709
BT709 Greyscale: Red: 0.2125 Green: 0.7154 Blue: 0.0721 |
protected int |
greyscaleType
The greyscale type (BT709, Y or RMY) |
static int |
RMY
RMY Greyscale: Red: 0.5 Green: 0.419 Blue: 0.081 |
static int |
Y
Y-Greyscale (YIQ/NTSC): Red: 0.299 Green: 0.587 Blue: 0.114 |
| Constructor Summary | |
GreyscaleFilter()
Creates a new instance of GreyscaleFilter |
|
| Method Summary | |
protected int |
calculateGrey(int r,
int g,
int b)
Calculate the grey value according to the grey conversion set. |
java.awt.image.BufferedImage |
filter(java.awt.image.BufferedImage image,
java.awt.image.BufferedImage output)
Convert an RGB image to greyscale. |
static java.awt.image.BufferedImage |
toGrey(java.awt.image.BufferedImage input,
java.awt.image.BufferedImage output)
A static utility function to generate a greyscale image. |
java.lang.String |
toString()
|
| Methods inherited from class org.generation5.vision.Filter |
filter, verifyOutput, verifyOutput, verifyOutput |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int BT709
public static final int Y
public static final int RMY
protected int greyscaleType
| Constructor Detail |
public GreyscaleFilter()
| Method Detail |
public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage image,
java.awt.image.BufferedImage output)
filter in class Filteroutput - the output image (optional).image - the input image.
Filter.verifyOutput(BufferedImage, BufferedImage)
public static java.awt.image.BufferedImage toGrey(java.awt.image.BufferedImage input,
java.awt.image.BufferedImage output)
GreyscaleFilter grey = new GreyscaleFilter();
return grey.filter(input, output);
input - the input image.output - the output image (optional).
protected int calculateGrey(int r,
int g,
int b)
r - the red value.g - the green value.b - the blue value.
public java.lang.String toString()
|
This documentation is part of the Generation5 JDK.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||