%% 读取和显示gantrycrane.png I = imread('gantrycrane.png'); figure(1); subplot(1,2,1); imshow(I); title('原图');

%% 转换为双精度型 I = im2double(I);

%% 采用edge()函数来进行边缘检测 J = edge(I, 'prewitt', 'both');

%% 在同一个figure窗口中,显示原图和边缘图像 subplot(1,2,2); imshow(J); title('边缘图像');

MATLAB边缘检测:使用'prewitt'算子检测gantrycrane.png图像边缘

原文地址: http://www.cveoy.top/t/topic/nUW4 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录