




已阅读5页,还剩12页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
上次:一、 引言(或介绍一些与图像处理有关的概念二、图像运算,三、图像变换图像运算包括图像的点运算(元素群运算,线性与非线性点运算、代数运算)、图像的几何运算(插值运算、坐标变换、仿射变换、透视变换运算等)、邻域操作运算(滑动邻域操作和分离邻域操作)。1 图像的点运算(元素群运算)点运算是图像处理中的一种最简单的运算。顾名思义,点运算是对图像像素点的运算。对一幅灰度图像来说,每一个像素点都具有一定的灰度值,点运算就是按照需要改变像素点原先的灰度值的操作。如果原图像为,经过点运算之后的图像为,那么,点运算操作实际上就是一个灰度变换函数,原图像与处理后的图像之间有如下的映射关系: 上式中,为灰度变换函数。(1) 线性点运算线性点运算的灰度变换函数如下:其中,为原图像像素点的灰度值,为变换后相应像素点的灰度值。可见点运算的变换函数执行的是点对点的变换。且有以下运算性质:当时,图像没有改变。当时,图像对比度增强;当时,图像对比度减弱。当时,图像更亮(b0)或更暗(b0)。例:线性变换clear all,close allI=imread(pout.tif);J=double(I);J=J*0.8+60;J=uint8(J);subplot(121),imshow(I)subplot(122),imshow(J)直方图灰度变换(讲):imadjust Adjust image intensity values or colormap SyntaxJ = imadjust(I,low_in high_in,low_out high_out,gamma)DescriptionJ = imadjust(I,low_in high_in,low_out high_out,gamma) maps the values in intensity image I to new values in J such that values between low_in and high_in map to values between low_out and high_out. Values below low_in and above high_in are clipped; that is, values below low_in map to low_out, and those above high_in map to high_out. You can use an empty matrix () for low_in high_in or for low_out high_out to specify the default of 0 1. gamma specifies the shape of the curve describing the relationship between the values in I and J. If gamma is less than 1, the mapping is weighted toward higher (brighter) output values. If gamma is greater than 1, the mapping is weighted toward lower (darker) output values. If you omit the argument, gamma defaults to 1 (linear mapping).强度增强(或亮度、对比度增强)实际上若原图像为,强度增强后的图像为。若原图像的灰度范围为:,而希望强度增强调整后的图像的灰度范围为:,则为线性变换。注: M-7.0版本中J = IMADJUST(I) maps the values in intensity image I to new values in J such that 100% of data is saturated at low and high intensities of I. This increases the contrast of the output image J.接上例:强度线性增强clear all,close allI = imread(pout.tif);figure(1),subplot(121),imshow(I),subplot(122),imhist(I),pauseJ = imadjust(I,0.3 0.7,);figure(2),subplot(121),imshow(J),subplot(122),imhist(J),pauseRGB1 = imread(C18.bmp);RGB2 = imadjust(RGB1,.2 .3 0; .6 .7 1,); %色彩增强图像RGB3 = imadjust(RGB1,0,1,1,0);%倒置图像figure(3),imshow(RGB1),pausefigure(4), imshow(RGB2),pausefigure(5),imshow(RGB3),pause RGB4= imadjust(RGB1,0,1,1,0,1.5);%倒置图像,非线性RGB5= imadjust(RGB1,0,1,1,0,0.5);%倒置图像,非线性figure(6),imshow(RGB4),figure(7),imshow(RGB5) (2) 非线性点运算例上例中用的直方图均衡化(histeq)是常用的非线性点运算。即它对已知的灰度分布图像,使用某种非线性灰度变换,使运算结果变成一幅具有均匀灰度分布的新图像。点运算常用于增强图像中感兴趣的那部分的对比度(称为对比度增强或对比度扩展)。也可以根据灰度的不同级把一幅图像划分成若干不连续的区域,以便进一步确定它们的边界,画出轮廓线等等。直方图均衡化讲直方图: 设总像素点数目为H,共有L灰度级,且第个灰度级的灰度值像素点数目为个,出现的频率为:histeq Enhance contrast using histogram equalization SyntaxJ = histeq(I,hgram)J = histeq(I,n)Descriptionhisteq enhances the contrast of images by transforming the values in an intensity image, or the values in the colormap of an indexed image, so that the histogram of the output image approximately matches a specified histogram. J = histeq(I,hgram) transforms the intensity image I so that the histogram of the output intensity image J with length(hgram) bins approximately matches hgram. The vector hgram should contain integer counts for equally spaced bins with intensity values in the appropriate range: 0, 1 for images of class double, 0, 255 for images of class uint8, and 0, 65535 for images of class uint16. histeq automatically scales hgram so that sum(hgram) = prod(size(I). The histogram of J will better match hgram when length(hgram) is much smaller than the number of discrete levels in I. J = histeq(I,n) transforms the intensity image I, returning in J an intensity image with n discrete gray levels. A roughly equal number of pixels is mapped to each of the n levels in J, so that the histogram of J is approximately flat. (The histogram of J is flatter when n is much smaller than the number of discrete levels in I.) The default value for n is 64. 实际上若原图像在像素点的灰度值为,则直方图均衡化后图像在像素点的灰度值为:接上例:直方图均衡化(非线性)clear all,close allI=imread(pout.tif);figure(1),subplot(121),imshow(I),subplot(122),imhist(I),pauseJ=histeq(I);figure(2),subplot(121),imshow(J),subplot(122),imhist(J)自适应直方图均衡化(限定对比度适应性直方图均衡化)在某些应用中,可能只需对图像的某个部分进行均衡化,此时可用adapthisteq函数替代histeq函数,实现对图像的自适应直方图均衡化。讲:接上例:自适应直方图均衡化clear all,close allI=imread(pout.tif);figure(1),subplot(121),imshow(I),subplot(122),imhist(I),pauseJ=adapthisteq(I);figure(2),subplot(121),imshow(J),subplot(122),imhist(J)注:用adapthisteq可对图像的某一个小区域进行操作,可以使小区域的直方图与指定的直方图相匹配,这样要设定adapthisteq函数的参数,可看help adapthisteq或 doc adapthisteq。使用最大熵对图像进行增强的思想和原理看P:243讲:I=imread(pout.tif);figu
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 房产经纪服务合同(标准版)
- 城乡供水管网水力分析
- 污水处理厂远程监控方案
- 电力接入与配电设计方案
- 2025年淮北濉溪县龙华学校教师招聘考试参考试题及答案解析
- 2025年湖南益阳桃江县选调县外教师20人备考练习试题及答案解析
- 风电机组风速与风向监测方案
- 2025年8月广东广州奥林匹克中学编外聘用制专任教师招聘1人备考练习题库及答案解析
- 2025年广西来宾市武宣县人民医院公开招聘6人(第三期)备考练习题库及答案解析
- 2025内蒙古包头医学院招聘管理助理和教学助理岗工作人员22人考试参考试题及答案解析
- 膜性肾病课件
- 河南省天立教育2025-2026学年高三上学期开学联合考试语文含答案
- 2025年市场监督管理局公务员招录面试题及答案解析
- 《MATLAB数值计算基础与实例教程 》课件-第10章 其他数值计算的优化问题
- 2024-2025学年苏教版(2024)小学数学三年级上册(全册)教学设计(附目录P303)
- 党史宣讲面试题目及答案
- 输电线路清障作业方案
- 环氧酯树脂行业报告
- 提高员工执行力培训课件
- 痰标本采集技术
- 《电机学》课件(共十章)
评论
0/150
提交评论