Canny edge detector

The Canny edge detector is another very important algorithm. It also uses the concept of gradients like in the Sobel edge detector, but in Sobel we only considered the magnitude of the gradient. In this we will also use the direction of the gradient to find the edges.

This algorithm has four major steps:

  1. Smoothing: In this step, the Gaussian filter is applied to the image to reduce the noise in the image.
  1. Finding the gradient: After removing the noise, the next step is to find the gradient magnitude and direction by calculating the x-derivative and y-derivative. The direction is important, as the gradient is always perpendicular to the edge. Therefore, if we know the direction of the gradient, we can find the direction ...

Get Computer Vision with Python 3 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.