Package io.scanbot.sdk.document
Interface DocumentScanner
-
- All Implemented Interfaces:
public interface DocumentScanner
-
-
Method Summary
Modifier and Type Method Description abstract DocumentScannerConfiguration
copyCurrentConfiguration()
Returns a copy of the current configuration. abstract Unit
setConfiguration(DocumentScannerConfiguration configuration)
Sets the configuration for the document scanner. abstract DocumentDetectionResult
scan(ByteArray nv21, Integer width, Integer height, Integer frameOrientation)
Tries to scan a polygon from the given image. abstract DocumentDetectionResult
scanFromJpeg(ByteArray data)
Tries to scan a polygon from the given image. abstract DocumentDetectionResult
scanInArea(ByteArray nv21, Integer width, Integer height, Integer frameOrientation, Rect areaRect)
Decode the nv21 within the finder rectangle, and time how long it took. abstract DocumentDetectionResult
scanFromFile(String filePath)
Tries to scan a polygon from the given file. abstract DocumentDetectionResult
scanFromBitmap(Bitmap bitmap)
Tries to scan a polygon from the given image. abstract Unit
setParameters(DocumentScannerParameters scanningParameters)
Set the scanning parameters to use. abstract Unit
resetPolygonHistory()
Calling this method will reset the polygon smoothing history. -
-
Method Detail
-
copyCurrentConfiguration
abstract DocumentScannerConfiguration copyCurrentConfiguration()
Returns a copy of the current configuration.
-
setConfiguration
abstract Unit setConfiguration(DocumentScannerConfiguration configuration)
Sets the configuration for the document scanner.
- Parameters:
configuration
- The configuration to set.
-
scan
abstract DocumentDetectionResult scan(ByteArray nv21, Integer width, Integer height, Integer frameOrientation)
Tries to scan a polygon from the given image.
- Parameters:
nv21
- NV21 encoded camera imagewidth
- Width of the image pixelsheight
- Height of the image in pixels
-
scanFromJpeg
abstract DocumentDetectionResult scanFromJpeg(ByteArray data)
Tries to scan a polygon from the given image.
- Parameters:
data
- Encoded image (e.g.
-
scanInArea
abstract DocumentDetectionResult scanInArea(ByteArray nv21, Integer width, Integer height, Integer frameOrientation, Rect areaRect)
Decode the nv21 within the finder rectangle, and time how long it took.
- Parameters:
nv21
- The YUV preview frame.width
- The width of the preview frame.height
- The height of the preview frame.frameOrientation
- The frame orientation degrees.areaRect
- decode area
-
scanFromFile
abstract DocumentDetectionResult scanFromFile(String filePath)
Tries to scan a polygon from the given file.
- Parameters:
filePath
- Encoded file path (e.g.
-
scanFromBitmap
abstract DocumentDetectionResult scanFromBitmap(Bitmap bitmap)
Tries to scan a polygon from the given image.
- Parameters:
bitmap
- The image
-
setParameters
abstract Unit setParameters(DocumentScannerParameters scanningParameters)
Set the scanning parameters to use.
-
resetPolygonHistory
abstract Unit resetPolygonHistory()
Calling this method will reset the polygon smoothing history.
-
-
-
-