public class DocumentCutout extends Object
Constructor and Description |
---|
DocumentCutout() |
Modifier and Type | Method and Description |
---|---|
void |
checkGeometry(Corners corners,
android.graphics.Point bounds)
check effective document area distortion
|
boolean |
isDistortionChecked()
checkGeometry(Corners, Point, Bundle) distortion result |
boolean |
isFullnessChecked()
checkGeometry(Corners, Point, Bundle) fullness result |
static boolean |
regulateCorners(Corners corners,
android.graphics.Point bounds)
Try to regulate document corners compliance to order UL-UR-BL-BR
|
static boolean |
validateCorners(Corners corners,
android.graphics.Point bounds)
Validate document corners order compliance to order UL-UR-BL-BR (required by
Corners ). |
public static boolean validateCorners(@NonNull Corners corners, @NonNull android.graphics.Point bounds)
Corners
).corners
- document corners to validatebounds
- image size (already rotated!)true
if corners are validpublic static boolean regulateCorners(@NonNull Corners corners, @NonNull android.graphics.Point bounds)
corners
- document corners to validatebounds
- image size (already rotated!)true
if corners are valid and regulating was successfulpublic void checkGeometry(@NonNull Corners corners, @NonNull android.graphics.Point bounds)
corners
- document cornersbounds
- entire document boundspublic boolean isFullnessChecked()
checkGeometry(Corners, Point, Bundle)
fullness resulttrue
if fullness was checked successfullypublic boolean isDistortionChecked()
checkGeometry(Corners, Point, Bundle)
distortion resulttrue
if fullness was checked successfully