Package io.scanbot.sdk.textpattern
Class DefaultTextPatternScanner
-
- All Implemented Interfaces:
-
io.scanbot.sdk.textpattern.TextPatternScanner
public final class DefaultTextPatternScanner implements TextPatternScanner
Default implementation for TextPatternScanner.
-
-
Constructor Summary
Constructors Constructor Description DefaultTextPatternScanner()
-
Method Summary
Modifier and Type Method Description TextPatternScannerConfiguration
copyCurrentConfiguration()
Returns a copy of the current configuration. Unit
setConfiguration(TextPatternScannerConfiguration configuration)
Sets the configuration for the text pattern scanner. TextPatternScannerResult
scan(ByteArray nv21, Integer width, Integer height, Integer orientation, Rect areaRect)
Scan image to recognize text on it. Unit
cleanRecognitionQueue()
Allows to clean the accumulated frames inside the scanner. -
-
Method Detail
-
copyCurrentConfiguration
TextPatternScannerConfiguration copyCurrentConfiguration()
Returns a copy of the current configuration.
-
setConfiguration
Unit setConfiguration(TextPatternScannerConfiguration configuration)
Sets the configuration for the text pattern scanner.
- Parameters:
configuration
- The configuration to set.
-
scan
TextPatternScannerResult scan(ByteArray nv21, Integer width, Integer height, Integer orientation, Rect areaRect)
Scan image to recognize text on it.
- Parameters:
nv21
- image in form of nv21-encoded byte arraywidth
- image width, pixelsheight
- image height, pixelsorientation
- image orientation.areaRect
- if non-null - perform scanning only in given area.
-
cleanRecognitionQueue
Unit cleanRecognitionQueue()
Allows to clean the accumulated frames inside the scanner. Should be called if reusing the instance after getting the successful result.
-
-
-
-