O'Reilly logo

Computer Vision with Python 3 by Saurabh Kapur

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required