Edge (Canny) Operator

The following Operator provides an edge detection by using the Canny-Algorithm. This operation can have a positive impact on contour detection.


The following image visualizes an exemplary usage of the operators’ functionality:


Dockwidget functionalities

The dockwidget inherits the adaption of the thresholds needed for the Canny algorithm (upper and lower). The used scale from 0 to 1000 each can be adjusted by using the scrollbar for a dynamic approach and the input field on the right side by directly inserting the required threshold value.

The following rules apply to the definition of the thresholds:

  1. If a pixel gradient value is higher than the upper threshold, the pixel is accepted as an edge.

  2. If a pixel gradient value is below the lower threshold, it is rejected.

  3. If the pixel gradient is between the two thresholds, then it will be accepted only if it is connected to a pixel that is above the upper threshold.

Canny recommended a upper : lower ratio between 2 : 1 and 3 : 1. Which of the two sliders is the upper limit or lower limit does not matter. The higher value is the upper limit, the one with the lower value is the lower limit.

The necessary calculations will be done instantly after defining the ratio, and the result directly affects the image’s appearance within the graphics view.


The image noise influences the results of the edge detection. By filtering out the noise, incorrect edge detection is avoided. The dropdown menu consists of values between 0 and 2, which aligns to the level of suppression. The lower the value, the more noise is suppressed.

For increased accuracy, the L2 Gradient can be additionally applied. The L2 Gradient results in better detection results but inherits a higher computational intensity.

By toggling the On/Off Checkbox, the modifications of this Operator can be hidden for other upcoming operations.

Toolbar functionalities

Currently, there is no unique toolbar for the Edge Operator available.