1、47.sim2bw 1848.im2col 1949.im2double 1950.im2uint8 1951.im2uint16 1952.imadjust 2053.imapprox 2055.imcrop 2156.imfeature 2157.imfinfo 2158.imhist 2159.immovie 2260.imnoise 2261.impixel 2263.imread 2364.imresize 2465.imrotate 2466.imshow 2467.imwrite 2568.ind2gray 2569.ind2rgb 2570.iptgetpref 2671.ip
2、tsetpref 2672.iradon 2673.isbw 2674.isgray 2775.isind 2776.isrgb 2777.makelut 2778.mat2gray 2779.mean2 2880.medfilt2 2881.montage 2882.nlfilter 2983.ntsc2rgb 2984.ordfilt2 2985.phantom 2986.pixval 3087.qtdecomp 3088.qtgetblk 3089.qtsetblk 3090.radon 3191.rgb2gray 3192.rgb2hsv 3193.rgb2ind 3194.rgb2n
3、tsc 3295.rgb2ycbcr 3296.rgbplot 3297.roicolor 3298.roifill 3399.roifilt2 33100.roipoly 33101.std2 34102.subimage 34103.truesize 34104.uint8 35105.uint16 35106.warp 35107.wiener2 35108.ycbcr2rgb 36109.zoom 36110. fft2: 36111.ifft2:112. imnoise: 37113. fspecial:114.imhist 37115.histeq 37116.imadjust 3
4、7117.log 37118.filter2 37119. conv2 38120.medfilt2 38121. Sobel算子锐化图像 38122.利用拉氏算子锐化图像 38123. sobel算子图像边缘检测 38124.prewitt算子图像边缘检测 38125.roberts算子图像边缘检测 39126.log算子图像边缘检测 39127.canny算子图像边缘检测 39128.Zero-Cross算子图像边缘检测 39129. imdilate膨胀: 39130.imerode执行腐蚀 39131. imopen开运算 39132. imclose闭运算 39133. imhist
5、 :计算和显示图像的色彩直方图 40134. imcontour :显示图像的等灰度值图 40135. imadjust :通过直方图变换调整对比度 40136. histeq :直方图均衡化 40137. imnoise 函数 40138.conv2 函数:计算二维卷积 41139. conv :计算多维卷积 41140.filter2:计算二维线型数字滤波,它与函数 fspecial 连用 41141.fspecial :产生预定义滤波器 41142. imfilter:真彩色增强 42143. 离散傅立叶变换的 Matlab 实现 fft、fft2 和 fftn 42144.离散余弦变换
6、的 Matlab 实现 dCT2 dict2 dctmtx 42145. 图像小波变换的 Matlab 实现 dwt idwt wcodemat dwt2 wavedec2 idwt2 43146.图像处理工具箱 45147.MATLAB图像类型转换 47148.图像文件的读写和查询 47149. 图像文件的显示 481.applylut 功能: 在二进制图像中利用lookup表进行边沿操作. 语法: A = applylut(BW,lut) 举例 lut = makelut(sum(x(:) = 4,2); BW1 = imread(text.tif);BW2 = applylut(BW1,
7、lut);imshow(BW1) figure, imshow(BW2) 2.bestblk 确定进行块操作的块大小. siz = bestblk(m n,k) mb,nb = bestblk(m n,k) 3.blkproc 实现图像的显式块操作. B = blkproc(A,m n,fun) B = blkproc(A,m n,fun,P1,P2,.) B = blkproc(A,m n,mborder nborder,fun,.) B = blkproc(A,indexed,.) 举例 I = imread(alumgrns.tifI2 = blkproc(I,8 8,std2(x)*o
8、nes(size(x)imshow(I) figure, imshow(I2,);相关命令:colfilt, nlfilter,inline 4.brighten 增加或降低颜色映像表的亮度. brighten(beta) newmap = brighten(beta) newmap = brighten(map,beta) brighten(fig,beta) imadjust, rgbplot 5.bwarea 计算二进制图像对象的面积. total = bwarea(BW) 举例 BW = imread(circles.tifimshow(BW);bwarea(BW) ans = 157
9、99 bweuler, bwperim 6.bweuler. 计算二进制图像的欧拉数. eul = bweuler(BW,n) bwmorph, bwperim 7.bwfill 填充二进制图像的背景色. BW2 = bwfill(BW1,c,r,n) BW2 = bwfill(BW1,n) BW2,idx = bwfill(.) BW2 = bwfill(x,y,BW1,xi,yi,n) x,y,BW2,idx,xi,yi = bwfill(.) BW2 = bwfill(BW1,holes,n) BW2,idx = bwfill(BW1,8.bwlabel 标注二进制图像中已连接的部分.
10、L = bwlabel(BW,n) L,num = bwlabel(BW,n) bweuler, bwselect 9.bwmorph 提取二进制图像的轮廓. BW2 = bwmorph(BW1,operation) BW2 = bwmorph(BW1,operation,n) imshow(BW1);BW2 = bwmorph(BW1,removeBW3 = bwmorph(BW1,skel,Inf);imshow(BW2) figure, imshow(BW3) bweuler, bwperim, dilate, erode 10.bwperim 计算二进制图像中对象的周长. BW2 =
11、bwperim(BW1,n) circbw.tifBW2 = bwperim(BW1,8);附录 MATLAB图像处理命令 325 bwarea, bweuler, bwfill 11.bwselect 在二进制图像中选择对象. BW2 = bwselect(BW1,c,r,n) BW2 = bwselect(BW1,n) BW2,idx = bwselect(.) c = 16 90 144;r = 85 197 247;BW2 = bwselect(BW1,c,r,4);bwfill, bwlabel, impixel, roipoly, roifill 12.cmpermute 调整颜色
12、映像表中的颜色. Y,newmap = cmpermute(X,map) Y,newmap = cmpermute(X,map,index) To order a colormap by luminance, use:ntsc = rgb2ntsc(map);dum,index = sort(ntsc(:,1);Y,newmap = cmpermute(X,map,index);randperm 13.cmunique 查找颜色映像表中特定的颜色及相应的图像. Y,newmap = cmunique(X,map) Y,newmap = cmunique(RGB) Y,newmap = cmun
13、ique(I) gray2ind, rgb2ind 14.col2im 将矩阵的列重新组织到块中. A = col2im(B,m n,mm nn,block_type) A = col2im(B,m n,mm nn) blkproc, colfilt, im2col, nlfilter 15.colfilt 利用列相关函数进行边沿操作. B = colfilt(A,m n,block_type,fun) B = colfilt(A,m n,block_type,fun,P1,P2,.) B = colfilt(A,m n,mblock nblock,block_type,fun,.) B =
14、colfilt(A,blkproc, col2im, im2col, nlfilter 16.colorbar 显示颜色条. colorbar(vert) colorbar(horizcolorbar(h) colorbar h = colorbar(.) blood1.tifh = fspecial(logI2 = filter2(h,I);imshow(I2,), colormap(jet(64), colorbar 17.conv2二维卷积操作. 进行二维卷积操作. C = conv2(A,B) C = conv2(hcol,hrow,A) C = conv2(.,shape) filt
15、er2 18.convmtx2 计算二维卷积矩阵. T = convmtx2(H,m,n) T = convmtx2(H,m n) conv2 19.convn 计算n维卷积. C = convn(A,B) C = convn(A,B,shape) 20.corr2 计算两个矩阵的二维相关系数. 附录 MATLAB图像处理命令 329 r = corr2(A,B) std2 21.dct2 进行二维离散余弦变换. B = dct2(A) B = dct2(A,m,n) B = dct2(A,m n) RGB = imread(autumn.tifI = rgb2gray(RGB);J = dc
16、t2(I);imshow(log(abs(J),), colormap(jet(64), colorbar J(abs(J) 10) = 0;K = idct2(J)/255;imshow(K) fft2, idct2, ifft2 22.dctmtx 计算离散余弦变换矩阵. D = dctmtx(n) dct2 23.dilate 放大二进制图像. BW2 = dilate(BW1,SE) BW2 = dilate(BW1,SE,alg) BW2 = dilate(BW1,SE,.,n) SE = ones(6,2);BW2 = dilate(BW1,SE);相关命令:bwmorph, er
17、ode 24.dither 通过抖动增加外观颜色分辨率,转换图像. X = dither(RGB,map) BW = dither(I) rgb2ind 25.double 转换数据为双精度型. B = double(A) A = imread(saturn.tifB = sqrt(double(A);im2double, im2uint, uint8 26.edge 识别强度图像中的边界. BW = edge(I,sobelBW = edge(I,thresh) ,thresh,direction) BW,thresh = edge(I,prewittroberts,thresh,sigma
18、) BW,threshold = edge(I,zerocross,thresh,h) cannyMATLAB高级应用图形及影像处理 332rice.tifBW1 = edge(I,BW2 = edge(I,27.erode 弱化二进制图像的边界. BW2 = erode(BW1,SE) BW2 = erode(BW1,SE,alg) BW2 = erode(BW1,SE,.,n) SE = ones(3,1);BW2 = erode(BW1,SE);bwmorph, dilate 附录 MATLAB图像处理命令 333 28.fft2 进行二维快速傅里叶变换. B = fft2(A) B =
19、 fft2(A,m,n) load imdemos saturn2 imshow(saturn2) B = fftshift(fft2(saturn2);imshow(log(abs(B),), colormap(jet(64), colorbar dct2, fftshift, idct2, ifft2 29.fftn 进行n维快速傅里叶变换. B = fftn(A) B = fftn(A,siz) fft2, ifftn 30.fftshift 把快速傅里叶变换的DC组件移到光谱中心. B = fftshift(A) B = fftn(A);C = fftshift(B);fft2, ff
20、tn, ifftshift 31.filter2 进行二维线性过滤操作. B = filter2(h,A)B = filter2(h,A,shape) conv2, roifilt2 32.freqspace 确定二维频率响应的频率空间. f1,f2 = freqspace(n) f1,f2 = freqspace(m n) x1,y1 = freqspace(.,meshgridf = freqspace(N) f = freqspace(N,wholefsamp2, fwind1, fwind2 33.freqz2 计算二维频率响应. H,f1,f2 = freqz2(h,n1,n2) H
21、,f1,f2 = freqz2(h,n2 n1) H,f1,f2 = freqz2(h,f1,f2) H,f1,f2 = freqz2(h) . = freqz2(h,.,dx dy) . = freqz2(h,.,dx) freqz2(.) Hd = zeros(16,16);Hd(5:12,5:12) = 1;Hd(7:10,7:10) = 0;h = fwind1(Hd,bartlett(16);colormap(jet(64) freqz2(h,32 32); axis (-1 1 -1 1 0 1) 34.fsamp2 用频率采样法设计二维FIR过滤器. h = fsamp2(Hd)
22、 h = fsamp2(f1,f2,Hd,m n) f1,f2 = freqspace(21,Hd = ones(21);r = sqrt(f1.2 + f2.2);Hd(r0.5) = 0;mesh(f1,f2,Hd) conv2, filter2, freqspace, ftrans2, fwind1, fwind2 35.fspecial 创建预定义过滤器. h = fspecial(type) h = fspecial(type,parameters) unsharp,0.5);I2 = filter2(h,I)/255;figure, imshow(I2) conv2, edge, filter2, fsamp2, fwind1, fwind2 36.ftrans2 通过频率转换设计二维FIR过滤器. h = ftrans2(b,t) h = ftrans2(b) colormap(j