编写matlab代码完成已下任务:1读取和显示gantrycranepng;2转换为双精度型;3采用edge函数来进行边缘检测; J=edgeI ’prewitt’’both’; 在同一个figure窗口中显示原图和边缘图像;
%% 读取和显示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('边缘图像');
原文地址: https://www.cveoy.top/t/topic/eDI3 著作权归作者所有。请勿转载和采集!