﻿ 噪声水平不一致性的图像拼接区域检测方法
 计算机系统应用  2019, Vol. 28 Issue (2): 132-139 PDF

Image Splicing Region Detection Method of Noise Level Inconsistency
ZHANG De-Peng, WANG Xiao-Feng, HU Jiao-Jiao, ZHANG Meng
Department of Applied Mathematics, Xi’an University of Technology, Xi’an 710048, China
Foundation item: National Natural Science Foundation of China (61772416); Project of Key Laboratory Program of Education Bureau, Shaanxi Province (17JS098); Shaanxi Province Technology Innovation Guiding Fund Project (2018XNCG-G-02)
Abstract: Focusing on image splicing detection and splicing localization, we proposed an image splicing region detection method of noise level inconsistency. In the proposed method, we utilize the double enhancement effect of the improved Laplace operator on noise, and combine the singular value decomposition to extract the local image gradient matrix and noise features from non-overlapping image blocks. Then, we use a clustering-based threshold algorithm to classify the noise features and locate the tampered regions. Compared with the existing noise-based image splicing region detection method, the proposed method has superior performance, especially when the noise difference between the splicing region and the original region is less. In addition, the proposed method is robust to content maintenance operation such as JPEG compression, Gaussian blur, Gamma correction, down sampling, and so on.
Key words: image tamper     singular value decomposition     Laplace operator     non-overlapping blocks

Ajá-Fernandez等人[1]从局部统计模型来估计噪声, 其基础是大多数图像区域均是平坦的, 但这在实践中并不总是成立. Liu等人[2]针对图像强度定义了噪声水平函数(Noise Level Function, NLF), 利用图像像素平均值和亮度变化作为样本集, 并使用贝叶斯MAP(Maximum A Posteriori)估计来从单个图像推断噪声水平函数, 该方法后来扩展到图像去噪领域[3]. 然而, 在贝叶斯估计过程中, NLF曲线的形状并没有较好的限制. 因此, 均匀块不足的图像可能会影响NLF估计的准确性. Yang 等人[4]主要解决了噪声水平估计中均匀样本块不足的问题, 他们使用稀疏表示技术通过字典恢复来估计NLF. 然而不足之处是, 为了使拟合NLF更接近真实噪声水平, 在估计之前需要训练可靠的字典. Lyu等人[5]利用带通域中自然图像峰度的特定的性质以及噪声特性和峰度之间的关系, 将噪声统计量的估计表示为封闭形式解的优化问题, 并进一步推广到一种有效的局部噪声统计量估计方法. Pun等人[6]利用多尺度噪声差异作为图像拼接伪造检测依据, 图像最初被分割成多个尺度的超像素, 在每个单独的尺度中, 计算噪声水平和亮度之间的噪声水平函数, 实验结果表明, 该方案对于多目标拼接具有较好性能. Zeng等人[7]提出基于主成分分析的图像块噪声水平估计算法, 并通过k-means聚类区分原始区域和篡改区域. Chierchia 等人[8]提出了基于传感器模式噪声的图像篡改检测方法, 在贝叶斯估计框架下使用马尔可夫随机场来探索图像来源的空间依赖关系, 在整个图像上综合考虑, 利用优化技术实现全局最优解, 并通过非局部去噪来提高估计, 该技术在很大程度上改善了当前的技术水平. Yao 等人[9]通过探索NLF与相机响应函数(Camera Response Function, CRF)之间的关系, 拟合CRF约束下的NLF曲线, 建立贝叶斯最大后验MAP框架来优化NLF估计. Cozzolino等人[10]从图像的噪声残差中提取局部特征, 从而定位篡改区域.

1 噪声模型

 $A(x, y) = {A_0}(x, y) + N(x, y)$ (1)

 $f(x) = \frac{1}{{\sigma \sqrt {2\pi } }}{e^{ - \frac{{{{(x - \mu )}^2}}}{{2{\sigma ^2}}}}}$ (2)

2 图像分块

 图 1 图像非重叠分块规则

 图 2 不同分块定位结果

