📄 edge_check.m
字号:
%边缘检测程序
%穆军 2008年10月
%
%
im= imread('olympic.jpg'); % 由文件读取
image(im); % 显示图片
figure(2); % create the picture window
bw= double(rgb2gray(im)); % transfer to double
image(bw); %display the picture
figure(3)
gradkernel= [-2 2];
dx= abs(conv2(bw, gradkernel, 'same')); %edge is easy to chech after two dimensional convolution
image(dx); %display
[dx,dy] = gradient(bw); %
gradmag= sqrt(dx.^2 + dy.^2); %get the square root
image(gradmag); %display the picture edge
colormap(gray(255))
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -