@Namespace(value="tesseract") @NoOffset public static class tesseract.TessBaseAPI extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator| Constructor and Description |
|---|
tesseract.TessBaseAPI() |
tesseract.TessBaseAPI(long size)
Native array allocator.
|
tesseract.TessBaseAPI(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
AdaptToWordStr(int mode,
BytePointer wordstr)
Applies the given word to the adaptive classifier if possible.
|
boolean |
AdaptToWordStr(int mode,
String wordstr) |
IntPointer |
AllWordConfidences()
Returns all word confidences (between 0 and 100) in an array, terminated
by -1.
|
tesseract.PageIterator |
AnalyseLayout()
Runs page layout analysis in the mode set by SetPageSegMode.
|
tesseract.PageIterator |
AnalyseLayout(boolean merge_similar_words) |
static void |
CatchSignals()
Writes the thresholded image to stderr as a PBM file on receipt of a
SIGSEGV, SIGFPE, or SIGBUS signal.
|
void |
Clear()
Free up recognition results and any stored image data, without actually
freeing any recognition data that would be time-consuming to reload.
|
void |
ClearAdaptiveClassifier()
Call between pages or documents etc to free up memory and forget
adaptive data.
|
static void |
ClearPersistentCache()
Clear any library-level memory caches.
|
static void |
DeleteBlockList(tesseract.BLOCK_LIST block_list)
Delete a block list.
|
boolean |
DetectOS(tesseract.OSResults arg0)
Estimates the Orientation And Script of the image.
|
void |
DumpPGM(BytePointer filename)
Deprecated.
Use GetThresholdedImage and write the image using pixWrite
instead if possible.
|
void |
DumpPGM(String filename) |
void |
End()
Close down tesseract and free up all memory.
|
tesseract.BLOCK_LIST |
FindLinesCreateBlockList()
Find lines from the image making the BLOCK_LIST.
|
static tesseract.ROW |
FindRowForBox(tesseract.BLOCK_LIST blocks,
int left,
int top,
int right,
int bottom)
This method returns the row to which a box of specified dimensions would
belong.
|
void |
GetAvailableLanguagesAsVector(tesseract.StringGenericVector langs)
Returns the available languages in the vector of STRINGs.
|
void |
GetBlockTextOrientations(int[] block_orientation,
boolean[] vertical_writing) |
void |
GetBlockTextOrientations(int[] block_orientation,
BoolPointer vertical_writing) |
void |
GetBlockTextOrientations(IntBuffer block_orientation,
boolean[] vertical_writing) |
void |
GetBlockTextOrientations(IntBuffer block_orientation,
BoolPointer vertical_writing) |
void |
GetBlockTextOrientations(IntPointer block_orientation,
boolean[] vertical_writing) |
void |
GetBlockTextOrientations(IntPointer block_orientation,
BoolPointer vertical_writing) |
void |
GetBlockTextOrientations(PointerPointer block_orientation,
PointerPointer vertical_writing)
Return text orientation of each block as determined by an earlier run
of layout analysis.
|
boolean |
GetBoolVariable(BytePointer name,
BoolPointer value) |
boolean |
GetBoolVariable(String name,
boolean[] value) |
BytePointer |
GetBoxText(int page_number)
The recognized text is returned as a char* which is coded in the same
format as a box file used in training.
|
lept.BOXA |
GetComponentImages(int level,
boolean text_only,
boolean raw_image,
int raw_padding,
lept.PIXA pixa,
int[] blockids,
int[] paraids) |
lept.BOXA |
GetComponentImages(int level,
boolean text_only,
boolean raw_image,
int raw_padding,
lept.PIXA pixa,
IntBuffer blockids,
IntBuffer paraids) |
lept.BOXA |
GetComponentImages(int level,
boolean text_only,
boolean raw_image,
int raw_padding,
lept.PIXA pixa,
IntPointer blockids,
IntPointer paraids) |
lept.BOXA |
GetComponentImages(int level,
boolean text_only,
boolean raw_image,
int raw_padding,
PointerPointer pixa,
PointerPointer blockids,
PointerPointer paraids)
Get the given level kind of components (block, textline, word etc.) as a
leptonica-style Boxa, Pixa pair, in reading order.
|
lept.BOXA |
GetComponentImages(int level,
boolean text_only,
lept.PIXA pixa,
int[] blockids) |
lept.BOXA |
GetComponentImages(int level,
boolean text_only,
lept.PIXA pixa,
IntBuffer blockids) |
lept.BOXA |
GetComponentImages(int level,
boolean text_only,
lept.PIXA pixa,
IntPointer blockids) |
lept.BOXA |
GetComponentImages(int level,
boolean text_only,
PointerPointer pixa,
PointerPointer blockids) |
lept.BOXA |
GetConnectedComponents(lept.PIXA cc) |
lept.BOXA |
GetConnectedComponents(PointerPointer cc)
Gets the individual connected (text) components (created
after pages segmentation step, but before recognition)
as a leptonica-style Boxa, Pixa pair, in reading order.
|
tesseract.CubeRecoContext |
GetCubeRecoContext()
Return a pointer to underlying CubeRecoContext object if present.
|
BytePointer |
GetDatapath() |
tesseract.Dawg |
GetDawg(int i)
Return the pointer to the i-th dawg loaded into tesseract_ object.
|
boolean |
GetDoubleVariable(BytePointer name,
double[] value) |
boolean |
GetDoubleVariable(BytePointer name,
DoubleBuffer value) |
boolean |
GetDoubleVariable(BytePointer name,
DoublePointer value) |
boolean |
GetDoubleVariable(String name,
double[] value) |
boolean |
GetDoubleVariable(String name,
DoubleBuffer value) |
boolean |
GetDoubleVariable(String name,
DoublePointer value) |
void |
GetFeaturesForBlob(tesseract.TBLOB blob,
tesseract.INT_FEATURE_STRUCT int_features,
int[] num_features,
int[] feature_outline_index) |
void |
GetFeaturesForBlob(tesseract.TBLOB blob,
tesseract.INT_FEATURE_STRUCT int_features,
IntBuffer num_features,
IntBuffer feature_outline_index) |
void |
GetFeaturesForBlob(tesseract.TBLOB blob,
tesseract.INT_FEATURE_STRUCT int_features,
IntPointer num_features,
IntPointer feature_outline_index)
This method returns the features associated with the input image.
|
BytePointer |
GetHOCRText(int page_number)
Make a HTML-formatted string with hOCR markup from the internal
data structures.
|
BytePointer |
GetInitLanguagesAsString()
Returns the languages string used in the last valid initialization.
|
lept.PIX |
GetInputImage() |
BytePointer |
GetInputName()
These functions are required for searchable PDF output.
|
boolean |
GetIntVariable(BytePointer name,
int[] value) |
boolean |
GetIntVariable(BytePointer name,
IntBuffer value) |
boolean |
GetIntVariable(BytePointer name,
IntPointer value)
Returns true if the parameter was found among Tesseract parameters.
|
boolean |
GetIntVariable(String name,
int[] value) |
boolean |
GetIntVariable(String name,
IntBuffer value) |
boolean |
GetIntVariable(String name,
IntPointer value) |
tesseract.ResultIterator |
GetIterator()
Get a reading-order iterator to the results of LayoutAnalysis and/or
Recognize.
|
void |
GetLoadedLanguagesAsVector(tesseract.StringGenericVector langs)
Returns the loaded languages in the vector of STRINGs.
|
tesseract.MutableIterator |
GetMutableIterator()
Get a mutable iterator to the results of LayoutAnalysis and/or Recognize.
|
static long |
getOpenCLDevice(Pointer device) |
static long |
getOpenCLDevice(PointerPointer device)
If compiled with OpenCL AND an available OpenCL
device is deemed faster than serial code, then
"device" is populated with the cl_device_id
and returns sizeof(cl_device_id)
otherwise *device=NULL and returns 0.
|
BytePointer |
GetOsdText(int page_number)
The recognized text is returned as a char* which is coded
as UTF8 and must be freed with the delete [] operator.
|
int |
GetPageSegMode()
Return the current page segmentation mode.
|
lept.BOXA |
GetRegions(lept.PIXA pixa) |
lept.BOXA |
GetRegions(PointerPointer pixa)
Get the result of page layout analysis as a leptonica-style
Boxa, Pixa pair, in reading order.
|
int |
GetSourceYResolution() |
BytePointer |
GetStringVariable(BytePointer name)
Returns the pointer to the string that represents the value of the
parameter if it was found among Tesseract parameters.
|
String |
GetStringVariable(String name) |
lept.BOXA |
GetStrips(lept.PIXA pixa,
int[] blockids) |
lept.BOXA |
GetStrips(lept.PIXA pixa,
IntBuffer blockids) |
lept.BOXA |
GetStrips(lept.PIXA pixa,
IntPointer blockids) |
lept.BOXA |
GetStrips(PointerPointer pixa,
PointerPointer blockids)
Get textlines and strips of image regions as a leptonica-style Boxa, Pixa
pair, in reading order.
|
boolean |
GetTextDirection(int[] out_offset,
float[] out_slope) |
boolean |
GetTextDirection(IntBuffer out_offset,
FloatBuffer out_slope) |
boolean |
GetTextDirection(IntPointer out_offset,
FloatPointer out_slope) |
lept.BOXA |
GetTextlines(boolean raw_image,
int raw_padding,
lept.PIXA pixa,
int[] blockids,
int[] paraids) |
lept.BOXA |
GetTextlines(boolean raw_image,
int raw_padding,
lept.PIXA pixa,
IntBuffer blockids,
IntBuffer paraids) |
lept.BOXA |
GetTextlines(boolean raw_image,
int raw_padding,
lept.PIXA pixa,
IntPointer blockids,
IntPointer paraids) |
lept.BOXA |
GetTextlines(boolean raw_image,
int raw_padding,
PointerPointer pixa,
PointerPointer blockids,
PointerPointer paraids)
Get the textlines as a leptonica-style
Boxa, Pixa pair, in reading order.
|
lept.BOXA |
GetTextlines(lept.PIXA pixa,
int[] blockids) |
lept.BOXA |
GetTextlines(lept.PIXA pixa,
IntBuffer blockids) |
lept.BOXA |
GetTextlines(lept.PIXA pixa,
IntPointer blockids) |
lept.BOXA |
GetTextlines(PointerPointer pixa,
PointerPointer blockids) |
lept.PIX |
GetThresholdedImage()
Get a copy of the internal thresholded image from Tesseract.
|
int |
GetThresholdedImageScaleFactor()
Returns the scale factor of the thresholded image that would be returned by
GetThresholdedImage() and the various GetX() methods that call
GetComponentImages().
|
BytePointer |
GetUnichar(int unichar_id)
This method returns the string form of the specified unichar.
|
BytePointer |
GetUNLVText()
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.
|
BytePointer |
GetUTF8Text()
The recognized text is returned as a char* which is coded
as UTF8 and must be freed with the delete [] operator.
|
boolean |
GetVariableAsString(BytePointer name,
tesseract.STRING val)
Get value of named variable as a string, if it exists.
|
boolean |
GetVariableAsString(String name,
tesseract.STRING val) |
lept.BOXA |
GetWords(lept.PIXA pixa) |
lept.BOXA |
GetWords(PointerPointer pixa)
Get the words as a leptonica-style
Boxa, Pixa pair, in reading order.
|
int |
Init(BytePointer datapath,
BytePointer language) |
int |
Init(BytePointer datapath,
BytePointer language,
int oem) |
int |
Init(BytePointer datapath,
BytePointer language,
int mode,
byte[] configs,
int configs_size,
tesseract.StringGenericVector vars_vec,
tesseract.StringGenericVector vars_values,
boolean set_only_non_debug_params) |
int |
Init(BytePointer datapath,
BytePointer language,
int mode,
ByteBuffer configs,
int configs_size,
tesseract.StringGenericVector vars_vec,
tesseract.StringGenericVector vars_values,
boolean set_only_non_debug_params) |
int |
Init(BytePointer datapath,
BytePointer language,
int mode,
BytePointer configs,
int configs_size,
tesseract.StringGenericVector vars_vec,
tesseract.StringGenericVector vars_values,
boolean set_only_non_debug_params) |
int |
Init(BytePointer datapath,
BytePointer language,
int mode,
PointerPointer configs,
int configs_size,
tesseract.StringGenericVector vars_vec,
tesseract.StringGenericVector vars_values,
boolean set_only_non_debug_params)
Instances are now mostly thread-safe and totally independent,
but some global parameters remain.
|
int |
Init(String datapath,
String language) |
int |
Init(String datapath,
String language,
int oem) |
int |
Init(String datapath,
String language,
int mode,
byte[] configs,
int configs_size,
tesseract.StringGenericVector vars_vec,
tesseract.StringGenericVector vars_values,
boolean set_only_non_debug_params) |
int |
Init(String datapath,
String language,
int mode,
ByteBuffer configs,
int configs_size,
tesseract.StringGenericVector vars_vec,
tesseract.StringGenericVector vars_values,
boolean set_only_non_debug_params) |
int |
Init(String datapath,
String language,
int mode,
BytePointer configs,
int configs_size,
tesseract.StringGenericVector vars_vec,
tesseract.StringGenericVector vars_values,
boolean set_only_non_debug_params) |
void |
InitForAnalysePage()
Init only for page layout analysis.
|
int |
InitLangMod(BytePointer datapath,
BytePointer language)
Init only the lang model component of Tesseract.
|
int |
InitLangMod(String datapath,
String language) |
void |
InitTruthCallback(tesseract.TruthCallback4 cb) |
boolean |
IsValidCharacter(BytePointer utf8_character) |
boolean |
IsValidCharacter(String utf8_character) |
int |
IsValidWord(BytePointer word)
Check whether a word is valid according to Tesseract's language model
|
int |
IsValidWord(String word) |
static tesseract.TBLOB |
MakeTBLOB(lept.PIX pix)
Returns a TBLOB corresponding to the entire input image.
|
static tesseract.ROW |
MakeTessOCRRow(float baseline,
float xheight,
float descender,
float ascender)
Returns a ROW object created from the input row specification.
|
int |
MeanTextConf()
Returns the (average) confidence value between 0 and 100.
|
static void |
NormalizeTBLOB(tesseract.TBLOB tblob,
tesseract.ROW row,
boolean numeric_mode)
This method baseline normalizes a TBLOB in-place.
|
int |
NumDawgs()
Return the number of dawgs loaded into tesseract_ object.
|
int |
oem() |
tesseract.TessBaseAPI |
position(long position) |
void |
PrintVariables(Pointer fp)
Print Tesseract parameters to the given file.
|
boolean |
ProcessPage(lept.PIX pix,
int page_index,
BytePointer filename,
BytePointer retry_config,
int timeout_millisec,
tesseract.TessResultRenderer renderer)
Turn a single image into symbolic text.
|
boolean |
ProcessPage(lept.PIX pix,
int page_index,
String filename,
String retry_config,
int timeout_millisec,
tesseract.TessResultRenderer renderer) |
boolean |
ProcessPages(BytePointer filename,
BytePointer retry_config,
int timeout_millisec,
tesseract.TessResultRenderer renderer)
Turns images into symbolic text.
|
boolean |
ProcessPages(String filename,
String retry_config,
int timeout_millisec,
tesseract.TessResultRenderer renderer) |
boolean |
ProcessPagesInternal(BytePointer filename,
BytePointer retry_config,
int timeout_millisec,
tesseract.TessResultRenderer renderer) |
boolean |
ProcessPagesInternal(String filename,
String retry_config,
int timeout_millisec,
tesseract.TessResultRenderer renderer) |
void |
ReadConfigFile(BytePointer filename)
Read a "config" file containing a set of param, value pairs.
|
void |
ReadConfigFile(String filename) |
void |
ReadDebugConfigFile(BytePointer filename)
Same as above, but only set debug params from the given config file.
|
void |
ReadDebugConfigFile(String filename) |
int |
Recognize(tesseract.ETEXT_DESC monitor)
Recognize the image from SetAndThresholdImage, generating Tesseract
internal structures.
|
int |
RecognizeForChopTest(tesseract.ETEXT_DESC monitor)
Variant on Recognize used for testing chopper.
|
void |
RunAdaptiveClassifier(tesseract.TBLOB blob,
int num_max_matches,
int[] unichar_ids,
float[] ratings,
int[] num_matches_returned) |
void |
RunAdaptiveClassifier(tesseract.TBLOB blob,
int num_max_matches,
IntBuffer unichar_ids,
FloatBuffer ratings,
IntBuffer num_matches_returned) |
void |
RunAdaptiveClassifier(tesseract.TBLOB blob,
int num_max_matches,
IntPointer unichar_ids,
FloatPointer ratings,
IntPointer num_matches_returned)
Method to run adaptive classifier on a blob.
|
void |
set_min_orientation_margin(double margin) |
boolean |
SetDebugVariable(BytePointer name,
BytePointer value) |
boolean |
SetDebugVariable(String name,
String value) |
void |
SetDictFunc(tesseract.DictFunc f)
Sets Dict::letter_is_okay_ function to point to the given function.
|
void |
SetImage(byte[] imagedata,
int width,
int height,
int bytes_per_pixel,
int bytes_per_line) |
void |
SetImage(ByteBuffer imagedata,
int width,
int height,
int bytes_per_pixel,
int bytes_per_line) |
void |
SetImage(BytePointer imagedata,
int width,
int height,
int bytes_per_pixel,
int bytes_per_line)
Provide an image for Tesseract to recognize.
|
void |
SetImage(lept.PIX pix)
Provide an image for Tesseract to recognize.
|
void |
SetInputImage(lept.PIX pix) |
void |
SetInputName(BytePointer name)
Set the name of the input file.
|
void |
SetInputName(String name) |
void |
SetOutputName(BytePointer name)
Set the name of the bonus output files.
|
void |
SetOutputName(String name) |
void |
SetPageSegMode(int mode)
Set the current page segmentation mode.
|
void |
SetProbabilityInContextFunc(tesseract.ProbabilityInContextFunc f)
Sets Dict::probability_in_context_ function to point to the given
function.
|
void |
SetRectangle(int left,
int top,
int width,
int height)
Restrict recognition to a sub-rectangle of the image.
|
void |
SetSourceResolution(int ppi)
Set the resolution of the source image in pixels per inch so font size
information can be calculated in results.
|
void |
SetThresholder(tesseract.ImageThresholder thresholder)
In extreme cases only, usually with a subclass of Thresholder, it
is possible to provide a different Thresholder.
|
boolean |
SetVariable(BytePointer name,
BytePointer 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.
|
boolean |
SetVariable(String name,
String value) |
tesseract.Tesseract |
tesseract() |
byte[] |
TesseractRect(byte[] imagedata,
int bytes_per_pixel,
int bytes_per_line,
int left,
int top,
int width,
int height) |
ByteBuffer |
TesseractRect(ByteBuffer imagedata,
int bytes_per_pixel,
int bytes_per_line,
int left,
int top,
int width,
int height) |
BytePointer |
TesseractRect(BytePointer 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 BytePointer |
Version()
Returns the version identifier as a static string.
|
address, asBuffer, asByteBuffer, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, free, hashCode, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, physicalBytes, position, put, realloc, setNull, sizeof, toString, totalBytes, withDeallocator, zeropublic tesseract.TessBaseAPI(Pointer p)
Pointer.Pointer(Pointer).public tesseract.TessBaseAPI(long size)
Pointer.position(long).public tesseract.TessBaseAPI()
public tesseract.TessBaseAPI position(long position)
@Cast(value="const char*") public static BytePointer Version()
@Cast(value="size_t") public static long getOpenCLDevice(@Cast(value="void**") PointerPointer device)
@Cast(value="size_t") public static long getOpenCLDevice(@Cast(value="void**")@ByPtrPtr Pointer device)
public static void CatchSignals()
public void SetInputName(@Cast(value="const char*") BytePointer name)
public void SetInputName(String name)
@Cast(value="const char*") public BytePointer GetInputName()
public void SetInputImage(lept.PIX pix)
public lept.PIX GetInputImage()
public int GetSourceYResolution()
@Cast(value="const char*") public BytePointer GetDatapath()
public void SetOutputName(@Cast(value="const char*") BytePointer name)
public void SetOutputName(String name)
@Cast(value="bool") public boolean SetVariable(@Cast(value="const char*") BytePointer name, @Cast(value="const char*") BytePointer value)
@Cast(value="bool") public boolean SetDebugVariable(@Cast(value="const char*") BytePointer name, @Cast(value="const char*") BytePointer value)
@Cast(value="bool") public boolean GetIntVariable(@Cast(value="const char*") BytePointer name, IntPointer value)
@Cast(value="bool") public boolean GetIntVariable(@Cast(value="const char*") BytePointer name, int[] value)
@Cast(value="bool") public boolean GetIntVariable(String name, IntPointer value)
@Cast(value="bool") public boolean GetIntVariable(@Cast(value="const char*") BytePointer name, IntBuffer value)
@Cast(value="bool") public boolean GetBoolVariable(@Cast(value="const char*") BytePointer name, @Cast(value="bool*") BoolPointer value)
@Cast(value="bool") public boolean GetBoolVariable(String name, @Cast(value="bool*") boolean[] value)
@Cast(value="bool") public boolean GetDoubleVariable(@Cast(value="const char*") BytePointer name, DoublePointer value)
@Cast(value="bool") public boolean GetDoubleVariable(String name, DoubleBuffer value)
@Cast(value="bool") public boolean GetDoubleVariable(@Cast(value="const char*") BytePointer name, double[] value)
@Cast(value="bool") public boolean GetDoubleVariable(String name, DoublePointer value)
@Cast(value="bool") public boolean GetDoubleVariable(@Cast(value="const char*") BytePointer name, DoubleBuffer value)
@Cast(value="const char*") public BytePointer GetStringVariable(@Cast(value="const char*") BytePointer name)
public void PrintVariables(@Cast(value="FILE*") Pointer fp)
@Cast(value="bool") public boolean GetVariableAsString(@Cast(value="const char*") BytePointer name, tesseract.STRING val)
@Cast(value="bool") public boolean GetVariableAsString(String name, tesseract.STRING val)
public int Init(@Cast(value="const char*") BytePointer datapath, @Cast(value="const char*") BytePointer language, @Cast(value="tesseract::OcrEngineMode") int mode, @Cast(value="char**") PointerPointer configs, int configs_size, @Const tesseract.StringGenericVector vars_vec, @Const tesseract.StringGenericVector vars_values, @Cast(value="bool") boolean set_only_non_debug_params)
public int Init(@Cast(value="const char*") BytePointer datapath, @Cast(value="const char*") BytePointer language, @Cast(value="tesseract::OcrEngineMode") int mode, @Cast(value="char**")@ByPtrPtr BytePointer configs, int configs_size, @Const tesseract.StringGenericVector vars_vec, @Const tesseract.StringGenericVector vars_values, @Cast(value="bool") boolean set_only_non_debug_params)
public int Init(String datapath, String language, @Cast(value="tesseract::OcrEngineMode") int mode, @Cast(value="char**")@ByPtrPtr ByteBuffer configs, int configs_size, @Const tesseract.StringGenericVector vars_vec, @Const tesseract.StringGenericVector vars_values, @Cast(value="bool") boolean set_only_non_debug_params)
public int Init(@Cast(value="const char*") BytePointer datapath, @Cast(value="const char*") BytePointer language, @Cast(value="tesseract::OcrEngineMode") int mode, @Cast(value="char**")@ByPtrPtr byte[] configs, int configs_size, @Const tesseract.StringGenericVector vars_vec, @Const tesseract.StringGenericVector vars_values, @Cast(value="bool") boolean set_only_non_debug_params)
public int Init(String datapath, String language, @Cast(value="tesseract::OcrEngineMode") int mode, @Cast(value="char**")@ByPtrPtr BytePointer configs, int configs_size, @Const tesseract.StringGenericVector vars_vec, @Const tesseract.StringGenericVector vars_values, @Cast(value="bool") boolean set_only_non_debug_params)
public int Init(@Cast(value="const char*") BytePointer datapath, @Cast(value="const char*") BytePointer language, @Cast(value="tesseract::OcrEngineMode") int mode, @Cast(value="char**")@ByPtrPtr ByteBuffer configs, int configs_size, @Const tesseract.StringGenericVector vars_vec, @Const tesseract.StringGenericVector vars_values, @Cast(value="bool") boolean set_only_non_debug_params)
public int Init(String datapath, String language, @Cast(value="tesseract::OcrEngineMode") int mode, @Cast(value="char**")@ByPtrPtr byte[] configs, int configs_size, @Const tesseract.StringGenericVector vars_vec, @Const tesseract.StringGenericVector vars_values, @Cast(value="bool") boolean set_only_non_debug_params)
public int Init(@Cast(value="const char*") BytePointer datapath, @Cast(value="const char*") BytePointer language, @Cast(value="tesseract::OcrEngineMode") int oem)
public int Init(String datapath, String language, @Cast(value="tesseract::OcrEngineMode") int oem)
public int Init(@Cast(value="const char*") BytePointer datapath, @Cast(value="const char*") BytePointer language)
@Cast(value="const char*") public BytePointer GetInitLanguagesAsString()
public void GetLoadedLanguagesAsVector(tesseract.StringGenericVector langs)
public void GetAvailableLanguagesAsVector(tesseract.StringGenericVector langs)
public int InitLangMod(@Cast(value="const char*") BytePointer datapath, @Cast(value="const char*") BytePointer language)
public void InitForAnalysePage()
public void ReadConfigFile(@Cast(value="const char*") BytePointer filename)
public void ReadConfigFile(String filename)
public void ReadDebugConfigFile(@Cast(value="const char*") BytePointer filename)
public void ReadDebugConfigFile(String filename)
public void SetPageSegMode(@Cast(value="tesseract::PageSegMode") int mode)
@Cast(value="tesseract::PageSegMode") public int GetPageSegMode()
@Cast(value="char*") public BytePointer TesseractRect(@Cast(value="const unsigned char*") BytePointer imagedata, int bytes_per_pixel, int bytes_per_line, int left, int top, int width, int height)
@Cast(value="char*") public ByteBuffer TesseractRect(@Cast(value="const unsigned char*") ByteBuffer imagedata, int bytes_per_pixel, int bytes_per_line, int left, int top, int width, int height)
@Cast(value="char*") public byte[] TesseractRect(@Cast(value="const unsigned char*") byte[] imagedata, int bytes_per_pixel, int bytes_per_line, int left, int top, int width, int height)
public void ClearAdaptiveClassifier()
public void SetImage(@Cast(value="const unsigned char*") BytePointer imagedata, int width, int height, int bytes_per_pixel, int bytes_per_line)
public void SetImage(@Cast(value="const unsigned char*") ByteBuffer imagedata, int width, int height, int bytes_per_pixel, int bytes_per_line)
public void SetImage(@Cast(value="const unsigned char*") byte[] imagedata, int width, int height, int bytes_per_pixel, int bytes_per_line)
public void SetImage(lept.PIX pix)
public void SetSourceResolution(int ppi)
public void SetRectangle(int left,
int top,
int width,
int height)
public void SetThresholder(tesseract.ImageThresholder thresholder)
public lept.PIX GetThresholdedImage()
public lept.BOXA GetRegions(@Cast(value="Pixa**") PointerPointer pixa)
public lept.BOXA GetTextlines(@Cast(value="const bool") boolean raw_image, int raw_padding, @Cast(value="Pixa**") PointerPointer pixa, @Cast(value="int**") PointerPointer blockids, @Cast(value="int**") PointerPointer paraids)
public lept.BOXA GetTextlines(@Cast(value="const bool") boolean raw_image, int raw_padding, @ByPtrPtr lept.PIXA pixa, @ByPtrPtr IntPointer blockids, @ByPtrPtr IntPointer paraids)
public lept.BOXA GetTextlines(@Cast(value="const bool") boolean raw_image, int raw_padding, @ByPtrPtr lept.PIXA pixa, @ByPtrPtr IntBuffer blockids, @ByPtrPtr IntBuffer paraids)
public lept.BOXA GetTextlines(@Cast(value="const bool") boolean raw_image, int raw_padding, @ByPtrPtr lept.PIXA pixa, @ByPtrPtr int[] blockids, @ByPtrPtr int[] paraids)
public lept.BOXA GetTextlines(@Cast(value="Pixa**") PointerPointer pixa, @Cast(value="int**") PointerPointer blockids)
public lept.BOXA GetTextlines(@ByPtrPtr lept.PIXA pixa, @ByPtrPtr IntPointer blockids)
public lept.BOXA GetStrips(@Cast(value="Pixa**") PointerPointer pixa, @Cast(value="int**") PointerPointer blockids)
public lept.BOXA GetStrips(@ByPtrPtr lept.PIXA pixa, @ByPtrPtr IntPointer blockids)
public lept.BOXA GetWords(@Cast(value="Pixa**") PointerPointer pixa)
public lept.BOXA GetConnectedComponents(@Cast(value="Pixa**") PointerPointer cc)
public lept.BOXA GetComponentImages(@Cast(value="const tesseract::PageIteratorLevel") int level, @Cast(value="const bool") boolean text_only, @Cast(value="const bool") boolean raw_image, int raw_padding, @Cast(value="Pixa**") PointerPointer pixa, @Cast(value="int**") PointerPointer blockids, @Cast(value="int**") PointerPointer paraids)
public lept.BOXA GetComponentImages(@Cast(value="const tesseract::PageIteratorLevel") int level, @Cast(value="const bool") boolean text_only, @Cast(value="const bool") boolean raw_image, int raw_padding, @ByPtrPtr lept.PIXA pixa, @ByPtrPtr IntPointer blockids, @ByPtrPtr IntPointer paraids)
public lept.BOXA GetComponentImages(@Cast(value="const tesseract::PageIteratorLevel") int level, @Cast(value="const bool") boolean text_only, @Cast(value="const bool") boolean raw_image, int raw_padding, @ByPtrPtr lept.PIXA pixa, @ByPtrPtr IntBuffer blockids, @ByPtrPtr IntBuffer paraids)
public lept.BOXA GetComponentImages(@Cast(value="const tesseract::PageIteratorLevel") int level, @Cast(value="const bool") boolean text_only, @Cast(value="const bool") boolean raw_image, int raw_padding, @ByPtrPtr lept.PIXA pixa, @ByPtrPtr int[] blockids, @ByPtrPtr int[] paraids)
public lept.BOXA GetComponentImages(@Cast(value="const tesseract::PageIteratorLevel") int level, @Cast(value="const bool") boolean text_only, @Cast(value="Pixa**") PointerPointer pixa, @Cast(value="int**") PointerPointer blockids)
public lept.BOXA GetComponentImages(@Cast(value="const tesseract::PageIteratorLevel") int level, @Cast(value="const bool") boolean text_only, @ByPtrPtr lept.PIXA pixa, @ByPtrPtr IntPointer blockids)
public lept.BOXA GetComponentImages(@Cast(value="const tesseract::PageIteratorLevel") int level, @Cast(value="const bool") boolean text_only, @ByPtrPtr lept.PIXA pixa, @ByPtrPtr IntBuffer blockids)
public lept.BOXA GetComponentImages(@Cast(value="const tesseract::PageIteratorLevel") int level, @Cast(value="const bool") boolean text_only, @ByPtrPtr lept.PIXA pixa, @ByPtrPtr int[] blockids)
public int GetThresholdedImageScaleFactor()
public void DumpPGM(@Cast(value="const char*") BytePointer filename)
public void DumpPGM(String filename)
public tesseract.PageIterator AnalyseLayout()
public tesseract.PageIterator AnalyseLayout(@Cast(value="bool") boolean merge_similar_words)
public int Recognize(tesseract.ETEXT_DESC monitor)
public int RecognizeForChopTest(tesseract.ETEXT_DESC monitor)
@Cast(value="bool") public boolean ProcessPages(@Cast(value="const char*") BytePointer filename, @Cast(value="const char*") BytePointer retry_config, int timeout_millisec, tesseract.TessResultRenderer renderer)
@Cast(value="bool") public boolean ProcessPages(String filename, String retry_config, int timeout_millisec, tesseract.TessResultRenderer renderer)
@Cast(value="bool") public boolean ProcessPagesInternal(@Cast(value="const char*") BytePointer filename, @Cast(value="const char*") BytePointer retry_config, int timeout_millisec, tesseract.TessResultRenderer renderer)
@Cast(value="bool") public boolean ProcessPagesInternal(String filename, String retry_config, int timeout_millisec, tesseract.TessResultRenderer renderer)
@Cast(value="bool") public boolean ProcessPage(lept.PIX pix, int page_index, @Cast(value="const char*") BytePointer filename, @Cast(value="const char*") BytePointer retry_config, int timeout_millisec, tesseract.TessResultRenderer renderer)
@Cast(value="bool") public boolean ProcessPage(lept.PIX pix, int page_index, String filename, String retry_config, int timeout_millisec, tesseract.TessResultRenderer renderer)
public tesseract.ResultIterator GetIterator()
public tesseract.MutableIterator GetMutableIterator()
@Cast(value="char*") public BytePointer GetUTF8Text()
@Cast(value="char*") public BytePointer GetHOCRText(int page_number)
@Cast(value="char*") public BytePointer GetBoxText(int page_number)
@Cast(value="char*") public BytePointer GetUNLVText()
@Cast(value="char*") public BytePointer GetOsdText(int page_number)
public int MeanTextConf()
public IntPointer AllWordConfidences()
@Cast(value="bool") public boolean AdaptToWordStr(@Cast(value="tesseract::PageSegMode") int mode, @Cast(value="const char*") BytePointer wordstr)
@Cast(value="bool") public boolean AdaptToWordStr(@Cast(value="tesseract::PageSegMode") int mode, String wordstr)
public void Clear()
public void End()
public static void ClearPersistentCache()
public int IsValidWord(@Cast(value="const char*") BytePointer word)
public int IsValidWord(String word)
@Cast(value="bool") public boolean IsValidCharacter(@Cast(value="const char*") BytePointer utf8_character)
@Cast(value="bool") public boolean GetTextDirection(IntPointer out_offset, FloatPointer out_slope)
@Cast(value="bool") public boolean GetTextDirection(IntBuffer out_offset, FloatBuffer out_slope)
@Cast(value="bool") public boolean GetTextDirection(int[] out_offset, float[] out_slope)
public void SetDictFunc(tesseract.DictFunc f)
public void SetProbabilityInContextFunc(tesseract.ProbabilityInContextFunc f)
@Cast(value="bool") public boolean DetectOS(tesseract.OSResults arg0)
public void GetFeaturesForBlob(tesseract.TBLOB blob, tesseract.INT_FEATURE_STRUCT int_features, IntPointer num_features, IntPointer feature_outline_index)
public void GetFeaturesForBlob(tesseract.TBLOB blob, tesseract.INT_FEATURE_STRUCT int_features, IntBuffer num_features, IntBuffer feature_outline_index)
public void GetFeaturesForBlob(tesseract.TBLOB blob, tesseract.INT_FEATURE_STRUCT int_features, int[] num_features, int[] feature_outline_index)
public static tesseract.ROW FindRowForBox(tesseract.BLOCK_LIST blocks, int left, int top, int right, int bottom)
public void RunAdaptiveClassifier(tesseract.TBLOB blob, int num_max_matches, IntPointer unichar_ids, FloatPointer ratings, IntPointer num_matches_returned)
public void RunAdaptiveClassifier(tesseract.TBLOB blob, int num_max_matches, IntBuffer unichar_ids, FloatBuffer ratings, IntBuffer num_matches_returned)
public void RunAdaptiveClassifier(tesseract.TBLOB blob, int num_max_matches, int[] unichar_ids, float[] ratings, int[] num_matches_returned)
@Cast(value="const char*") public BytePointer GetUnichar(int unichar_id)
@Const public tesseract.Dawg GetDawg(int i)
public int NumDawgs()
public static tesseract.ROW MakeTessOCRRow(float baseline, float xheight, float descender, float ascender)
public static tesseract.TBLOB MakeTBLOB(lept.PIX pix)
public static void NormalizeTBLOB(tesseract.TBLOB tblob, tesseract.ROW row, @Cast(value="bool") boolean numeric_mode)
public tesseract.Tesseract tesseract()
public void InitTruthCallback(@Cast(value="tesseract::TruthCallback*") tesseract.TruthCallback4 cb)
public tesseract.CubeRecoContext GetCubeRecoContext()
public void set_min_orientation_margin(double margin)
public void GetBlockTextOrientations(@Cast(value="int**") PointerPointer block_orientation, @Cast(value="bool**") PointerPointer vertical_writing)
public void GetBlockTextOrientations(@ByPtrPtr IntPointer block_orientation, @Cast(value="bool**")@ByPtrPtr BoolPointer vertical_writing)
public void GetBlockTextOrientations(@ByPtrPtr IntBuffer block_orientation, @Cast(value="bool**")@ByPtrPtr boolean[] vertical_writing)
public void GetBlockTextOrientations(@ByPtrPtr int[] block_orientation, @Cast(value="bool**")@ByPtrPtr BoolPointer vertical_writing)
public void GetBlockTextOrientations(@ByPtrPtr IntPointer block_orientation, @Cast(value="bool**")@ByPtrPtr boolean[] vertical_writing)
public void GetBlockTextOrientations(@ByPtrPtr IntBuffer block_orientation, @Cast(value="bool**")@ByPtrPtr BoolPointer vertical_writing)
public void GetBlockTextOrientations(@ByPtrPtr int[] block_orientation, @Cast(value="bool**")@ByPtrPtr boolean[] vertical_writing)
public tesseract.BLOCK_LIST FindLinesCreateBlockList()
public static void DeleteBlockList(tesseract.BLOCK_LIST block_list)
Copyright © 2016. All rights reserved.