Draw Line
This function block provides a platform for users to draw lines on an image by clicking with the mouse. It includes the ability to clear drawings and undo the last action.
📥 Inputs
Image Any
The input image on which lines will be drawn.
Calculate All Points
A boolean control that determines if all points on the line should be calculated when a line is drawn.
📤 Outputs
Image Any
The modified image with drawn lines.
Line Coordinates
The coordinates of the drawn lines, returned as a list.
Angles
The angles of the drawn lines, calculated based on their slope.
🕹️ Controls
Press 'C'
To clear all lines from the image.
Press 'U'
To undo the last drawn line.
🎨 Features
Interactive Drawing
Users can interactively draw lines by clicking on the image.
Easy Clearing and Undoing
The ability to clear all drawings or undo the last action makes it easy to correct mistakes.
Angle Calculation
The block computes and returns angles for each drawn line based on the direction.
📝 Usage Instructions
Connect Input Image: Attach an image to the block through the
Image Any
input.Draw a Line: Click on the image to draw a line at the clicked position. Each click defines a point of the line.
Clear or Undo: Use the keyboard:
Press
C
to clear all lines.Press
U
to undo the last drawn line.
Evaluate Output: Run the block to retrieve the modified image, line coordinates, and angles of the drawn lines.
📊 Evaluation
When evaluated, this block will show the updated image with drawn lines and provide details regarding their coordinates and angles.
💡 Tips and Tricks
🛠️ Troubleshooting
Last updated