Package com.geniusscansdk.core
Class ScanProcessor
- java.lang.Object
-
- com.geniusscansdk.core.ScanProcessor
-
public class ScanProcessor extends java.lang.Object
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ScanProcessor.Configuration<O>
Parameters of the processing.static class
ScanProcessor.CurvatureCorrection
Configuration for curvature correction.static class
ScanProcessor.Enhancement
Configuration for image enhancement.static class
ScanProcessor.OutputConfiguration<O>
static class
ScanProcessor.OutputFileFormat
static class
ScanProcessor.PerspectiveCorrection
Configuration for perspective correction.static class
ScanProcessor.Result<T>
Result of the processing.static class
ScanProcessor.Rotation
-
Constructor Summary
Constructors Constructor Description ScanProcessor(android.content.Context context)
ScanProcessor(DocumentDetector documentDetector, OrientationDetector orientationDetector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScanProcessor.Result<android.graphics.Bitmap>
process(android.graphics.Bitmap inBitmap, ScanProcessor.Configuration<android.graphics.Bitmap> configuration)
Process image file using the given configuration.ScanProcessor.Result<java.io.File>
process(java.io.File inputImage, ScanProcessor.Configuration<java.io.File> configuration)
Process image file using the given configuration.
-
-
-
Constructor Detail
-
ScanProcessor
public ScanProcessor(android.content.Context context)
-
ScanProcessor
public ScanProcessor(DocumentDetector documentDetector, OrientationDetector orientationDetector)
-
-
Method Detail
-
process
public ScanProcessor.Result<java.io.File> process(java.io.File inputImage, ScanProcessor.Configuration<java.io.File> configuration) throws ProcessingException, LicenseException
Process image file using the given configuration.- Parameters:
inputImage
- the input imageconfiguration
- configuration of the processing- Returns:
- the path of the output file and settings used to process the image
- Throws:
ProcessingException
LicenseException
-
process
public ScanProcessor.Result<android.graphics.Bitmap> process(android.graphics.Bitmap inBitmap, ScanProcessor.Configuration<android.graphics.Bitmap> configuration) throws ProcessingException, LicenseException
Process image file using the given configuration.- Parameters:
inBitmap
- input bitmapconfiguration
- configuration of the processing- Returns:
- the processed bitmap and the settings used to process the image
- Throws:
ProcessingException
LicenseException
-
-