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.