Image ROI Polygon
This function block allows users to define a region of interest (ROI) by drawing a polygon on an image using mouse clicks. The defined ROI can be used for further image processing.
📥 Inputs
Input Image
The image on which the polygon ROI will be drawn.
📤 Outputs
Output Image
The resulting image showing only the area defined by the drawn polygon.
Polygon
The coordinates of the polygon points that define the ROI.
🕹️ Controls
Mouse Click
Click on the image to add vertices of the polygon. Each click adds a point.
Key Press
C: Clears all points and the polygon.
U: Undoes the last added point.
🎨 Features
Interactive Drawing
Users can draw polygons directly on the image by clicking to set points, allowing for flexible ROI selection.
Dynamic Line Visualization
As users click to define the polygon, lines and points are dynamically drawn on the image for immediate visual feedback.
📝 Usage Instructions
Connect an Image: Link an image to the
Input Image
socket.Draw Polygon: Click on the image to add points. Connect at least three points to form a closed polygon.
Clear or Undo: Use the C key to clear all points or the U key to remove the last point.
Evaluate: Run the function block to obtain the output image focusing only on the defined ROI.
📊 Evaluation
When executed, this function block generates an output image highlighting only the area included within the polygon drawn by the user.
💡 Tips and Tricks
🛠️ Troubleshooting
Last updated