图像处理工具箱-英.ppt
《图像处理工具箱-英.ppt》由会员分享,可在线阅读,更多相关《图像处理工具箱-英.ppt(48页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、计算机科学系黄 剑数字图像处理,数字图像处理,20082008年年中山大学信息科学与技术学院计算机系,黄剑中山大学信息科学与技术学院计算机系,黄剑Matlab with DIP 教学2数字图像处理,数字图像处理,20082008年年中山大学信息科学与技术学院计算机系,黄剑中山大学信息科学与技术学院计算机系,黄剑The MATLAB Image Processing ToolboxThe Image Processing Toolbox is a collection of MATLAB functions(called M-functions or M-files)that extend th
2、e capability of the MATLAB environment for the solution of digital image processing problems.3数字图像处理,数字图像处理,20082008年年中山大学信息科学与技术学院计算机系,黄剑中山大学信息科学与技术学院计算机系,黄剑The MATLAB Image Processing Toolbox(cont.)Including:Including:-Spatial image transformations -Spatial image transformations -Morphological ope
3、rations -Morphological operations -Neighborhood and block operations -Neighborhood and block operations -Linear filtering and filter design -Linear filtering and filter design -Transforms -Transforms -Image analysis and enhancement -Image analysis and enhancement -Image registration -Image registrat
4、ion -DeblurringDeblurring -Region of interest operations -Region of interest operations4数字图像处理,数字图像处理,20082008年年中山大学信息科学与技术学院计算机系,黄剑中山大学信息科学与技术学院计算机系,黄剑How do I know M-function?Find it in Matlab Help.-by category.-by alphabetical order.Find it on the textbook.5数字图像处理,数字图像处理,20082008年年中山大学信息科学与技术学院计算
5、机系,黄剑中山大学信息科学与技术学院计算机系,黄剑Matlab 内建图像内建图像C:MATLAB7toolboximagesimdemos皆为Matlab Help中范例的原始图像。使用时只需直接在指令中输入文件名,即可使用。适用于观察影像处理结果6数字图像处理,数字图像处理,20082008年年中山大学信息科学与技术学院计算机系,黄剑中山大学信息科学与技术学院计算机系,黄剑Different Image TypesIndexed imagesIntensity(grayscale)images Binary images RGB(true-color)images7数字图像处理,数字图像处理
6、,20082008年年中山大学信息科学与技术学院计算机系,黄剑中山大学信息科学与技术学院计算机系,黄剑Reading an imageimread()功用:将图像加载并存成array格式备用用法:I,map=imread(filename);I=imread(filename);ex:I=imread(pout.tif);I为指向影像的变量 不指定变数,则为ans8数字图像处理,数字图像处理,20082008年年中山大学信息科学与技术学院计算机系,黄剑中山大学信息科学与技术学院计算机系,黄剑Displaying an imageimshow()功用功用:开启一个窗口显示影像开启一个窗口显示影像
7、 用法用法:imshow(I)imshow(I,map)Figure,imshow()功用功用:开启一个新窗口显示影像开启一个新窗口显示影像 用法用法:figure,imshow(I)9数字图像处理,数字图像处理,20082008年年中山大学信息科学与技术学院计算机系,黄剑中山大学信息科学与技术学院计算机系,黄剑Displaying an image(cont.)imshow(I,low,high)imshow(I,)功用:displays I as a grayscale intensity image,specifying the data range for I.The minimum
8、value in I is displayed as black,and the maximum value is displayed as white.10数字图像处理,数字图像处理,20082008年年中山大学信息科学与技术学院计算机系,黄剑中山大学信息科学与技术学院计算机系,黄剑Displaying an image(cont.)Spatial domain11数字图像处理,数字图像处理,20082008年年中山大学信息科学与技术学院计算机系,黄剑中山大学信息科学与技术学院计算机系,黄剑Displaying an image(cont.)pixval :功能:cursor on imag
9、e to show pixel values 用法:imshow(I),pixval12数字图像处理,数字图像处理,20082008年年中山大学信息科学与技术学院计算机系,黄剑中山大学信息科学与技术学院计算机系,黄剑Displaying an image(cont.)colorbar功能功能:To display an image with a colorbar that indicates the range of intensity values.用法:用法:imshow(I),colorbarex:I=imread(pout.tif);imshow(I),colorbar13数字图像处理
10、,数字图像处理,20082008年年中山大学信息科学与技术学院计算机系,黄剑中山大学信息科学与技术学院计算机系,黄剑Writing an imageimwrite()功能功能:将影像写入成档案将影像写入成档案用法:用法:imwrite(I,filename,format)ex:imwrite(I,pout.jpg,JPEG);14数字图像处理,数字图像处理,20082008年年中山大学信息科学与技术学院计算机系,黄剑中山大学信息科学与技术学院计算机系,黄剑Image informationImage size:size()ex:I=imread(saturn.png);size(I)M,N=s
11、ize(I)M=影像影像I的高的高 N=影像影像I的宽的宽15数字图像处理,数字图像处理,20082008年年中山大学信息科学与技术学院计算机系,黄剑中山大学信息科学与技术学院计算机系,黄剑Image informationwhos功用:display information about an image.ex:whos IImfinfo(filename)功用:display information about image file.ex:info=imfinfo(saturn.png)16数字图像处理,数字图像处理,20082008年年中山大学信息科学与技术学院计算机系,黄剑中山大学信息科
12、学与技术学院计算机系,黄剑Digital Image processing图像二值化图像二值化g=g=im2bwim2bw(I,T);(I,T);功用功用:Convert intensity image I to binary image g using:Convert intensity image I to binary image g using threshold T,where T must be in range 0,1.threshold T,where T must be in range 0,1.ex:ex:I=I=imread(pout.tifimread(pout.tif
13、););g=im2bw(I,0.4);g=im2bw(I,0.4);imshow(gimshow(g),),colorbarcolorbar17数字图像处理,数字图像处理,20082008年年中山大学信息科学与技术学院计算机系,黄剑中山大学信息科学与技术学院计算机系,黄剑Digital Image processing(cont.)彩色转灰阶彩色转灰阶Rgb2gray()功用功用:将将RBG彩色影像转换成彩色影像转换成gray-level影像。影像。ex:I=imread(saturn.png);g=rgb2gray(I);imshow(g),colorbar18数字图像处理,数字图像处理,2
14、0082008年年中山大学信息科学与技术学院计算机系,黄剑中山大学信息科学与技术学院计算机系,黄剑Digital Image processing(cont.)反相反相imcomplement()功用:The negative of an image.ex:J=imcomplement(g);imshow(J),19数字图像处理,数字图像处理,20082008年年中山大学信息科学与技术学院计算机系,黄剑中山大学信息科学与技术学院计算机系,黄剑Digital Image processing(cont.)变更影像大小变更影像大小 imresize(I,scale,method);功用:To ch
15、ange the size of an image.interpolation Method:-nearest:Nearest-neighbor interpolation -bilinear:Bilinear(the default)-bicubic:Bicubic interpolation20数字图像处理,数字图像处理,20082008年年中山大学信息科学与技术学院计算机系,黄剑中山大学信息科学与技术学院计算机系,黄剑Digital Image processing(cont.)ex:ex:I=I=imread(circuit.tifimread(circuit.tif););J=imr
16、esize(I,1.25);J=imresize(I,1.25);imshow(Iimshow(I)figure,figure,imshow(Jimshow(J)ex:ex:I=I=imread(circuit.tifimread(circuit.tif););J=imresize(I,100 150,J=imresize(I,100 150,bilinearbilinear););imshow(Iimshow(I)figure,figure,imshow(Jimshow(J)21数字图像处理,数字图像处理,20082008年年中山大学信息科学与技术学院计算机系,黄剑中山大学信息科学与技术学院
17、计算机系,黄剑Digital Image processing(cont.)旋转影像旋转影像imrotate(I,angle);功用:To rotate an image.ex:I=imread(pout.tif);J=imrotate(I,35);imshow(J)22数字图像处理,数字图像处理,20082008年年中山大学信息科学与技术学院计算机系,黄剑中山大学信息科学与技术学院计算机系,黄剑More ExampleUsing affine transformation 1.Rotation 45 degree I=I=imread(imread(cameraman.tif););T=ma
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 图像 处理 工具箱
限制150内