IDCardRecognitionSettings

Inheritance: java.lang.Object, com.aspose.ocr.ReceiptRecognitionSettings

public class IDCardRecognitionSettings extends ReceiptRecognitionSettings

Settings for the ID Card recognition Contains elements that allow customizing the recognition process

Constructors

ConstructorDescription
IDCardRecognitionSettings()Default constructor: set autoSkew true.

Methods

MethodDescription
setAllowedCharacters(CharactersAllowedType allowedCharacters)Allowed characters set.
setAllowedCharacters(String allowedCharacters)Allowed characters set.
setAutomaticColorInversion(boolean automaticColorInversion)Detect images with white text on dark/black background and automatically choose a special OCR algorithm for them.
setIgnoredCharacters(String characters)Sets blacklist for recognition symbols.
setLanguage(Language language)
setThreadsCount(int threadsCount)Gets or sets the number of threads for processing.
setUpscaleSmallFont(boolean upscaleSmallFont)Allows you to use additional algorithms specifically for small font recognition.

IDCardRecognitionSettings()

public IDCardRecognitionSettings()

Default constructor: set autoSkew true.

setAllowedCharacters(CharactersAllowedType allowedCharacters)

public void setAllowedCharacters(CharactersAllowedType allowedCharacters)

Allowed characters set. Determines the type of characters allowed for recognition result.

Parameters:

ParameterTypeDescription
allowedCharactersCharactersAllowedTypecontains enum @see CharactersAllowedType value.

setAllowedCharacters(String allowedCharacters)

public void setAllowedCharacters(String allowedCharacters)

Allowed characters set. Determines the array of characters allowed for recognition result.

Parameters:

ParameterTypeDescription
allowedCharactersjava.lang.Stringcontains array of characters.

setAutomaticColorInversion(boolean automaticColorInversion)

public void setAutomaticColorInversion(boolean automaticColorInversion)

Detect images with white text on dark/black background and automatically choose a special OCR algorithm for them.

Parameters:

ParameterTypeDescription
automaticColorInversionbooleancontains boolean value - a automaticColorInversion is set.

setIgnoredCharacters(String characters)

public void setIgnoredCharacters(String characters)

Sets blacklist for recognition symbols.

Parameters:

ParameterTypeDescription
charactersjava.lang.StringCharacters excluded from recognition.

setLanguage(Language language)

public void setLanguage(Language language)

Parameters:

ParameterTypeDescription
languageLanguageSets the language used for OCR. Multi-language (none) by default.

setThreadsCount(int threadsCount)

public void setThreadsCount(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:

ParameterTypeDescription
threadsCountintthe number of threads that will be created for parallel recognition of image fragments.

setUpscaleSmallFont(boolean upscaleSmallFont)

public void setUpscaleSmallFont(boolean upscaleSmallFont)

Allows you to use additional algorithms specifically for small font recognition. Useful for images with small size characters.

Parameters:

ParameterTypeDescription
upscaleSmallFontbooleancontains boolean value - a upscaleSmallFont is set.