预览加载中,请您耐心等待几秒...
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

亲,该文档总共25页,到这已经超出免费预览范围,如果喜欢就直接下载吧~

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

MATLAB图像处理函数汇总(二) 21.dct2功能:进行二维离散余弦变换.语法:B=dct2(A)B=dct2(A,m,n)B=dct2(A,[mn])举例RGB=imread('autumn.tif');I=rgb2gray(RGB);J=dct2(I);imshow(log(abs(J)),[]),colormap(jet(64)),colorbarJ(abs(J)<10)=0;K=idct2(J)/255;imshow(K)相关命令:fft2,idct2,ifft222.dctmtx功能:计算离散余弦变换矩阵.MATLAB高级应用——图形及影像处理330语法:D=dctmtx(n)相关命令:dct223.dilate功能:放大二进制图像.语法:BW2=dilate(BW1,SE)BW2=dilate(BW1,SE,alg)BW2=dilate(BW1,SE,...,n)举例BW1=imread('text.tif');SE=ones(6,2);BW2=dilate(BW1,SE);imshow(BW1)figure,imshow(BW2)相关命令:bwmorph,erode24.dither功能:通过抖动增加外观颜色分辨率,转换图像.语法:X=dither(RGB,map)BW=dither(I)相关命令:rgb2ind25.double附录MATLAB图像处理命令331功能:转换数据为双精度型.语法:B=double(A)举例A=imread('saturn.tif');B=sqrt(double(A));相关命令:im2double,im2uint,uint826.edge功能:识别强度图像中的边界.语法:BW=edge(I,'sobel')BW=edge(I,'sobel',thresh)BW=edge(I,'sobel',thresh,direction)[BW,thresh]=edge(I,'sobel',...)BW=edge(I,'prewitt')BW=edge(I,'prewitt',thresh)BW=edge(I,'prewitt',thresh,direction)[BW,thresh]=edge(I,'prewitt',...)BW=edge(I,'roberts')BW=edge(I,'roberts',thresh)[BW,thresh]=edge(I,'roberts',...)BW=edge(I,'log')BW=edge(I,'log',thresh)BW=edge(I,'log',thresh,sigma)[BW,threshold]=edge(I,'log',...)BW=edge(I,'zerocross',thresh,h)[BW,thresh]=edge(I,'zerocross',...)BW=edge(I,'canny')BW=edge(I,'canny',thresh)BW=edge(I,'canny',thresh,sigma)MATLAB高级应用——图形及影像处理332[BW,threshold]=edge(I,'canny',...)举例I=imread('rice.tif');BW1=edge(I,'prewitt');BW2=edge(I,'canny');imshow(BW1);figure,imshow(BW2)27.erode功能:弱化二进制图像的边界.语法:BW2=erode(BW1,SE)BW2=erode(BW1,SE,alg)BW2=erode(BW1,SE,...,n)举例BW1=imread('text.tif');SE=ones(3,1);BW2=erode(BW1,SE);imshow(BW1)figure,imshow(BW2)相关命令:bwmorph,dilate附录MATLAB图像处理命令33328.fft2功能:进行二维快速傅里叶变换.语法:B=fft2(A)B=fft2(A,m,n)举例loadimdemossaturn2imshow(saturn2)B=fftshift(fft2(saturn2));imshow(log(abs(B)),[]),colormap(jet(64)),colorbar相关命令:dct2,fftshift,idct2,ifft229.fftn功能:进行n维快速傅里叶变换.语法:B=fftn(A)B=fftn(A,siz)相关命令:fft2,ifftn30.fftshiftMATLAB高级应用——图形及影像处理334功能:把快速傅里叶变换的DC组件移到光谱中心.语法:B=fftshift(A)举例B=fftn(A);C=fftshift(B);相关命令:fft2,fftn,ifftshift31.