Browse docsvision.contour
On this page
API method

vision.contour

Configures native contour/blob extraction and returns a contour value.

Syntax

Atlas Script
vision.contour(lower, upper, roi?, min_area?, enabled?)

Parameters

lower
Lower HSV threshold array for the accepted color range.
upper
Upper HSV threshold array for the accepted color range.
roi Optional
Optional region of interest: a four-value [x, y, width, height] array. Pass null when the method accepts a full-frame scan.
min_area Optional
Minimum detected area to retain. Smaller candidates are ignored.
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 contour.

Remarks

Configures native contour/blob extraction and returns a contour value. Read/set enabled, overlay, roi, lower, upper, min_area; read results, count, target.

Examples

Count contour blobs.atlas
const centerRoi = [0.25, 0.25, 0.50, 0.50];
contour blobs = vision.contour([0, 90, 80], [15, 255, 255], centerRoi, 40, true);

event on_frame() {
    ui.status(string.format("Blobs: {}", blobs.count));
}
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.