matlab图像处理基础实例

2026/1/27 2:49:19

注意:找不到wiener函数

>> i=imread('eight.tif'); >> i=double(i); >> imshow(i,[])

>> h=[0 1 0;1 -4 0;0 1 0]; >> j=conv2(i,h,'same'); >> k=i-j; >> hold

Current plot held >> figure

>> imshow(k,[])

i=imread('eight.tif');

>> subplot(211),imshow(i),title('pri')

>> H=fspecial('laplacian');%应用laplacian滤波进行图像锐化 >> laplacianH=filter2(H,i);%在5*5邻域内进行维纳滤波 >> subplot(223),imshow(laplacianH) >> title('laplacian算子锐化图像') >> H=fspecial('prewitt'); >> prewittH=filter2(H,i);

>> subplot(224),imshow(prewittH) >> title('prewitt模板锐化图像')

>> i=imread('saturn.png'); >> j=imnoise(i,'salt',.02);

>> subplot(121),imshow(j),title('含噪图片') >> j=double(j);f=fft2(j); >> g=fftshift(f); >> [m,n]=size(f); >> n=3;d0=20;

>> n1=floor(m/2);n2=floor(n/2); >> for i=1:m for j=1:n

d=sqrt((i-n1)^2+(j-n2)^2);h=1/(1+.414*(d/d0)^(2*n)); g(i,j)=h*g(i,j); end end

>> g=ifftshift(g);

>> g=uint8(real(ifft2(g))); >> subplot(122),imshow(g)

>> title('三阶巴特沃斯滤波结果')

>> rgb=imread('peppers.png');

>> subplot(221),imshow(rgb),title('pri')

>> subplot(222),imshow(rgb(:,:,1)),title('red part') >> subplot(223),imshow(rgb(:,:,2)),title('green part') >> subplot(224),imshow(rgb(:,:,3)),title('blue part')


matlab图像处理基础实例.doc 将本文的Word文档下载到电脑
搜索更多关于: matlab图像处理基础实例 的文档
相关推荐
相关阅读
× 游客快捷下载通道(下载后可以自由复制和排版)

下载本文档需要支付 10

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:xuecool-com QQ:370150219