QRCodeScanner Class

Inherits: FrameFilter

Description

QRCodeScanner is used for QRCode recognition.

You need to call attachStreamer to attach a FrameStreamer to QRCodeScanner first, then the images from the FrameStreamer 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 FrameStreamer.peek which contains current camera image and recognized code string.

Constructor

C: void easyar_QRCodeScanner__ctor(easyar_QRCodeScanner * * Return)
C++11: QRCodeScanner()
Traditional C++: QRCodeScanner()
Java: public QRCodeScanner()
Objective-C: + (easyar_QRCodeScanner *) create
Swift (since EasyAR SDK 2.1.0): public convenience init()

attachStreamer

Attach FrameStreamer to the QRCodeScanner. QRCodeScanner will not scan until a FrameStreamer is attached.

Attach null object will detach previous attached FrameStreamer from QRCodeScanner.

C: bool easyar_QRCodeScanner_attachStreamer(easyar_QRCodeScanner * This, easyar_FrameStreamer * obj)
C++11: bool attachStreamer(std::shared_ptr<FrameStreamer> obj)
Traditional C++: bool attachStreamer(FrameStreamer * obj)
Java: public native boolean attachStreamer(FrameStreamer obj)
Objective-C: - (bool)attachStreamer:(easyar_FrameStreamer *)obj
Swift (since EasyAR SDK 2.1.0): public override func attachStreamer(_ obj: FrameStreamer?) -> Bool

start

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

C: bool easyar_QRCodeScanner_start(easyar_QRCodeScanner * This)
C++11: bool start()
Traditional C++: bool start()
Java: public native boolean start()
Objective-C: - (bool)start
Swift (since EasyAR SDK 2.1.0): public override func start() -> Bool

stop

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

C: bool easyar_QRCodeScanner_stop(easyar_QRCodeScanner * This)
C++11: bool stop()
Traditional C++: bool stop()
Java: public native boolean stop()
Objective-C: - (bool)stop
Swift (since EasyAR SDK 2.1.0): public override func stop() -> Bool