BarCodeScanner Class

Inherits: Base


BarCodeScanner is used for barcode recognition.

Currently only QR code is enabled. You need to call AttachCamera to attach a CameraDevice to BarCodeScanner first, then the images from the CameraDevice are used for the recognition. You can call Start/Stop to enable/disable the scan process. Start and Stop are very lightweight calls.

You can get a Frame by Augmenter.newFrame which contains current camera image and recognized code string.

Public Functions

virtual bool AttachCamera(CameraDevice cam)
virtual bool DetachCamera(CameraDevice cam)
virtual bool Start()
virtual bool Stop()


Creates a BarCodeScanner object.

bool AttachCamera(CameraDevice cam)

Attach CameraDevice to the BarCodeScanner. BarCodeScanner will not scan until a CameraDevice is attached.

bool DetachCamera(CameraDevice cam)

Detach CameraDevice from the BarCodeScanner. After detach, the BarCodeScanner will not accept images from the CameraDevice anymore and the scan will stop if no CameraDevice is attached.

bool Start()

Starts the scan. The scan will not actually start until a CameraDevice is attached.

bool Stop()

Stops the scan. Call Start to start the scan again.