Quadrangle

data class Quadrangle(val topLeft: Point = Point(), val topRight: Point = Point(), val bottomLeft: Point = Point(), val bottomRight: Point = Point()) : Parcelable

The quadrangle used to represent document borders. It consists of four points in a specific order: Top Left, Top Right, Bottom Left, Bottom Right. By default, an empty quadrangle is created, meaning document detection has not been run, or it has detected no document in the image.

The primary constructor exposes each normalized corner as an immutable Point.

Constructors

Link copied to clipboard
constructor(x1: Float, y1: Float, x2: Float, y2: Float, x3: Float, y3: Float, x4: Float, y4: Float)

Creates a quadrangle from eight normalized coordinates ordered as: TopLeft (x, y), TopRight (x, y), BottomLeft (x, y), BottomRight (x, y).

constructor(topLeft: Point = Point(), topRight: Point = Point(), bottomLeft: Point = Point(), bottomRight: Point = Point())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Returns the quadrangle coordinates in the order described in the array constructor.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Rotate a quadrangle by a specific angle