Scan Processor
This class is used to apply a sequence of image operations on a picture: perspective correction, curvature correction and image enhancement. Each of these operations can be configured using a configuration object.
Types
Link copied to clipboard
class Configuration<O>(perspectiveCorrection: ScanProcessor.PerspectiveCorrection, curvatureCorrection: ScanProcessor.CurvatureCorrection, enhancement: ScanProcessor.Enhancement, rotation: ScanProcessor.Rotation, outputConfiguration: ScanProcessor.OutputConfiguration<O>)
Parameters of the processing.
Link copied to clipboard
class CurvatureCorrection
Configuration for curvature correction.
Link copied to clipboard
class Enhancement
Configuration for image enhancement.
Link copied to clipboard
Style for the magic filter
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class PerspectiveCorrection
Configuration for perspective correction. When this configuration is enabled, perspective correction will be applied to the image, either using the result of the document detection, or the Quadrangle provided in this configuration.
Link copied to clipboard
class Result<T>(val appliedQuadrangle: Quadrangle, val appliedFilter: FilterType?, val appliedFilterConfiguration: FilterConfiguration, val appliedRotation: RotationAngle, val output: T)
Result of the processing.
Functions
Link copied to clipboard
fun process(inBitmap: Bitmap, configuration: ScanProcessor.Configuration<Bitmap>): ScanProcessor.Result<Bitmap>
fun process(inputImage: File, configuration: ScanProcessor.Configuration<File>): ScanProcessor.Result<File>
Process image file using the given configuration.