资源描述:
《图像处理相关函数命令大全》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、Matlab图像处理相关函数命令大全 一、通用函数:colorbar 显示彩色条语法:colorbarcolorbar('vert')colorbar('horiz')colorbar(h)h=colorbar(...)colorbar(...,'peer',axes_handle)getimage从坐标轴取得图像数据语法:A=getimage(h)[x,y,A]=getimage(h)[...,A,flag]=getimage(h)[...]=getimageimshow显示图
2、像语法:imshow(I,n)imshow(I,[lowhigh])imshow(BW)imshow(X,map)imshow(RGB)imshow(...,display_option)imshow(x,y,A,...)imshowfilenameh=imshow(...)montage在矩形框中同时显示多幅图像语法:montage(I)montage(BW)montage(X,map)montage(RGB)h=montage(...)immovie创建多帧索引图的电影
3、动画语法:mov=immovie(X,map)mov=immovie(RGB)subimage在一副图中显示多个图像语法:subimage(X,map)subimage(I)subimage(BW) subimage(RGB)subimage(x,y,...)subimage(...)truesize调整图像显示尺寸语法:truesize(fig,[mrowsmcols])truesize(fig)warp将图像显示到纹理映射表面语法:warp(X,map)warp(I,n)w
4、arp(z,...)warp(x,y,z,...) h=warp(...)zoom缩放图像语法:zoomonzoomoffzoomoutzoomresetzoomzoomxonzoomyonzoom(factor)zoom(fig,option) 二、图像文件I/O函数命令imfinfo 返回图形图像文件信息语法:info=imfinfo(filename,fmt)info=imfinfo(filename)imread 从图像文件中读取(载入)图像语法:A=imread
5、(filename,fmt)[X,map]=imread(filename,fmt)[...]=imread(filename)[...]=imread(URL,...)[...]=imread(...,idx)(CUR,ICO,andTIFFonly)[...]=imread(...,'frames',idx)(GIFonly)[...]=imread(...,ref)(HDFonly)[...]=imread(...,'BackgroundColor',BG)(PNGonly)
6、[A,map,alpha]=imread(...)(ICO,CUR,PNGonly)imwrite 把图像写入(保存)图像文件中9语法:imwrite(A,filename,fmt)imwrite(X,map,filename,fmt)imwrite(...,filename)imwite(...,Param1,Val1,Param2,Val2...)imcrop 剪切图像语法:I2=imcrop(I)X2=imcrop(X,map)RGB2=imcrop(RGB)I2=imcro
7、p(I,rect)X2=imcrop(RGB,rect)[...]=imcrop(x,y,...)[A,rect]=imcrop(...)[x,y,A,rect]=imcrop(...)imresize 改变图像大小语法:B=imresize(A,m,method)imrotate 旋转图像语法:B=imrotate(A,angle,method)B=imrotate(A,angle,method,'crop') 三、像素和统计处理函数corr2 计算两个矩形的二维相关系数语法:r
8、=corr2(A,B)imcontour创建图像数据的轮廓图语法:imcontour(I,n)imcontour(I,v)imcontour(x,y,...)imcontour(...,LineSpec)[C,h]=imcontour(...)imfeature 计算图像区域的特征尺寸语法:stats=imfeature(L,measurements)stats=imfeature(L,measurements,n)imbist 显示图像数据的柱状图impixel确定