On this page
vision.line
Configures native Hough line detection and returns a line value.
Syntax
Atlas Script
vision.line(roi?, threshold?, min_area?, enabled?)Parameters
roiOptional- Optional region of interest: a four-value [x, y, width, height] array. Pass null when the method accepts a full-frame scan.
thresholdOptional- Detection or matching threshold. Higher values require a stronger match.
min_areaOptional- Minimum detected area to retain. Smaller candidates are ignored.
enabledOptional- 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 line.
Remarks
Configures native Hough line detection and returns a line value. Read/set enabled, overlay, roi, threshold, min_area; read results, count, target.
Examples
Detect circles and lines.atlas
circle circles = vision.circle(null, 0.45, 12, true);
line lines = vision.line(null, 0.45, 20, true);
event on_frame() {
ui.status(string.format("Circles {} lines {}", circles.count, lines.count));
}