|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.tess4j.TessDllAPI1
public class TessDllAPI1
A Java wrapper for Tesseract OCR DLL
using JNA Direct Mapping
.
Nested Class Summary | |
---|---|
static interface |
TessDllAPI1.CANCEL_FUNC
Callback for cancel_func. |
Nested classes/interfaces inherited from interface com.sun.jna.Library |
---|
com.sun.jna.Library.Handler |
Field Summary | |
---|---|
static java.lang.String |
LIB_NAME
DLL library name. |
Fields inherited from interface com.sun.jna.Library |
---|
OPTION_ALLOW_OBJECTS, OPTION_CALLING_CONVENTION, OPTION_FUNCTION_MAPPER, OPTION_INVOCATION_MAPPER, OPTION_STRUCTURE_ALIGNMENT, OPTION_TYPE_MAPPER |
Constructor Summary | |
---|---|
TessDllAPI1()
|
Method Summary | |
---|---|
static int |
TessDllBeginPage(int xsize,
int ysize,
java.nio.ByteBuffer buf)
BeginPage assumes the first memory address is the bottom of the image (MS DIB format). |
static int |
TessDllBeginPageBPP(int xsize,
int ysize,
java.nio.ByteBuffer buf,
byte bpp)
BeginPage assumes the first memory address is the bottom of the image (MS DIB format). |
static int |
TessDllBeginPageLang(int xsize,
int ysize,
java.nio.ByteBuffer buf,
java.lang.String lang)
BeginPage assumes the first memory address is the bottom of the image (MS DIB format). |
static int |
TessDllBeginPageLangBPP(int xsize,
int ysize,
java.nio.ByteBuffer buf,
java.lang.String lang,
byte bpp)
BeginPage assumes the first memory address is the bottom of the image (MS DIB format). |
static int |
TessDllBeginPageUpright(int xsize,
int ysize,
java.nio.ByteBuffer buf,
java.lang.String lang)
BeginPageUpright assumes the first memory address is the top of the image (TIFF format). |
static int |
TessDllBeginPageUprightBPP(int xsize,
int ysize,
java.nio.ByteBuffer buf,
java.lang.String lang,
byte bpp)
BeginPageUpright assumes the first memory address is the top of the image (TIFF format). |
static void |
TessDllEndPage()
Ends page. |
static ETEXT_DESC |
TessDllRecognize_a_Block(int left,
int right,
int top,
int bottom)
Recognizes one word or section from the bitmap or the whole page. |
static ETEXT_DESC |
TessDllRecognize_all_Words()
Recognizes the whole page. |
static void |
TessDllRelease()
Releases any memory associated with the recognize class object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String LIB_NAME
Constructor Detail |
---|
public TessDllAPI1()
Method Detail |
---|
public static int TessDllBeginPage(int xsize, int ysize, java.nio.ByteBuffer buf)
xsize
- width of imageysize
- height of imagebuf
- a buffer of bytes for a 1 bit per pixel bitmap
public static int TessDllBeginPageLang(int xsize, int ysize, java.nio.ByteBuffer buf, java.lang.String lang)
xsize
- width of imageysize
- height of imagebuf
- a buffer of bytes for a 1 bit per pixel bitmaplang
- the code of the language for which the data will be loaded.
Codes follow ISO 639-3 standard. If it is null
, English (eng) will be loaded.
public static int TessDllBeginPageUpright(int xsize, int ysize, java.nio.ByteBuffer buf, java.lang.String lang)
xsize
- width of imageysize
- height of imagebuf
- a buffer of bytes for a 1 bit per pixel bitmaplang
- the code of the language for which the data will be loaded.
Codes follow ISO 639-3 standard. If it is null
, English (eng) will be loaded.
public static int TessDllBeginPageBPP(int xsize, int ysize, java.nio.ByteBuffer buf, byte bpp)
xsize
- width of imageysize
- height of imagebuf
- a buffer of bytes for a bitmapbpp
- bit depth (bits per pixel): 1 for binary bitmap; 8 for gray; 24 for color RGB
public static int TessDllBeginPageLangBPP(int xsize, int ysize, java.nio.ByteBuffer buf, java.lang.String lang, byte bpp)
xsize
- width of imageysize
- height of imagebuf
- a buffer of bytes for a bitmaplang
- the code of the language for which the data will be loaded.
Codes follow ISO 639-3 standard. If it is null
, English (eng) will be loaded.bpp
- bit depth (bits per pixel): 1 for binary bitmap; 8 for gray; 24 for color RGB
public static int TessDllBeginPageUprightBPP(int xsize, int ysize, java.nio.ByteBuffer buf, java.lang.String lang, byte bpp)
xsize
- width of imageysize
- height of imagebuf
- a buffer of bytes for a bitmaplang
- the code of the language for which the data will be loaded.
Codes follow ISO 639-3 standard. If it is null
, English (eng) will be loaded.bpp
- bit depth (bits per pixel): 1 for binary bitmap; 8 for gray; 24 for color RGB
public static void TessDllEndPage()
public static ETEXT_DESC TessDllRecognize_a_Block(int left, int right, int top, int bottom)
left
- left of blockright
- right of blocktop
- top of blockbottom
- bottom of block
public static ETEXT_DESC TessDllRecognize_all_Words()
public static void TessDllRelease()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |