Other
Program to detect edges in image by using the CANNY Algorithm
% This demo is known to work with:
% Matlab Version 7.10.0.499 (R2010a)
% Image Processing Toolbox Version 7.0 (R2010a)
A = imread('jump.jpg');
% Marr/Hildreth edge detection
% with threshold forced to zero
MH1 = edge(A,'log',0,1.0);
MH2 = edge(A,'log',0,2.0);
MH3 = edge(A,'log',0,3.0);
MH4 = edge(A,'log',0,4.0);
% form mosaic
EFGH = [ MH1 MH2; MH3 MH4];
%% show mosaic in Matlab Figure window
log = figure('Name','Marr/Hildreth: UL: s=1 UR: s=2 BL: s=3 BR: s=4');
iptsetpref('ImshowBorder','tight');
imshow(EFGH,'InitialMagnification',100);
% Canny edge detection
[C1, Ct1] = edge(A,'canny',[],1.0);
[C2, Ct2] = edge(A,'canny',[],2.0);
[C3, Ct3] = edge(A,'canny',[],3.0);
[C4, Ct4] = e
matlab
canny
边缘
检测器
No comment