Header: #include “easyar/barcode.hpp”
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.
Creates a BarCodeScanner object.
Destroys the BarCodeScanner object.
virtual bool attachCamera(const CameraDevice& obj)¶
Attach CameraDevice to the BarCodeScanner. BarCodeScanner will not scan until a CameraDevice is attached.
virtual bool detachCamera(const CameraDevice& obj)¶
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.
virtual bool start()¶
Starts the scan. The scan will not actually start until a CameraDevice is attached.
virtual bool stop()¶
Stops the scan. Call start to start the scan again.