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 https://www.uco.es/investiga/grupos/ava/node/26
The implementation of ArUco used by JeVois is the one of OpenCV-Contrib, documented here: http://docs.opencv.org/3.2.0/d5/dae/tutorial_aruco_detection.html
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 http://jevois.org/data/ArUco.zip
To make your own, for example, using another dictionary, see the documentation of the ArUco component of JeVoisBase. Some utilities are provided with the component.
This module can send the following messages over serial port (make sure you set the
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). See Helper functions to convert coordinates from camera resolution to standardized for more information on standardized coordinates in JeVois.
One message is issued for every detected ArUco, on every video frame.
Things to try
Showing the pose vectors
The OpenCV ArUco module can also compute normals to each marker, which allows you to recover the marker's orientation and distance. The requires that the camera be calibrated, see the documentation of the ArUco component in JeVois. A generic calibration that is for a JeVois camera with standard lens is included in file calibration.yaml in the module's directory (on the MicroSD, this is JEVOIS:/modules/JeVois/DemoArUco/calibration.yaml).
FIXME this crashes since the update to opencv 3.2, need to figure out what changed since 3.1.