Skip to main content
Skip table of contents

Contour

Filter

Sobel

Applies the Sobel operator – calculates gradient magnitude and highlights edges and intensity changes.

The Sobel filter highlights edges by measuring brightness changes in the image. It calculates gradients in the x- and y-directions and combines them to create an edge strength. This makes object outlines visible, robust against slight noise.

Flow

image-20250901-093009.png

Parameter set

Parameter

Type

Description

Value range

Effect Min

Effect Max

Image

Image

Requires a grayscale image. This can be created by using the "Convert To Grayscale" node.

image-20250901-091538.png
image-20250901-091643.png

Order X

Int32

Specifies the gradient order in the x-direction.

0…2

image-20250901-092049.png
image-20250901-092112.png

Order Y

Int32

Specifies the gradient order in the y-direction.

0…2

image-20250901-092150.png
image-20250901-092237.png

Kernel Size (Pixel)

Int32

A high value increases the kernel size for calculating larger surface gradients. The size of the extended Sobel kernel must be 1, 3, 5, or 7.

1,3,5,7

image-20250901-092428.png
image-20250901-092527.png

Scale

Single

Scaling factor applied to the calculated gradient.

>0.1

image-20250901-092841.png

image-20250901-092816.png

Delta

Single

Value added to the calculated gradient.

image-20250901-093227.png
image-20250901-093252.png

Canny

Applies the Canny edge detection algorithm – detects edges based on intensity gradients in the image.

The Canny detector detects edges with exceptional precision through multi-stage processing (smoothing, gradient, non-maximum suppression, and hysteresis). It delivers thin, clear contours and reliably suppresses noise. This makes it suitable for precise edge analysis and complex scenes.

Flow

image-20250901-101515.png

Parameter set

Parameter

Type

Description

Value range

Effect Min

Effect Max

Image

Image

Requires a grayscale image. This can be created by using the "Convert To Grayscale" node.

image-20250901-091538.png
image-20250901-091643.png

Threshold

Single

The value must be between 0 and 255. Higher values ​​increase edge sensitivity, potentially detecting more edges.

0…255

image-20250901-101336.png
image-20250901-101410.png

Laplacian

Applies the Laplace operator – calculates second derivative and enhances areas with rapid intensity changes.

The Laplacian filter uses the second derivative and marks edges with sharp intensity changes. It detects edges regardless of their direction. Because it is sensitive to noise, it is often combined with prior smoothing.

Flow

image-20250901-101834.png

Parameter set

Parameter

Type

Description

Value range

Effect Min

Effect Max

Image

Image

Requires a grayscale image. This can be created by using the "Convert To Grayscale" node.

image-20250901-091538.png
image-20250901-091643.png

Kernel Size (Pixel)

Int32

The value must be positive and odd. A high value increases the kernel size for calculating larger surface gradients.

1,3,5,7

image-20250901-102142.png

image-20250901-102202.png

Scale

Single

Scaling factor applied to the calculated gradient.

>0.1

image-20250901-102245.png
image-20250901-102305.png

Delta

Single

Value added to the calculated gradient.

image-20250901-102340.png
image-20250901-102512.png

Find Contours Basic

This node detects and outlines contours (white areas) in a binary image. Suitable inputs include the Binary Threshold, Adaptive Threshold, Color Threshold, Canny, or other methods that generate a binary image from a grayscale image. Three modes are available: Inner Contour, Outer Contour, or Both Contours – these allow the inner and outer contours of a surface to be detected. The detected contours can then be used for further processing.

Flow

image-20250901-202715.png

Parameter set

Image preparation

Type

Description

Value range

Before

Thereafter

Image

Image → Region

Converting an image into a region using the Color Threshold node. The desired color is previously defined in the Make Color node—for example, yellow.

image-20250901-202839.png
image-20250901-202852.png

Image

Image → Region

The same conversion of an image into a region using the Color Threshold node. The desired color is previously defined in the Make Color node—for example, white.

image-20250901-202839.png
image-20250901-203433.png

