Demo QR-code
Simple demo of QR-code and barcode detection and decoding using the ZBar library.
By Laurent Ittiitti@usc.eduhttp://jevois.orgGPL v3
 Language: C++Supports mappings with USB output: YesSupports mappings with NO USB output: Yes 
 Video Mapping:   YUYV 640 526 15.0 YUYV 640 480 15.0 JeVois DemoQRcode
 Video Mapping:   YUYV 320 286 30.0 YUYV 320 240 30.0 JeVois DemoQRcode
 Video Mapping:   NONE 0 0 0 YUYV 640 480 15.0 JeVois DemoQRcode
 Video Mapping:   NONE 0 0 0 YUYV 320 240 30.0 JeVois DemoQRcode

Module Documentation

Detect barcodes and QR-codes, and decode their contents.

QR-codes (Quick Response Codes) are popular 2D patterns that contain embedded information, such as a string of text, a URL, etc. They basically work like barcodes, coding information into a high-contrast, geometric pattern that is easier to detect and decode by a machine that more conventional human-written text or drawings.

One can generate QR-codes containing different kinds of information, for example using online QR-code generators, such as http://www.qr-code-generator.com/

JeVois detects and decodes QR-codes and other barcodes. The implementation of the detection and decoding algorithm used in JeVois is from the popular library ZBar, found at http://zbar.sourceforge.net/

You should be able to sustain 30 frames/s with camera resolution 320x240, and 15 frames/s with camera resolution 640x480 when running this module inside the JeVois smart camera.

Serial Messages

This module can send standardized serial messages as described in Standardized serial messages formatting. One message is issued for every detected QR-code or barcode, on every video frame.

  • Serial message type: 2D
  • id: type of symbol (e.g., QR-Code, ISBN13, etc).
  • x, y, or vertices: standardized 2D coordinates of symbol center or of corners of bounding box (depending on serstyle)
  • w, h: standardized object size
  • extra: decoded contents (e.g., URL that was in a QR-code, ISBN number from a barcode, etc)

Note that when serstyle is Fine, only 4 corners are returned for each detected QR-code, but many points are returned all over each detected barcode. Beware to not exceed your serial bandwidth in that case.

See Standardized serial messages formatting for more on standardized serial messages, and Helper functions to convert coordinates from camera resolution to standardized for more info on standardized coordinates.

ParameterTypeDescriptionDefaultValid Values
(QRcode) symbolstd::stringType(s) of QR code / barcode symbols searched for, multiple entries are possible and should be separated by / characters. Selecting many symbol types or ALL will slow down processing. Supported symbols are: QRCODE, EAN2, EAN5, EAN8, EAN13, UPCE, UPCA, ISBN10, ISBN13, COMPOSITE, I25, DATABAR, DATABAREXP, CODABAR, CODE39, PDF417, CODE93, and CODE128ALL-
(QRcode) xdensityintScanner vertical scan density (pixel stride), or 0 to disable1-
(QRcode) ydensityintScanner horizontal scan density (pixel stride), or 0 to disable1-
params.cfg file
# Default parameters that are set upon loading the module

# Only look for QR codes by default, faster than looking for any kind of barcode and qr-code:
qrcode:symbol = QRCODE
Detailed docs:DemoQRcode
Copyright:Copyright (C) 2016 by Laurent Itti, iLab and the University of Southern California
License:GPL v3
Distribution:Unrestricted
Restrictions:None
Support URL:http://jevois.org/doc
Other URL:http://iLab.usc.edu
Address:University of Southern California, HNB-07A, 3641 Watt Way, Los Angeles, CA 90089-2520, USA