//scanning/com.pixelnetica.scanning/ScanCutout

ScanCutout

[androidJvm]
class ScanCutout : ScanningSdkLibrary.Instance, Parcelable

Represents document or another area in the picture Cutout means array of linked clockwise arranged points. Usually 4 points for a document but in the future cutout will may contains more points to represents more complex area

Initially ScanCutout is defined in image’s native origin, without any rotation or transformation but later cutout can be transformed and restored back to native orientation

Constructors

   
ScanCutout [androidJvm]
constructor(source: ScanCutout)
A deep copy constructor
constructor(bounds: SizeF, points: Array<PointF>, transform: Matrix)
@JvmOverloads
constructor(points: Array<Point>, orientation: Int, bounds: Point, asOrigin: Boolean = true)
Compatible constructor to use with old-ones
constructor(bytes: ByteArray)

Properties

Name Summary
bounds [androidJvm]
val bounds: RectF
transformed cutout bounds
intPoints [androidJvm]
val intPoints: Array<Point>
ordered integer version of points
isDefined [androidJvm]
val isDefined: Boolean
Cutout represents detected document if detection failed isDefined returns false and cutout contains entire image origin
isValid [androidJvm]
val isValid: Boolean
Validate cutout: point order, self-intersection etc Useful for user-edited cutout to indicate invalid state
origin [androidJvm]
var origin: SizeF
represents cutout source area
points [androidJvm]
var points: Array<PointF>
float point array of current cutout returns a copy of cutout content
transform [androidJvm]
var transform: Matrix
Setup transformation matrix from native state

Functions

Name Summary
copy [androidJvm]
fun ScanCutout?.copy(): ScanCutout?
Safe copy cutout.
equals [androidJvm]
open operator override fun equals(other: Any?): Boolean
expand [androidJvm]
external fun expand()
Expand cutout to current origin. isDefined will be false
hashCode [androidJvm]
open override fun hashCode(): Int
rectify [androidJvm]
fun ScanCutout?.rectify(): RefineFeature
Safe define RefineFeature for nullable cutout
toString [androidJvm]
open external override fun toString(): String
transform [androidJvm]
external fun transform(orientation: ScanOrientation)
Transform cutout to specified orientation
writeBytes [androidJvm]
external fun writeBytes(packed: Boolean): ByteArray
Top