BinarizationFunc

Inheritance: java.lang.Object

public class BinarizationFunc

Constructors

Constructor Description
BinarizationFunc()

Methods

Method Description
adaptiveAverageBinarizeImage(ByteBitmap bitmap, int radius)
adaptiveBinarizeImage(ByteBitmap bitmap)
adaptiveBinarizeImage(ByteBitmap bitmap, int radius)
binarizeIntegralImageByMiddle(ByteBitmap aBitmap, int aWindow)
binarizeIntegralImageByMiddle(ByteBitmap aBitmap, int aWindow, float aNormalization)
binarizeOtsu(ByteBitmap aBitmap)
binarizeSavola(ByteBitmap aBitmap)
binarizeSavola(ByteBitmap aBitmap, ITerminationCheck aTerminationCheck)
binarizeSavola(ByteBitmap aBitmap, int aWindow)
binarizeSavola(ByteBitmap aBitmap, int aWindow, ITerminationCheck aTerminationCheck)
binarizeSavola(ByteBitmap aBitmap, int aWindow, float aK)
binarizeSavola(ByteBitmap aBitmap, int aWindow, float aK, ITerminationCheck aTerminationCheck)
binarizeSavolaOtsu(ByteBitmap aBitmap) Combined Savola and Otsu binarization
binarizeWithThreshold(ByteBitmap aBitmap, byte Threshold)
equals(Object arg0)
getBitmapHistogram(ByteBitmap aBitmap)
getClass()
getDarknessThreshold(ByteBitmap aBitmap, double aDarkPixels) Recognizes threshold by bitmap white black pixels filling in most cases we have 50/50 of black and white dosts in barcodes area
getDarknessThreshold(int[] aHistogram, double aDarkness, int aPixelsCnt) Recognizes threshold by bitmap white black pixels filling in most cases we have 50/50 of black and white dosts in barcodes area
getThresholdOtsu(int[] histogramData)
getThresholdOtsuMethod(ByteBitmap aBitmap)
getThresholdOtsuMethod(int[] histogramData)
hashCode()
notify()
notifyAll()
tRSinghBinarization(ByteBitmap aBitmap)
tRSinghBinarization(ByteBitmap aBitmap, ITerminationCheck aTerminationCheck)
tRSinghBinarization(ByteBitmap aBitmap, float K, int HalfWindow)
tRSinghBinarization(ByteBitmap aBitmap, float K, int HalfWindow, ITerminationCheck aTerminationCheck)
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

BinarizationFunc()

public BinarizationFunc()

adaptiveAverageBinarizeImage(ByteBitmap bitmap, int radius)

public static ByteBitmap adaptiveAverageBinarizeImage(ByteBitmap bitmap, int radius)

Parameters:

Parameter Type Description
bitmap ByteBitmap
radius int

Returns: ByteBitmap

adaptiveBinarizeImage(ByteBitmap bitmap)

public static ByteBitmap adaptiveBinarizeImage(ByteBitmap bitmap)

Parameters:

Parameter Type Description
bitmap ByteBitmap

Returns: ByteBitmap

adaptiveBinarizeImage(ByteBitmap bitmap, int radius)

public static ByteBitmap adaptiveBinarizeImage(ByteBitmap bitmap, int radius)

Parameters:

Parameter Type Description
bitmap ByteBitmap
radius int

Returns: ByteBitmap

binarizeIntegralImageByMiddle(ByteBitmap aBitmap, int aWindow)

public static ByteBitmap binarizeIntegralImageByMiddle(ByteBitmap aBitmap, int aWindow)

Parameters:

Parameter Type Description
aBitmap ByteBitmap
aWindow int

Returns: ByteBitmap

binarizeIntegralImageByMiddle(ByteBitmap aBitmap, int aWindow, float aNormalization)

public static ByteBitmap binarizeIntegralImageByMiddle(ByteBitmap aBitmap, int aWindow, float aNormalization)

Parameters:

Parameter Type Description
aBitmap ByteBitmap
aWindow int
aNormalization float

Returns: ByteBitmap

binarizeOtsu(ByteBitmap aBitmap)

public static ByteBitmap binarizeOtsu(ByteBitmap aBitmap)

Parameters:

Parameter Type Description
aBitmap ByteBitmap

Returns: ByteBitmap

binarizeSavola(ByteBitmap aBitmap)

public static ByteBitmap binarizeSavola(ByteBitmap aBitmap)

Parameters:

Parameter Type Description
aBitmap ByteBitmap

Returns: ByteBitmap

binarizeSavola(ByteBitmap aBitmap, ITerminationCheck aTerminationCheck)

public static ByteBitmap binarizeSavola(ByteBitmap aBitmap, ITerminationCheck aTerminationCheck)

Parameters:

Parameter Type Description
aBitmap ByteBitmap
aTerminationCheck ITerminationCheck

Returns: ByteBitmap

binarizeSavola(ByteBitmap aBitmap, int aWindow)

public static ByteBitmap binarizeSavola(ByteBitmap aBitmap, int aWindow)

Parameters:

Parameter Type Description
aBitmap ByteBitmap
aWindow int

Returns: ByteBitmap

