Demo ArUco
Simple demo of ArUco augmented reality markers detection and decoding.
By Laurent Ittiitti@usc.eduhttp://jevois.orgGPL v3
Video Mapping: NONE 0 0 0 YUYV 320 240 30.0 JeVois DemoArUco
Video Mapping: YUYV 320 260 30.0 YUYV 320 240 30.0 JeVois DemoArUco
Video Mapping: YUYV 640 500 20.0 YUYV 640 480 20.0 JeVois DemoArUco

Detect and decode patterns known as ArUco markers, which are small 2D barcodes often used in augmented reality and robotics.

ArUco markers are small 2D barcodes. Each ArUco marker corresponds to a number, encoded into a small grid of black and white pixels. The ArUco decoding algorithm is capable of locating, decoding, and of estimating the pose (location and orientation in space) of any ArUco markers in the camera's field of view.

ArUcos are very useful as tags for many robotics and augmented reality applications. For example, one may place an ArUco next to a robot's charging station, an elevator button, or an object that a robot should manipulate.

For more information about ArUco, see

The implementation of ArUco used by JeVois is the one of OpenCV-Contrib, documented here:

ArUco markers can be created with several standard dictionaries. Different disctionaries give rise to different numbers of pixels in the markers, and to different numbers of possible symbols that can be created using the dictionary. The default dictionary used by JeVois is 4x4 with 50 symbols. Other dictionaries are also supported by setting the appropriate parameter over serial port or in a config file, up to 7x7 with 1000 symbols.

Creating and printing markers

We have created the 50 markers available in the default dictionary (4x4_50) as PNG images that you can download and print, at

To make your own, for example, using another dictionary, see the documentation of the ArUco component of JeVoisBase.

Serial Messages

This module can send the following messages over serial port (make sure you set the serout parameter to designate the serial port to which you want to send these messages, see the documentation for serout under UserCli).

  • When serstyle is 0:
      ArUco ID
    • ID is the decoded ID of the ArUco that was detected
  • When serstyle is 1:
      ArUco ID X,Y
    • ID is the decoded ID of the ArUco that was detected
    • X,Y are the coordinates of the marker's center
  • When serstyle is 2:
      ArUco ID X1,Y1 X2,Y2 X3,Y3 X4,Y4
    • ID is the decoded ID of the ArUco that was detected
    • X1,Y1 are the coordinates of the first corner
    • X2,Y2 are the coordinates of the second corner
    • X3,Y3 are the coordinates of the third corner
    • X4,Y4 are the coordinates of the fourth corner

The coordinates are normalized so that the serial outputs are independent of camera resolution. x=0, y=0 is the center of the field of view, the left edge of the camera image is at x=-1000, the right edge at x=1000, the top edge at y=-750, and the bottom edge at y=750 (since the camera has a 4:3 aspect ratio).

One message is issued for each detected ArUco.

ParameterTypeDescriptionDefaultValid Values
(DemoArUco) showposeboolShow pose vectors, requires a valid camera calibration matrixfalse-
(DemoArUco) markerlenfloatMarker side length (meters), used only for pose estimation0.1F-
(DemoArUco) serstyleintSerial output style for strings issued for each detected ArUco marker: 0: [ArUco ID] where ID is the decoded ArUco ID; 1: [ArUco ID X,Y] sends ID and standardized coordinates of the marker center;2: [ArUco ID X1,Y1 X2,Y2 X3,Y3 X4,Y4] sends ID and standardized coords of the 4 corners.0jevois::Range<int>(0, 2)
(ArUco) camparamsstd::stringFilename of camera parameters, or empty-
(ArUco) detparamsstd::stringFilename of detector parameters, or empty-
(ArUco) dictionaryDictSymbol dictionary to useDict::D4X4_50-
Detailed docs:DemoArUco, ArUco
Copyright:Copyright (C) 2016 by Laurent Itti, iLab and the University of Southern California
License:GPL v3
Support URL:
Other URL:
Address:University of Southern California, HNB-07A, 3641 Watt Way, Los Angeles, CA 90089-2520, USA