public interface TessdllWrapper
extends com.sun.jna.win32.StdCallLibrary
DEC 14, 2009 Original Release
Modifier and Type | Field and Description |
---|---|
static TessdllWrapper |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
ImageBufferToText(byte[] imageBuf,
int width,
int height,
int bpp,
java.lang.String langId,
java.lang.String configs)
Method in tessdllWrapper.dll for converting image data to text with supported language.
|
java.lang.String |
ImageFileToText(java.lang.String imagefile,
java.lang.String langId,
java.lang.String configs)
Method to convert an image file to text.
|
static final TessdllWrapper INSTANCE
java.lang.String ImageBufferToText(byte[] imageBuf, int width, int height, int bpp, java.lang.String langId, java.lang.String configs)
imageBuf
- image data in byte[] format, java.awt.image.BufferedImage can return this format.
Note: The image in the imageBuf is supposed to fit 300DPI, which is required by
tesseract-ocr. Images captured on screen normally are at low DPI like 72 or 96. Before
using them, remember to resize these images to fit in.width
- image width in pixelheight
- image height in pixelbpp
- bits per pixellangId
- language id indicating which language it intends to convert the image to
"eng" for English --- done
"chn" for Chinese --- todo
"" forconfigs
- custom configure file [optional]java.lang.String ImageFileToText(java.lang.String imagefile, java.lang.String langId, java.lang.String configs)
imagefile,
- an image file. (only BMP and uncompressed TIF supported). It should be at 300DPI.langId
- configs
- Copyright © SAS Institute. All Rights Reserved.