您好,欢迎访问三七文档
当前位置:首页 > 行业资料 > 交通运输 > MATLAB图像处理工具箱常用函数列表_打印
1附录MATLAB图像处理工具箱函数表1通用函数函数功能语法colorbar显示颜色条colorbarcolorbar(...,'peer',axes_handle)colorbar(axes_handle)colorbar('location')colorbar(...,'PropertyName',propertyvalue)cbar_axes=colorbar(...)getimage从坐标轴取得图像数据A=getimage(h)[x,y,A]=getimage(h)[...,A,flag]=getimage(h)[...]=getimageimage创建并显示图像对象image(C)image(x,y,C)image(...,'PropertyName',PropertyValue,...)image('PropertyName',PropertyValue,...)Formalsyntax-PN/PVonlyhandle=image(...)imagesc按图像显示数据矩阵imagesc(C)imagesc(x,y,C)imagesc(...,clims)h=imagesc(...)imshow显示图像imshow(I,n)imshow(I,[lowhigh])imshow(BW)imshow(X,map)imshow(RGB)imshow(…,display_option)imshow(x,y,A,…)imshowfilenameh=imshow(…)imview利用图像浏览器显示图像imview(I)imview(RGB)imview(X,map)imview(I,range)imview(filename)imview(...,'InitialMagnification',initial_mag)h=imview(...)imviewcloseallmontage在矩形框中同时显示多帧图像montage(I)montage(BW)montage(X,map)montage(RGB)h=montage(...)immovie创建多帧索引色图像的电影动画mov=immovie(X,map)mov=immovie(RGB)subimage在一个图形中显示多个图像,结合函数subplot使用subimage(X,map)subimage(I)subimage(BW)subimage(RGB)subimage(x,y,...)h=subimage(...)truesize调整图像显示尺寸truesize(fig,[mrowsmcols])truesize(fig)wrap将图像显示到纹理映射表面warp(X,map)warp(I,n)warp(BW)warp(RGB)warp(z,...)warp(x,y,z,...)h=warp(...)zoom缩放图像或图形zoomonzoomoffzoomoutzoomresetzoomzoomxonzoomyonzoom(factor)zoom(fig,option)表2图像文件I/O函数函数功能语法imfinfo返回图像文件信息info=imfinfo(filename,fmt)info=imfinfo(filename)imread从图像文件中读取图像A=imread(filename,fmt)[X,map]=imread(filename,fmt)[...]=imread(filename)[...]=imread(URL,...)[...]=imread(...,idx)(CUR,GIF,ICO,andTIFFonly)[...]=imread(...,'PixelRegion',{ROWS,COLS})(TIFFonly)[...]=imread(...,'frames',idx)(GIFonly)[...]=imread(...,ref)(HDFonly)[...]=imread(...,'BackgroundColor',BG)(PNGonly)[A,map,alpha]=imread(...)(ICO,CUR,andPNGonly)imwrite把图像写入图像文件中imwrite(A,filename,fmt)imwrite(X,map,filename,fmt)imwrite(...,filename)imwrite(...,Param1,Val1,Param2,Val2...)表3空间变换函数函数功能语法findbounds为空间变换寻找输出边界outbounds=findbounds(TFORM,inbounds)fliptform切换空间变换结构的输入和输出角色TFLIP=fliptform(T)imcrop剪切图像I2=imcrop(I)X2=imcrop(X,map)RGB2=imcrop(RGB)I2=imcrop(I,rect)X2=imcrop(X,map,rect)RGB2=imcrop(RGB,rect)[...]=imcrop(x,y,...)[A,rect]=imcrop(...)[x,y,A,rect]=imcrop(...)imresize图像缩放B=imresize(A,m)B=imresize(A,m,method)B=imresize(A,[mrowsncols],method)B=imresize(...,method,n)B=imresize(...,method,h)imrotate图像旋转B=imrotate(A,angle)B=imrotate(A,angle,method)B=imrotate(A,angle,method,bbox)interp22-D数据插值ZI=interp2(X,Y,Z,XI,YI)ZI=interp2(Z,XI,YI)ZI=interp2(Z,ntimes)ZI=interp2(X,Y,Z,XI,YI,method)imtransform对图像进行2-D空间变换B=imtransform(A,TFORM)B=imtransform(A,TFORM,INTERP)[B,XDATA,YDATA]=imtransform(...)[B,XDATA,YDATA]=imtransform(...,param1,val1,param2,val2,...)makeresampler生成重采样结构R=makeresampler(interpolant,padmethod)maketform生成几何变换结构T=maketform(transformtype,...)tformarray多维数组的空间变换B=tformarray(A,T,R,TDIMS_A,TDIMS_B,TSIZE_B,TMAP_B,F)tformfwd正向空间变换[X,Y]=tformfwd(T,U,V)[X1,X2,X3,...]=tformfwd(T,U1,U2,U3,...)X=tformfwd(T,U)[X1,X2,X3,...]=tformfwd(T,U)X=tformfwd(T,U1,U2,U3,...)tforminv逆向空间变换U=tforminv(X,T)表4像素和统计处理函数函数功能语法corr2计算两个矩阵的2-D相关系数r=corr2(A,B)imcontour创建图像的轮廓图imcontour(I)imcontour(I,n)imcontour(I,v)imcontour(x,y,...)imcontour(...,LineSpec)[C,h]=imcontour(...)imhist显示图像的直方图imhist(I,n)imhist(X,map)[counts,x]=imhist(...)impixel确定像素颜色值P=impixel(I)P=impixel(X,map)P=impixel(RGB)P=impixel(I,c,r)P=impixel(X,map,c,r)P=impixel(RGB,c,r)[c,r,P]=impixel(...)P=impixel(x,y,I,xi,yi)P=impixel(x,y,X,map,xi,yi)P=impixel(x,y,RGB,xi,yi)[xi,yi,P]=impixel(x,y,...)improfile沿线段计算剖面图的像素值c=improfilec=improfile(n)c=improfile(I,xi,yi)c=improfile(I,xi,yi,n)[cx,cy,c]=improfile(...)[cx,cy,c,xi,yi]=improfile(...)[...]=improfile(x,y,I,xi,yi)[...]=improfile(x,y,I,xi,yi,n)[...]=improfile(...,method)mean2求矩阵元素平均值B=mean2(A)pixval显示图像像素信息pixvalonpixvaloffpixvalpixval(fig,option)pixval(ax,option)pixval(H,option)regionprops得到图像区域属性STATS=regionprops(L,properties)std2计算矩阵元素的标准偏移b=std2(A)表5图像分析函数函数功能语法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',...)qtdecomp执行四叉树分解S=qtdecomp(I)S=qtdecomp(I,threshold)S=qtdecomp(I,threshold,mindim)S=qtdecomp(I,threshold,[mindimmaxdim])S=qtdecomp(I,fun)S=qtdecomp(I,fun,P1,P2,...)qtgetblk获取四叉树分解中的数组块值[vals,r,c]=qtgetblk(I,S,dim)[vals,idx]=qtgetblk(I,S,dim)qtsetblk设置四叉树分解中的数组块值J=qtsetblk(I,S,dim,vals)2表6图像增强函数函数功能语法adapthisteq执行对比度受限的直方图均衡J=adapthisteq(I)J=adapthisteq(I,param1,val1,param2,val2...)decorrstretch对多通道图像应用解卷积延拓S=decorrstretch(I)S=decorrstretch(I,TOL)histeq用直方图均等化增强对比度J=histeq(I,hgram)J=histeq(I,n)[J,T]=histeq(I,...)newmap=histeq(X,map,hgram)newmap=histeq(X,map)[newmap,T]=histeq(X,...)imadjust调整图像灰度值或颜色映射表J=imadjust(I)J=imadjust(I,[low_in;high_in],[low_out;high_out])J=imadjust(...,gamma)newmap=imadjust(map,[low
本文标题:MATLAB图像处理工具箱常用函数列表_打印
链接地址:https://www.777doc.com/doc-2887241 .html