Please wait a minute...
Journal of ZheJiang University (Engineering Science)  2020, Vol. 54 Issue (8): 1525-1533    DOI: 10.3785/j.issn.1008-973X.2020.08.010
    
Image Hashing algorithm based on structure and gradient
Qi SHEN1,Yan ZHAO1,2,*(),Xiao-wei ZHOU1,Xiao-ran YUAN1
1. College of Electronics and Information Engineering, Shanghai University of Electric Power, Shanghai 200090, China
2. Guangxi Key Lab of Multi-source Information Mining and Security, Guangxi Normal University, Guilin 541004, China
Download: HTML     PDF(2131KB) HTML
Export: BibTeX | EndNote (RIS)      

Abstract  

An image Hashing algorithm based on structure features and gradient features was proposed to improve the classification performance and efficiency of Hashing algorithm. The input image is pre-processed to improve the robustness of the algorithm, and then the pre-processed image is transformed into YCbCr color space for extracting the brightness Y component. The external structure feature is obtained by using the peak and valley curves of Y component, and the internal structure feature is obtained by extracting the position information of the peak and valley. The external and internal structure features are combined to produce structure features of the image. The horizontal and vertical gradients of Y component are extracted to construct the gradient features. The final Hash is produced by combining and disturbing the structure features and gradient features. Experimental results show that the proposed algorithm is robust to some common content-preserving image processing such as brightness adjustment, contrast adjustment and Gaussian low-pass filtering. The proposed algorithm has better receiver operating characteristic(ROC) curve and better image classification performanc, compared with the existing Hashing algorithms. The tampering detection experiment shows that the algorithm can effectively detect tampered images.



Key wordsstructure feature      gradient feature      robustness      image classification      tamper detection     
Received: 24 May 2019      Published: 28 August 2020
CLC:  TP 391  
Corresponding Authors: Yan ZHAO     E-mail: yanzhao79@hotmail.com
Cite this article:

Qi SHEN,Yan ZHAO,Xiao-wei ZHOU,Xiao-ran YUAN. Image Hashing algorithm based on structure and gradient. Journal of ZheJiang University (Engineering Science), 2020, 54(8): 1525-1533.

URL:

http://www.zjujournals.com/eng/10.3785/j.issn.1008-973X.2020.08.010     OR     http://www.zjujournals.com/eng/Y2020/V54/I8/1525


结合结构与梯度的图像哈希算法

为了提高分类性能和运算效率,提出结合结构特征与梯度特征的图像哈希算法. 该算法对输入图像进行预处理提高算法的鲁棒性,将预处理后的图像转换到YCbCr颜色空间,提取亮度Y分量. 利用Y分量的峰顶曲线和峰谷曲线来获取外部结构特征,同时提取峰顶和峰谷的位置信息来构建内部结构特征. 结合外部结构特征和内部结构特征得到图像的结构特征;提取Y分量的横向梯度与纵向梯度来构建图像的梯度特征;将结构特征与梯度特征联合起来并扰乱得到最终的哈希序列. 实验结果表明,所提算法对亮度调整、对比度调整和高斯低通滤波等保持内容的图像处理较稳健. 与已有算法对比,该算法具有更好的受试者工作特性(ROC)曲线和较好的图像分类性能,在篡改检测实验中,该算法可以有效地检测篡改图像.