3 噪声估计算法 3.1 改进的拉普拉斯算子

 ${\nabla ^2}f(x, y) = \frac{{{\partial ^2}f}}{{\partial {x^2}}} + \frac{{{\partial ^2}f}}{{\partial {y^2}}}$ (3)

 \begin{aligned} {\nabla ^2}f = &[f(x + 1, y) + f(x - 1, y) + f(x, y + 1) + \cdots \\ & + f(x, y - 1)] - 4f(x, y) \\ \end{aligned} (4)

 ${L_1} = \left[ {\begin{array}{*{20}{c}} 0&1&0 \\ 1&{-4}&1 \\ 0&1&0 \end{array}} \right],\;\;{L_2} = \frac{1}{2}\left[ {\begin{array}{*{20}{c}} 1&0&1 \\ 0&{-4}&0 \\ 1&0&1 \end{array}} \right]$
 $C = 2({L_2} - {L_1}) = \left[ {\begin{array}{*{20}{c}} 1&{-2}&1 \\ {-2}&4&{-2} \\ 1&{-2}&1 \end{array}} \right]$

${B'_i}$ 表示在图像块 ${B_i}$ 处应用掩模 $C$ 的值, 如下式:

 ${B'_i}(x, y) = {B_i}(x, y) * C$ (5)

 $\sigma _i^2 = \frac{1}{{36{*}W{*}H}}\sum\limits_{{\rm{i}}mage B} {{{({B_i}(x, y) * C)}^2}}$ (6)

 $\int_{-\infty }^\infty {|t|} \frac{1}{{\sqrt {2\pi } {\sigma _i}}}\exp (\frac{{ - {t^2}}}{{2{\sigma _i}^2}})dt = \sqrt {\frac{2}{\pi }} {\sigma _i}$ (7)

 ${\sigma _i} = \sqrt {\frac{\pi }{2}} \int_{-\infty }^\infty {|t|} \frac{1}{{\sqrt {2\pi } {\sigma _i}}}\exp (\frac{{ - {t^2}}}{{2{\sigma _i}^2}})dt$ (8)

 ${\sigma _i} = \sqrt {\frac{\pi }{2}} \frac{1}{{6{*}W{*}H}}\sum\limits_{image B} {|{B_i}(x, y) * C|}$ (9)
3.2 基于SVD的图像块噪声估计

 $A = U \times S \times {V^{\rm{T}}}$ (10)

 ${P_M} = \frac{1}{M}\sum\limits_{i = r - M + 1}^r {S(i)}$ (11)

${P_M}$ ${\sigma _l}$ 的关系为:

 ${P_M} = \sum\limits_{i = r - M + 1}^r {{S(i)}} = a{\sigma _l} + \beta$ (12)

 ${\sigma _w} = \sqrt {\sigma _l^2 + \sigma _1^2} = \sqrt {\sigma _l^2 + 50 ^2}$ (13)

 ${P_M} = a{\sigma _l} + \beta$ (14)
 ${P_{1M}} = a\sqrt {\sigma _l^2 + \sigma _1^2} + \beta = a\sqrt {\sigma _l^2 + 50 ^2} + \beta$ (15)

 ${{\sigma _l}} = \frac{{a\sigma _1^2}}{{2({P_{1M}} - {P_M})}} - \frac{{{P_{1M}} - {P_M}}}{{2a}}$ (16)

 $C = \max ({{\mathop \sigma \limits^ \wedge }_i})/\max ({\sigma _i})$ (17)
 ${{\bar\sigma _i}} = {\sigma _i} + \frac{{\mathop {{\sigma _i}}\limits^ \wedge }}{{3C}}$ (18)
3.3 基于SVD的局部图像梯度矩阵

 ${G_{{B_i}}} = [{D_h}{B_i} \;\;{D_v}{B_i}]$ (19)

 ${D_h} = \frac{1}{2}\left[ {\begin{array}{*{20}{c}} 0&0&0 \\ { - 1}&0&1 \\ 0&0&0 \end{array}} \right], {D_v} = \frac{1}{2}\left[ {\begin{array}{*{20}{c}} 0&{ - 1}&0 \\ 0&0&0 \\ 0&1&0 \end{array}} \right]$ (20)

 ${D_h} = \frac{1}{8}\left[ {\begin{array}{*{20}{c}} { - 1}&0&1 \\ { - 2}&0&2 \\ { - 1}&0&1 \end{array}} \right], {D_v} = \frac{1}{8}\left[ {\begin{array}{*{20}{c}} { - 1}&{ - 2}&{ - 1} \\ 0&0&0 \\ 1&2&1 \end{array}} \right]$ (21)

 $\begin{gathered} {C_{{B_i}}} = {G_{{B_{ii}}}}^{\rm{T}}{G_{{B_{ii}}}}= \left[ {\begin{array}{*{20}{c}} {{B_i}^{\rm{T}}{D_h}^{\rm{T}}{D_h}{B_i}}&{{B_i}^{\rm{T}}{D_h}^{\rm{T}}{D_v}{B_i}} \\ {{B_i}^{\rm{T}}{D_v}^{\rm{T}}{D_h}{B_i}}&{{B_i}^{\rm{T}}{D_v}^{\rm{T}}{D_v}{B_i}} \end{array}} \right] \\ \end{gathered}$ (22)

 ${G_{{B_i}}} = {\rm{U}}S{{\rm{V}}^{\rm{T}}} = {\rm{U}}\left[ {\begin{array}{*{20}{c}} {{s_{\rm{1}}}}&{0}& \cdots &{0} \\ {0}&{{s_2}}& \cdots &0 \\ \vdots & \vdots & \ddots &{0} \\ {0}&0& \cdots &{{s_{{r}}}} \end{array}} \right]{{\rm{V}}^{\rm{T}}}$ (23)
 \begin{aligned} {C_{{B_i}}} & = {G_{{B_{ii}}}}^{\rm{T}}{G_{{B_{ii}}}} = {({{U}}S{{{V}}^{\rm{T}}})^{\rm{T}}}{{U}}S{{{V}}^{\rm{T}}} = {{V}}{S^{\rm{T}}}{{{U}}^{\rm{T}}}{{U}}S{{{V}}^{\rm{T}}} \\ & = {{V}}{S^{\rm{T}}}S{{{V}}^{\rm{T}}} = {{V(}}{S^{\rm{T}}}S){{{V}}^{\rm{T}}}\\ & = {{V}}\left[ {\begin{array}{*{20}{c}} {{s_{\rm{1}}}^2}&{0}& \cdots &{0} \\ {0}&{{s_2}^2}& \cdots &0 \\ \vdots & \vdots & \ddots &{0} \\ {0}&0& \cdots &{{s_{{r}}}^2} \end{array}} \right]{{{V}}^{\rm{T}}} \end{aligned} (24)

 $W = {\sum\nolimits_{i = 1}^r {{s_i}} ^2}$ (25)
3.4 拼接区域检测

3.4 基于纹理强度的篡改定位

 图 3 图像纹理强度特征(其中, (b),(d)图中的横坐标是分割对应块, 纵坐标是纹理强度值)

 图 4 拼接规则

 ${C_{RS - v}} = \sum\limits_{v = 1}^4 \sum\limits_{v1 = 1}^4 {{{(S{R_v} - S{R_{v1}})}^2}} , (v \ne v1, v, v1 = 1, 2, 3, 4)$ (26)

$S{R_{\rm{ave}}}$ 表示 ${C_{SR - v}}$ 的均值. 为了确定块是否是篡改块, 我们计算 ${C_{SR - v}}$ $S{R_{\rm{ave}}}$ 的比值, 记为 ${\eta _v}$ , 如下:

 ${\eta _v} = \displaystyle\tfrac{{S{R_v}}}{{S{R_{\rm{ave}}}}} v = 1, 2, 3, 4$ (27)

 $T = F(\eta )*0.6$ (28)

3.5 篡改定位

 $T = \frac{1}{r}\sum\limits_{i = 1}^r {\mathop {{\sigma _i}}\limits^ - }$ (29)

 $th = (T + {N_{\max }})/2$ (30)

 ${D_i} = \left\{ \begin{gathered} 1,\;\; {\rm{if}} \;\;th < {\bar\sigma _i} \\ 0 ,\;\; {\rm{otherwise}} \\ \end{gathered} \right.$ (31)
4 实验结果及分析

4.1 所提出的方法的有效性评估

 $TP=\frac {\text{拼接区域被检测为拼接区域像素数}}{\text{图像总像素数}}\times 100\%$
 $FP=\frac {\text{原始区域被检测为原始区域像素数}}{\text{原始区域总像素数}}\times 100\%$

4.2 定量分析以及鲁棒性检测

4.3 拼接定位视觉结果对比

 图 5 数据库中的拼接图像篡改定位结果

4.3 鲁棒性拼接定位视觉结果对比

 图 6 不同JPEG质量因子的篡改定位结果, 从左至右列依次为篡改图像、未压缩、JPEG95、JPEG85、JPEG75结果

4.4 实验总结

 图 7 伽玛矫正(Gamma=1.2)的篡改定位结果, 从左至右列依次为篡改图像、未后处理、伽玛矫正结果

 图 8 高斯模糊(3×3, $\sigma = 1$ )的篡改定位结果, 从左至右列依次为篡改图像、未后处理、高斯模糊结果

5 结论与展望

 [1] Aja-Fernández S, Vegas-Sánchez-Ferrero G, Martín-Fernández M, et al. Automatic noise estimation in images using local statistics. Additive and multiplicative cases. Image and Vision Computing, 2009, 27(6): 756-770. DOI:10.1016/j.imavis.2008.08.002 [2] Liu C, Freeman WT, Szeliski R, et al. Noise estimation from a single image. 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition. New York, NY, USA. 2006. 901–908. [3] Liu C, Szeliski R, Kang SB, et al. Automatic estimation and removal of noise from a single image. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2008, 30(20): 299-314. [4] Yang JY, Wu ZY, Hou CP. Estimation of signal-dependent sensor noise via sparse representation of noise level functions. 2012 19th IEEE International Conference on Image Processing. Orlando, FL, USA. 2013. 673–676. [5] Lyu S, Pan XY, Zhang X. Exposing region splicing forgeries with blind local noise estimation. International Journal of Computer Vision, 2014, 110(2): 202-221. DOI:10.1007/s11263-013-0688-y [6] Pun CM, Liu B, Yuan XC. Multi-scale noise estimation for image splicing forgery detection. Journal of Visual Communication and Image Representation, 2016, 38: 195-206. DOI:10.1016/j.jvcir.2016.03.005 [7] Zeng H, Zhan YF, Kang XG, et al. Image splicing localization using PCA-based noise level estimation. Multimedia Tools and Applications, 2016, 76(4): 4783-4799. [8] Chierchia G, Poggi G, Sansone C, et al. A Bayesian-MRF approach for PRNU-based image forgery detection. IEEE Transactions on Information Forensics and Security, 2014, 9(4): 554-567. DOI:10.1109/TIFS.2014.2302078 [9] Yao H, Wang SZ, Zhang XP, et al. Detecting image splicing based on noise level inconsistency. Multimedia Tools and Applications, 2017, 76(10): 12457-12479. DOI:10.1007/s11042-016-3660-3 [10] Cozzolino D, Verdoliva L. Single-image splicing localization through autoencoder-based anomaly detection. IEEE International Workshop on Information Forensics and Security. Abu Dhabi, United Arab Emirates. 2016: 1–6. [11] Russo F. A method for estimation and filtering of Gaussian noise in images. IEEE Transactions on Instrumentation and Measurement, 2003, 52(4): 1148-1154. DOI:10.1109/TIM.2003.815989 [12] Immerkær J. Fast noise variance estimation. Computer Vision and Image Understanding, 1996, 64(2): 300-302. DOI:10.1006/cviu.1996.0060 [13] Liu W, Lin WS. Additive white Gaussian noise level estimation in SVD domain for images. IEEE Transactions on Image Processing, 2013, 22(3): 872-883. DOI:10.1109/TIP.2012.2219544 [14] 宫改云, 高新波, 伍忠东. FCM聚类算法中模糊加权指数m的优选方法 . 模糊系统与数学, 2005, 19(1): 143-148. DOI:10.3969/j.issn.1001-7402.2005.01.025 [15] 汤效琴, 戴汝源. 数据挖掘中聚类分析的技术方法. 微计算机信息, 2003(1): 3-4. DOI:10.3969/j.issn.1008-0570.2003.01.002