Canny Edge Detection Algorithm | OpenCV | Deep Learning
Canny Edge Detection is a popular edge detection algorithm.
The Canny edge detector is an edge detection operator that uses a multi-stage algorithm to detect a wide range of edges in images.
Process of Canny Edge Detection Algorithm:
Apply Gaussian filter to smooth the image in order to remove the noise
Find the intensity gradients of the image.
Apply non-maximum suppression to get rid of spurious response to edge detection.
Apply double threshold to determine potential edges.
Track edge by hysteresis: Finalize the detection of edges by suppressing all the other edges that are weak and not connected to strong edges.
steps:
Download openCV library using command pip install opencv-python.
Go to your IDE and write the code as shown below.
Run the code to get desired output.
Operation of Canny Algorithm in openCV:
Write the code in python program file and execute it. There is no need to import numpy and matplotlib in this algorithm.
Output:
The output is basically a difference between normal image and edge detection image.