Draw Lines

Block Category: Draw

Input Image Format

Input Image Requirements: None

Description: The Draw Lines block draws a line on an image based on two inputs to the block:

      image: Matrix input treated as an image.

      lLines: Specifies the line characteristics to be drawn. Input to this tab is the Hough Lines block.

Color: Specifies the line color.

Line Smoothness: Specifies an anti-aliasing algorithm for drawing the rectangle. The algorithms are trade-offs between computation and smoothness of non-square lines. The choices are:

      4-connected: Uses Von Neumann algorithm.

      8-connected: Uses Moore Neighborhood algorithm.

      Anti-aliased: Uses Xiaolin Wu algorithm.

Random: When activated, it overrides the color selection and colors the lines in random colors.

Thickness: Specifies line thickness as an integer greater than 0.

Example

In this example, Canny’s Edge detects and retains edges that meet the threshold specifications. The Hough Lines block finds straight lines within the detected edges based on intersection, line length, and line gap specifications. The Draw Lines block displays the image with red lines drawn on the detected lines.

HoughLinesExample