Este objeto es la implemtación de LuminanceSource. Puede utilizarse para excluir pixeles superfluos alrededor del perímetro. Funciona para cualquier formato de píxel donde el canal Y es plano y aparece por primera vez. Más...
Métodos públicos | |
PlanarYUVLuminanceSource (byte[] yuvData, int dataWidth, int dataHeight, int left, int top, int width, int height, boolean reverseHorizontal) | |
LuminanceSource | crop (int left, int top, int width, int height) |
Returns a new object with cropped image data. Implementations may keep a reference to the original data rather than a copy. Only callable if isCropSupported() is true. | |
byte[] | getMatrix () |
Fetches luminance data for the underlying bitmap. Values should be fetched using: int luminance = array[y * width + x] & 0xff;. | |
byte[] | getRow (int y, byte[] row) |
Fetches one row of luminance data from the underlying platform's bitmap. Values range from 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have to bitwise and with 0xff for each value. It is preferable for implementations of this method to only fetch this row rather than the whole image, since no 2D Readers may be installed and getMatrix() may never be called. | |
boolean | isCropSupported () |
Bitmap | renderCroppedGreyscaleBitmap () |
Métodos privados | |
void | reverseHorizontal (int width, int height) |
Atributos privados | |
final int | dataHeight |
final int | dataWidth |
final int | left |
final int | top |
final byte[] | yuvData |
Este objeto es la implemtación de LuminanceSource. Puede utilizarse para excluir pixeles superfluos alrededor del perímetro. Funciona para cualquier formato de píxel donde el canal Y es plano y aparece por primera vez.
Definición en la línea 37 del archivo PlanarYUVLuminanceSource.java.
edu.uoc.ocr.PlanarYUVLuminanceSource.PlanarYUVLuminanceSource | ( | byte[] | yuvData, |
int | dataWidth, | ||
int | dataHeight, | ||
int | left, | ||
int | top, | ||
int | width, | ||
int | height, | ||
boolean | reverseHorizontal | ||
) |
Definición en la línea 45 del archivo PlanarYUVLuminanceSource.java.
LuminanceSource edu.uoc.ocr.PlanarYUVLuminanceSource.crop | ( | int | left, |
int | top, | ||
int | width, | ||
int | height | ||
) |
Returns a new object with cropped image data. Implementations may keep a reference to the original data rather than a copy. Only callable if isCropSupported() is true.
left | The left coordinate, 0 <= left < getWidth(). |
top | The top coordinate, 0 <= top <= getHeight(). |
width | The width of the rectangle to crop. |
height | The height of the rectangle to crop. |
Reimplementado de edu.uoc.ocr.LuminanceSource.
Definición en la línea 120 del archivo PlanarYUVLuminanceSource.java.
byte [] edu.uoc.ocr.PlanarYUVLuminanceSource.getMatrix | ( | ) | [virtual] |
Fetches luminance data for the underlying bitmap. Values should be fetched using: int luminance = array[y * width + x] & 0xff;.
Implementa edu.uoc.ocr.LuminanceSource.
Definición en la línea 81 del archivo PlanarYUVLuminanceSource.java.
byte [] edu.uoc.ocr.PlanarYUVLuminanceSource.getRow | ( | int | y, |
byte[] | row | ||
) | [virtual] |
Fetches one row of luminance data from the underlying platform's bitmap. Values range from 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have to bitwise and with 0xff for each value. It is preferable for implementations of this method to only fetch this row rather than the whole image, since no 2D Readers may be installed and getMatrix() may never be called.
y | The row to fetch, 0 <= y < getHeight(). |
row | An optional preallocated array. If null or too small, it will be ignored. Always use the returned object, and ignore the .length of the array. |
Implementa edu.uoc.ocr.LuminanceSource.
Definición en la línea 66 del archivo PlanarYUVLuminanceSource.java.
Reimplementado de edu.uoc.ocr.LuminanceSource.
Definición en la línea 115 del archivo PlanarYUVLuminanceSource.java.
Definición en la línea 125 del archivo PlanarYUVLuminanceSource.java.
void edu.uoc.ocr.PlanarYUVLuminanceSource.reverseHorizontal | ( | int | width, |
int | height | ||
) | [private] |
Definición en la línea 147 del archivo PlanarYUVLuminanceSource.java.
final int edu.uoc.ocr.PlanarYUVLuminanceSource.dataHeight [private] |
Definición en la línea 41 del archivo PlanarYUVLuminanceSource.java.
final int edu.uoc.ocr.PlanarYUVLuminanceSource.dataWidth [private] |
Definición en la línea 40 del archivo PlanarYUVLuminanceSource.java.
final int edu.uoc.ocr.PlanarYUVLuminanceSource.left [private] |
Definición en la línea 42 del archivo PlanarYUVLuminanceSource.java.
final int edu.uoc.ocr.PlanarYUVLuminanceSource.top [private] |
Definición en la línea 43 del archivo PlanarYUVLuminanceSource.java.
final byte [] edu.uoc.ocr.PlanarYUVLuminanceSource.yuvData [private] |
Definición en la línea 39 del archivo PlanarYUVLuminanceSource.java.