資源描述:
《中值濾波+高斯濾波+二值化》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在學(xué)術(shù)論文-天天文庫。
1、中值濾波+高斯濾波+二值化Roberts邊緣檢測>>I=imread('E:/study/k.jpg');>>X=rgb2gray(I);>>X=im2double(X);>>g=medfilt2(X,[33],'symmetric');>>g1=im2uint8(g);>>>>h=fspecial('gaussian');>>gau=imfilter(g1,h,'replicate');>>>>bw=im2bw(gau,0.5);>>imshow(bw);>>>>R=edge(bw,'roberts');>>figu
2、re,imshow(R);>>I=imread('E:/study/c.jpg');>>imwrite(I,'c.jpg');>>imfinfo('c.jpg')ans=Filename:'c.jpg'FileModDate:'20-Jul-201117:39:36'FileSize:2503Format:'jpg'FormatVersion:''Width:163Height:164BitDepth:24ColorType:'truecolor'FormatSignature:''NumberOfSamples:3C
3、odingMethod:'Huffman'CodingProcess:'Sequential'Comment:{}>>X=rgb2gray(I);>>X=im2double(X);>>m=medfilt2(X,[33],'symmetric');>>m1=im2uint8(m);>>h=fspecial('gaussian');>>g=imfilter(m1,h,'replicate');>>>>imshow(I),imwrite(I,'c.jpg'),title('原圖');>>figure,imshow(g),im
4、write(g,'gau.jpg'),title('中值濾波+高斯濾波');>>>>S=edge(g,'sobel');>>