Markers Combo
Simple demo of QRcode + ARtoolkit + ArUco markers detection and decoding.
By Laurent Ittiitti@usc.eduhttp://jevois.orgGPL v3
 Language: C++Supports mappings with USB output: YesSupports mappings with NO USB output: Yes 
 Video Mapping:   NONE 0 0 0 YUYV 320 240 30.0 JeVois MarkersCombo
 Video Mapping:   YUYV 320 306 50.0 YUYV 320 240 50.0 JeVois MarkersCombo
 Video Mapping:   YUYV 640 546 20.0 YUYV 640 480 20.0 JeVois MarkersCombo

Module Documentation

Detect and decode 3 kinds of coded patterns which can be useful to a robot:

The three algorithms run in parallel. You should be able to sustain 50 frames/s at 320x240 camera resolution, and 20 frames/s at 640x480 camera resolution.

Serial Messages

This module can send standardized serial messages as described in Standardized serial messages formatting.

When dopose is turned on, 3D messages will be sent, otherwise 2D messages.

One message is issued for every detected marker, on every video frame.

2D messages when msg3d and dopose are off:

  • Serial message type: 2D
  • id: decoded marker ID (with prefix 'U' for ArUco, or 'A' for ARtoolkit), or type of symbol (e.g., QR-Code, ISBN13, etc).
  • x, y, or vertices: standardized 2D coordinates of marker center or corners
  • w, h: standardized marker size
  • extra: none (empty string) for ArUco and ARtoolkit markers, otherwise decoded barcode or QRcode content.

3D messages when msg3d and dopose are on:

  • Serial message type: 3D
  • id: decoded marker ID (with prefix 'U' for ArUco, or 'A' for ARtoolkit), or type of symbol (e.g., QR-Code, ISBN13, etc).
  • x, y, z, or vertices: 3D coordinates in millimeters of marker center or corners
  • w, h, d: marker size in millimeters, a depth of 1mm is always used
  • extra: none (empty string) for ArUco and ARtoolkit markers, otherwise decoded barcode or QRcode content.

If you will use the quaternion data (Detail message style; see Standardized serial messages formatting), you should probably set the serprec parameter to something non-zero to get enough accuracy in the quaternion values.

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
(ARtoolkit) camparamsstd::stringFile stem of camera parameters, or empty. Camera resolution will be appended, as well as a .dat extension. For example, specifying 'camera_para' here and running the camera sensor at 320x240 will attempt to load camera_para320x240.dat from within the module's directory (if relative stem) or from the specified absolute location (if absolute stem).JEVOIS_SHARE_PATH /camera/camera_para-
(ARtoolkit) contposeboolUse continuous pose estimation in good quality videotrue-
(ARtoolkit) msg3dboolSend 3D serial messages if true, otherwise 2Dfalse-
(ARtoolkit) threshmodeDictThreshModeDictionary threshold mode to use, affects robustness to varying lighting conditionsDictThreshMode::AR_LABELING_THRESH_MODE_AUTO_OTSUDictThreshMode_Values
(ARtoolkit) dictionaryDictSymbol dictionary to useDict::AR_MATRIX_CODE_3x3_PARITY65Dict_Values
(ARtoolkit) confthreshdoubleMinimum confidence threshold required for valid detections0.7jevois::Range<double>(0.0, 1.0)
(ArUco) camparamsstd::stringFile stem of camera parameters, or empty. Camera resolution will be appended, as well as a .yaml extension. For example, specifying 'calibration' here and running the camera sensor at 320x240 will attempt to load calibration320x240.yaml from within directory JEVOIS_SHARE_PATH /camera/ - Note that this parameter cannot be changed at runtime (must be set in the module's params.cfg).calibration-
(ArUco) detparamsstd::stringFilename of detector parameters, or empty - Note that this parameter cannot be changed at runtime (must be set in the module's params.cfg).-
(ArUco) dictionaryDictSymbol dictionary to use - Note that this parameter cannot be changed at runtime (must be set in the module's params.cfg).Dict::D4X4_50Dict_Values
(ArUco) doposeboolCompute (and show) pose vectors, requires a valid camera calibrationfalse-
(ArUco) markerlenfloatMarker side length (millimeters), used only for pose estimation100.0F-
(ArUco) showcubeboolShow a 3D cube on top of each detected marker, when dopose is also truefalse-
(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:MarkersCombo
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