关键词: 结构特征,  梯度特征,  鲁棒性,  图像分类,  篡改检测 
Fig.1 Block diagram of image Hash
Fig.2 Original and pre-processed images
Fig.3 Image with three-dimensional visual angle
Fig.4 Image with different visual angles
Fig.5 Gradient images from different visual angles
图像处理方式 软件工具 参数说明 参数设置
JPEG压缩 光影魔术手 质量因子 0.3、0.4、···、1.0
亮度调整 Photoshop 级别 ?20、?10、10、20
对比度调整 Photoshop 级别 ?20、?10、10、20
椒盐噪音 Matlab 级别 0.002、0.004、···、0.010
图像缩放 Matlab 比例 0.6、0.8、1.2、1.4、1.6、1.8
高斯滤波 Matlab 方差 0.1、0.2、···、1.0
旋转 Matlab 角度 1、2、3、···、8
Tab.1 Different image attack settings
图像处理方式 最小值 最大值 均值 标准差
JPEG压缩 0 0.051 3 0.004 9 0.007 7
亮度调整 0 0.070 5 0.013 9 0.016 4
对比度调整 0 0.057 7 0.011 0 0.012 5
椒盐噪音 0 0.051 3 0.006 2 0.008 2
图像缩放 0 0.051 3 0.008 4 0.010 4
高斯滤波 0 0.051 3 0.006 0 0.008 2
旋转 0 0.461 5 0.148 8 0.145 4
Tab.2 Statistic of hamming distance under different attacks
Fig.6 Examples of test images for robust experiment
Fig.7 Performance of perceptual robustness under different attacks
图像处理方式 软件工具 参数说明 参数设置
JPEG压缩 光影魔术手 质量因子 0.4、0.8
亮度调整 Photoshop 级别 ?20、20
对比度调整 Photoshop 级别 ?20、20
椒盐噪音 Matlab 级别 0.002、0.006
图像缩放 Matlab 比例 0.8、1.6
高斯滤波 Matlab 方差 0.2、0.6
Tab.3 Image processing method and parameter setting
Fig.8 Hamming distance distribution of different images
D PC PE
0.150 0 0 1.66×10?4
0.160 0 2.00×10?6 1.66×10?4
0.170 0 6.00×10?6 8.33×10?5
0.180 0 2.20×10?5 0
Tab.4 Collision rate and error rate under different thresholds
Fig.9 ROC curves of different Hashing algorithms
算法 t/s L
本研究算法 0.02 156位
Local Color算法 0.09 64个十进制数
Ring算法 0.69 440位
CS-LBP算法 0.19 64个十进制数
TD算法 0.38 96位
Tab.5 Average computing time and Hash length of different algorithms
原始图像 篡改图像 D 原始图像 篡改图像 D
0.089 7 0.102 6
0.217 9 0.166 7
0.141 0 0.211 5
0.076 9 0.115 4
0.166 7 0.089 7
Tab.6 Original image,tampered image and hamming distance
Fig.10 Example of original image and tampered image
Fig.11 Hamming distance distribution of similar image pairs, tampered image pairs and different image pairs
[1]   VENKATESAN R, KOON S M, JAKUBOWSKI M H, et al. Robust image hashing [C]// Proceedings 2000 International Conference on Image Processing. Vancouver: IEEE, 2000: 664-666.
[2]   沈麒, 赵琰 基于小波分解的统计特征哈希[J]. 应用科学学报, 2018, 36 (2): 247- 254
SHEN Qi, ZHAO Yan Statistical feature hashing based on wavelet decomposition[J]. Journal of Applied Sciences, 2018, 36 (2): 247- 254
doi: 10.3969/j.issn.0255-8297.2018.02.004
[3]   TANG Z, YANG F, HUANG L, et al Robust image hashing with dominant DCT coefficients[J]. Optik: International Journal for Light and Electron Optics, 2014, 125 (18): 5102- 5107
doi: 10.1016/j.ijleo.2014.05.015
[4]   QIN C, CHANG C, TSOU P Robust image hashing using non-uniform sampling in discrete Fourier domain[J]. Digital Signal Processing, 2013, (23): 578- 585
[5]   李新伟, 夏秀珍 基于内容结构图的鲁棒图像哈希[J]. 应用科学学报, 2016, 34 (6): 691- 701
LI Xin-Wei, XIA Xiu-Zhen Robust image hashing based on content structure diagram[J]. Journal of Applied Sciences, 2016, 34 (6): 691- 701
doi: 10.3969/j.issn.0255-8297.2016.06.005
[6]   TANG Z, YAO H Robust image hashing via random Gabor filtering and DWT[J]. Computers Materials and Continua, 2018, 55 (2): 331- 344
[7]   HERMANDEZ R A P, MIYATAKE M N, KURKOSKI B M. Robust image hashing using image normalization and SVD decomposition [C]// IEEE International Midwest Symposium on Circuits and Systems. Seoul: IEEE, 2011: 1–4.
[8]   GHOUTI L Robust perceptual color image hashing using randomized hypercomplex matrix factorizations[J]. Multimedia Tools and Applications, 2017, (11): 1
[9]   唐振军, 杨帆, 黄紫晴, 等 基于PCA特征距离的图像哈希算法[J]. 广西师范大学学报: 自然科学版, 2016, 34 (4): 9- 18
TANG Zhen-jun, YANG Fan, HUANG Zi-qing, et al Image hashing algorithm based on pca feature distance[J]. Journal of Guangxi Normal University: Natural Science Edition, 2016, 34 (4): 9- 18
[10]   TANG Z, LAO H, ZHANG X, et al Robust image hashing via DCT and LLE[J]. Computers and Security, 2016, 62: 133- 148
doi: 10.1016/j.cose.2016.07.006
[11]   TANG Z, HUANG Z, ZHANG X, et al Robust image hashing with multidimensional scaling[J]. Signal Processing, 2017, 137: 240- 250
doi: 10.1016/j.sigpro.2017.02.008
[12]   TANG Z, CHEN L, ZHANG X, et al Robust image hashing with tensor decomposition[J]. IEEE Transactions on Knowledge and Data Engineering, 2019, 31 (3): 549- 560
doi: 10.1109/TKDE.2018.2837745
[13]   TANG Z, ZHANG X, LI X, et al Robust image hashing with ring partition and invariant vector distance[J]. IEEE Transactions on Information Forensics and Security, 2016, 11 (1): 200- 214
doi: 10.1109/TIFS.2015.2485163
[14]   ZHAO Y, WANG S, ZHANG X, et al Robust hashing for image authentication using zernike moments and local features[J]. IEEE Transactions on Information Forensics and Security, 2013, 8 (1): 55- 63
doi: 10.1109/TIFS.2012.2223680
[15]   DAVARZANI R, MOZAFFARI S, YAGHMAIE K Perceptual image hashing using center-symmetric local binary patterns[J]. Multimedia Tools and Applications, 2016, 75 (8): 4639- 4667
doi: 10.1007/s11042-015-2496-6
[16]   QIN C, CHEN X, LUO X, et al Perceptual image hashing via dual-cross pattern encoding and salient structure detection[J]. Information Sciences, 2018, 423: 284- 302
doi: 10.1016/j.ins.2017.09.060
[17]   TANG Z, ZHANG X, DAI X, et al Robust image hash function using local color features[J]. AEU-International Journal of Electronics and Communications, 2013, 67 (8): 717- 722
doi: 10.1016/j.aeue.2013.02.009
[18]   OSTU N A threshold selection method from gray-level histogram[J]. IEEE Transactions on Systems, Man, and Cybernetics, 1979, 9 (1): 62- 66
doi: 10.1109/TSMC.1979.4310076
[19]   赵琰, 魏为民 用于图像认证和窜改检测的稳健图像摘要[J]. 计算机应用研究, 2011, 28 (5): 1929- 1931
ZHAO Yan, WEI Wei-min Robust image hashing for image authentication and tampering detection[J]. Application Research of Computers, 2011, 28 (5): 1929- 1931
doi: 10.3969/j.issn.1001-3695.2011.05.095
[20]   FAWCETT T An introduction to ROC analysis[J]. Pattern Recognition Letters, 2006, 27 (8): 861- 874
doi: 10.1016/j.patrec.2005.10.010
[1] Qiao-hong CHEN,YI CHEN,Wen-shu Li,Yu-bo JIA. Clothing image classification based on multi-scale SE-Xception[J]. Journal of ZheJiang University (Engineering Science), 2020, 54(9): 1727-1735.
[2] Zhuang KANG,Jie YANG,Hao-qi GUO. Automatic garbage classification system based on machine vision[J]. Journal of ZheJiang University (Engineering Science), 2020, 54(7): 1272-1280.
[3] Tao MING,Dan WANG,Ji-chang GUO,Qiang LI. Breast cancer histopathological image classification using multi-scale channel squeeze-and-excitation model[J]. Journal of ZheJiang University (Engineering Science), 2020, 54(7): 1289-1297.
[4] Hong-xia WANG,Jia-qi ZHOU,Cheng-hao GU,Hong LIN. Design of activation function in CNN for image classification[J]. Journal of ZheJiang University (Engineering Science), 2019, 53(7): 1363-1373.
[5] Na LV,Chuang LIU,Ke-fan CHEN,Fang-bo CAO. Software defined airborne network election algorithm considering controller failure[J]. Journal of ZheJiang University (Engineering Science), 2019, 53(4): 785-793.
[6] Hao SUI,Gao-feng QIN,Xiang-bo CUI,Xin-jiang LU. Robust fuzzy T-S modeling method based on minimizing mean and variance of modeling error[J]. Journal of ZheJiang University (Engineering Science), 2019, 53(2): 382-387.
[7] YANG Chun ning, FANG Jia wei, LI Chun, GE Hui. Hypersonic vehicle blended control methodology based on stability criterion[J]. Journal of ZheJiang University (Engineering Science), 2017, 51(2): 422-428.
[8] ZOU Bei-ji, GUO Jian-jing, ZHU Cheng-zhang, YANG Wen-Jun, WU Hui, HE Qi. Image classification based on BOW-HOG feature[J]. Journal of ZheJiang University (Engineering Science), 2017, 51(12): 2311-2319.
[9] LI Tao, WANG Shi-tong. Incremental zero-order TSK fuzzy classifier and its robust version[J]. Journal of ZheJiang University (Engineering Science), 2017, 51(10): 1901-1911.
[10] YANG Hui lin, HUANG Zhi gang, LIU Jiu wen, DU Yuan feng. WIFI fingerprinting localization based on Kernel Fuzzy C means II Clustering[J]. Journal of ZheJiang University (Engineering Science), 2016, 50(6): 1126-1133.
[11] ZHAO Chan yuan, LU Zhi qiang, CUI Wei wei. Proactive scheduling optimization on flow shops with random machine breakdowns[J]. Journal of ZheJiang University (Engineering Science), 2016, 50(4): 641-649.
[12] ZHU Guang-ming, JIANG Rong-xin, ZHOU Fan, TIAN Xiang, CHEN Yao-wu. Robust Kalman filtering algorithm with estimation of measurement biases[J]. Journal of ZheJiang University (Engineering Science), 2015, 49(7): 1343-1349.
[13] MA Teng, ZHAO Xing zhong, GAO Bo qing, WU Hui. Combined shape and topology optimization of free form structure[J]. Journal of ZheJiang University (Engineering Science), 2015, 49(10): 1946-1951.
[14] LI Xiao-run, ZHU Jie-er, WANG Jing, ZHAO Liao-ying. Hyperspectral image classification based on compsite kernels support vector machine[J]. Journal of ZheJiang University (Engineering Science), 2013, 47(8): 1403-1410.
[15] YANG Bing, XU Duan-qing, YANG Xin, ZHAO Lei, TANG Da-wei. Painting image classification based on aesthetic style similarity rule[J]. Journal of ZheJiang University (Engineering Science), 2013, 47(8): 1486-1492.