Description
The QR Code Reader Interface Asset is an off-the-shelf component of Intuiface that enables the use of a webcam or any device-accessible camera to read QR codes and retrieve the encoded data.
Although QR codes are typically used to encode website URLs, they can encode any text string. The QR Code Reader IA extracts the text string and makes it available for use.
An example use case: A museum visitor scans a QR code in a museum using their mobile device, loading an Intuiface-based experience into their device's web browser. They then use this experience to scan QR codes located next to each painting in the museum. When the QR code is read, the experience displays information about the particular artwork.
The QR Code Reader runs on all Player-supported platforms, including web deployments.
Adding the QR Code Reader Interface Asset into your experience
The QR Code Reader Interface Asset can be added to any experience using the "Add an interface asset" option located within Composer's Interface Assets panel.
Starting QR code detection
To look for a QR code, trigger the "Start detection" action. This action will use the camera represented by the Selected Camera property to start looking for QR codes.
Stopping detection
To stop detection, trigger the "Stop detection" action.
Additional properties, triggers, and actions
Properties
- Selected camera (read-only): This property stores the name of the selected camera. The default will be the first in the list of available cameras.
- Available cameras (read-only): This property contains a list of cameras available on the device.
- Recognition is active (read-only): This property is True if the recognition has been started and False if the recognition has not been started.
Triggers
-
QR code recognized: This trigger is raised when a QR code is recognized successfully.
- QR code data: This parameter contains the data encoded in the recognized QR code. It is a text string.
-
Error received: This trigger is raised when an error is detected.
- Error message: This parameter provides a detailed error message.
Actions
- Refresh available cameras: This action retrieves the list of available cameras and updates the "Available cameras" property with the list of detected devices.
- Switch to next camera: This action switches to the next camera in the "Available cameras" list and updates the "Selected camera" property.
-
Switch to specific camera: This action changes the camera.
- Camera name: Name of the camera. This should be one of the names listed in the "Available cameras" property.
Ensuring the proper camera is selected
When the recognition process starts, the camera used for recognition operates in the background. To help the user ensure that the correct camera is being used on their device, include the Webcam Asset in your scene and bind the Webcam Asset's "Camera" property to the "Selected Camera" property of the QR Code Reader Interface Asset. This way, the user can see what the camera is seeing and change the camera if necessary.
QR Code Recognition Webinar Demonstration
You can watch a live demo of the Interface Asset being used in our live
Comments
0 comments
Please sign in to leave a comment.