Package | Description |
---|---|
net.sourceforge.tess4j |
Modifier and Type | Method and Description |
---|---|
protected ITessAPI.TessBaseAPI |
Tesseract.getHandle()
Returns API handle.
|
protected ITessAPI.TessBaseAPI |
Tesseract1.getHandle()
Returns API handle.
|
ITessAPI.TessBaseAPI |
TessAPI.TessBaseAPICreate()
Creates an instance of the base class for all Tesseract APIs.
|
static ITessAPI.TessBaseAPI |
TessAPI1.TessBaseAPICreate()
Creates an instance of the base class for all Tesseract APIs.
|
Modifier and Type | Method and Description |
---|---|
int |
TessAPI.TessBaseAPIAdaptToWordStr(ITessAPI.TessBaseAPI handle,
int mode,
java.lang.String wordstr)
Applies the given word to the adaptive classifier if possible.
|
static int |
TessAPI1.TessBaseAPIAdaptToWordStr(ITessAPI.TessBaseAPI handle,
int mode,
java.lang.String wordstr)
Applies the given word to the adaptive classifier if possible.
|
com.sun.jna.ptr.IntByReference |
TessAPI.TessBaseAPIAllWordConfidences(ITessAPI.TessBaseAPI handle)
Returns an array of all word confidences, terminated by -1.
|
static com.sun.jna.ptr.IntByReference |
TessAPI1.TessBaseAPIAllWordConfidences(ITessAPI.TessBaseAPI handle)
Returns an array of all word confidences, terminated by -1.
|
ITessAPI.TessPageIterator |
TessAPI.TessBaseAPIAnalyseLayout(ITessAPI.TessBaseAPI handle)
Runs page layout analysis in the mode set by
SetPageSegMode . |
static ITessAPI.TessPageIterator |
TessAPI1.TessBaseAPIAnalyseLayout(ITessAPI.TessBaseAPI handle)
Runs page layout analysis in the mode set by
SetPageSegMode . |
void |
TessAPI.TessBaseAPIClear(ITessAPI.TessBaseAPI handle)
Free up recognition results and any stored image data, without actually
freeing any recognition data that would be time-consuming to reload.
|
static void |
TessAPI1.TessBaseAPIClear(ITessAPI.TessBaseAPI handle)
Free up recognition results and any stored image data, without actually
freeing any recognition data that would be time-consuming to reload.
|
void |
TessAPI.TessBaseAPIClearAdaptiveClassifier(ITessAPI.TessBaseAPI handle)
Call between pages or documents etc to free up memory and forget adaptive
data.
|
static void |
TessAPI1.TessBaseAPIClearAdaptiveClassifier(ITessAPI.TessBaseAPI handle)
Call between pages or documents etc to free up memory and forget adaptive
data.
|
void |
TessAPI.TessBaseAPIClearPersistentCache(ITessAPI.TessBaseAPI handle)
Clear any library-level memory caches.
|
static void |
TessAPI1.TessBaseAPIClearPersistentCache(ITessAPI.TessBaseAPI handle)
Clear any library-level memory caches.
|
void |
TessAPI.TessBaseAPIDelete(ITessAPI.TessBaseAPI handle)
Disposes the TesseractAPI instance.
|
static void |
TessAPI1.TessBaseAPIDelete(ITessAPI.TessBaseAPI handle)
Disposes the TesseractAPI instance.
|
void |
TessAPI.TessBaseAPIDumpPGM(ITessAPI.TessBaseAPI handle,
java.lang.String filename)
Dump the internal binary image to a PGM file.
|
static void |
TessAPI1.TessBaseAPIDumpPGM(ITessAPI.TessBaseAPI handle,
java.lang.String filename)
Dump the internal binary image to a PGM file.
|
void |
TessAPI.TessBaseAPIEnd(ITessAPI.TessBaseAPI handle)
Close down tesseract and free up all memory.
|
static void |
TessAPI1.TessBaseAPIEnd(ITessAPI.TessBaseAPI handle)
Close down tesseract and free up all memory.
|
com.sun.jna.ptr.PointerByReference |
TessAPI.TessBaseAPIGetAvailableLanguagesAsVector(ITessAPI.TessBaseAPI handle)
Returns the available languages in the vector of STRINGs.
|
static com.sun.jna.ptr.PointerByReference |
TessAPI1.TessBaseAPIGetAvailableLanguagesAsVector(ITessAPI.TessBaseAPI handle)
Returns the available languages in the vector of STRINGs.
|
int |
TessAPI.TessBaseAPIGetBoolVariable(ITessAPI.TessBaseAPI handle,
java.lang.String name,
java.nio.IntBuffer value)
Get the value of an internal bool parameter.
|
static int |
TessAPI1.TessBaseAPIGetBoolVariable(ITessAPI.TessBaseAPI handle,
java.lang.String name,
java.nio.IntBuffer value)
Get the value of an internal bool parameter.
|
com.sun.jna.Pointer |
TessAPI.TessBaseAPIGetBoxText(ITessAPI.TessBaseAPI handle,
int page_number)
The recognized text is returned as a char* which is coded as a UTF8 box
file and must be freed with the delete [] operator.
|
static com.sun.jna.Pointer |
TessAPI1.TessBaseAPIGetBoxText(ITessAPI.TessBaseAPI handle,
int page_number)
The recognized text is returned as a char* which is coded as a UTF8 box
file and must be freed with the delete [] operator.
|
java.lang.String |
TessAPI.TessBaseAPIGetDatapath(ITessAPI.TessBaseAPI handle) |
static java.lang.String |
TessAPI1.TessBaseAPIGetDatapath(ITessAPI.TessBaseAPI handle) |
int |
TessAPI.TessBaseAPIGetDoubleVariable(ITessAPI.TessBaseAPI handle,
java.lang.String name,
java.nio.DoubleBuffer value)
Get the value of an internal double parameter.
|
static int |
TessAPI1.TessBaseAPIGetDoubleVariable(ITessAPI.TessBaseAPI handle,
java.lang.String name,
java.nio.DoubleBuffer value)
Get the value of an internal double parameter.
|
com.sun.jna.Pointer |
TessAPI.TessBaseAPIGetHOCRText(ITessAPI.TessBaseAPI handle,
int page_number)
Make a HTML-formatted string with hOCR markup from the internal data
structures.
|
static com.sun.jna.Pointer |
TessAPI1.TessBaseAPIGetHOCRText(ITessAPI.TessBaseAPI handle,
int page_number)
Make a HTML-formatted string with hOCR markup from the internal data
structures.
|
java.lang.String |
TessAPI.TessBaseAPIGetInitLanguagesAsString(ITessAPI.TessBaseAPI handle)
Returns the languages string used in the last valid initialization.
|
static java.lang.String |
TessAPI1.TessBaseAPIGetInitLanguagesAsString(ITessAPI.TessBaseAPI handle)
Returns the languages string used in the last valid initialization.
|
java.lang.String |
TessAPI.TessBaseAPIGetInputName(ITessAPI.TessBaseAPI handle)
These functions are required for searchable PDF output.
|
static java.lang.String |
TessAPI1.TessBaseAPIGetInputName(ITessAPI.TessBaseAPI handle)
These functions are required for searchable PDF output.
|
int |
TessAPI.TessBaseAPIGetIntVariable(ITessAPI.TessBaseAPI handle,
java.lang.String name,
java.nio.IntBuffer value)
Get the value of an internal int parameter.
|
static int |
TessAPI1.TessBaseAPIGetIntVariable(ITessAPI.TessBaseAPI handle,
java.lang.String name,
java.nio.IntBuffer value)
Get the value of an internal int parameter.
|
ITessAPI.TessResultIterator |
TessAPI.TessBaseAPIGetIterator(ITessAPI.TessBaseAPI handle)
Get a reading-order iterator to the results of LayoutAnalysis and/or
Recognize . |
static ITessAPI.TessResultIterator |
TessAPI1.TessBaseAPIGetIterator(ITessAPI.TessBaseAPI handle)
Get a reading-order iterator to the results of LayoutAnalysis and/or
Recognize . |
com.sun.jna.ptr.PointerByReference |
TessAPI.TessBaseAPIGetLoadedLanguagesAsVector(ITessAPI.TessBaseAPI handle)
Returns the loaded languages in the vector of STRINGs.
|
static com.sun.jna.ptr.PointerByReference |
TessAPI1.TessBaseAPIGetLoadedLanguagesAsVector(ITessAPI.TessBaseAPI handle)
Returns the loaded languages in the vector of STRINGs.
|
ITessAPI.TessMutableIterator |
TessAPI.TessBaseAPIGetMutableIterator(ITessAPI.TessBaseAPI handle)
Get a mutable iterator to the results of LayoutAnalysis and/or
Recognize . |
static ITessAPI.TessMutableIterator |
TessAPI1.TessBaseAPIGetMutableIterator(ITessAPI.TessBaseAPI handle)
Get a mutable iterator to the results of LayoutAnalysis and/or
Recognize . |
int |
TessAPI.TessBaseAPIGetPageSegMode(ITessAPI.TessBaseAPI handle)
Return the current page segmentation mode.
|
static int |
TessAPI1.TessBaseAPIGetPageSegMode(ITessAPI.TessBaseAPI handle)
Return the current page segmentation mode.
|
int |
TessAPI.TessBaseAPIGetSourceYResolution(ITessAPI.TessBaseAPI handle) |
static int |
TessAPI1.TessBaseAPIGetSourceYResolution(ITessAPI.TessBaseAPI handle) |
java.lang.String |
TessAPI.TessBaseAPIGetStringVariable(ITessAPI.TessBaseAPI handle,
java.lang.String name)
Get the value of an internal string parameter.
|
static java.lang.String |
TessAPI1.TessBaseAPIGetStringVariable(ITessAPI.TessBaseAPI handle,
java.lang.String name)
Get the value of an internal string parameter.
|
int |
TessAPI.TessBaseAPIGetTextDirection(ITessAPI.TessBaseAPI handle,
java.nio.IntBuffer out_offset,
java.nio.FloatBuffer out_slope)
Gets text direction.
|
static int |
TessAPI1.TessBaseAPIGetTextDirection(ITessAPI.TessBaseAPI handle,
java.nio.IntBuffer out_offset,
java.nio.FloatBuffer out_slope)
Gets text direction.
|
int |
TessAPI.TessBaseAPIGetThresholdedImageScaleFactor(ITessAPI.TessBaseAPI handle) |
static int |
TessAPI1.TessBaseAPIGetThresholdedImageScaleFactor(ITessAPI.TessBaseAPI handle) |
java.lang.String |
TessAPI.TessBaseAPIGetUnichar(ITessAPI.TessBaseAPI handle,
int unichar_id)
Gets the string of the specified unichar.
|
static java.lang.String |
TessAPI1.TessBaseAPIGetUnichar(ITessAPI.TessBaseAPI handle,
int unichar_id)
Gets the string of the specified unichar.
|
com.sun.jna.Pointer |
TessAPI.TessBaseAPIGetUNLVText(ITessAPI.TessBaseAPI handle)
The recognized text is returned as a char* which is coded as UNLV format
Latin-1 with specific reject and suspect codes and must be freed with the
delete [] operator.
|
static com.sun.jna.Pointer |
TessAPI1.TessBaseAPIGetUNLVText(ITessAPI.TessBaseAPI handle)
The recognized text is returned as a char* which is coded as UNLV format
Latin-1 with specific reject and suspect codes and must be freed with the
delete [] operator.
|
com.sun.jna.Pointer |
TessAPI.TessBaseAPIGetUTF8Text(ITessAPI.TessBaseAPI handle)
The recognized text is returned as a char* which is coded as UTF-8 and
must be freed with the delete [] operator.
|
static com.sun.jna.Pointer |
TessAPI1.TessBaseAPIGetUTF8Text(ITessAPI.TessBaseAPI handle)
The recognized text is returned as a char* which is coded as UTF-8 and
must be freed with the delete [] operator.
|
int |
TessAPI.TessBaseAPIInit1(ITessAPI.TessBaseAPI handle,
java.lang.String datapath,
java.lang.String language,
int oem,
com.sun.jna.ptr.PointerByReference configs,
int configs_size)
Instances are now mostly thread-safe and totally independent, but some
global parameters remain.
|
static int |
TessAPI1.TessBaseAPIInit1(ITessAPI.TessBaseAPI handle,
java.lang.String datapath,
java.lang.String language,
int oem,
com.sun.jna.ptr.PointerByReference configs,
int configs_size)
Instances are now mostly thread-safe and totally independent, but some
global parameters remain.
|
int |
TessAPI.TessBaseAPIInit2(ITessAPI.TessBaseAPI handle,
java.lang.String datapath,
java.lang.String language,
int oem) |
static int |
TessAPI1.TessBaseAPIInit2(ITessAPI.TessBaseAPI handle,
java.lang.String datapath,
java.lang.String language,
int oem) |
int |
TessAPI.TessBaseAPIInit3(ITessAPI.TessBaseAPI handle,
java.lang.String datapath,
java.lang.String language) |
static int |
TessAPI1.TessBaseAPIInit3(ITessAPI.TessBaseAPI handle,
java.lang.String datapath,
java.lang.String language) |
int |
TessAPI.TessBaseAPIInit4(ITessAPI.TessBaseAPI handle,
java.lang.String datapath,
java.lang.String language,
int oem,
com.sun.jna.ptr.PointerByReference configs,
int configs_size,
com.sun.jna.ptr.PointerByReference vars_vec,
com.sun.jna.ptr.PointerByReference vars_values,
NativeSize vars_vec_size,
int set_only_non_debug_params) |
static int |
TessAPI1.TessBaseAPIInit4(ITessAPI.TessBaseAPI handle,
java.lang.String datapath,
java.lang.String language,
int oem,
com.sun.jna.ptr.PointerByReference configs,
int configs_size,
com.sun.jna.ptr.PointerByReference vars_vec,
com.sun.jna.ptr.PointerByReference vars_values,
NativeSize vars_vec_size,
int set_only_non_debug_params) |
void |
TessAPI.TessBaseAPIInitForAnalysePage(ITessAPI.TessBaseAPI handle)
Init only for page layout analysis.
|
static void |
TessAPI1.TessBaseAPIInitForAnalysePage(ITessAPI.TessBaseAPI handle)
Init only for page layout analysis.
|
int |
TessAPI.TessBaseAPIInitLangMod(ITessAPI.TessBaseAPI handle,
java.lang.String datapath,
java.lang.String language)
Init only the lang model component of Tesseract.
|
static int |
TessAPI1.TessBaseAPIInitLangMod(ITessAPI.TessBaseAPI handle,
java.lang.String datapath,
java.lang.String language)
Init only the lang model component of Tesseract.
|
int |
TessAPI.TessBaseAPIIsValidWord(ITessAPI.TessBaseAPI handle,
java.lang.String word)
Check whether a word is valid according to Tesseract's language model.
|
static int |
TessAPI1.TessBaseAPIIsValidWord(ITessAPI.TessBaseAPI handle,
java.lang.String word)
Check whether a word is valid according to Tesseract's language model.
|
int |
TessAPI.TessBaseAPIMeanTextConf(ITessAPI.TessBaseAPI handle)
Returns the average word confidence for Tesseract page result.
|
static int |
TessAPI1.TessBaseAPIMeanTextConf(ITessAPI.TessBaseAPI handle)
Returns the average word confidence for Tesseract page result.
|
void |
TessAPI.TessBaseAPIPrintVariablesToFile(ITessAPI.TessBaseAPI handle,
java.lang.String filename)
Print Tesseract parameters to the given file.
Note: Must not be the first method called after instance create. |
static void |
TessAPI1.TessBaseAPIPrintVariablesToFile(ITessAPI.TessBaseAPI handle,
java.lang.String filename)
Print Tesseract parameters to the given file.
Note: Must not be the first method called after instance create. |
com.sun.jna.Pointer |
TessAPI.TessBaseAPIProcessPages(ITessAPI.TessBaseAPI handle,
java.lang.String filename,
java.lang.String retry_config,
int timeout_millisec)
Recognizes all the pages in the named file, as a multi-page tiff or list
of filenames, or single image, and gets the appropriate kind of text
according to parameters:
tessedit_create_boxfile ,
tessedit_make_boxes_from_boxes ,
tessedit_write_unlv , tessedit_create_hocr . |
static com.sun.jna.Pointer |
TessAPI1.TessBaseAPIProcessPages(ITessAPI.TessBaseAPI handle,
java.lang.String filename,
java.lang.String retry_config,
int timeout_millisec)
Recognizes all the pages in the named file, as a multi-page tiff or list
of filenames, or single image, and gets the appropriate kind of text
according to parameters:
tessedit_create_boxfile ,
tessedit_make_boxes_from_boxes ,
tessedit_write_unlv , tessedit_create_hocr . |
int |
TessAPI.TessBaseAPIProcessPages1(ITessAPI.TessBaseAPI handle,
java.lang.String filename,
java.lang.String retry_config,
int timeout_millisec,
ITessAPI.TessResultRenderer renderer) |
static int |
TessAPI1.TessBaseAPIProcessPages1(ITessAPI.TessBaseAPI handle,
java.lang.String filename,
java.lang.String retry_config,
int timeout_millisec,
ITessAPI.TessResultRenderer renderer) |
void |
TessAPI.TessBaseAPIReadConfigFile(ITessAPI.TessBaseAPI handle,
java.lang.String filename,
int init_only)
Read a "config" file containing a set of param, value pairs.
|
static void |
TessAPI1.TessBaseAPIReadConfigFile(ITessAPI.TessBaseAPI handle,
java.lang.String filename,
int init_only)
Read a "config" file containing a set of param, value pairs.
|
int |
TessAPI.TessBaseAPIRecognize(ITessAPI.TessBaseAPI handle,
ITessAPI.ETEXT_DESC monitor)
Recognize the image from
SetAndThresholdImage , generating
Tesseract internal structures. |
static int |
TessAPI1.TessBaseAPIRecognize(ITessAPI.TessBaseAPI handle,
ITessAPI.ETEXT_DESC monitor)
Recognize the image from
SetAndThresholdImage , generating
Tesseract internal structures. |
int |
TessAPI.TessBaseAPIRecognizeForChopTest(ITessAPI.TessBaseAPI handle,
ITessAPI.ETEXT_DESC monitor)
Variant on Recognize used for testing chopper.
|
static int |
TessAPI1.TessBaseAPIRecognizeForChopTest(ITessAPI.TessBaseAPI handle,
ITessAPI.ETEXT_DESC monitor)
Variant on Recognize used for testing chopper.
|
com.sun.jna.Pointer |
TessAPI.TessBaseAPIRect(ITessAPI.TessBaseAPI handle,
java.nio.ByteBuffer imagedata,
int bytes_per_pixel,
int bytes_per_line,
int left,
int top,
int width,
int height)
Recognize a rectangle from an image and return the result as a string.
|
static com.sun.jna.Pointer |
TessAPI1.TessBaseAPIRect(ITessAPI.TessBaseAPI handle,
java.nio.ByteBuffer imagedata,
int bytes_per_pixel,
int bytes_per_line,
int left,
int top,
int width,
int height)
Recognize a rectangle from an image and return the result as a string.
|
void |
TessAPI.TessBaseAPISetImage(ITessAPI.TessBaseAPI handle,
java.nio.ByteBuffer imagedata,
int width,
int height,
int bytes_per_pixel,
int bytes_per_line)
Provide an image for Tesseract to recognize.
|
static void |
TessAPI1.TessBaseAPISetImage(ITessAPI.TessBaseAPI handle,
java.nio.ByteBuffer imagedata,
int width,
int height,
int bytes_per_pixel,
int bytes_per_line)
Provide an image for Tesseract to recognize.
|
void |
TessAPI.TessBaseAPISetInputName(ITessAPI.TessBaseAPI handle,
java.lang.String name)
Set the name of the input file.
|
static void |
TessAPI1.TessBaseAPISetInputName(ITessAPI.TessBaseAPI handle,
java.lang.String name)
Set the name of the input file.
|
void |
TessAPI.TessBaseAPISetOutputName(ITessAPI.TessBaseAPI handle,
java.lang.String name)
Set the name of the bonus output files.
|
static void |
TessAPI1.TessBaseAPISetOutputName(ITessAPI.TessBaseAPI handle,
java.lang.String name)
Set the name of the bonus output files.
|
void |
TessAPI.TessBaseAPISetPageSegMode(ITessAPI.TessBaseAPI handle,
int mode)
Set the current page segmentation mode.
|
static void |
TessAPI1.TessBaseAPISetPageSegMode(ITessAPI.TessBaseAPI handle,
int mode)
Set the current page segmentation mode.
|
void |
TessAPI.TessBaseAPISetRectangle(ITessAPI.TessBaseAPI handle,
int left,
int top,
int width,
int height)
Restrict recognition to a sub-rectangle of the image.
|
static void |
TessAPI1.TessBaseAPISetRectangle(ITessAPI.TessBaseAPI handle,
int left,
int top,
int width,
int height)
Restrict recognition to a sub-rectangle of the image.
|
void |
TessAPI.TessBaseAPISetSourceResolution(ITessAPI.TessBaseAPI handle,
int ppi)
Set the resolution of the source image in pixels per inch so font size
information can be calculated in results.
|
static void |
TessAPI1.TessBaseAPISetSourceResolution(ITessAPI.TessBaseAPI handle,
int ppi)
Set the resolution of the source image in pixels per inch so font size
information can be calculated in results.
|
int |
TessAPI.TessBaseAPISetVariable(ITessAPI.TessBaseAPI handle,
java.lang.String name,
java.lang.String value)
Set the value of an internal "parameter." Supply the name of the
parameter and the value as a string, just as you would in a config file.
|
static int |
TessAPI1.TessBaseAPISetVariable(ITessAPI.TessBaseAPI handle,
java.lang.String name,
java.lang.String value)
Set the value of an internal "parameter." Supply the name of the
parameter and the value as a string, just as you would in a config file.
|