Choose Line

This function block allows the user to select a specific line within a contour defined in an image. It calculates relevant properties of the chosen line, such as length and angle, while providing a visual representation of the selection.

πŸ“₯ Inputs

Generic Image The image where the contour is located.

Contour The contour from which lines will be chosen. The contour must be provided as input for selection.

πŸ“€ Outputs

Generic Image The original image with the chosen line drawn on it.

Length The calculated length of the selected line segment.

Point 1 The coordinates of the first endpoint of the selected line.

Point 2 The coordinates of the second endpoint of the selected line.

Angle The angle of the line with respect to the horizontal.

Line A representation of the selected line for further processing.

πŸ•ΉοΈ Controls

Choose a Line A dropdown menu to select a specific line from the contour.

Line Properties A label displaying the properties of the chosen line, including its endpoints, length, and angle.

🎨 Features

Interactive Line Selection Choose from multiple lines defined by contours, making it intuitive to select desired features.

Visual Feedback Provides a visual representation by drawing the contour and selected line on the image with different colors.

Mathematical Outputs Computes and displays properties of the selected line, making it easy for users to understand its geometry.

πŸ“ Usage Instructions

  1. Connect Inputs: Link a generic image to the Generic Image input and its corresponding contour to the Contour input.

  2. Select Line: Use the dropdown menu to select a specific line from the contour drawn on the image.

  3. View Properties: Observe properties of the chosen line (length, angle, endpoints) in the corresponding label area.

πŸ“Š Evaluation

Upon execution, this function block evaluates the contour in the image and allows the user to select a line, displaying its properties and visualizing it directly on the output image.

πŸ› οΈ Troubleshooting

No Contours Found

If no contours are displayed or selectable, ensure that the input contour is valid and properly connected. You could also check the previous steps to verify that the contour has been accurately detected.

Length Calculation Issues

Ensure that the two selected points correspond correctly to the line segment you wish to analyze. If the points are not valid or if the selected line is too short, some lengths may appear incorrectly.

Angle Not Displaying Correctly

If the angle appears incorrect, check that the selected line’s collinear endpoints are being calculated properly. Adjust the input contour if necessary.

Last updated