🖥
🖥
🖥
🖥
AugeLab Studio Manual
English
Ask or search…
K
Comment on page

Find Contour

Find Contour Node Documentation

The Find Contour node in AugeLab Studio is designed to find contours in an input grayscale image and allows you to adjust the threshold value to find the desired contours. The node can process the input image and extract the contours based on the specified minimum and maximum contour area percentages.

Node Overview

The Find Contour node takes an input grayscale image and searches for contours within it. It provides the following outputs:
  • Selected Contour: The contour selected by the user from the list of detected contours. You can choose a specific contour to further analyze or use in subsequent nodes.
  • Contours: A list of all the detected contours in the input image.
  • Contour Image: An image with the selected contour highlighted in green and the others shown in grayscale.
  • Object Position: The (x, y) coordinates of the centroid of the selected contour.
  • Object Rotation: The rotation angle of the selected contour (in degrees).
  • Object Area: The area of the selected contour.
  • Object Count: The total number of proper contours found in the input image.

Node Properties

  • Node Title: Find Contour
  • Node ID: OP_NODE_FIND_CONTOUR2
  • Tooltip: Adjust threshold value to find contours

Inputs

  • Input: Grayscale image to be processed for contour detection.

Outputs

  • Selected Contour: The selected contour chosen by the user from the list of detected contours.
  • Contours: A list of all the detected contours in the input image.
  • Contour Image: An image with the selected contour highlighted in green and the others shown in grayscale.
  • Object Position: The (x, y) coordinates of the centroid of the selected contour.
  • Object Rotation: The rotation angle of the selected contour (in degrees).
  • Object Area: The area of the selected contour.
  • Object Count: The total number of proper contours found in the input image.

Node Widgets

The Find Contour node has the following widgets:
  • Minimum Contour Area Range Slider: A slider to set the minimum and maximum contour area as a percentage of the total image area. The node will ignore contours whose area falls outside this range.
  • Shape Approximation Method ComboBox: A dropdown menu to choose the shape approximation method for the detected contours. The available options are 'Default', 'Simple', 'Teh-Chin1', and 'Teh-Chin2'.
  • Contour Index ComboBox: A dropdown menu to select a specific contour from the list of detected contours. The user can choose a contour for further analysis or processing.

Widget Configurations

The behavior of the Find Contour node can be affected by the following widget configurations:
  • Minimum Contour Area Range Slider:
    • The slider allows you to set the range for the minimum and maximum contour area as a percentage of the total image area.
    • The node will ignore contours whose area falls outside this specified range.
  • Shape Approximation Method ComboBox:
    • The dropdown menu lets you choose the shape approximation method for the detected contours.
    • The available options are 'Default', 'Simple', 'Teh-Chin1', and 'Teh-Chin2'. Each method affects how the contours are approximated and detected.
  • Contour Index ComboBox:
    • The dropdown menu displays a list of detected contours along with their respective areas as percentages of the total image area.
    • You can select a specific contour from the list for further analysis or processing.

Usage

  1. 1.
    Drag and drop the Find Contour node from the node library onto the canvas in AugeLab Studio.
  2. 2.
    Connect a grayscale image to the input socket of the node.
  3. 3.
    Adjust the Minimum Contour Area range slider to set the desired range for the minimum and maximum contour areas.
  4. 4.
    Choose a shape approximation method from the Shape Approximation Method dropdown menu.
  5. 5.
    Click on the Contour Index dropdown menu to select a specific contour for further analysis or processing. This will highlight the chosen contour in the output image.
  6. 6.
    The output sockets will provide the results of the contour detection process, including the selected contour, all detected contours, the contour image, object position, rotation, area, and the total number of proper contours found.

Example

Let's walk through an example to illustrate how the Find Contour node works.
  1. 1.
    Drag and drop the Find Contour node onto the canvas.
  2. 2.
    Connect a grayscale image of an object with contours to the input socket of the node.
  3. 3.
    Adjust the Minimum Contour Area range slider to set the desired range for the minimum and maximum contour areas, e.g., 1% to 20%.
  4. 4.
    Choose the Simple shape approximation method from the Shape Approximation Method dropdown menu.
  5. 5.
    Click on the Contour Index dropdown menu to select a specific contour for further analysis.
  6. 6.
    The output sockets will provide the results of the contour detection process, including the selected contour, all detected contours, the contour image, object position, rotation, area, and the total number of proper contours found.

Notes

  • The Find Contour node is particularly useful for shape analysis and object detection tasks.
  • Adjusting the Minimum Contour Area range allows you to filter out unwanted contours based on their sizes.
  • Different shape approximation methods may yield different results in contour detection, so choose the most suitable method for your specific application.
That concludes the documentation for the Find Contour node in AugeLab Studio. This node provides a versatile way to find contours in grayscale images, allowing you to adjust the threshold value and choose the desired contours for further analysis and processing.