SpatialBarcode

data class SpatialBarcode(val value: String, val type: Barcode.Type, val bounds: Rect? = null, val sourceImageWidth: Int = 0, val sourceImageHeight: Int = 0)

A barcode and its position in one image or analyzed camera frame.

Constructors

Link copied to clipboard
constructor(value: String, type: Barcode.Type, bounds: Rect? = null, sourceImageWidth: Int = 0, sourceImageHeight: Int = 0)

Properties

Link copied to clipboard

The decoded barcode value and type.

Link copied to clipboard
val bounds: Rect?

The bounding rectangle in pixels in the upright source image.

Link copied to clipboard

The axis-aligned bounding rectangle in normalized coordinates, with a top-left origin. File coordinates refer to the full image after applying its orientation metadata. Camera coordinates refer to the full analyzed frame after capture rotation, before preview mirroring, cropping, or scaling. Coordinates may extend beyond the image.

Link copied to clipboard

The height of the upright source image in pixels.

Link copied to clipboard

The width of the upright source image in pixels.

Link copied to clipboard

The type of barcode (e.g. EAN-13).

Link copied to clipboard

The value of the barcode, as a string.

Functions

Link copied to clipboard