第二章:图像处理之空域图像增强Spatial domain image enhancement

outline

• Spatial domain image enhancement

– Intensity transformation functions • Inverse or Image Negatives

• Brightening, e.g., log
• Darkening, e.g., nth power
• Power-law transformation • Intensity normalization

– Histogram Equalization • Contrast stretching

• Contrast compressing
• Global vs local
• Spatial domain image enhancement

– Image operations

• Addition, subtraction, multiplication, AND,
OR, Not, etc.

– Image averaging, effect to noise – Filtering using a mask

– Low-pass spatial filtering

– Median spatial filtering

– High-pass spatial filtering

————————————————————————————————————————————

1.强度变换函数Intensity transformation functions • Inverse or Image Negatives

1.1 Basic Gray Level Transforms: Inverse or Image Negatives

第二章:图像处理之空域图像增强Spatial domain image enhancement_第1张图片
比如256级的灰度图(0~255)如果灰度为0,那么反转对应255,也就是256-1-0 = 255

效果如下:

1.2 brightning and darkening

第二章:图像处理之空域图像增强Spatial domain image enhancement_第2张图片

1.3 幂律变换Power‐Law Transformations

也就是个指数函数
第二章:图像处理之空域图像增强Spatial domain image enhancement_第3张图片
0 < gamma < 1, 斜率前期变化越快,也就是说特别黑的地方会很白,原来很白的地方变化不大。整体变白
gamma > 1, 斜率后期变化越快,也就是说特别白的地方会很黑,原来很白的地方变化不大。整体变黑。

例子:

gamma 越大越黑

1.4 Intensity normalization 强度归一化

2.Histogram Equalization直方图均值化

2.1 Contrast Stretching 拉伸

第二章:图像处理之空域图像增强Spatial domain image enhancement_第4张图片
如图把白的地方压黑,把黑的地方提亮,这样对比度就变大了。

假设r1 r2分别是原图中灰度最小最大值,也就是最黑最白点。把他们直接归为0和L-1,如下图:

第二章:图像处理之空域图像增强Spatial domain image enhancement_第5张图片

2.2 Contrast compressing

反之,若要对比度变小:第二章:图像处理之空域图像增强Spatial domain image enhancement_第6张图片

2.3 Global vs local

Local Enhancement

– Each pixel is processed based on information of the entire image
– Often enhances global details

如果我们希望加强局部特征:
– Each pixel is processed based on information of a small area/sub‐image

Local Histogram Equalization

calculate histogram using neighborhood of m ∗ m m *m mm about (x,y)第二章:图像处理之空域图像增强Spatial domain image enhancement_第7张图片

3. Image Operations

3.1 加减乘除,和或非异或

第二章:图像处理之空域图像增强Spatial domain image enhancement_第8张图片

3.2 • Subtraction or Absolute Difference

– Very useful for determining the difference between two images
– Used for “detection”

两图对减:

第二章:图像处理之空域图像增强Spatial domain image enhancement_第9张图片
第二章:图像处理之空域图像增强Spatial domain image enhancement_第10张图片

3.3 Addition can blend two images

加法可以混合两张图
第二章:图像处理之空域图像增强Spatial domain image enhancement_第11张图片

3.4 逻辑操作
  1. 取反
    第二章:图像处理之空域图像增强Spatial domain image enhancement_第12张图片
  2. 取交集,也就是共同有的部分第二章:图像处理之空域图像增强Spatial domain image enhancement_第13张图片

第二章:图像处理之空域图像增强Spatial domain image enhancement_第14张图片

3.5 图像平均 Image Averaging 可以去噪

我们知道图像带有如下天然的特性:图像中每个像素点的值与其旁边的像素点的值比较接近。

既然图像中的每个像素点的值与其旁边像素的值比较接近,如果一个像素点的值被噪声干扰,那么是否可以用其周边区域的像素平均值来代替这个像素点的值呢。

这就是平均操作:即把每个像素的值改变为其与领域像素组成区域的平均值。

第二章:图像处理之空域图像增强Spatial domain image enhancement_第15张图片

4.Filter

4.1 Filtering using a mask

filter的计算公式:对应点和对应权重相乘累加和。

第二章:图像处理之空域图像增强Spatial domain image enhancement_第16张图片

4.2 Low‐pass spatial filtering低通空间滤波

第二章:图像处理之空域图像增强Spatial domain image enhancement_第17张图片
注意权重必须为正数
4.2.1 平均滤波器——mask越大越糊

第二章:图像处理之空域图像增强Spatial domain image enhancement_第18张图片

4.3 Median spatial filtering 中值空间滤波器
  1. 非线性
  2. 查找窗口的中值
  3. 保留边缘
  4. 消除脉冲噪声避免过度平滑

第二章:图像处理之空域图像增强Spatial domain image enhancement_第19张图片

第二章:图像处理之空域图像增强Spatial domain image enhancement_第20张图片
和低通空间滤波的区别是能防止过度平滑

• Often referred to as “de‐speckle operation”(是一种不断的去斑点操作)
• It converges(最终聚合)
– That is, if you perform it over and over for many times, eventually the image will not change.

4.4 High-pass spatial filtering 高通空间滤波器

第二章:图像处理之空域图像增强Spatial domain image enhancement_第21张图片
中间为正,四周为负,和为0

第二章:图像处理之空域图像增强Spatial domain image enhancement_第22张图片

你可能感兴趣的:(图像处理,计算机视觉,图像处理)