当前位置:
文档之家› 数字图像处理 第三章 空域图像增强技术
数字图像处理 第三章 空域图像增强技术
It makes all the difference whether one sees darkness through the light or brightness through the shadows.
3.2.4 分段线性变换
分段线性函数的主要有点是其形式可以任意复杂,主要缺点是其说明需 要更多的用户输入。 对照度拉伸变换:
rk r0=0 r1=1/7 r2=2/7 r3=3/7 r4=4/7 r5=5/7 r6=6/7 r7=1
nk 790 1023 850 656 329 245 122 81
p(rk) 0.19 0.25 0.21 0.16 0.08 0.06 0.03 0.02
It makes all the difference whether one sees darkness through the light or brightness through the shadows.
位平面切割(bit-plane slicing):
该操作主要是为突出图像中的某个具体的位对整个图像外表的贡献。可以 把一副数字图像分解成位平面的组合,分析图像每个位的相对重要性,从 而在图像量化时可以帮助决定所使用的位数是否足够,这种分解在图像压 缩中也有很 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.1 基础
空域增强的一般数学表达式:
g ( x, y) T [ f ( x, y)]
s T (r ) pr ( w)dw, r 1
0
r
pr ( r ) dr ps ( s ) pr ( r ) T' ds 1, s 1
It makes all the difference whether one sees darkness through the light or brightness through the shadows.
sj+s sj
rj rj+r
It makes all the difference whether one sees darkness through the light or brightness through the shadows.
例
例:设图象有64*64=4096个象素,有8个灰度级,灰度 分布如表所示。进行直方图均衡化。
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.
当领域为1×1,即只包含当前象素自己时,T成为灰度级变换函数, 此时的处理成为点处理。当更大的邻域被考虑时,往往成为掩码处 理(mask processing)或者滤波。
s T (r )
两个常用的灰度级变换函数:对照度拉伸和阈值函数
It makes all the difference whether one sees darkness through the light or brightness 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-1]
算子T操作在(x,y)的某个邻域(neighborhood)上,例如3×3领域, 或一输入图像集上
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.2.2 对数变换
s c log(1 r ),r 0
其将使比较狭窄的低灰度级范围变得更宽,而较宽的高灰度级范围变得更窄, 同时能够压缩象素值变化范围很大的图像,使之象素值分布范围更小。
灰度切割(slicing): 主要用于突出某个特定的灰度范围,从而增强某个专门的特征,如卫 星图像中的水团。
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 直方图处理
直方图是大量的空域处理技术的基础,直方图处理可以有效地用于图像 增强。除了能提供有关图像的统计特征外,其所包含的信息还能用于其 他很多的图像处理技术,如图像分割、图像压缩等。其软件实现简单, 可以做成固件,使其在实时图像处理中成为最受欢迎的工具。 定义:
=0.4
It 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 light or brightness through the shadows.
例
步骤:
rk r0=0 r1=1/7 r2=2/7 r3=3/7 r4=4/7 r5=5/7 r6=6/7 r7=1
3.3.1 直方图均衡处理(equalization)
用于直方图均衡化的函数s=T(r)必须满足两个条件: a) T(r)是一个单调递增的单值函数 b) 0= T(r) <=1, 对0= r <=1; 以上s和r;分别表示输入和输出图像的规一化灰度,即在[0,1]范围 可以证明,概率累计分布函数就是所要的直方图均衡函数:
直方图的计算:
通过面积求直方图(做实验):
It makes all the difference whether one sees darkness through the light or brightness through the shadows.
直方图的用途: 1)数字化参数的选择:
2)边界阈值的选取:
k
特点:虽然不象连续情况下时输出灰度完全满足均匀分布,但从该方程明 显可以看出,均衡化后的图像比原图像所跨越的灰度级范围更宽。另外, 直方图处理是完全“自主”性质的,即该过程所需的参数完全来自图像本 身,不需要任何额外的参数,是一种有力的自适应增强工具。。还有,该 技术实现起来也很简单。
It makes all the difference whether one sees darkness through the light or brightness through the shadows.
c=1,而变化 r 时 的各种变换规律
It makes all the difference whether one sees darkness through the light or brightness through the shadows.
幂律变换的一个最好应用是伽马校正(Gamma correction) 被广泛使用在图像捕捉、打印和显示设备上。 =2.5
第3章 空域图像增强技术
图像增强的目的是使处理后的图像更适合于具体的应用,是面向问 题的,例如:适合于处理X射线的技术并不一定适合于处理空间探 测器传送的图像。图像增强是最有趣的和最生动的图像处理技术之 一。判断标准:人的主观视觉 图像增强技术从总体上说,可以分为两大类:空域增强和频域增强。 空域增强是直接对图像平面中的像素进行处理,像前面已经介绍过 的直方图均衡、匹配等方法,都属于空域增强技术。 频域增强则是将原定义在图像空间中的图像以某种形式转换 (Fourier 变换)到其它空间(频率域)中,利用该空间的特有性 质方便地进行图像处理,最后再转回原图像空间中。 另外,两大类中的某些方法通常也被结合在一起来进行增强操作。
a) 分段线性函数 b) 低对照度放大约 700倍的花粉SEM 图像 c) 对照度拉伸结果 d) 灰度阈值化处理
It makes all the difference whether one sees darkness through the light or brightness through the shadows.
四种典型灰度图像的直方图特征: (a)暗图像;(b)亮图像; (c)低对照度图像;(e)高对照度图像