Tesseract-android-tools  1.0
 Todo Clases Namespaces Archivos Funciones Variables
Métodos públicos estáticos | Atributos públicos estáticos | Funciones estáticas del 'package' | Métodos privados estáticos
Referencia de la Clase com.googlecode.leptonica.android.Binarize

Métodos de binarización de imagen. Más...

Lista de todos los miembros.

Métodos públicos estáticos

static Pix otsuAdaptiveThreshold (Pix pixs)
 Performs locally-adaptive Otsu threshold binarization with default parameters.
static Pix otsuAdaptiveThreshold (Pix pixs, int sizeX, int sizeY, int smoothX, int smoothY, float scoreFraction)
 Performs locally-adaptive Otsu threshold binarization.

Atributos públicos estáticos

static final float OTSU_SCORE_FRACTION = 0.1f
 Fraction of the max Otsu score, typically 0.1.
static final int OTSU_SIZE_X = 32
 Desired tile X dimension; actual size may vary.
static final int OTSU_SIZE_Y = 32
 Desired tile Y dimension; actual size may vary.
static final int OTSU_SMOOTH_X = 2
 Desired X smoothing value.
static final int OTSU_SMOOTH_Y = 2
 Desired Y smoothing value.

Funciones estáticas del 'package'

 [static initializer]

Métodos privados estáticos

static native int nativeOtsuAdaptiveThreshold (int nativePix, int sizeX, int sizeY, int smoothX, int smoothY, float scoreFract)

Descripción detallada

Métodos de binarización de imagen.

Definición en la línea 32 del archivo Binarize.java.


Documentación de las funciones miembro

com.googlecode.leptonica.android.Binarize.[static initializer] ( ) [static, package]
static native int com.googlecode.leptonica.android.Binarize.nativeOtsuAdaptiveThreshold ( int  nativePix,
int  sizeX,
int  sizeY,
int  smoothX,
int  smoothY,
float  scoreFract 
) [static, private]

Gráfico de llamadas a esta función:

Performs locally-adaptive Otsu threshold binarization with default parameters.

Parámetros:
pixsAn 8 bpp PIX source image.
Devuelve:
A 1 bpp thresholded PIX image.

Definición en la línea 62 del archivo Binarize.java.

static Pix com.googlecode.leptonica.android.Binarize.otsuAdaptiveThreshold ( Pix  pixs,
int  sizeX,
int  sizeY,
int  smoothX,
int  smoothY,
float  scoreFraction 
) [static]

Performs locally-adaptive Otsu threshold binarization.

Notes:

  1. The Otsu method finds a single global threshold for an image. This function allows a locally adapted threshold to be found for each tile into which the image is broken up.
  2. The array of threshold values, one for each tile, constitutes a highly downscaled image. This array is optionally smoothed using a convolution. The full width and height of the convolution kernel are (2 * smoothX + 1) and (2 * smoothY + 1).
  3. The minimum tile dimension allowed is 16. If such small tiles are used, it is recommended to use smoothing, because without smoothing, each small tile determines the splitting threshold independently. A tile that is entirely in the image bg will then hallucinate fg, resulting in a very noisy binarization. The smoothing should be large enough that no tile is only influenced by one type (fg or bg) of pixels, because it will force a split of its pixels.
  4. To get a single global threshold for the entire image, use input values of sizeX and sizeY that are larger than the image. For this situation, the smoothing parameters are ignored.
  5. The threshold values partition the image pixels into two classes: one whose values are less than the threshold and another whose values are greater than or equal to the threshold. This is the same use of 'threshold' as in pixThresholdToBinary().
  6. The scorefract is the fraction of the maximum Otsu score, which is used to determine the range over which the histogram minimum is searched. See numaSplitDistribution() for details on the underlying method of choosing a threshold.
  7. This uses enables a modified version of the Otsu criterion for splitting the distribution of pixels in each tile into a fg and bg part. The modification consists of searching for a minimum in the histogram over a range of pixel values where the Otsu score is within a defined fraction, scoreFraction, of the max score. To get the original Otsu algorithm, set scoreFraction == 0.
Parámetros:
pixsAn 8 bpp PIX source image.
sizeXDesired tile X dimension; actual size may vary.
sizeYDesired tile Y dimension; actual size may vary.
smoothXHalf-width of convolution kernel applied to threshold array: use 0 for no smoothing.
smoothYHalf-height of convolution kernel applied to threshold array: use 0 for no smoothing.
scoreFractionFraction of the max Otsu score; typ. 0.1 (use 0.0 for standard Otsu).
Devuelve:
A 1 bpp thresholded PIX image.

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

Gráfico de llamadas para esta función:


Documentación de los datos miembro

Fraction of the max Otsu score, typically 0.1.

Definición en la línea 52 del archivo Binarize.java.

Desired tile X dimension; actual size may vary.

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

Desired tile Y dimension; actual size may vary.

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

Desired X smoothing value.

Definición en la línea 46 del archivo Binarize.java.

Desired Y smoothing value.

Definición en la línea 49 del archivo Binarize.java.


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