图像处理工具箱-英

上传人:kms****20 文档编号:50933528 上传时间:2018-08-11 格式:PPT 页数:48 大小:834.50KB
返回 下载 相关 举报
图像处理工具箱-英_第1页
第1页 / 共48页
图像处理工具箱-英_第2页
第2页 / 共48页
图像处理工具箱-英_第3页
第3页 / 共48页
图像处理工具箱-英_第4页
第4页 / 共48页
图像处理工具箱-英_第5页
第5页 / 共48页
点击查看更多>>
资源描述

《图像处理工具箱-英》由会员分享,可在线阅读,更多相关《图像处理工具箱-英(48页珍藏版)》请在金锄头文库上搜索。

1、计算机科学系 黄 剑 数字图像处理,2008年中山大学信息科学与技术学院计算机系,黄剑Matlab with DIP 教学2数字图像处理,2008年中山大学信息科学与技术学院计算机系,黄剑The MATLAB Image Processing Toolbox The Image Processing Toolbox is a collectionof MATLAB functions (called M-functions or M- files) that extend the capability of the MATLAB environment for the solution of

2、digital image processing problems.3数字图像处理,2008年中山大学信息科学与技术学院计算机系,黄剑The MATLAB Image Processing Toolbox(cont.) Including:-Spatial image transformations -Morphological operations -Neighborhood and block operations -Linear filtering and filter design-Transforms- Image analysis and enhancement-Image reg

3、istration -Deblurring-Region of interest operations4数字图像处理,2008年中山大学信息科学与技术学院计算机系,黄剑How do I know M-function? Find it in Matlab Help.-by category.-by alphabetical order. Find it on the textbook.5数字图像处理,2008年中山大学信息科学与技术学院计算机系,黄剑Matlab 内建图像C:MATLAB7toolboximagesimdemos 皆为Matlab Help中范例的原始图像。 使用时只需直接在指

4、令中输入文件名,即 可使用。 适用于观察影像处理结果6数字图像处理,2008年中山大学信息科学与技术学院计算机系,黄剑Different Image Types Indexed images Intensity (grayscale) images Binary images RGB (true-color) images7数字图像处理,2008年中山大学信息科学与技术学院计算机系,黄剑Reading an image imread() 功用:将图像加载并存成array格式备用 用法:I,map = imread(filename); I = imread(filename); ex: I =

5、 imread(pout.tif); I为指向影像的变量 不指定变数,则为ans8数字图像处理,2008年中山大学信息科学与技术学院计算机系,黄剑Displaying an image imshow() 功用:开启一个窗口显示影像 用法: imshow(I) imshow(I,map) Figure, imshow() 功用:开启一个新窗口显示影像 用法: figure,imshow(I) 9数字图像处理,2008年中山大学信息科学与技术学院计算机系,黄剑Displaying an image(cont.) imshow(I, low, high) imshow(I, ) 功用:display

6、s I as a grayscale intensity image, specifying the data range for I. The minimum value in I is displayed as black, and the maximum value is displayed as white.10数字图像处理,2008年中山大学信息科学与技术学院计算机系,黄剑Displaying an image(cont.) Spatial domain11数字图像处理,2008年中山大学信息科学与技术学院计算机系,黄剑Displaying an image(cont.) pixva

7、l :功能:cursor on image to show pixel values用法: imshow(I),pixval12数字图像处理,2008年中山大学信息科学与技术学院计算机系,黄剑Displaying an image(cont.) colorbar 功能:To display an image with a colorbar that indicates the range of intensity values. 用法: imshow(I), colorbar ex: I = imread(pout.tif); imshow(I) , colorbar13数字图像处理,2008

8、年中山大学信息科学与技术学院计算机系,黄剑Writing an image imwrite() 功能:将影像写入成档案 用法: imwrite(I,filename,format) ex: imwrite(I,pout.jpg,JPEG); 14数字图像处理,2008年中山大学信息科学与技术学院计算机系,黄剑Image information Image size: size() ex:I= imread(saturn.png);size(I)M,N = size(I) M=影像I的高 N=影像I的宽15数字图像处理,2008年中山大学信息科学与技术学院计算机系,黄剑Image informa

9、tion whos 功用:display information about an image . ex: whos I Imfinfo( filename ) 功用: display information about image file . ex: info = imfinfo(saturn.png)16数字图像处理,2008年中山大学信息科学与技术学院计算机系,黄剑Digital Image processing 图像二值化 g = im2bw(I, T); 功用:Convert intensity image I to binary image g using threshold T

10、, where T must be in range 0, 1.ex: I= imread(pout.tif);g = im2bw(I, 0.4);imshow(g) ,colorbar17数字图像处理,2008年中山大学信息科学与技术学院计算机系,黄剑Digital Image processing(cont.) 彩色转灰阶 Rgb2gray() 功用:将RBG彩色影像转换成gray-level影像 。 ex:I= imread (saturn.png);g = rgb2gray(I);imshow(g), colorbar18数字图像处理,2008年中山大学信息科学与技术学院计算机系,黄剑

11、Digital Image processing(cont.) 反相 imcomplement( ) 功用:The negative of an image.ex: J = imcomplement(g);imshow(J),19数字图像处理,2008年中山大学信息科学与技术学院计算机系,黄剑Digital Image processing(cont.) 变更影像大小 imresize(I,scale,method); 功用:To change the size of an image. interpolation Method:-nearest :Nearest-neighbor inter

12、polation -bilinear :Bilinear (the default)-bicubic :Bicubic interpolation20数字图像处理,2008年中山大学信息科学与技术学院计算机系,黄剑Digital Image processing(cont.) ex:I = imread(circuit.tif);J = imresize(I,1.25);imshow(I)figure, imshow(J) ex:I = imread(circuit.tif);J = imresize(I,100 150, bilinear);imshow(I)figure, imshow(J

13、)21数字图像处理,2008年中山大学信息科学与技术学院计算机系,黄剑Digital Image processing(cont.) 旋转影像 imrotate(I, angle); 功用:To rotate an image. ex:I = imread(pout.tif);J = imrotate(I,35);imshow(J)22数字图像处理,2008年中山大学信息科学与技术学院计算机系,黄剑More Example Using affine transformation 1.Rotation 45 degree I=imread(cameraman.tif); T = maketfor

14、m(affine,cosd(45) -sind(45) 0; sind(45) cosd(45) 0; 0 0 1); tformfwd(10 20,T); I2 = imtransform(I,T); imshow(I2) 23数字图像处理,2008年中山大学信息科学与技术学院计算机系,黄剑More Example(cont.)2.Translation I = imread(cameraman.tif); se = translate(strel(1), 25 25); J = imdilate(I,se); imshow(I), title(Original) figure, imsho

15、w(J), title(Translated);24数字图像处理,2008年中山大学信息科学与技术学院计算机系,黄剑More Example(cont.)3.shearI=imread(cameraman.tif); T = maketform(affine,1 0 0; 1 2 0; 0 0 1); tformfwd(10 20,T); I2 = imtransform(I,T); imshow(I2)25数字图像处理,2008年中山大学信息科学与技术学院计算机系,黄剑More Example(cont.) Edge detectors 1.Sobel edge detector Code:/Both horizontal and verticalI=imread(cameraman.tif); BW2=edge(I,sobel,0.02,both); figure,imshow(BW2)26数字图像处理,2008年中山大学信息科学与技术学院计算机系,黄剑M

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 生活休闲 > 科普知识

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号