Expand description

ArUco Marker Detection

This module is dedicated to square fiducial markers (also known as Augmented Reality Markers) These markers are useful for easy, fast and robust camera pose estimation.ç

The main functionalities are:

  • Detection of markers in an image
  • Pose estimation from a single marker or from a board/set of markers
  • Detection of ChArUco board for high subpixel accuracy
  • Camera calibration from both, ArUco boards and ChArUco boards.
  • Detection of ChArUco diamond markers The samples directory includes easy examples of how to use the module.

The implementation is based on the ArUco Library by R. Muñoz-Salinas and S. Garrido-Jurado Aruco2014.

Markers can also be detected based on the AprilTag 2 wang2016iros fiducial detection method.

See also

S. Garrido-Jurado, R. Muñoz-Salinas, F. J. Madrid-Cuevas, and M. J. Marín-Jiménez. 2014. “Automatic generation and detection of highly reliable fiducial markers under occlusion”. Pattern Recogn. 47, 6 (June 2014), 2280-2292. DOI=10.1016/j.patcog.2014.01.005

http://www.uco.es/investiga/grupos/ava/node/26

This module has been originally developed by Sergio Garrido-Jurado as a project for Google Summer of Code 2015 (GSoC 15).

Modules

Structs

Board of markers
ChArUco board Specific class for ChArUco boards. A ChArUco board is a planar board where the markers are placed inside the white squares of a chessboard. The benefits of ChArUco boards is that they provide both, ArUco markers versatility and chessboard corner precision, which is important for calibration and pose estimation. This class also allows the easy creation and drawing of ChArUco boards.
Parameters for the detectMarker process:
Dictionary/Set of markers. It contains the inner codification
Pose estimation parameters
Planar board with grid arrangement of markers More common type of board. All markers are placed in the same plane in a grid arrangement. The board can be drawn using drawPlanarBoard() function (see also: drawPlanarBoard)

Enums

Predefined markers dictionaries/sets Each dictionary indicates the number of bits and the number of markers contained
rvec/tvec define the right handed coordinate system of the marker. PatternPos defines center this system and axes direction. Axis X (red color) - first coordinate, axis Y (green color) - second coordinate, axis Z (blue color) - third coordinate.

Constants

The marker coordinate system is centered on the middle of the marker. The coordinates of the four corners (CCW order) of the marker in its own coordinate system are: (-markerLength/2, markerLength/2, 0), (markerLength/2, markerLength/2, 0), (markerLength/2, -markerLength/2, 0), (-markerLength/2, -markerLength/2, 0).
Tag and corners detection based on the AprilTag 2 approach wang2016iros
ArUco approach and refine the corners locations using the contour-points line fitting
Tag and corners detection based on the ArUco approach
ArUco approach and refine the corners locations using corner subpixel accuracy
The marker coordinate system is centered on the top-left corner of the marker. The coordinates of the four corners (CW order) of the marker in its own coordinate system are: (0, 0, 0), (markerLength, 0, 0), (markerLength, markerLength, 0), (0, markerLength, 0).
4x4 bits, minimum hamming distance between any two codes = 4, 50 codes
4x4 bits, minimum hamming distance between any two codes = 3, 100 codes
4x4 bits, minimum hamming distance between any two codes = 3, 250 codes
4x4 bits, minimum hamming distance between any two codes = 2, 1000 codes
5x5 bits, minimum hamming distance between any two codes = 8, 50 codes
5x5 bits, minimum hamming distance between any two codes = 7, 100 codes
5x5 bits, minimum hamming distance between any two codes = 6, 250 codes
5x5 bits, minimum hamming distance between any two codes = 5, 1000 codes
6x6 bits, minimum hamming distance between any two codes = 13, 50 codes
6x6 bits, minimum hamming distance between any two codes = 12, 100 codes
6x6 bits, minimum hamming distance between any two codes = 11, 250 codes
6x6 bits, minimum hamming distance between any two codes = 9, 1000 codes
7x7 bits, minimum hamming distance between any two codes = 19, 50 codes
7x7 bits, minimum hamming distance between any two codes = 18, 100 codes
7x7 bits, minimum hamming distance between any two codes = 17, 250 codes
7x7 bits, minimum hamming distance between any two codes = 14, 1000 codes
4x4 bits, minimum hamming distance between any two codes = 5, 30 codes
5x5 bits, minimum hamming distance between any two codes = 9, 35 codes
6x6 bits, minimum hamming distance between any two codes = 10, 2320 codes
6x6 bits, minimum hamming distance between any two codes = 11, 587 codes
6x6 bits, minimum hamming distance between any two codes = 3, 1024 codes

Traits

Board of markers
ChArUco board Specific class for ChArUco boards. A ChArUco board is a planar board where the markers are placed inside the white squares of a chessboard. The benefits of ChArUco boards is that they provide both, ArUco markers versatility and chessboard corner precision, which is important for calibration and pose estimation. This class also allows the easy creation and drawing of ChArUco boards.
Parameters for the detectMarker process:
Dictionary/Set of markers. It contains the inner codification
Pose estimation parameters
Planar board with grid arrangement of markers More common type of board. All markers are placed in the same plane in a grid arrangement. The board can be drawn using drawPlanarBoard() function (see also: drawPlanarBoard)

Functions

It’s the same function as #calibrateCameraAruco but without calibration error estimation.
Calibrate a camera using aruco markers
It’s the same function as #calibrateCameraCharuco but without calibration error estimation.
Calibrate a camera using Charuco corners
Generates a new customizable marker dictionary
Detect ChArUco Diamond markers
Basic marker detection
Draw a ChArUco Diamond marker
Draws a set of Charuco corners
Draw a set of detected ChArUco Diamond markers
Draw detected markers in image
Draw a canonical marker image
Draw a planar board
Pose estimation for a board of markers
Pose estimation for a ChArUco board given some of their corners
Pose estimation for single markers
Given a board configuration and a set of detected markers, returns the corresponding image points and object points to call solvePnP
Returns one of the predefined dictionaries defined in PREDEFINED_DICTIONARY_NAME
Returns one of the predefined dictionaries referenced by DICT_*.
Interpolate position of ChArUco board corners
Refind not detected markers based on the already detected and the board layout
test whether the ChArUco markers are collinear