Edge detection is another popular image processing technique (http://en.wikipedia.org/wiki/Edge_detection). scikit-image has a Canny filter implementation based on the standard deviation of the Gaussian distribution, which can perform edge detection out of the box. Besides the image data as a 2D array, this filter accepts the following parameters:
We will use the same image as in the previous recipe. The code is almost the same (see
edge_detection.py). Pay extra attention to the line where we call the Canny filter function:
from sklearn.datasets import load_sample_images import matplotlib.pyplot as plt import skimage.feature dataset ...