Aspose.OCR for Python via Java API docs
Toggle main menu visibility
Loading...
Searching...
No Matches
Settings for the image recognition.
More...
__init__ (self)
Default constructor: set recognitionAreas null, linesFiltration false, autoSkew false, recognizeSingleLine false.
set_allowed_characters (self, str allowedCharacters)
Allowed characters set.
set_automatic_color_inversion (self, bool automaticColorInversion)
Detect images with white text on dark/black background and automatically choose a special OCR algorithm for them.
set_detect_areas_mode (self, DetectAreasMode detectAreasMode)
Determines the type of neural network used for areas detection.
set_ignored_characters (self, str ignoredCharacters)
Sets blacklist for recognition symbols.
set_language (self, Language language)
Sets the language used for OCR.
set_recognize_single_line (self, bool recognizeSingleLine)
Sets single-line image recognition.
set_threads_count (self, int threadsCount)
Gets or sets the number of threads for processing.
set_upscale_small_font (self, bool upscaleSmallFont)
Allows you to use additional algorithms specifically for small font recognition.
Settings for the image recognition.
Contains elements that allow customizing the recognition process.
◆ __init__()
Default constructor: set recognitionAreas null, linesFiltration false, autoSkew false, recognizeSingleLine false.
◆ set_allowed_characters()
set_allowed_characters
(
self ,
str
allowedCharacters
)
Allowed characters set.
Determines the array of characters allowed for recognition result.
Parameters
allowedCharacters contains string of characters.
◆ set_automatic_color_inversion()
set_automatic_color_inversion
(
self ,
bool
automaticColorInversion
)
Detect images with white text on dark/black background and automatically choose a special OCR algorithm for them.
Parameters
automaticColorInversion contains boolean value - a automaticColorInversion is set. True by default.
◆ set_detect_areas_mode()
set_detect_areas_mode
(
self ,
DetectAreasMode
detectAreasMode
)
Determines the type of neural network used for areas detection.
Parameters
detectAreasMode contains enum DetectAreasMode value.
◆ set_ignored_characters()
set_ignored_characters
(
self ,
str
ignoredCharacters
)
Sets blacklist for recognition symbols.
Parameters
ignoredCharacters Characters excluded from recognition.
◆ set_language()
set_language
(
self ,
Language
language
)
Sets the language used for OCR.
Multi-language (none) by default.
Parameters
language contains enum Language value.
◆ set_recognize_single_line()
set_recognize_single_line
(
self ,
bool
recognizeSingleLine
)
Sets single-line image recognition.
Disabled (false) by default. Disable all the processing steps associated with splitting into lines. Set this parameter to true if your image contains only one line. Disables set_recognition_areas settings, so all areas settings will be ignored.
Parameters
recognizeSingleLine True for single-line image
◆ set_threads_count()
set_threads_count
(
self ,
int
threadsCount
)
Gets or sets the number of threads for processing.
By default, 0 means that the image will be processed with the number of threads equal to your number of processors. ThreadsCount = 1 means that the image will be processed in the main thread.
Parameters
threadsCount the number of threads that will be created for parallel recognition of image fragments.
◆ set_upscale_small_font()
set_upscale_small_font
(
self ,
bool
upscaleSmallFont
)
Allows you to use additional algorithms specifically for small font recognition.
Useful for images with small size characters.
Parameters
upscaleSmallFont contains boolean value - an upscaleSmallFont is set.
◆ JAVA_CLASS_NAME
str JAVA_CLASS_NAME = "com.aspose.ocr.RecognitionSettings"
static