OCR Configurable  1.0
 Todo Clases Namespaces Archivos Funciones Variables
Métodos públicos | Métodos protegidos | Atributos privados
Referencia de la Clase edu.uoc.ocr.LuminanceSource

The purpose of this class hierarchy is to abstract different bitmap implementations across platforms into a standard interface for requesting greyscale luminance values. The interface only provides immutable methods; therefore crop and rotation create copies. This is to ensure that one Reader does not modify the original luminance source and leave it in an unknown state for other Readers in the chain. Más...

Diagrama de herencias de edu.uoc.ocr.LuminanceSource
Inheritance graph
[significado de colores y flechas]

Lista de todos los miembros.

Métodos públicos

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.
final int getHeight ()
abstract byte[] getMatrix ()
 Fetches luminance data for the underlying bitmap. Values should be fetched using: int luminance = array[y * width + x] & 0xff;.
abstract 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.
final int getWidth ()
boolean isCropSupported ()
boolean isRotateSupported ()
LuminanceSource rotateCounterClockwise ()
 Returns a new object with rotated image data. Only callable if isRotateSupported() is true.

Métodos protegidos

 LuminanceSource (int width, int height)

Atributos privados

final int height
final int width

Descripción detallada

The purpose of this class hierarchy is to abstract different bitmap implementations across platforms into a standard interface for requesting greyscale luminance values. The interface only provides immutable methods; therefore crop and rotation create copies. This is to ensure that one Reader does not modify the original luminance source and leave it in an unknown state for other Readers in the chain.

Definición en la línea 40 del archivo LuminanceSource.java.


Documentación del constructor y destructor

edu.uoc.ocr.LuminanceSource.LuminanceSource ( int  width,
int  height 
) [protected]

Definición en la línea 45 del archivo LuminanceSource.java.


Documentación de las funciones miembro

LuminanceSource edu.uoc.ocr.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.

Parámetros:
leftThe left coordinate, 0 <= left < getWidth().
topThe top coordinate, 0 <= top <= getHeight().
widthThe width of the rectangle to crop.
heightThe height of the rectangle to crop.
Devuelve:
A cropped version of this object.

Reimplementado en edu.uoc.ocr.PlanarYUVLuminanceSource.

Definición en la línea 115 del archivo LuminanceSource.java.

Devuelve:
The height of the bitmap.

Definición en la línea 89 del archivo LuminanceSource.java.

Gráfico de llamadas a esta función:

abstract byte [] edu.uoc.ocr.LuminanceSource.getMatrix ( ) [pure virtual]

Fetches luminance data for the underlying bitmap. Values should be fetched using: int luminance = array[y * width + x] & 0xff;.

Devuelve:
A row-major 2D array of luminance values. Do not use result.length as it may be larger than width * height bytes on some platforms. Do not modify the contents of the result.

Implementado en edu.uoc.ocr.PlanarYUVLuminanceSource.

abstract byte [] edu.uoc.ocr.LuminanceSource.getRow ( int  y,
byte[]  row 
) [pure 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.

Parámetros:
yThe row to fetch, 0 <= y < getHeight().
rowAn optional preallocated array. If null or too small, it will be ignored. Always use the returned object, and ignore the .length of the array.
Devuelve:
An array containing the luminance data.

Implementado en edu.uoc.ocr.PlanarYUVLuminanceSource.

Devuelve:
The width of the bitmap.

Definición en la línea 82 del archivo LuminanceSource.java.

Gráfico de llamadas a esta función:

Devuelve:
Whether this subclass supports cropping.

Reimplementado en edu.uoc.ocr.PlanarYUVLuminanceSource.

Definición en la línea 96 del archivo LuminanceSource.java.

Devuelve:
Whether this subclass supports counter-clockwise rotation.

Definición en la línea 123 del archivo LuminanceSource.java.

Returns a new object with rotated image data. Only callable if isRotateSupported() is true.

Devuelve:
A rotated version of this object.

Definición en la línea 133 del archivo LuminanceSource.java.


Documentación de los datos miembro

Definición en la línea 43 del archivo LuminanceSource.java.

final int edu.uoc.ocr.LuminanceSource.width [private]

Definición en la línea 42 del archivo LuminanceSource.java.


La documentación para esta clase fue generada a partir del siguiente fichero:
 Todo Clases Namespaces Archivos Funciones Variables