public class LeptUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SEL_STR2
HMT (with just misses) for speckle up to 2x2
|
static java.lang.String |
SEL_STR3
HMT (with just misses) for speckle up to 3x3
|
| Constructor and Description |
|---|
LeptUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Pix |
convertImageToPix(java.awt.image.BufferedImage image)
Converts
BufferedImage to Leptonica Pix . |
static java.awt.image.BufferedImage |
convertPixToImage(Pix pix)
Converts Leptonica
Pix to BufferedImage. |
static Pix |
despeckle(Pix pixs,
java.lang.String selStr,
int selSize)
Reduces speckle noise in image.
|
static void |
dispose(com.sun.jna.Structure resource)
Disposes of Leptonica native resource.
|
static void |
disposePix(Pix pix)
Disposes of Pix resource.
|
static Pix |
removeLines(Pix pixs)
Removes horizontal lines from a grayscale image.
|
public static final java.lang.String SEL_STR2
"oooo" "oC o" "o o" "oooo"
public static final java.lang.String SEL_STR3
"ooooo" "oC o" "o o" "o o" "ooooo"
public static java.awt.image.BufferedImage convertPixToImage(Pix pix) throws java.io.IOException
Pix to BufferedImage.pix - source pixjava.io.IOExceptionpublic static Pix convertImageToPix(java.awt.image.BufferedImage image) throws java.io.IOException
BufferedImage to Leptonica Pix .image - source imagejava.io.IOExceptionpublic static Pix removeLines(Pix pixs)
lineremoval.c example.
pixs - input pixpublic static Pix despeckle(Pix pixs, java.lang.String selStr, int selSize)
speckle_reg.c example demonstrating morphological method of
removing speckle.pixs - input pixselStr - hit-miss sels in 2D layout; SEL_STR2 and SEL_STR3 are
predefined valuesselSize - 2 for 2x2, 3 for 3x3public static void disposePix(Pix pix)
pix - public static void dispose(com.sun.jna.Structure resource)
resource - A Leptonica object, such as Pix,
Pixa, Box, Boxa,
PixColormap, etc.Copyright © 2018. All Rights Reserved.