当前位置:
文档之家› MATLAB图像处理工具箱常用函数列表
MATLAB图像处理工具箱常用函数列表
imresize
图像缩放
B = imresize(A,m)
B = imresize(A,m,method)
B = imresize(A,[mrows ncols],method)
B = imresize(...,method,n)
B = imresize(...,method,h)
imrotate
图像旋转
(PNG only)
[A,map,alpha] = imread(...)
(ICO, CUR, and PNG only)
imwrite
把图像写入图像文件中
imwrite(A,filename,fmt)
imwrite(X,map,filename,fmt)
imwrite(...,filename)
imwrite(...,Param1,Val1,Param2,Val2...)
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(...)
表3空间变换函数
函数
功能
语法
findbounds
为空间变换寻找输出边界
outbounds = findbounds(TFORM,inbounds)
fliptform
切换空间变换结构的输入和输出角色
TFLIP = fliptform(T)
imcrop
剪切图像
I2 = imcrop(I)
X2 = imcrop(X,map)
[...] = imread(...,'PixelRegion',{ROWS, COLS}) (TIFF only)
[...] = imread(...,'frames',idx) (GIF only)
[...] = imread(...,ref) (HDF only)
[...] = imread(...,'BackgroundColor',BG)
cbar_axes = colorbar(...)
getimage
从坐标轴取得图像数据
A = getimage(h)
[x,y,A] = getimage(h)
[...,A,flag] = getimage(h)
[...] = getimage
image
创建并显示图像对象
image(C)
image(x,y,C)
imshow filename
h = imshow(…)
imview
利用图像浏览器显示图像
imview(I)
imview(RGB)
imview(X,map)
imview(I,range)
imview(filename)
imview(...,'InitialMagnification',initial_mag)
h = imview(...)
imview close all
montage
在矩形框中同时显示多帧图像
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
调整图像显示尺寸
B = imrotate(A,angle)
B = imrotate(A,angle,method)
B = imrotate(A,angle,method,bbox)
interp2
2-D数据插值
imagesc(x,y,C)
imagesc(...,clims)
h = imagesc(...)
imshow
显示图像
imshow(I,n)
imshow(I,[low high])
imshow(BW)
imshow(X,map)
imshow(RGB)
imshow(…,display_option)
imshow(x,y,A,…)
附录MATLAB图像处理工具箱函数
表1通用函数
函数
功能
语法
colorbar
显示颜色条
colorbar
colorbar(...,'peer',axes_handle)
colorbar(axes_handle)
colorbar('location')
colorbar(...,'PropertyName',propertyvalue)
truesize(fig,[mrows mcols])
truesize(fig)
wrap
将图像显示到纹理映射表面
warp(X,map)
warp(I,n)
warp(BW)
warp(RGB)
warp(z,...)
warp(x,y,z,...)
h = warp(...)
zoom
缩放图像或图形
zoom on
image(...,'PropertyName',PropertyValue,...)
image('PropertyName',PropertyValue,...) Formal syntax - PN/PV only
handle = image(...)
imagesc
按图像显示数据矩阵
imagesc(C)
imread
从图像文件中读取图像
A = imread(filename,fmt)
[X,map] = imread(filename,fmt)
[...] = imread(filename)
[...] = imread(URL,...)
[...] = imread(...,idx)
(CUR, GIF, ICO, and TIFF only)
zoom off
zoom out
zoom reset
zoom
zoom xon
zoom yon
zoom(factor)
zoom(fig, option)
表2图像文件I/O函数
函数
功能
语法
imfinfo
返回图像文件信息
info = imfinfo(filename,fmt)
info = imfinfo(filename)