public GenericTextRecognizer
Component to scan image, recognize text on it and validate the recognized text
int getMinimumNumberOfRequiredFramesWithEqualRecognitionResult()
Minimum number of accumulated frames that have equal result
void setMinimumNumberOfRequiredFramesWithEqualRecognitionResult(int p)
Minimum number of accumulated frames that have equal result
int getMaximumNumberOfAccumulatedFrames()
Maximum number of accumulated frames to inspect before actual result is returned
void setMaximumNumberOfAccumulatedFrames(int p)
Maximum number of accumulated frames to inspect before actual result is returned
int getOcrResolutionLimit()
The image will be downscaled to the given value during the processing. If the quality of the scanning is not enough, try to increase the limit. This variable affects the performance of the scanning process. Higher the size limit - better the quality, but the recognition is slower
0 - do not rescale.
void setOcrResolutionLimit(int p)
The image will be downscaled to the given value during the processing. If the quality of the scanning is not enough, try to increase the limit. This variable affects the performance of the scanning process. Higher the size limit - better the quality, but the recognition is slower
0 - do not rescale.
@NotNull java.util.Set<io.scanbot.sdk.entity.Language> getSupportedLanguages()
Languages on which the recognition will be run
void setSupportedLanguages(@NotNull
java.util.Set<? extends io.scanbot.sdk.entity.Language> p)
Languages on which the recognition will be run
boolean getMatchSubstringForPattern()
Find and match only part of the whole string if the pattern is used
void setMatchSubstringForPattern(boolean p)
Find and match only part of the whole string if the pattern is used
@NotNull java.util.Set<java.lang.Character> getAllowedSymbols()
Allowed symbols to be detected
void setAllowedSymbols(@NotNull
java.util.Set<java.lang.Character> p)
Allowed symbols to be detected
@NotNull TextFilterStrategy getTextFilterStrategy()
Additional parameter to set the type of the scanned object. TextFilterStrategy.Document by default
void setTextFilterStrategy(@NotNull
TextFilterStrategy p)
Additional parameter to set the type of the scanned object. TextFilterStrategy.Document by default
@Nullable GenericTextRecognitionResult scanNv21(@NotNull kotlin.Array[] nv21, int width, int height, int orientation, @Nullable android.graphics.Rect finderRect)
Scan image to recognize text on it
nv21 - image in form of nv21-encoded byte arraywidth - image width, pixelsheight - image height, pixelsorientation - image orientation. Default is 0finderRect - if non-null - perform scanning only in given area. Default is nullvoid setValidator(@Nullable
java.lang.String pattern,
@Nullable
io.scanbot.sdk.generictext.GenericTextRecognizer.GenericTextValidationCallback callback)
Sets the configuration to use during the validation
pattern - sets a validation pattern (Supports ? - any character, # - any digit,all other characters represent themselves). Empty string or null will disable the validation)callback - callback to validate a string in recognizervoid setCleaner(@Nullable
io.scanbot.sdk.generictext.GenericTextRecognizer.CleanRecognitionResultCallback callback)
Sets the cleaner for the raw text to prepare the raw recognized string to validation. Allows to increase the quality and speed of the recognition
callback - callback to clean the raw text extracted from the picture and to extract only valuable part from itvoid cleanRecognitionQueue()
Allows to clean the accumulated frames inside the recognizer. Should be called if reusing the instance after getting the successful result
void <no name provided>()
Callback for text validation
void <no name provided>()
Optional callback to clean recognized string prior to validation. Allows to increase the quality and speed of the recognition