常用函数列表

  • 格式:doc
  • 大小:133.50 KB
  • 文档页数:23

下载文档原格式

  / 23
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

附录MATLAB图像处理工具箱函数

表1 通用函数

函数功能语法

colorbar 显示颜色条colorbar

colorbar(...,'peer',axes_handle) colorbar(axes_handle) colorbar('location')

colorbar(...,'PropertyName',pro pertyvalue)

cbar_axes = colorbar(...)

getimage 从坐标轴取得图

像数据

A = getimage(h)

[x,y,A] = getimage(h)

[...,A,flag] = getimage(h)

[...] = getimage

image 创建并显示图像

对象

image(C)

image(x,y,C)

image(...,'PropertyName',Prope

rtyValue,...)

image('PropertyName',Propert

yValue,...) Formal syntax -

PN/PV only

handle = image(...)

imagesc 按图像显示数据

矩阵

imagesc(C)

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,…) 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 调整图像显示尺

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

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)

imread 从图像文件中读取图像A = imread(filename,fmt)

[X,map] = imread(filename,fmt)

[...] = imread(filename)

[...] = imread(URL,...)

[...] = imread(...,idx)

(CUR, GIF, ICO, and TIFF only)

[...] = imread(..., 'PixelRegion', { ROWS, COLS }) (TIFF only)

[...] = imread(...,'frames',idx) (GIF only) [...] = imread(...,ref) (HDF only) [...] = imread(...,'BackgroundColor',BG) (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...)