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

Why have pixels with large gradient values?

Consider a solid black box (refer to Figure 13). All the pixels within the black box have similar pixel values, whereas, the pixel values on the boundary or the edge vary significantly from their neighboring pixels. Therefore, it makes sense to consider pixels with large gradient values:

Figure 13: Image to depict why pixels with large values are selected

The kernel used in the Sobel edge detector algorithm is as follows:

Here is a code to find edges using the scikit-image:

>>> from skimage import ...

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