Class DocumentDetectionResult

Result of the document contour detection.

Constructors

Properties

aspectRatio: number

Aspect ratio of the detected document contour.

averageBrightness: number = 0

Average brightness, calculated as the average of the Value channel in the HSV color space of:

  • the whole image, if no document was detected
  • the document crop, if a document was detected Ranges from 0 to 255.

Default is 0

detectionScores: DocumentDetectionScores

The total and partial scores for the detected quad.

displacement: DocumentDisplacement = "NONE"

The displacement of the document from the image center if the document is partially visible.

Default is NONE

displacementVector: Point

The displacement vector of the document from the image center if the document is partially visible in normalized coordinates.

horizontalLines: LineSegmentInt[]

All detected horizontal lines in image space.

horizontalLinesNormalized: LineSegmentFloat[]

Normalized horizontal lines in image space.

points: Point[]

Absolute coordinates of the detected document contour in image space sorted in clockwise order, starting from the top left corner.

pointsNormalized: Point[]

Normalized coordinates of the detected document contour in image space sorted in clockwise order, starting from the top left corner.

status: DocumentDetectionStatus = "NOT_ACQUIRED"

Detection status.

Default is NOT_ACQUIRED

verticalLines: LineSegmentInt[]

All detected vertical lines in image space.

verticalLinesNormalized: LineSegmentFloat[]

Normalized vertical lines in image space.