|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sourceforge.javaocr.scanner.PixelImage
public class PixelImage
Class to contain a pixel representation of an image.
| Field Summary | |
|---|---|
float |
aspectRatio
Deprecated. Aspect ratio of the image ( arrayWidth/arrayHeight). |
protected static float[] |
FILTER_FIR_COEFFS
Deprecated. |
int |
height
Deprecated. Height of the image, in pixels. |
private static Logger |
LOG
Deprecated. |
int |
npix
Deprecated. Total number of pixels in the image ( arrayWidth*arrayHeight). |
int[] |
pixels
Deprecated. An array of pixels. |
int |
width
Deprecated. Width of the image, in pixels. |
| Constructor Summary | |
|---|---|
PixelImage(Image image)
Deprecated. Construct a new PixelImage object from an
Image. |
|
PixelImage(int[] pixels,
int width,
int height)
Deprecated. Construct a new PixelImage object from an array of
pixels. |
|
| Method Summary | |
|---|---|
void |
filter()
Deprecated. |
void |
filter(int[] pixels,
int width,
int height)
Deprecated. |
int |
getPixel(int x,
int y)
Deprecated. Get the value of a pixel at a specific x,y position. |
int |
getPixelIndex(int x,
int y)
Deprecated. Get the index of a pixel at a specific x,y position. |
int[] |
grayScaleToRGB(int[] pixels)
Deprecated. |
private static int |
rgbToGrayScale(int pix)
Deprecated. |
Image |
rgbToImage(int[] rgbPixels,
int width,
int height,
Component comp)
Deprecated. |
void |
toGrayScale(boolean normalize)
Deprecated. Convert all pixels to grayscale from RGB or RGBA. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final float[] FILTER_FIR_COEFFS
public final int[] pixels
toGrayScale() method
has been called, each pixel will be in the range of 0-255 grayscale.
public final int width
public final int height
public final int npix
arrayWidth*arrayHeight).
public final float aspectRatio
arrayWidth/arrayHeight).
private static final Logger LOG
| Constructor Detail |
|---|
public PixelImage(int[] pixels,
int width,
int height)
PixelImage object from an array of
pixels.
pixels - An array of pixels. This can be in RGBA or grayscale.
By default, it is RGBA, but if the toGrayScale() method
has been called, each pixel will be in the range of 0-255 grayscale.width - Width of the image, in pixels.height - Height of the image, in pixels.public PixelImage(Image image)
PixelImage object from an
Image.
image - An Image from which to get the pixels.
The image must be fully loaded. Use a MediaTracker to
ensure this, if necessary.| Method Detail |
|---|
public Image rgbToImage(int[] rgbPixels,
int width,
int height,
Component comp)
public final int getPixelIndex(int x,
int y)
x,y position.
x - The pixel's x position.y - The pixel's y position.
pixels array)
of the pixel.
public final int getPixel(int x,
int y)
x,y position.
x - The pixel's x position.y - The pixel's y position.
private static int rgbToGrayScale(int pix)
public final void toGrayScale(boolean normalize)
normalize - true to normalize the image after converting to
grayscale, such that the darkest pixel in the image is all black and the lightest
pixel in the image is all white.public final int[] grayScaleToRGB(int[] pixels)
public final void filter()
public final void filter(int[] pixels,
int width,
int height)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||