Tracked Barcode

Defined in framework ScanditBarcodeCapture

TrackedBarcode
open class TrackedBarcode : NSObject

Added in version 6.0.0

A barcode tracked over the course of multiple frames.

The state of a TrackedBarcode can be observed using a BarcodeBatchListener.

The BarcodeBatchListener.barcodeBatch() callback will be invoked every time a new frame is processed and at least one of the following events took place:

  1. A track is established.

  2. A track location has changed.

  3. A track is lost and can no longer be tracked.

location
open var location: Quadrilateral { get }

Added in version 6.4.0

The location of the code. The coordinates are in image-space, meaning that the coordinates correspond to actual pixels in the image. For display, the coordinates need first to be converted into screen-space using the data capture view.

The meaning of the values of Quadrilateral.topLeft is such that the top left point corresponds to the top left corner of the barcode, independent of how the code is oriented in the image. Same for the other conrners.

Note

Using this property requires the MatrixScan AR add-on. In case the feature is not licensed, a quadrilateral with all corners set to 0, 0 is returned.

identifier
open var identifier: Int { get }

Added in version 6.0.0

The unique identifier for the tracked barcode. The identifier is unique for each barcode. The same identifier may be reused once the barcode is lost for another barcode.

barcode
open var barcode: Barcode { get }

Added in version 6.0.0

The barcode associated to this track.

anchorPosition
open func anchorPosition(_ anchor: Anchor) -> CGPoint

Added in version 6.4.0

The position of an anchor point of the tracked barcode.

jsonString
open var jsonString: String { get }

Added in version 6.2.0

Returns the JSON representation of the tracked barcode.

init
init(trackedBarcodeInfo: TrackedBarcodeInfo)

Added in version 6.13.0

Constructs a TrackedBarcode instance using the specified information. Can be used to create mocks for unit testing