public class OCRTesseract extends BaseOCR
Modifier | Constructor and Description |
---|---|
protected |
OCRTesseract(long addr) |
Modifier and Type | Method and Description |
---|---|
static OCRTesseract |
__fromPtr__(long addr) |
static OCRTesseract |
create()
Creates an instance of the OCRTesseract class.
|
static OCRTesseract |
create(String datapath)
Creates an instance of the OCRTesseract class.
|
static OCRTesseract |
create(String datapath,
String language)
Creates an instance of the OCRTesseract class.
|
static OCRTesseract |
create(String datapath,
String language,
String char_whitelist)
Creates an instance of the OCRTesseract class.
|
static OCRTesseract |
create(String datapath,
String language,
String char_whitelist,
int oem)
Creates an instance of the OCRTesseract class.
|
static OCRTesseract |
create(String datapath,
String language,
String char_whitelist,
int oem,
int psmode)
Creates an instance of the OCRTesseract class.
|
protected void |
finalize() |
String |
run(Mat image,
int min_confidence)
Recognize text using the tesseract-ocr API.
|
String |
run(Mat image,
int min_confidence,
int component_level)
Recognize text using the tesseract-ocr API.
|
String |
run(Mat image,
Mat mask,
int min_confidence) |
String |
run(Mat image,
Mat mask,
int min_confidence,
int component_level) |
void |
setWhiteList(String char_whitelist) |
getNativeObjAddr
public static OCRTesseract __fromPtr__(long addr)
public static OCRTesseract create(String datapath, String language, String char_whitelist, int oem, int psmode)
datapath
- the name of the parent directory of tessdata ended with "/", or NULL to use the
system's default directory.language
- an ISO 639-3 code or NULL will default to "eng".char_whitelist
- specifies the list of characters used for recognition. NULL defaults to
"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".oem
- tesseract-ocr offers different OCR Engine Modes (OEM), by default
tesseract::OEM_DEFAULT is used. See the tesseract-ocr API documentation for other possible
values.psmode
- tesseract-ocr offers different Page Segmentation Modes (PSM) tesseract::PSM_AUTO
(fully automatic layout analysis) is used. See the tesseract-ocr API documentation for other
possible values.public static OCRTesseract create(String datapath, String language, String char_whitelist, int oem)
datapath
- the name of the parent directory of tessdata ended with "/", or NULL to use the
system's default directory.language
- an ISO 639-3 code or NULL will default to "eng".char_whitelist
- specifies the list of characters used for recognition. NULL defaults to
"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".oem
- tesseract-ocr offers different OCR Engine Modes (OEM), by default
tesseract::OEM_DEFAULT is used. See the tesseract-ocr API documentation for other possible
values.
(fully automatic layout analysis) is used. See the tesseract-ocr API documentation for other
possible values.public static OCRTesseract create(String datapath, String language, String char_whitelist)
datapath
- the name of the parent directory of tessdata ended with "/", or NULL to use the
system's default directory.language
- an ISO 639-3 code or NULL will default to "eng".char_whitelist
- specifies the list of characters used for recognition. NULL defaults to
"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".
tesseract::OEM_DEFAULT is used. See the tesseract-ocr API documentation for other possible
values.
(fully automatic layout analysis) is used. See the tesseract-ocr API documentation for other
possible values.public static OCRTesseract create(String datapath, String language)
datapath
- the name of the parent directory of tessdata ended with "/", or NULL to use the
system's default directory.language
- an ISO 639-3 code or NULL will default to "eng".
"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".
tesseract::OEM_DEFAULT is used. See the tesseract-ocr API documentation for other possible
values.
(fully automatic layout analysis) is used. See the tesseract-ocr API documentation for other
possible values.public static OCRTesseract create(String datapath)
datapath
- the name of the parent directory of tessdata ended with "/", or NULL to use the
system's default directory.
"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".
tesseract::OEM_DEFAULT is used. See the tesseract-ocr API documentation for other possible
values.
(fully automatic layout analysis) is used. See the tesseract-ocr API documentation for other
possible values.public static OCRTesseract create()
public String run(Mat image, int min_confidence, int component_level)
image
- Input image CV_8UC1 or CV_8UC3
text elements found (e.g. words or text lines).
recognition of individual text elements found (e.g. words or text lines).
for the recognition of individual text elements found (e.g. words or text lines).component_level
- OCR_LEVEL_WORD (by default), or OCR_LEVEL_TEXTLINE.min_confidence
- automatically generatedpublic String run(Mat image, int min_confidence)
image
- Input image CV_8UC1 or CV_8UC3
text elements found (e.g. words or text lines).
recognition of individual text elements found (e.g. words or text lines).
for the recognition of individual text elements found (e.g. words or text lines).min_confidence
- automatically generatedpublic void setWhiteList(String char_whitelist)
Generated on Wed Oct 9 2019 23:24:43 UTC / OpenCV 4.1.2