




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、It makes all the difference whether one sees darkness through the light or brightness through the shadows.第3章 空域图像增强技术图像增强的目的是使处理后的图像更适合于具体的应用,是面向问题的,例如:适合于处理X射线的技术并不一定适合于处理空间探测器传送的图像。图像增强是最有趣的和最生动的图像处理技术之一。判断标准:人的主观视觉图像增强技术从总体上说,可以分为两大类:空域增强和频域增强。空域增强是直接对图像平面中的像素进行处理,像前面已经介绍过的直方图均衡、匹配等方法,都属于空域增强技术。
2、频域增强则是将原定义在图像空间中的图像以某种形式转换(Fourier 变换)到其它空间(频率域)中,利用该空间的特有性质方便地进行图像处理,最后再转回原图像空间中。另外,两大类中的某些方法通常也被结合在一起来进行增强操作。It makes all the difference whether one sees darkness through the light or brightness through the shadows.3.1 基础( , ) ( , )g x yT f x y空域增强的一般数学表达式:算子T操作在(x,y)的某个邻域(neighborhood)上,例如33领域,或一
3、输入图像集上It makes all the difference whether one sees darkness through the light or brightness through the shadows.当领域为11,即只包含当前象素自己时,T成为灰度级变换函数,此时的处理成为点处理。当更大的邻域被考虑时,往往成为掩码处理(mask processing)或者滤波。( )sT r两个常用的灰度级变换函数:对照度拉伸和阈值函数It makes all the difference whether one sees darkness through the light or b
4、rightness through the shadows.3.2 一些基本的灰度变换It makes all the difference whether one sees darkness through the light or brightness through the shadows.3.2.1 负变换S=L-1-r, 这里图像的灰度范围为0, L-1It makes all the difference whether one sees darkness through the light or brightness through the shadows.3.2.2 对数变换l
5、og(1),0scrr 其将使比较狭窄的低灰度级范围变得更宽,而较宽的高灰度级范围变得更窄,同时能够压缩象素值变化范围很大的图像,使之象素值分布范围更小。Fourier谱(01.5*106)经过对数变换后:06.2It makes all the difference whether one sees darkness through the light or brightness through the shadows.3.2.3 幂律变换,0scrcc1,而变化 r 时的各种变换规律It makes all the difference whether one sees darkness
6、through the light or brightness through the shadows.幂律变换的一个最好应用是伽马校正(Gamma correction)被广泛使用在图像捕捉、打印和显示设备上。2.50.4It makes all the difference whether one sees darkness through the light or brightness through the shadows.Gamma变换用于通常的对照度操作It makes all the difference whether one sees darkness through the
7、 light or brightness through the shadows.It makes all the difference whether one sees darkness through the light or brightness through the shadows.3.2.4 分段线性变换分段线性函数的主要有点是其形式可以任意复杂,主要缺点是其说明需要更多的用户输入。对照度拉伸变换:a) 分段线性函数b) 低对照度放大约700倍的花粉SEM图像c) 对照度拉伸结果d) 灰度阈值化处理It makes all the difference whether one se
8、es darkness through the light or brightness through the shadows.灰度切割(slicing):主要用于突出某个特定的灰度范围,从而增强某个专门的特征,如卫星图像中的水团。It makes all the difference whether one sees darkness through the light or brightness through the shadows.位平面切割(bit-plane slicing):该操作主要是为突出图像中的某个具体的位对整个图像外表的贡献。可以把一副数字图像分解成位平面的组合,分析图像
9、每个位的相对重要性,从而在图像量化时可以帮助决定所使用的位数是否足够,这种分解在图像压缩中也有很大的作用。It makes all the difference whether one sees darkness through the light or brightness through the shadows.It makes all the difference whether one sees darkness through the light or brightness through the shadows.3.3 直方图处理直方图是大量的空域处理技术的基础,直方图处理可以有效
10、地用于图像增强。除了能提供有关图像的统计特征外,其所包含的信息还能用于其他很多的图像处理技术,如图像分割、图像压缩等。其软件实现简单,可以做成固件,使其在实时图像处理中成为最受欢迎的工具。定义:性质:It makes all the difference whether one sees darkness through the light or brightness through the shadows.直方图描述了每个灰度级具有的像素的个数,反映的是图像灰度的统计信息,但丢失了所有这些像素点的空间信息,即像素点的相对位置。因此,任一特定的图像有唯一的直方图,但反之并不成立。It make
11、s all the difference whether one sees darkness through the light or brightness through the shadows.直方图反映的总体性质:明暗程度、细节是否清晰、动态范围大小等It makes all the difference whether one sees darkness through the light or brightness through the shadows.四种典型灰度图像的直方图特征:(a)暗图像;(b)亮图像;(c)低对照度图像;(e)高对照度图像It makes all the
12、difference whether one sees darkness through the light or brightness through the shadows.直方图的计算:通过面积求直方图(做实验):It makes all the difference whether one sees darkness through the light or brightness through the shadows.直方图的用途:1)数字化参数的选择:2)边界阈值的选取:例:It makes all the difference whether one sees darkness
13、through the light or brightness through the shadows.It makes all the difference whether one sees darkness through the light or brightness through the shadows.3.3.1 直方图均衡处理(equalization)用于直方图均衡化的函数s=T(r)必须满足两个条件:a) T(r)是一个单调递增的单值函数b) 0 T(r) 1, 对0 r 1;以上s和r;分别表示输入和输出图像的规一化灰度,即在0,1范围可以证明,概率累计分布函数就是所要的直
14、方图均衡函数:0( )( ),1( )( )( )1,1rrrsrsT rp w dwrp rdrp sp rTdss It makes all the difference whether one sees darkness through the light or brightness through the shadows.在离散情况下:00( )( )( ),krkkkkrjjkkjnp rkLnsT rp rnkLn 以上,k表示某个灰度级,L是整个灰度级的数目,在通常的8位图像下,为256。以上的方程就是通常所说的直方图均衡化或者线性化。很显然,该方程满足前面所说的两个条件。特点:
15、虽然不象连续情况下时输出灰度完全满足均匀分布,但从该方程明显可以看出,均衡化后的图像比原图像所跨越的灰度级范围更宽。另外,直方图处理是完全“自主”性质的,即该过程所需的参数完全来自图像本身,不需要任何额外的参数,是一种有力的自适应增强工具。还有,该技术实现起来也很简单。It makes all the difference whether one sees darkness through the light or brightness through the shadows.rjrj+rsjsj+sIt makes all the difference whether one sees da
16、rkness through the light or brightness through the shadows.例例例例例例例:设图象有例:设图象有6464* *6464=4096=4096个象素,有个象素,有8 8个灰度级,灰度个灰度级,灰度分布如表所示。进行分布如表所示。进行直直方图均衡化方图均衡化。rkr0=0r1=1/7r2=2/7r3=3/7r4=4/7r5=5/7r6=6/7r7=1 nk 790102385065632924512281p(rk) 0.190.250.210.160.080.060.030.02It makes all the difference whet
17、her one sees darkness through the light or brightness through the shadows.步骤:步骤:rkr0=0r1=1/7r2=2/7r3=3/7r4=4/7r5=5/7r6=6/7r7=1 nk 790102385065632924512281p(rk) 0.190.250.210.160.080.060.030.02例例例例例例It makes all the difference whether one sees darkness through the light or brightness through the shad
18、ows.1. 1. 由(由(2-22-2)式计算)式计算s sk k。rkr0=0r1=1/7r2=2/7r3=3/7r4=4/7r5=5/7r6=6/7r7=1 nk 790102385065632924512281p(rk) 0.190.250.210.160.080.060.030.02sk计算计算 0.190.440.650.810.890.950.981.00例例例例例例It makes all the difference whether one sees darkness through the light or brightness through the shadows.rk
19、r0=0r1=1/7r2=2/7r3=3/7r4=4/7r5=5/7r6=6/7r7=1 nk 790102385065632924512281p(rk) 0.190.250.210.160.080.060.030.02sk计算计算 0.190.440.650.810.890.950.981.00sk舍入舍入 1/73/75/76/76/71112. 2. 把计算的把计算的s sk k就近安排到就近安排到8 8个个灰度级中。灰度级中。例例例例例例It makes all the difference whether one sees darkness through the light or
20、brightness through the shadows.rkr0=0r1=1/7r2=2/7r3=3/7r4=4/7r5=5/7r6=6/7r7=1 nk 790102385065632924512281p(rk) 0.190.250.210.160.080.060.030.02sk计算计算 0.190.440.650.810.890.950.981.00sk舍入舍入 1/73/75/76/76/7111sk nsk 7901023850985448p(sk) 0.190.250.210.240.113. 3. 重新命名重新命名s sk k,归并相同灰度归并相同灰度级的象素数。级的象素数
21、。例例例例例例It makes all the difference whether one sees darkness through the light or brightness through the shadows.均衡化前后直方图比较例例例例例例It makes all the difference whether one sees darkness through the light or brightness through the shadows.例:It makes all the difference whether one sees darkness through t
22、he light or brightness through the shadows.It makes all the difference whether one sees darkness through the light or brightness through the shadows. 直方图均衡化实质上是减少图象的灰度级以换取对比度的加大。在均衡过程中,原来的直方图上频数较小的灰度级被归入很少几个或一个灰度级内,故得不到增强(?!) 。若这些灰度级所构成的图象细节比较重要,则需采用局部区域直方图均衡。It makes all the difference whether one
23、sees darkness through the light or brightness through the shadows.3.3.2 直方图匹配/规定(specification)n 另外,直方图的规定没有什么规则可循。一般,可以根据特定的增强任务,采用试错的方法来得到想要的直方图规定。It makes all the difference whether one sees darkness through the light or brightness through the shadows.连续灰度的直方图原图It makes all the difference whether
24、 one sees darkness through the light or brightness through the shadows.连续灰度的直方图规定It makes all the difference whether one sees darkness through the light or brightness through the shadows. 令P(r) 为原始图象的灰度密度函数,P(z)是期望通过匹配的图象灰度密度函数。对P(r) 及P(z) 作直方图均衡变换,通过直方图均衡为桥梁,实现P(r) 与P(z) 变换。It makes all the differe
25、nce whether one sees darkness through the light or brightness through the shadows.rjzkIt makes all the difference whether one sees darkness through the light or brightness through the shadows. 步骤: (1)由 将各点灰度由 r映射成s。 (2)由 将各点灰度由 z映射成v。 rrdrrprTs010)()(zzdzzpzGv010)()(It makes all the difference wheth
26、er one sees darkness through the light or brightness through the shadows. 步骤: (3)根据v=G(z), z=G-1(v) 由于v, s有相同的分布,逐一取 v=s,求出与r对应的z=G-1(s)。It makes all the difference whether one sees darkness through the light or brightness through the shadows.离散灰度级情况: 由(1)、(2)计算得两张表,从中选取一对, ,使,并从两张表中查得对应的rj,zk。于是,原始
27、图象中灰度级为的所有象素均映射成灰度级。最终得到所期望的图象。It makes all the difference whether one sees darkness through the light or brightness through the shadows.It makes all the difference whether one sees darkness through the light or brightness through the shadows.It makes all the difference whether one sees darkness thr
28、ough the light or brightness through the shadows.3.3.3 局部增强前面所说的两种处理技术都是全局处理,用于整体增强。在某些情况下,用于增强某个小区域细节的局部增强技术是需要的。局部增强其实就是基于邻域的空间域操作(更详细的讨论在3.5节),前面的方法同样可以使用,但此时处理的是一副图像中的某个子区域。简单实例:It makes all the difference whether one sees darkness through the light or brightness through the shadows.3.3.4 直方图统计量
29、用于增强1010011220( )()( )( )0( )()(LnniiiLiiiLiiinrrmp rm=r p rrrrrmp r阶中心矩:)均值:)显然:1,二阶中心矩(方差):)m是图像平均灰度级的测度;而方差,通常表示为2,则代表了图像的平均对照度。这两个量的更有力的应用是在局部增强中,不仅简单、灵活性大,而且局部均值和方差与图像的外观存在紧密的、可预测的对应关系。例:02( , ),and( , ), otherwisexyxysG1GsGE f x ymk Mk Dk Dg x yf(x,y)It makes all the difference whether one see
30、s darkness through the light or brightness through the shadows.绕在支撑物上钨丝的SEM图像(放大130倍)使用统计量的局部增强结果It makes all the difference whether one sees darkness through the light or brightness through the shadows.3.4 代数和逻辑运算增强n 逻辑操作(二进制掩膜,binary masking)基于点运算,对两副图像的单个象素进行操作(此时每个象素的值都被看成逻辑值),基本包括与、或、非三者,其他任何逻辑
31、操作都可通过三者之间的组合来完成。逻辑操作通常用于选择ROI (region of interest),也常与形态学处理相结合。It makes all the difference whether one sees darkness through the light or brightness through the shadows.It makes all the difference whether one sees darkness through the light or brightness through the shadows.3.4.1 图像加It makes all th
32、e difference whether one sees darkness through the light or brightness through the shadows.It makes all the difference whether one sees darkness through the light or brightness through the shadows.It makes all the difference whether one sees darkness through the light or brightness through the shado
33、ws.3.4.2 图像减图像减的重要作用之一是突出图像间的差异,最成功的商业应用是医学图像中的掩码模式X光成像。It makes all the difference whether one sees darkness through the light or brightness through the shadows.It makes all the difference whether one sees darkness through the light or brightness through the shadows.3.4.3 图像乘It makes all the differ
34、ence whether one sees darkness through the light or brightness through the shadows.3.4.4 图像乘It makes all the difference whether one sees darkness through the light or brightness through the shadows.3.4.5 代数运算的应用平均去噪It makes all the difference whether one sees darkness through the light or brightness
35、 through the shadows.It makes all the difference whether one sees darkness through the light or brightness through the shadows.3.5 空间滤波It makes all the difference whether one sees darkness through the light or brightness through the shadows.基本步骤:不过当模板的边界超出图像的边界时,要注意边界问题的处理,最常用的方法是填充(padding),但其会影响图像
36、的边界,影响程度随模板尺寸的增大而增加。It makes all the difference whether one sees darkness through the light or brightness through the shadows.也称做滤波器(filter)、核(kernel)、模板(template)、窗口(window)。对mn的掩码(通常要求m,n必须是奇数):( , )( , ) (,)absa tbg x yw s t f xs yt 这里:a=(m-1)/2,b=(n-1)/2,这种线性空间滤波也通常指“把图像与掩码进行卷积”,掩码也叫“卷积掩码”。从滤波器响
37、应的角度讲,上式也可以简写称:1 1221mnmnmniiiRw zw zw zw zIt makes all the difference whether one sees darkness through the light or brightness through the shadows.3.5.1 空间平滑滤波器a) 线性平滑滤波器平滑滤波通常被用作模糊图像和减少噪声。模糊处理通常用在预处理阶段,如在目标抽取前用于移除小的细节,或者把线和曲线间的间隙连接起来。噪声减少可以用可以用线性的或非线性的滤波器来完成。It makes all the difference whether on
38、e sees darkness through the light or brightness through the shadows.邻域平均相当于模板的元素全为1的情况,当还包含其他整数时,更适合的叫法是加权平均。( , )( , ) (,)/( , )ababsa tbsa tbg x yw s t f xs ytw s t 平均法在一定程度上抑制了噪声,但同时也会引起模糊线性,其程度与邻域半径成正比。It makes all the difference whether one sees darkness through the light or brightness through
39、the shadows.从左至右,从上到下分别为500500象素的原图像,和用大小分别为3、5、9、15和35的平方平均滤波器模板对原图像平滑的结果。It makes all the difference whether one sees darkness through the light or brightness through the shadows.超限(基于阈值的)邻域平均法:It makes all the difference whether one sees darkness through the light or brightness through the shadow
40、s.b) 排序统计滤波器是一种非线性操作,其响应是基于模板所包含图像区域内象素的排序结果来定的,用得最多的是中值滤波器,此外还有最大、最小滤波器等。中值滤波对脉冲噪声和椒盐噪声(salt-and pepper noise)特别有效。It makes all the difference whether one sees darkness through the light or brightness through the shadows.中值滤波的基本步骤:It makes all the difference whether one sees darkness through the li
41、ght or brightness through the shadows.一般来讲:It makes all the difference whether one sees darkness through the light or brightness through the shadows.3.5.2 空间锐化滤波器一阶导数和二阶导数的特征:1)一阶导数产生更厚的边缘;2)二阶导数对细的细节,如细线和孤立点的响应更强;3)一阶导数对灰度的阶跃变化响应更强烈,而二阶导数则会在此产生双响应;4)二阶导数在灰度变化相似时,其对线的响应要强于阶跃变化,对点的响应又强于线。It makes all
42、 the difference whether one sees darkness through the light or brightness through the shadows.It makes all the difference whether one sees darkness through the light or brightness through the shadows.3.5.2.1 二阶导数增强Laplacian算子22222fffxy2 (1, )(1, )( ,1)( ,1)4 ( , )ff xyf xyf x yf x yf x y具有各向同性特征的线性变
43、换算子:Laplacian算子(相当于线性高通滤波器)离散实现:其具有90度旋转不变性,当对角方向的不变性(45度方向)也加上时,即得到如下右图的掩码:It makes all the difference whether one sees darkness through the light or brightness through the shadows.通过把原图像与锐化处理结果相减,可以既保留锐化效果,同时能恢复图像的背景特征。2( , )( , )( , )g x yf x yf x yIt makes all the difference whether one sees dar
44、kness through the light or brightness through the shadows.反锐化掩膜和高提升滤波(unsharp masking and high-boost filtering)见教材p132,自学It makes all the difference whether one sees darkness through the light or brightness through the shadows.3.5.2.2 一阶导数增强梯度算子1/222/()()xyGfxGfyfffxy f梯度算子:梯度矢量的幅度:xyfGG 9586fzzzz 在
45、不再特殊说明时,通常把梯度矢量的幅度称为梯度。其具有旋转不变性。实际实现时通常采用如下近似:尽管其计算简单,也能反映灰度变化,但丧失了各向同性特征一阶导数算子的数字近似:a) Robert 交叉梯度算子b) Sobel梯度算子789123369147(2)(2)(2)(2)fzzzzzzzzzzzz It makes all the difference whether one sees darkness through the light or brightness through the shadows.33掩模图:It makes all the difference whether o
46、ne sees darkness through the light or brightness through the shadows.一阶导数检测隐形眼镜边缘缺陷It makes all the difference whether one sees darkness through the light or brightness through the shadows.3.6 空间增强方法的联合应用(实验)Frequently, a given enhancement task will require application of several complementary enhan
47、cement techniques in order to achieve an acceptable result. The image shown left is a nuclear whole body bone scan, used to detect diseases such as bone infection and tumors. The objective is to enhance this image by sharpening it and by bringing out more of the skeletal detail. The narrow dynamic r
48、ange of the low gray levels and high noise content make this image difficult to enhance.It makes all the difference whether one sees darkness through the light or brightness through the shadows.The StrategyUtilize the Laplacian to highlight fine detailUtilize the gradient to enhance prominent edgesC
49、ombine Laplacian and gradient to get the detail-enhanced and noise-compressed imageIncrease the contrast of low gray levels by using a gray-level transformation.It makes all the difference whether one sees darkness through the light or brightness through the shadows.Laplacian EnhancementA rather noi
50、sy sharpened image is expected. Median filter is incapable of removing noise in such medical images),(),(2yxfyxfIt makes all the difference whether one sees darkness through the light or brightness through the shadows.Smoothed Gradient as a MaskThe response of the gradient to noise and fine detail i
51、s lower than the Laplacians and can be lowered further by smoothing the gradient with an averaging filter.We can smooth the gradient and multiply it by the Laplacian enhanced image. In this case the smoothed gradient may be viewed as a mask image.5 x 5 box smoothmask imageIt makes all the difference
52、 whether one sees darkness through the light or brightness through the shadows.The Sharpen Enhanced ImageThe final sharpen enhanced image can be obtained from the sum of original image and the sharpened image which comes from the product of Laplacian enhanced image and the smoothed Sobel gradient.ad
53、d to theoriginalsharpen enhanced image Laplacianenhancedsmoothed Sobel gradientsharpened image strong edges and the relative lack of visible noiseIt makes all the difference whether one sees darkness through the light or brightness through the shadows.Contrast Stretch and the final ResultThe final s
54、tep in this enhancement task is to increase the contrast of the sharpened image.There are a number of gray level transformation functions that can accomplish this objective. The dark characteristics of the images lend themselves to a power-law transformation.Significant new detail is visible in the result, including the faint definition of the outline of the body, and of body tissue.c = 1 = 0.5It makes all the difference whether one sees darkness through the light or
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 好吃的水果课件
- 巡察干部知识培训会课件
- 2025年电商绿色物流行业物流运输车辆绿色化升级案例研究报告
- 激光原理陈鹤鸣课件
- 消防站建设项目可行性研究报告
- 年产10万吨苯乙烯脱氢催化剂再生项目可行性研究报告
- 二零二五年度生态园林景观工程设计合同
- 二零二五年度不锈钢户外照明系统设计与安装合同
- 2025版智能控制系统研发合同模板
- 二零二五年度能源设备招标采购合同
- 2025年山西航空产业集团有限公司招聘考试笔试试题(含答案)
- 电梯安全培训课件内容
- 2025年事业单位招聘职业能力倾向测验考试题库附参考答案满分必刷
- 应聘副研究员汇报
- 2025年中考历史(河南卷)真题评析
- 手术室时间管理课件
- 2025版线上直播场推广服务合同模板
- 高一上学期数学学法指导课件2024.9.14
- GB/T 45845.1-2025智慧城市基础设施整合运营框架第1部分:全生命周期业务协同管理指南
- 呼吸科考试试题及答案
- 肿瘤内科胆囊癌护理查房
评论
0/150
提交评论