MATLAB implementation for Canny edge detector, including example input and outputs
Implemented by:
This project covers a custom implementation of John F. Canny's edge detection algorithm and some experimental improvements explained in the articles of Zhou et al (2011) and Tao and Yue-hong (2015). The implementation includes:
-
Pre-processing Gray-scale conversion and double precision to improve image's reliability
-
Smoothing Eliminating possible noise using a smoothing kernel (Gaussian kernel in this case)
-
Derivation Edge detection step along x & y axes.
-
Non-max Suppression First signature step of Canny's algorithm, which makes the detected edge length to 1 pixel.
-
Hysteresis Thresholding Second signature step of Canny's algorithm, which keeps the weak edges if they're neighbouring strong edges and eliminate otherwise.
In addition classical methods of implementing these steps, there is also other ways of thresholding (such as otsu thresholding) is tried to obtain different results for comparison.
For further information refer to final report of the project
-
The entry-point of the project is the file "thecleverguy.m". Running this file should automatically use needed scripts from the repository or from the MATLAB library.
-
Input image is can be changed by modifying the 9th line of the "thecleverguy.m" which is the following:
img = imread('images\Taryn Harbridge.png');