Line Tracking Example
HUSKYLENS 2 line tracking reads line length, angle, X/Y and branch count; it’s like a smart map that reports every turn to your robot.
1.Line Tracking Blocks
Before You Start:
1.1 Recognize Intersections and Output Data
Under the Line Tracking function, HUSKYLENS 2 can mark the trajectory of the line in the frame and acquire the current line's length, angle, and X, Y components. When the line branches, it can get the number of branches at the intersection and the corresponding data for each branch, starting counterclockwise.
Example Program:
Output Result: As shown, point the HUSKYLENS camera at a map with lines. Observe the Mind+ serial port output, which can display data such as the current line's length and angle. When the line has multiple branches, it can output the number of branches.
1.2 Line Tracking Blocks Description
| block | Description |
|---|---|
|
Used to obtain one set of Line Tracking data under the Line Tracking function of HUSKYLENS 2. |
|
Determines whether lines exist in the current frame. |
|
Obtains data for the line closest to the crosshair, including X component,Y component,angle,length. |
|
Gets the total number of detected lines on the screen. |
|
When multiple lines appear, obtaining datas of a specified branch. |
Was this article helpful?
