MATLAB+图像处理命令(4)

2019-04-09 11:51

45.ifft2

功能:

计算二维快速傅里叶反变换。 语法: B = ifft2(A) B = ifft2(A,m,n) 相关命令: fft2, fftshift, idct2 46.ifftn 功能:

计算n 维快速傅里叶反变换。 语法: B = ifftn(A) B = ifftn(A,siz) 相关命令:

fft2, fftn, ifft2 47.sim2bw 功能:

转换图像为二进制图像。 语法:

BW = im2bw(I,level) BW = im2bw(X,map,level) BW = im2bw(RGB,level) 举例 load trees

BW = im2bw(X,map,0.4); imshow(X,map) 附录 MATLAB 图像处理命令 341

figure, imshow(BW) 相关命令: ind2gray, rgb2gray 48.im2col 功能:

重调图像块为列。 语法:

B = im2col(A,[m n],block_type) B = im2col(A,[m n])

B = im2col(A,'indexed',...) 相关命令:

blkproc, col2im, colfilt, nlfilter 49.im2double 功能:

转换图像矩阵为双精度型。

语法:

I2 = im2double(I1)

RGB2 = im2double(RGB1) BW2 = im2double(BW1)

X2 = im2double(X1,'indexed') 相关命令:

double, im2uint8, uint8 50.im2uint8 功能:

转换图像阵列为8 位无符号整型。 语法:

I2 = im2uint8(I1) RGB2 = im2uint8(RGB1) BW2 = im2uint8(BW1)

X2 = im2uint8(X1,'indexed') MATLAB 高级应用——图形及影像处理 342

相关命令:

im2uint16, double, im2double, uint8, imapprox, uint16 51.im2uint16 功能:

转换图像阵列为16 位无符号整型。 语法:

I2 = im2uint16(I1)

RGB2 = im2uint16(RGB1) X2 = im2uint16(X1,'indexed') 相关命令:

im2uint8, double, im2double, uint8, uint16, imapprox 52.imadjust 功能:

调整图像灰度值或颜色映像表。 语法:

J = imadjust(I,[low high],[bottom top],gamma)

newmap = imadjust(map,[low high],[bottom top],gamma) RGB2 = imadjust(RGB1,...) 举例

I = imread('pout.tif'); J = imadjust(I,[0.3 0.7],[]); imshow(I) figure, imshow(J) 相关命令: brighten, histeq 53.imapprox 功能:

对索引图像进行近似处理。 语法:

[Y,newmap] = imapprox(X,map,n) 附录 MATLAB 图像处理命令 343

[Y,newmap] = imapprox(X,map,tol) Y = imapprox(X,map,newmap) [...] = imapprox(...,dither_option) 相关命令:

cmunique, dither, rgb2ind 54.imcontour 功能:

创建图像数据的轮廓图。 语法: imcontour(I,n) imcontour(I,v) imcontour(x,y,...)

imcontour(...,LineSpec) [C,h] = imcontour(...) 举例

I = imread('ic.tif'); imcontour(I,3) 相关命令:

clabel, contour, LineSpec 55.imcrop 功能:

剪切图像。 语法:

I2 = imcrop(I)

X2 = imcrop(X,map) RGB2 = imcrop(RGB) I2 = imcrop(I,rect)

X2 = imcrop(X,map,rect) RGB2 = imcrop(RGB,rect) MATLAB 高级应用——图形及影像处理 344

[...] = imcrop(x,y,...) [A,rect] = imcrop(...) [x,y,A,rect] = imcrop(...) 举例

I = imread('ic.tif');

I2 = imcrop(I,[60 40 100 90]); imshow(I)

figure, imshow(I2)

相关命令:

zoom

56.imfeature 功能:

计算图像区域的特征尺寸。 语法:

stats = imfeature(L,measurements) stats = imfeature(L,measurements,n) 举例

BW = imread('text.tif'); L = bwlabel(BW);

stats = imfeature(L,'all'); stats(23) ans =

Area: 89

Centroid: [95.6742 192.9775]

BoundingBox: [87.5000 184.5000 16 15] MajorAxisLength: 19.9127 MinorAxisLength: 14.2953 Eccentricity: 0.6961 Orientation: 9.0845

ConvexHull: [28x2 double] 附录 MATLAB 图像处理命令 345

ConvexImage: [15x16 uint8 ] ConvexArea: 205 Image: [15x16 uint8 ] FilledImage: [15x16 uint8 ] FilledArea: 122 EulerNumber: 0 Extrema: [ 8x2 double] EquivDiameter: 10.6451 Solidity: 0.4341 Extent: 0.3708 PixelList: [89x2 double] 相关命令: bwlabel 57.imfinfo 功能:

返回图形文件信息。 语法:

info = imfinfo(filename,fmt) info = imfinfo(filename) 举例

info = imfinfo('canoe.tif')

info =

Filename:'canoe.tif'

FileModDate: '25-Oct-1996 22:10:39' FileSize: 69708 Format: 'tif' FormatVersion: [] Width: 346 Height: 207 BitDepth: 8

ColorType: 'indexed'

FormatSignature: [73 73 42 0] ByteOrder: 'little-endian' NewSubfileType: 0 BitsPerSample: 8

Compression: 'PackBits'

PhotometricInterpretation: 'RGB Palette' MATLAB 高级应用——图形及影像处理 346

StripOffsets: [ 9x1 double] SamplesPerPixel: 1

RowsPerStrip: 23

StripByteCounts: [ 9x1 double] XResolution: 72 YResolution: 72

ResolutionUnit: 'Inch' Colormap: [256x3 double] PlanarConfiguration: 'Chunky' TileWidth: [] TileLength: [] TileOffsets: [] TileByteCounts: [] Orientation: 1 FillOrder: 1

GrayResponseUnit: 0.0100 MaxSamplue: 255 MinSamplue: 0 Thresholding: 1 相关命令: imread, imwrite 58.imhist

功能:

显示图像数据的柱状图。 语法:


MATLAB+图像处理命令(4).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:数据结构课程设计计信系教师通信录查询系统

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: