Image Edge Detection algorithm
(1) Robert operator Edge Detection
(2) Sobel operator Edge detection
(3) Prewitt operator Edge detection
(4) Log operator edge detection
(5) Canny edge detection
The implementation of MATLAB.
In fact, just drop Bao, a little algorithm does not write
Try to write it again with OpenCV.
I=imread (' 1.jpg '); I0=rgb2gray (i); subplot (231); imshow (i); Bw1=edge (I0, ' Roberts ', 0.16); subplot (232); Imshow (BW1); title (' Robert Operator Edge Detection ') Bw2=edge (I0, ' Sobel ', 0.16); subplot ( 233); Imshow (BW2); title (' Sobel operator Edge Detection ') Bw3=edge (I0, ' Prewitt ', 0.16) subplot (234); Imshow (BW3); title (' Prewitt Operator edge detection ‘); Bw4=edge (I0, ' log ', 0.012); subplot (235); Imshow (BW4); title (' Log Operator Edge detection ') Bw5=edge (I0, ' Canny ', 0.2); subplot (236); Imshow (BW5); title (' Canny Operator Edge detection ')
Edge detection algorithm of classical image based on Matlab