binarizeSavola(ByteBitmap aBitmap, int aWindow, ITerminationCheck aTerminationCheck)

public static ByteBitmap binarizeSavola(ByteBitmap aBitmap, int aWindow, ITerminationCheck aTerminationCheck)

Parameters:

Parameter Type Description
aBitmap ByteBitmap
aWindow int
aTerminationCheck ITerminationCheck

Returns: ByteBitmap

binarizeSavola(ByteBitmap aBitmap, int aWindow, float aK)

public static ByteBitmap binarizeSavola(ByteBitmap aBitmap, int aWindow, float aK)

Parameters:

Parameter Type Description
aBitmap ByteBitmap
aWindow int
aK float

Returns: ByteBitmap

binarizeSavola(ByteBitmap aBitmap, int aWindow, float aK, ITerminationCheck aTerminationCheck)

public static ByteBitmap binarizeSavola(ByteBitmap aBitmap, int aWindow, float aK, ITerminationCheck aTerminationCheck)

Parameters:

Parameter Type Description
aBitmap ByteBitmap
aWindow int
aK float
aTerminationCheck ITerminationCheck

Returns: ByteBitmap

binarizeSavolaOtsu(ByteBitmap aBitmap)

public static ByteBitmap binarizeSavolaOtsu(ByteBitmap aBitmap)

Combined Savola and Otsu binarization

Parameters:

Parameter Type Description
aBitmap ByteBitmap

Returns: ByteBitmap - Binarized bytebitmap

binarizeWithThreshold(ByteBitmap aBitmap, byte Threshold)

public static ByteBitmap binarizeWithThreshold(ByteBitmap aBitmap, byte Threshold)

Parameters:

Parameter Type Description
aBitmap ByteBitmap
Threshold byte

Returns: ByteBitmap

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

Parameter Type Description
arg0 java.lang.Object

Returns: boolean

getBitmapHistogram(ByteBitmap aBitmap)

public static int[] getBitmapHistogram(ByteBitmap aBitmap)

Parameters:

Parameter Type Description
aBitmap ByteBitmap

Returns: int[]

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getDarknessThreshold(ByteBitmap aBitmap, double aDarkPixels)

public static byte getDarknessThreshold(ByteBitmap aBitmap, double aDarkPixels)

Recognizes threshold by bitmap white black pixels filling in most cases we have 50/50 of black and white dosts in barcodes area

Parameters:

Parameter Type Description
aBitmap ByteBitmap proceed bitmap
aDarkPixels double darkness of image, 0.3% image must be bright, 0.7 image must be dark

Returns: byte - threshold

getDarknessThreshold(int[] aHistogram, double aDarkness, int aPixelsCnt)

public static byte getDarknessThreshold(int[] aHistogram, double aDarkness, int aPixelsCnt)

Recognizes threshold by bitmap white black pixels filling in most cases we have 50/50 of black and white dosts in barcodes area

Parameters:

Parameter Type Description
aHistogram int[] gray histogram
aDarkness double darkness of image, 0.3% image must be bright, 0.7 image must be dark
aPixelsCnt int cashed value of pizels countm if -1 or 0, it is calculated

Returns: byte - threshold

getThresholdOtsu(int[] histogramData)

public static int getThresholdOtsu(int[] histogramData)

Parameters:

Parameter Type Description
histogramData int[]

Returns: int

getThresholdOtsuMethod(ByteBitmap aBitmap)

public static byte getThresholdOtsuMethod(ByteBitmap aBitmap)

Parameters:

Parameter Type Description
aBitmap ByteBitmap

Returns: byte

getThresholdOtsuMethod(int[] histogramData)

public static byte getThresholdOtsuMethod(int[] histogramData)

Parameters:

Parameter Type Description
histogramData int[]

Returns: byte

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

tRSinghBinarization(ByteBitmap aBitmap)

public static ByteBitmap tRSinghBinarization(ByteBitmap aBitmap)

Parameters:

Parameter Type Description
aBitmap ByteBitmap

Returns: ByteBitmap

tRSinghBinarization(ByteBitmap aBitmap, ITerminationCheck aTerminationCheck)

public static ByteBitmap tRSinghBinarization(ByteBitmap aBitmap, ITerminationCheck aTerminationCheck)

Parameters:

Parameter Type Description
aBitmap ByteBitmap
aTerminationCheck ITerminationCheck

Returns: ByteBitmap

tRSinghBinarization(ByteBitmap aBitmap, float K, int HalfWindow)

public static ByteBitmap tRSinghBinarization(ByteBitmap aBitmap, float K, int HalfWindow)

Parameters:

Parameter Type Description
aBitmap ByteBitmap
K float
HalfWindow int

Returns: ByteBitmap

tRSinghBinarization(ByteBitmap aBitmap, float K, int HalfWindow, ITerminationCheck aTerminationCheck)

public static ByteBitmap tRSinghBinarization(ByteBitmap aBitmap, float K, int HalfWindow, ITerminationCheck aTerminationCheck)

Parameters:

Parameter Type Description
aBitmap ByteBitmap
K float
HalfWindow int
aTerminationCheck ITerminationCheck

Returns: ByteBitmap

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

Parameter Type Description
arg0 long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

Parameter Type Description
arg0 long
arg1 int