Browse docsvision.track
On this page
API method

vision.track

Configures native tracking and returns a track value.

Syntax

Atlas Script
vision.track(source?, roi?, enabled?)

Parameters

source Optional
Optional source label associated with this configured value.
roi Optional
Optional region of interest: a four-value [x, y, width, height] array. Pass null when the method accepts a full-frame scan.
enabled Optional
Optional boolean that turns this configured tool on or off. Use true to process it and false to keep its configuration without running it.

Return value

Returns track.

Remarks

Configures native tracking and returns a track value. All arguments are optional and enabled defaults to true. The current pipeline tracks all detections: source only labels emitted output, while roi is stored and re-emitted but not applied by RunTrackerTool. Read/set enabled, overlay, roi; read source, results, count, target.

Examples

Track detections across frames.atlas
color candidates = vision.color([0, 90, 80], [15, 255, 255], null, 20, true);
track activeTracks = vision.track("candidate", null, true);

event on_frame() {
    target activeTrack = activeTracks.target;
    if (activeTrack == null) {
        ui.status(string.format("Detections {} tracks 0", candidates.count));
        return;
    }
    ui.rect(activeTrack.box.x, activeTrack.box.y, activeTrack.box.width, activeTrack.box.height, rgb.cyan, 2, false);
    ui.status(string.format("Detections {} tracks {} best {}", candidates.count, activeTracks.count, activeTrack.text));
}
Reference details are generated from the Atlas Script schema in this documentation source snapshot. Confirm release-specific behavior in the Atlas for Windows build you use.