Parameter

Type

Description

Value range

Before

Thereafter

Detection Mode

InnerContour

Detects only the inner contours of objects. This mode is useful when you want to focus on closed shapes within a binary region and ignore the outer boundary.

image-20250901-203433.png
image-20250901-203704.png

OuterContour

Detects only the outermost contours of objects. This mode is suitable for isolating the outer boundaries of objects without considering nested structures.

image-20250901-203433.png
image-20250901-203755.png

BothContours

Detects both the outermost contours and all nested inner contours. This mode is ideal for analyzing hierarchical relationships between contours, for example, when objects are enclosed by other objects.

image-20250901-203433.png
image-20250901-203858.png

Find Contour Advanced

This node detects and outlines contours (white areas) in a binary image. For it to work, the objects must be white – if necessary, the Invert Pixel node can be used for preprocessing. The detected contours are output sorted from largest to smallest and can be used for further processing.

Compared to the Find Contour Basic node, the Find Contour Advanced node allows you to control the process and thus the processing speed, as well as to specifically influence the sorting of the output contours.

Flow

image-20250901-205440.png

Parameter set

Image preparation

Type

Description

Before

Thereafter

Image

Image → Region

Converting an image into a region using the Color Threshold node. The desired color is previously defined in the Make Color node—for example, yellow.

image-20250901-202839.png
image-20250901-202852.png

Image

Image → Region

The same conversion of an image into a region using the Color Threshold node. The desired color is previously defined in the Make Color node—for example, white.

image-20250901-202839.png
image-20250901-203433.png

Parameter

Type

Description

Before

Thereafter

Detail Level

ChainApprxNone

Saves all points of the contour (very accurate, but memory intensive).

image-20250901-203433.png
image-20250901-203858.png

ChainApproxSimple

Reduces points to a minimal representation (e.g. for a rectangle only 4 corner points).

image-20250901-203433.png
image-20250901-203858.png

ChainApproxTc89L1

A Douglas-Peucker-like method that simplifies contours with fewer points (more accurate but more compact).

image-20250901-203433.png
image-20250901-203858.png

ChainApproxTc89Kcos

Similar to Tc89L1, but uses a different heuristic for simplification (often even smoother approximation).

image-20250901-203433.png
image-20250901-203858.png

Retrieval Mode

ListByArea

Returns all contours and sorts them by area (from largest to smallest).

image-20250901-203433.png
image-20250901-203858.png

External

Returns only the outer contours, inner structures are ignored.

image-20250901-203433.png
image-20250901-203755.png

Ccomp

Creates a two-level hierarchy: outer contours and their directly contained holes.

image-20250901-203433.png
image-20250901-203858.png

Tree

Builds a hierarchy of contours (e.g. outer contour and holes in it).

image-20250901-203433.png
image-20250901-203858.png

Notes on the parameter set:

Detail Level

In 90% of cases, ChainApproxSimple is the right choice. It's fast, memory-efficient, and provides stable vertices/vertices for most applications.

The other options are useful in the following situations:

  • ChainApproxNone – when every pixel point is needed (e.g., precise lengths/perimeters on a pixel-by-pixel basis, downstream smoothing/resampling), which, however, consumes memory and time.

    ChainApproxTc89L1 / Tc89Kcos – when contours are long or noisy and a compact, smooth representation is required (shape matching, tracking). Kcos is often a bit smoother, while L1 is a bit more angular.

Retrieval Mode

For most applications, External is the recommended setting because it reliably detects the external object contours and hides internal structures.

  • If the entire hierarchy (e.g., outer contour and all holes/subcontours) needs to be captured, Tree is suitable.

  • Ccomp is sufficient for a simplified outer/inner relationship.

  • ListByArea is useful if the largest or smallest contours need to be processed further.

👉 Recommendation: ListByArea or External as standard, Tree if internal structures are important.

Draw Contour

This node allows contours to be displayed directly in the image. This makes it easier to visualize and verify the outlines of previously detected objects or regions.

