Line Tracking Example

Line tracking blocks let HUSKYLENS 2 detect line paths, measure length, angle and XY components, and count branches at intersections. It’s like a map reader that outputs each road’s direction. UNIHIKER M10 displays whether lines exist, the nearest line’s data, total line count and selected branch info.

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:

Interface Diagram

Output Result: As shown, point the HUSKYLENS camera at a map with lines. Observe the UNIHIKER M10 screen output, which displays data such as the current line's length and angle. When the line has multiple branches, it can output the number of branches and the X-component data of a specified line branch, starting counterclockwise.

Interface Diagram

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?

TOP