public class ImageProcessing extends Object
Modifier and Type | Field and Description |
---|---|
boolean |
recycle
Default flag to recycle images after processing
Set to false if it isn't desirable behaviour
|
Modifier and Type | Method and Description |
---|---|
MetaImage |
correctDocument(MetaImage sourceBitmap,
Corners corners)
Corrects document perspective distortions in the image, warping corners to corrected image rectangle.
|
void |
destroy()
Deprecated.
No more need!
|
Corners |
detectDocumentCorners(MetaImage sourceBitmap,
android.os.Bundle params)
detects document corners in the page image.
|
MetaImage |
imageBWBinarization(MetaImage sourceBitmap)
Deprecated.
|
MetaImage |
imageColorBinarization(MetaImage sourceBitmap)
Deprecated.
|
MetaImage |
imageGrayBinarization(MetaImage sourceBitmap)
Deprecated.
|
MetaImage |
imageOriginal(MetaImage sourceBitmap)
creates a new
MetaImage as a copy of source image with applying orientation flag to it. |
MetaImage |
imageWithoutRotation(MetaImage sourceBitmap)
Deprecated.
Equals of
imageOriginal(MetaImage) |
android.graphics.Point |
supportImageSize(android.graphics.Point imageSize)
Deprecated.
Returns max supported image size.
NOTE: Using
Point class as size |
boolean |
validate()
Deprecated.
Validate object initialization
|
static boolean |
validateDocumentCorners(Corners corners,
android.graphics.Point bounds)
Deprecated.
Use
DocumentCutout instead
Validate document corners order compliance to order UL-UR-BL-BR (required by Corners ). |
public boolean recycle
@Deprecated public boolean validate()
true
@Deprecated public android.graphics.Point supportImageSize(android.graphics.Point imageSize)
Point
class as sizeimageSize
- input image size.imageSize
public Corners detectDocumentCorners(MetaImage sourceBitmap, @NonNull android.os.Bundle params)
Detection parameters.
ImageSdkLibrary.SDK_IS_SMART_CROP
boolean output. Routine set to true
if detection was successfully and
otherwise false
ImageSdkLibrary.SDK_CHECK_DOCUMENT_GEOMETRY
boolean input. Perform additional document geometry checkImageSdkLibrary.SDK_DOCUMENT_FULLNESS_CHECKED
boolean output. Document area checkedImageSdkLibrary.SDK_DOCUMENT_DISTORTION_CHECKED
boolean output. Document distortion checkedsourceBitmap
- input imageparams
- detection parameters on input and detection as outputnull
@Deprecated public static boolean validateDocumentCorners(@NonNull Corners corners, @NonNull android.graphics.Point bounds)
DocumentCutout
instead
Validate document corners order compliance to order UL-UR-BL-BR (required by Corners
).corners
- document corners to validatebounds
- image size (already rotated!)true
if corners is validDocumentCutout.validateCorners(com.pixelnetica.imagesdk.Corners, android.graphics.Point)
public MetaImage correctDocument(MetaImage sourceBitmap, Corners corners)
sourceBitmap
- source image containing the document.corners
- 4 corners in the source image coordinate space as Corners
classpublic MetaImage imageOriginal(MetaImage sourceBitmap)
MetaImage
as a copy of source image with applying orientation flag to it.sourceBitmap
- input image@Deprecated public MetaImage imageWithoutRotation(MetaImage sourceBitmap)
imageOriginal(MetaImage)
sourceBitmap
- image to rotatesourceBitmap
if no rotation need@Deprecated public MetaImage imageBWBinarization(MetaImage sourceBitmap)
sourceBitmap
- input image@Deprecated public MetaImage imageGrayBinarization(MetaImage sourceBitmap)
sourceBitmap
- input image@Deprecated public MetaImage imageColorBinarization(MetaImage sourceBitmap)
sourceBitmap
- input image@Deprecated public void destroy()