Video Detection Markers

Detects printed ArUco and AprilTag markers in the video and outputs the id, center, angle, size and four corners of each one. It is the base of tangible interfaces (objects on a table), of the tracking of props on stage and of the calibration of a projector by a camera with four markers.

Six ArUco 4x4 markers on a tilted sheet: the outline, top-left corner and orientation of each one.

The same layout with AprilTag 36h11 markers.

Print the markers of the chosen dictionary black on white, with a white margin around each one: these are the dictionaries of OpenCV, so its marker generators can be used. A marker is found when it lies entirely inside the frame, with sides of at least min size pixels and about 4 pixels per cell at the analysis size; white-on-black markers are not read. Two prints of one id are two markers, so the id appears twice. A frame of a street scene costs about 6 to 7 ms at 1920 x 1080 and 9 to 11 ms at 3840 x 2160.

Settings

bypass

Bypasses the module processing when activated (ON).

  • OFF (0): Module processes normally
  • ON (1): Input passes directly to output without processing

video in

Video input flow(s).

video out

Video output flow(s).

process time

Total time used for the calculation of the module.

dictionary

Family of the printed markers (default aruco 4x4 50). The markers of another family are not found.

  • aruco 4x4 50: ArUco markers of 4 x 4 cells, ids 0 to 49.
  • aruco 5x5 100: ArUco markers of 5 x 5 cells, ids 0 to 99.
  • aruco 6x6 250: ArUco markers of 6 x 6 cells, ids 0 to 249.
  • apriltag 36h11: AprilTag markers of 6 x 6 cells, ids 0 to 586.

analysis size

Resolution at which the markers are searched (default auto); the outputs stay relative to the whole frame.

  • auto: the frame halved until its width is 1920 pixels or less (1920 x 1080 for 3840 x 2160).
  • full: the size of the frame, for small markers.
  • 1/2: half its width and height, cheaper (4.2 ms instead of 6.2 ms at 1920 x 1080).

window

Radius of the area around each pixel whose mean brightness it is compared with, from 3 to 100 pixels (default 15). This local threshold copes with uneven light.

offset

How much darker than that mean a pixel must be to count as the ink of a marker, from 1 to 50 grey levels (default 7).

min size

Smallest side of a marker, from 8 to 500 pixels (default 20).

max size

Largest side of a marker, from 16 to 4000 pixels (default 2000).

error correction

Part of the bits a dictionary can correct that may be wrong in a marker, from 0 to 1 (default 0.6). At 0 only exact codes are read, as clean prints give; higher values read damaged or blurred markers.

max markers

Largest number of markers output, from 1 to 64 (default 32): the lowest ids first.

refine corners

When ON (default), each corner is the crossing of lines fitted to the sides of the marker, with subpixel precision. When OFF, the corners of the traced outline are used: the angles move by less than half a degree.

draw

When ON (default), draws on video out 1 the outline of each marker, a square on its top-left corner and a line from its center to the middle of its top edge. The marks grow with the frame, so that they stay visible on a screen: the outline is 2 pixels thick up to 1920 x 1080 and 4 at 3840 x 2160, drawn inward, and the square 7 pixels wide up to 1280 x 720, 13 at 1920 x 1080 and 25 at 3840 x 2160.

color

Color of the drawing (default $FF00FF00, green).

count

Number of markers found, from 0 to max markers.

input = a sheet of six ArUco 4x4 markers at 1280 x 720, id 7 turned a quarter clockwise, id 42 upside down
count = 6
ids = [0, 1, 2, 3, 7, 42]
x = [0.172, 0.5, 0.828, 0.172, 0.5, 0.828]
y = [0.264, 0.264, 0.264, 0.736, 0.736, 0.736]
angle = [0, 0, 0, 0, 90, 180]

ids

Array of the id of each marker, in increasing order. Two prints of one id give it twice.

x

Array of the x of the center of each marker (the crossing of its diagonals), from 0 (left edge) to 1 (right edge), in the order of ids.

y

Array of the y of the center of each marker, from 0 (top edge) to 1 (bottom edge).

angle

Array of the direction of the top edge of each marker, from 0 to 360 degrees, clockwise on the screen: 0 for an upright marker, 90 for a marker turned a quarter clockwise.

size

Array of the mean side of each marker, from 0 to 1 in frame widths.

corners x

Array of 4 values per marker: the x of its top-left, top-right, bottom-right and bottom-left corners as printed, so that they turn with the marker.

ids = [3, 7]
corners x = [TL of 3, TR of 3, BR of 3, BL of 3, TL of 7, TR of 7, BR of 7, BL of 7]

corners y

Array of 4 values per marker: the y of the same corners, in the same order.

Common Settings

info

show manual

Button. Opens the manual page of the selected object (or of its parent module for a control) in the web browser. If no page exists for this object, an error is traced in the trace panel.

For more details about information/help creation, see create-help-file.

description

Free multi-line text attached to the module, saved with the patch. When it is not empty, it is shown as the hint of the module (mouse over the module header in the patch) in place of the default module hint, even when the module hints are disabled.

ID's

visible only in god mode, see setup-panel-tab-expert.

unique ID

Read-only, not saved. Current private numeric ID of the object, used internally to identify it (for example as the target of a bind ID).

preset ID

Read-only, not saved. Private ID used to store and recall the values of this control in presets.

recreate ID

Button. Generates a new unique ID, original ID and preset ID for the object. Use it if you experience difficulties in Polyphonic mode or if two objects share the same ID. Preset values and binds referring to the old IDs are lost.

Object Remote Address

absolute

Read-only, not saved. Absolute address of the object in the Usine objects tree, built from the workspace root. This is the address to use to reach the object from scripts, the objects panel or remote messages. Only shown for objects that are registered in the objects list. See objects-address.

local

Read-only, not saved. Address of the object relative to the current patch, valid inside that patch only. See objects-address.

user addr

Free user-defined address for the object (empty by default). When set, the object is also registered in the objects tree under this name, so it can be reached independently of its position in the workspace (the value is also reported in the mouse-over and mouse-down chunks). Changing it rebuilds the objects list. Only available on objects that support a user address. See objects-address.

See also

version 7.0.250921

Edit All Pages