• 主页
  • 相册
  • 随笔
  • 目录
  • 存档
Total 244
Search AboutMe

  • 主页
  • 相册
  • 随笔
  • 目录
  • 存档

实验:基于对比度增强的数字图像取证

2019-12-09

1. 原理

2. 0. 直方图归一化(Histogram normalization)

目的

  1. In image processing, normalization is a process that changes the range of pixel intensity values. In more general fields of data processing, such as digital signal processing, it is referred to as dynamic range expansion.

  2. The purpose of dynamic range expansion in the various applications is usually to bring the image, or other type of signal, into a range that is more familiar or normal to the senses, hence the term normalization.

  3. For example, a newspaper will strive to make all of the images in an issue share a similar range of grayscale.

  4. After applying certain processing operations to the input image, the gray levels of the resulting image are no longer necessarily within the proper range for display. In this case the image needs to be normalized or rescaled

实现

$y=f(x)=255\frac{x-x_{min}}{x_{max}-x_{min}}$

  • $x_{max}$,$x_{min}$:图像像素的最值
  • Remark: $x_{max}=255,x_{min}=0$,显然不需要归一化

3. 1. 需求

3.1. 现实需求

In the applications such as law enforcement and news recording, it is necessary to verify the originality and authenticity of digital images, and make clear the image manipulation history to get more information.

3.2. 理论需求

  • 之前的对比度增强法证算法是假设图像并未修改,此时的灰度直方图呈现平滑轮廓
    • 通过阈值测试来确定对比度是否增强。$F$大于决策阈值,则检测到对比度增强。
      • $F$:高频能量度量(high frequency energy metric)
  • 但在低质量Jpeg压缩下,图像将会出现块效应,将导致直方图的不平滑甚至局部密集
    • 块效应导致**$F$值增大**,使不再适用于先前的算法

4. 2. 改进的全局对比度增强算法(detection of global contrast enhancement)

改进原理

  • 峰谷效应(Peak/Gap Artifacts)

    • contrast enhancement = pixel mapping

  • 峰谷效应不受图像压缩影响

    In fact, two factors affect the de facto presence of histogram peak bins in a JPEG image: 1) the flatness; 2) JPEG quality factor. The larger flat regions and larger DC quantization step would cause more apparent peak bins.

    On the contrary, the zero-height gap bins are absent in compressed images since there is lack of a distinct pixel value mapping applied to all pixels. A regular pixel value mapping relationship exists in flat regions, but not in other regions. Therefore, the zero-height gap feature can be used to detect global contrast enhancement in both uncompressed and compressed images.

  • $r$:伽马系数

实现

  • 定义零高度谷(zero-height gap):对于零高度谷的像素值$k$,归一化的灰度直方图$h(x)$
    • 相邻像素的灰度级应大于阈值$τ$
      • $min {h(k − 1), h(k + 1)} >τ$
    • 排除直方图尾端可能被错误检测到的零高度谷,故$2w+1$邻域内的像素灰度级应大于阈值$τ$
      • $\frac{1}{2w+1}\sum_{x=k-w}^{k+w}h(k+1)>τ$
  • 计算零高度谷的数目,记作$N_g$。
    • 如果$N_g$大于阈值,则检测到对比度增强

代码

5. 3. 识别拼接图像算法(detection of splicing image)

**0. divided into nonoverlapping blocks**
  • $i$:$i$-th block
  • $N_b$:the number of divided blocks

1.1.1 Loacate gap bins

  • $V_g^i=[V_g^i(0),V_g^i(1)…V_g^i(255)]$
    • 如果当前像素值$k$为谷值,则$V_g^i(k)=1$。反之$V_g^i(k)=0$
    • 判断基准:与zero-height gap bin定义相同

1.1.2 Locate peak bins

  • $V_p^i=[V_p^i(0),V_p^i(1)…V_p^i(255)]$

    • 如果当前像素值$k$为峰值,则$V_p^i(k)=1$。反之$V_p^i(k)=0$

    • 判断基准:

1.2 Correct

  • 为了进一步降低检测误差,对提取的peak/gap进行矫正

Co-existing peak/ gap positions in most blocks are remained as a compared vector Vg

  • $V_{gc}^i=V_g^i\bigodot V_g$

    • $C_g=\sum^{N_b}_{i=1}V_g^i/N_b$

    • $V_g=[V_g(0),V_g(1)…V_g(255)]$

      • 如果$C_g(k)$大于一特定阈值(来源于统计),则$V_g(k)=1$;反之为$0$
    • $\bigodot$:哈达玛积

      其输入为两个相同形状的矩阵,输出是具有同样形状的、各个位置的元素等于两个输入矩阵相同位置元素的乘积的矩阵

**2.1 Gap Based Similarity Measure **

2.2 Peak Based Similarity Measure

略

6. 实现

略

7. 参考

直方图归一化

  • Histogram and normalization
  • Normalization (image processing) - Wikipedia

基于对比度增强的检测算法

  • 数字图像取证的热点和研究进展 - 中国计算机学会专委
  • Lab
  • Computer Graphics
  • Lab
实验:LL1-LR计算器
Note-Metaphysics-0
© 2024 何决云 载入天数...