I=imread('C:\Users\hydgl\Desktop\111.jpg');
figure(1),imshow(I);title('原圖');I1=rgb2gray(I); %將真彩色圖像轉(zhuǎn)換為灰度圖像
figure(2),subplot(1,2,1),imshow(I1);title('灰度圖');
figure(2),subplot(1,2,2),imhist(I1);title('灰度圖直方圖');
I2=edge(I1,'robert',0.08,'both'); %高斯濾波器,方差為0.08
figure(3),imshow(I2);title('robert算子邊緣檢測')
Error using edge>parse_inputs (line 587)Invalid input string: 'robert'.
Error in edge (line 190)[a,method,thresh,sigma,thinning,H,kx,ky] = parse_inputs(varargin{:});
錯誤不會改,前兩個圖能正確顯示,求幫助 |