Important: Before using this node, contours must first be found. To do this, use the Find Contours node and connect its output to the Contours input of this node.

Flow

image-20250901-211930.png

Parameter set

Parameter

Type

Description

Input

Return

Image

Image → Input

The image in which you want to draw the outlines.

image-20250902-195908.png
image-20250902-195849.png

Contours

Polyline Array

A polyline is a continuous line consisting of several connected segments stored in an array that represent the outlines or edges of contours in an image.

To do this, a “Find Contours Basic” or “Find Contours Advanced” node must first be used.

Color

Beispiel 1: Green

Choose a color to highlight the outlines.

In this example, the outlines are drawn in green.

Other colors:

  • Beige

  • Black

  • Blue

  • Green

  • YellowGreen

  • Red

  • White

  • Yellow

image-20250902-195849.png

Beispiel 2: Red

Choose a color to highlight the outlines.

In this example, the outlines are drawn in red.

Other colors:

  • Beige

  • Black

  • Blue

  • Green

  • YellowGreen

  • Red

  • White

  • Yellow

image-20250902-200055.png

Thickness (Pixel)

Int32

Select the line thickness. A higher number results in a thicker outline. The value must be greater than 1.

image-20250902-200422.png
image-20250902-200444.png

Get Contour By Index

Retrieves contours from a polyline array for a specified index range. Indexing is done by distance from the image origin (0,0), with the nearest contour drawn first. This requires a previous contour search using the "Find Contours Basic" or "Find Contours Advanced" node.

In this way, individual or multiple contours can be specifically selected for further processing.

Flow

image-20250902-201757.png

Paramerter set

Parameter

Type

Description

Contours

Polyline Array

A polyline is a continuous line consisting of several connected segments stored in an array that represent the outlines or edges of contours in an image.

To do this, a “Find Contours Basic” or “Find Contours Advanced” node must be used beforehand.

Min Index

Int32

Minimum index value of the contours to be retrieved. The minimum value is contour length 0.

Max Index

Int32

Maximum index value of the contours to retrieve. The maximum value is contour length - 1.

Get Contour By Area

This node filters contours by area, sorting from largest to smallest. This node is best suited if you're looking for a specific area size or want to filter out all contours. A previous contour search using the "Find Contours Basic" or "Find Contours Advanced" node is required.

Flow

image-20250902-204154.png

Parameterset

Parameter

Type

Description

Contours

Polyline Array

A polyline is a continuous line consisting of several connected segments stored in an array that represent the outlines or edges of contours in an image.

To do this, a “Find Contours Basic” or “Find Contours Advanced” node must be used beforehand.

Min Area Pixel

Int32

Minimum area size of the contours to be included. The minimum value is 0.

Max Area Pixel

Int32

Maximum area size of the contours to be included.

Contours to Region

This node converts contours into a binary image (region) – usable as a mask for further processing. This requires a previous contour search using the "Find Contours Basic" or "Find Contours Advanced" node.

Flow

image-20250902-204521.png

The return type is a Region. This data type can be converted back to an image format or the image data type using the "Region To Image" node.

Parameter set

Parameter

Type

Description

Example 1

Example 2

Contours

Polyline Array

A polyline is a continuous line consisting of several connected segments stored in an array that represent the outlines or edges of contours in an image.

To do this, a “Find Contours Basic” or “Find Contours Advanced” node must be used beforehand.

Region Width (Pixel)

Int32

The width of the binary image, which determines the horizontal size of the mask or region.

Width = 600
Heigth = 600

image-20250902-205408.png


Width = 1200
Height = 1200

image-20250902-205242.png

Region Height (Pixel)

Int32

The height of the binary image, which determines the vertical size of the mask or region.

Mode

Enum: Fill

The contours are filled with white color to create a solid area.

image-20250902-205408.png
image-20250902-205242.png

Enum: Border

Only the edges of the contours are drawn in white.

image-20250902-205621.png
image-20250902-205717.png

Return

Region

Binary image processed in black and white.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.