Find Contour
This function block allows users to detect contours in a grayscale image. It provides options to choose the contour approximation method and set a minimum area for detected contours. The results include the selected contour, its position, rotation, and area.
📥 Inputs
Input Image (Gray)
A grayscale image in which contours will be detected.
📤 Outputs
Selected Contour
The contour that is currently selected based on user input.
Contours
A list of all detected contours from the input image.
Contour Image
The original image with the selected contour highlighted.
Object Position
The position (center) of the selected contour.
Object Rotation
The rotation of the selected contour.
Object Area
The area of the selected contour.
Object Count
The total number of detected contours.
🕹️ Controls
Minimum Contour Area %
A slider that sets the minimum area percentage for contours to be considered valid.
Approximation Method
A dropdown to choose the contour approximation method, such as Default, Simple, or various Teh-Chin methods.
Select Contour Object
A dropdown to select a specific contour from the list of detected contours.
🎨 Features
Dynamic Contour Detection
Capable of detecting contours in real time while providing visual feedback.
Multiple Methods for Contour Approximation
Users can choose from various approximation methods to fine-tune the detection process.
Detailed Outputs
Provides not only the detected contours but also relevant attributes such as area and rotation.
📝 Usage Instructions
Input Image: Connect a grayscale image to the
Input Image (Gray)
input.Set Minimum Area: Adjust the
Minimum Contour Area %
slider to filter out small contours that are not of interest.Select Approximation Method: Choose the desired contour approximation method from the dropdown.
Run the Node: Evaluate the block and examine the detected contours and their attributes.
Select Specific Contour: If needed, select a specific contour from the
Select Contour Object
dropdown to focus on that contour's details.
📊 Evaluation
When executed, this function block generates a detailed analysis of contours within the input image, returning the selected contour alongside visual output.
💡 Tips and Tricks
🛠️ Troubleshooting
Last updated