CN102129549A - Image Hash method based on thumbnail and singular value decomposition - Google Patents

Image Hash method based on thumbnail and singular value decomposition Download PDF

Info

Publication number
CN102129549A
CN102129549A CN 201110033139 CN201110033139A CN102129549A CN 102129549 A CN102129549 A CN 102129549A CN 201110033139 CN201110033139 CN 201110033139 CN 201110033139 A CN201110033139 A CN 201110033139A CN 102129549 A CN102129549 A CN 102129549A
Authority
CN
China
Prior art keywords
image
thumbnail
hash
singular value
value decomposition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 201110033139
Other languages
Chinese (zh)
Other versions
CN102129549B (en
Inventor
唐振军
张显全
孙容海
秦芳远
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangxi Normal University
Original Assignee
Guangxi Normal University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangxi Normal University filed Critical Guangxi Normal University
Priority to CN201110033139A priority Critical patent/CN102129549B/en
Publication of CN102129549A publication Critical patent/CN102129549A/en
Application granted granted Critical
Publication of CN102129549B publication Critical patent/CN102129549B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)

Abstract

本发明涉及一种基于缩略图和奇异值分解的图像Hash方法,先对图像预处理,再进行分块;将奇异值分解应用于图像块并取第1、2个奇异值作为特征;运用双线性插值法生成原图像的缩略图并进行奇异值分解,取第1、2个奇异值作为特征;将图像块和缩略图的特征归一化,并对图像块的特征序列进行位置重排;以缩略图的第1、2个奇异值为基准,计算每对奇异值与它的欧氏距离,串连所有距离值即为图像Hash判断相似性时,计算两个图像Hash的L1范数,如果小于设定阈值,认为其对应的图像相似,否则认为是不同图像。本发明对JPEG压缩、适度噪声干扰、亮度调整、对比度增强等常见数字处理稳健,并具有良好的唯一性。

Figure 201110033139

The invention relates to an image Hash method based on thumbnails and singular value decomposition, which first preprocesses the image, and then divides it into blocks; applies the singular value decomposition to the image block and takes the first and second singular values as features; uses double The linear interpolation method generates the thumbnail of the original image and performs singular value decomposition, taking the first and second singular values as features; normalizes the features of the image block and thumbnail, and rearranges the position of the feature sequence of the image block ;Based on the first and second singular values of the thumbnail, calculate the Euclidean distance between each pair of singular values and it, and concatenate all the distance values to be the image Hash. When judging the similarity, calculate the L1 norm of the two image Hash , if it is less than the set threshold, the corresponding images are considered similar, otherwise they are considered different images. The invention is robust to common digital processing such as JPEG compression, moderate noise interference, brightness adjustment and contrast enhancement, and has good uniqueness.

Figure 201110033139

Description

基于缩略图和奇异值分解的图像Hash方法Image Hash Method Based on Thumbnail and Singular Value Decomposition

技术领域technical field

本发明涉及信号处理领域和计算机技术领域,特别是一种基于缩略图和奇异值分解的图像Hash方法。The invention relates to the field of signal processing and computer technology, in particular to an image Hash method based on thumbnails and singular value decomposition.

背景技术Background technique

随着数字照相机等图像获取设备的普及,数字图像呈几何级数增长,如何有效管理和检索数字图像成为人们面临的一个问题。与此同时,数字图像易于复制和修改的特点使图像内容的侵权、篡改、伪造等问题日益严重,如何更好地保护图像版权等问题变得越来越重要。图像Hash(哈希)是多媒体信息安全的一种新兴技术。它用图像中提取的短序列来标识该图像,可广泛应用于图像认证、拷贝检测、数字水印、图像检索等领域。With the popularity of image acquisition devices such as digital cameras, digital images are increasing exponentially, how to effectively manage and retrieve digital images has become a problem that people are facing. At the same time, the characteristics of digital images that are easy to copy and modify make the problems of infringement, tampering and forgery of image content more and more serious, and how to better protect image copyright has become more and more important. Image Hash (hashing) is an emerging technology of multimedia information security. It uses short sequence extracted from the image to identify the image, and can be widely used in image authentication, copy detection, digital watermarking, image retrieval and other fields.

由于密码学Hash函数如SHA-1和MD5对输入数据的变化非常敏感,任何1比特的改变都会完全改变输出的Hash值,因此不适用于图像。实际应用中往往要对图像进行正常的数字处理如增强、JPEG压缩等,其内容并未发生实质性改变,希望图像Hash保持不变。通常,图像Hash应该满足两个条件:1)感知鲁棒性,即对感知相似的两幅图像,不管其内部数据是否一致,它们的Hash以很大的概率相同或十分接近;2)唯一性,即不同图像具有不同的图像Hash。Because cryptographic Hash functions such as SHA-1 and MD5 are very sensitive to changes in input data, any 1-bit change will completely change the output Hash value, so they are not suitable for images. In practical applications, it is often necessary to perform normal digital processing on the image, such as enhancement, JPEG compression, etc., and its content has not changed substantially. It is hoped that the image Hash will remain unchanged. Usually, the image hash should meet two conditions: 1) perceptual robustness, that is, for two images with similar perception, regardless of whether their internal data are consistent, their hashes have a high probability of being the same or very close; 2) uniqueness , that is, different images have different image Hash.

根据构造技术不同,现有图像Hash方法大致分为以下五类:(1)基于图像统计量的方法;(2)基于不变关系的方法;(3)基于图像粗糙表达的方法;(4)利用图像低层语义特征;(5)运用矩阵分解技术。具体参阅以下文献:According to different construction techniques, the existing image hashing methods can be roughly divided into the following five categories: (1) methods based on image statistics; (2) methods based on invariant relations; (3) methods based on rough representation of images; (4) Utilize the low-level semantic features of the image; (5) Use matrix decomposition technology. Please refer to the following documents for details:

1.R.Venkatesan,S.-M.Koon,M.H.Jakubowski,et al.,Robust image hashing[C],in Proc.ofthe IEEE International Conference on Image Processing,2000,3:664-666,Vancouver,BC,Canada,September 10-13,2000.1.R.Venkatesan, S.-M.Koon, M.H.Jakubowski, et al., Robust image hashing[C], in Proc.of the IEEE International Conference on Image Processing, 2000, 3:664-666, Vancouver, BC, Canada, September 10-13, 2000.

2.C.Y.Lin and S.F.Chang,A robust image authentication system distinguishing JPEGcompression from malicious manipulation[J].IEEE Transactions on Circuits and Systems forVideo Technology,2001,11(2):153-168.2. C.Y.Lin and S.F.Chang, A robust image authentication system distinguishing JPEGcompression from malicious manipulation[J]. IEEE Transactions on Circuits and Systems for Video Technology, 2001, 11(2): 153-168.

3.A.Swaminathan,Y.Mao and M.Wu,Robust and secure image hashing[J].IEEETransactions on Information Forensics and Security,2006,1(2):215-230.3. A. Swaminathan, Y. Mao and M. Wu, Robust and secure image hashing [J]. IEEE Transactions on Information Forensics and Security, 2006, 1(2): 215-230.

4.V.Monga and B.L.Evans,Perceptual image hashing via feature points:performanceevaluation and trade-offs[J].IEEE Transactions on Image Processing,2006,15(11):3453-3466.4. V.Monga and B.L.Evans, Perceptual image hashing via feature points: performance evaluation and trade-offs [J]. IEEE Transactions on Image Processing, 2006, 15(11): 3453-3466.

5.V.Monga and M.K.Mihcak,Robust and secure image hashing via non-negative matrixfactorizations[J].IEEE Transactions on Information Forensics and Security,2007,2(3):376-390.5.V.Monga and M.K.Mihcak, Robust and secure image hashing via non-negative matrixfactorizations[J].IEEE Transactions on Information Forensics and Security, 2007, 2(3): 376-390.

上述的已有技术大多对某些数字处理具有稳健性,如JPEG压缩、数字滤波、几何变换,但普遍存在唯一性较差的不足。Most of the above-mentioned existing technologies are robust to certain digital processing, such as JPEG compression, digital filtering, and geometric transformation, but generally have the disadvantage of poor uniqueness.

发明内容Contents of the invention

本发明的目的在于提供一种基于缩略图和奇异值分解的图像Hash方法,该方法可从数字图像中提取出稳健Hash,对常见的图像处理稳健,并具有良好的唯一性。The object of the present invention is to provide an image Hash method based on thumbnail and singular value decomposition, which can extract robust Hash from digital images, is robust to common image processing, and has good uniqueness.

一种基于缩略图和奇异值分解的图像Hash方法,先对输入图像预处理,再进行非重叠分块;然后将奇异值分解应用于每个图像块,取第1和第2个奇异值作为块特征,用双线性插值法将输入图像转换成与图像块大小一致的图像并取亮度分量表示,生成原图像的缩略图,同时将奇异值分解应用于缩略图,取第1和第2个奇异值作为特征,将图像块和缩略图的特征值归一化,并对图像块的特征序列进行位置重排,以缩略图的第1、2个奇异值为基准,计算其余每对奇异值与它的欧氏距离,串连所有距离值即为图像Hash,判断两个图像Hash相似性时,计算它们的L1范数,如果小于设定阈值,认为其对应的图像相同,否则认为是不同图像。An image Hash method based on thumbnails and singular value decomposition. First, the input image is preprocessed, and then non-overlapping blocks are performed; then the singular value decomposition is applied to each image block, and the first and second singular values are taken as Block features, use bilinear interpolation to convert the input image into an image with the same size as the image block and take the brightness component to represent it, generate a thumbnail of the original image, and apply the singular value decomposition to the thumbnail, taking the first and second Singular values as features, normalize the eigenvalues of the image blocks and thumbnails, and rearrange the position of the feature sequence of the image blocks, based on the first and second singular values of the thumbnails, calculate the remaining pairs of singular values Value and its Euclidean distance, concatenating all the distance values is the image Hash, when judging the similarity of two image Hash, calculate their L1 norm, if it is less than the set threshold, the corresponding image is considered to be the same, otherwise it is considered to be different images.

本方法的具体步骤如下:The concrete steps of this method are as follows:

(1)图像预处理:对输入图像I进行预处理,包括图像尺寸规格化和颜色空间转换。先用双线性插值法,将图像规格化成M×M大小,如果输入为彩色图像,则将其转换到YCbCr空间,取Y分量代表图像。记预处理后的图像为J;(1) Image preprocessing: Preprocessing the input image I, including image size normalization and color space conversion. First use the bilinear interpolation method to normalize the image into M×M size. If the input is a color image, convert it to the YCbCr space, and take the Y component to represent the image. Denote the preprocessed image as J;

(2)图像分块:将J分割成大小为t×t的非重叠块,一共有N=M2/t2个图像块(图像归格化时,取M为t的整数倍),按从上往下从左到右的次序对分块编号,记第i个图像块为Bi(1≤i≤N);(2) Image block: Divide J into non-overlapping blocks with a size of t×t, and there are N=M 2 /t 2 image blocks in total (when the image is normalized, take M as an integer multiple of t), press Number the blocks in order from top to bottom and from left to right, and record the i-th image block as B i (1≤i≤N);

(3)计算图像块特征:设Bi的奇异值分解记为[Ui Si Vi]=SVD(Bi),其中Ui和Vi是酉矩阵,Si是对角矩阵,Si对角线上的元素为Bi的奇异值,取Bi的第1、2个奇异值作为图像块特征,分别记为pi和qi,即pi=Si(1,1)和qi=Si(2,2)。分别串连图像块的第1、2个特征,可得到描述整幅图像的特征向量p=[p1,p2,...,pN]和q=[q1,q2,...,qN];(3) Calculate image block features: Let the singular value decomposition of Bi be recorded as [ U i S i V i ]=SVD(B i ), where U i and V i are unitary matrices, S i is a diagonal matrix, S The elements on the diagonal of i are the singular values of Bi , and the first and second singular values of Bi are taken as the image block features, which are recorded as p i and q i respectively, that is, p i =S i (1,1) and q i =S i (2,2). Connecting the first and second features of the image block respectively, the feature vector p=[p 1 ,p 2 ,...,p N ] and q=[q 1 ,q 2 ,.. ., qN ];

(4)生成缩略图:利用双线性插值法,将图像I规格化成大小为t×t的缩略图,对于彩色图像,进一步将其转换到YCbCr空间,取Y分量代表图像,记最终的缩略图为R;(4) Generate thumbnails: Use bilinear interpolation to normalize the image I into thumbnails with a size of t×t. For color images, further convert them to YCbCr space, take the Y component to represent the image, and record the final thumbnail thumbnail for R;

(5)提取缩略图特征:对R进行奇异值分解,取其第1、2个奇异值作为特征,分别记为s1和s2(5) extract thumbnail feature: carry out singular value decomposition to R, get its 1st, 2nd singular value as feature, denote as s 1 and s 2 respectively;

(6)特征归一化:分别用向量u和v表示图像块和缩略图的第1、2个奇异值,即ui=pi(1≤i≤N),uN+1=s1;vi=qi(1≤i≤N),vN+1=s2,分别对u和v的元素归一化,即xi=(uiu)/δu,yi=(viv)/δv,其中μu和μv分别为u和v的均值,δu和δv分别为它们的标准差;(6) Feature normalization: Use vectors u and v to represent the first and second singular values of image blocks and thumbnails respectively, namely u i =p i (1≤i≤N), u N+1 =s 1 ;v i =q i (1≤i≤N), v N+1 =s 2 , normalize the elements of u and v respectively, that is, x i =(u iu )/δ u , y i =(v iv )/δ v , wherein μ u and μ v are the mean values of u and v respectively, and δ u and δ v are their standard deviations respectively;

(7)特征置乱:在密钥控制下,用伪随机发生器分别对归一化向量x和y的前N个元素进行位置重排,并保留第N+1个元素不变,得到置乱后向量x′和y′;(7) Feature scrambling: Under the control of the key, use a pseudo-random generator to rearrange the positions of the first N elements of the normalization vectors x and y, and keep the N+1th element unchanged, and get the set Random back vectors x' and y';

(8)Hash提取,计算

Figure BSA00000430364500031
(1≤i≤N),即可得到图像Hash h=[h1,h2,...,hN];(8) Hash extraction, calculation
Figure BSA00000430364500031
(1≤i≤N), the image Hash h=[h 1 , h 2 ,..., h N ] can be obtained;

(9)相似性判断,设h(1)和h(2)分别为两个图像Hash序列,hi (1)和hi (2)分别表示它们的第i个元素,计算L1范数如果d小于设定阈值T,认为h(1)和h(2)所对应的图像相同,否则认为是不同图像。(9) Similarity judgment, let h (1) and h (2) be two image Hash sequences respectively, h i (1) and h i (2) represent their i-th elements respectively, and calculate the L1 norm If d is smaller than the set threshold T, the images corresponding to h (1) and h (2) are considered to be the same, otherwise they are considered to be different images.

本发明与现有技术相比,具有如下显而易见的突出实质性特点和显著进步:本发明运用奇异值分解提取图像信息,取图像块最重要的两个奇异值作为特征;引入图像缩略图作为参考,用图像块奇异值与缩略图奇异值的距离作为Hash值;提取的图像Hash对JPEG压缩、适度噪声干扰、亮度调整、对比度增强等常见数字处理稳健,并具有良好的唯一性。Compared with the prior art, the present invention has the following obvious outstanding substantive features and significant progress: the present invention uses singular value decomposition to extract image information, takes the two most important singular values of image blocks as features; introduces image thumbnails as reference , using the distance between the singular value of the image block and the singular value of the thumbnail as the Hash value; the extracted image Hash is robust to common digital processing such as JPEG compression, moderate noise interference, brightness adjustment, and contrast enhancement, and has good uniqueness.

附图说明Description of drawings

图1是本发明实施例中用到的一幅测试图像,大小为600×400;Fig. 1 is a test image used in the embodiment of the present invention, size is 600 * 400;

图2是本发明实施例中用到的另外一幅图像;Fig. 2 is another image used in the embodiment of the present invention;

图3是对图1进行尺寸规格化的结果;Figure 3 is the result of normalizing the size of Figure 1;

图4是取图3的Y分量(亮度分量)结果,也即对图1进行预处理的最终结果;Fig. 4 is the result of taking the Y component (brightness component) of Fig. 3, that is, the final result of preprocessing Fig. 1;

图5是图4的分块示意图;Fig. 5 is a block diagram of Fig. 4;

图6是图1的缩略图;Figure 6 is a thumbnail of Figure 1;

图7是实施例中L1范数的统计分布图。Fig. 7 is a statistical distribution diagram of the L1 norm in the embodiment.

具体实施方式Detailed ways

以下结合附图对本发明的一个优选实施例作详细说明,但本发明的保护范围不限于下述的实施例。A preferred embodiment of the present invention will be described in detail below with reference to the accompanying drawings, but the scope of protection of the present invention is not limited to the following embodiment.

实施例:Example:

本实施例包括鲁棒性验证和唯一性验证两部分。鲁棒性验证通过判断图1和图2所对应的图像Hash是否相似来实现,其中图2是通过对图1进行连续的数字处理得到,包括JPEG压缩(质量因子为60)、亮度调整(调整幅度为20)、对比度增强(调整幅度为20)以及高斯白噪声(均值为0、方差为0.01)。在下面的步骤中,(1)~(8)是提取图1的Hash的步骤,提取图2的Hash的步骤与图1的相同,不再重复叙述,(9)为两个图像Hash的相似性判断,具体步骤如下:This embodiment includes two parts: robustness verification and uniqueness verification. Robustness verification is realized by judging whether the Hash images corresponding to Figure 1 and Figure 2 are similar, where Figure 2 is obtained through continuous digital processing of Figure 1, including JPEG compression (quality factor is 60), brightness adjustment (adjustment amplitude of 20), contrast enhancement (adjustment amplitude of 20), and white Gaussian noise (mean of 0, variance of 0.01). In the following steps, (1) to (8) are the steps of extracting the Hash of Figure 1, and the steps of extracting the Hash of Figure 2 are the same as those of Figure 1, and will not be repeated. (9) is the similarity of the two image Hash Sex judgment, the specific steps are as follows:

(1)图像预处理:用双线性插值法将图1规格化成256×256大小,结果如图3所示;将图3转换到YCbCr空间表示,取Y分量代表图像,得到预处理后的结果,如图4所示;(1) Image preprocessing: use bilinear interpolation to normalize Figure 1 to a size of 256×256, and the result is shown in Figure 3; convert Figure 3 to YCbCr space representation, take the Y component to represent the image, and obtain the preprocessed image The result, as shown in Figure 4;

(2)图像分块:将图4划分成大小为64×64的非重叠块,一共得到16个图像块,图5为分块示意图;(2) Image segmentation: Figure 4 is divided into non-overlapping blocks with a size of 64 × 64, and a total of 16 image blocks are obtained, and Figure 5 is a block diagram;

(3)计算图像块特征:对上述16个图像块依次进行奇异值分解,取每个图像块的第1、2个奇异值作为特征,于是可得到图像的特征向量p和q:(3) Calculate image block features: Singular value decomposition is performed on the above 16 image blocks in turn, and the first and second singular values of each image block are taken as features, so the feature vectors p and q of the image can be obtained:

p=[13618.85,12438.3281,6800.47315,5791.30954,13182.7201,12360.2039,7554.88336,7234.64,12772.461,11346.9951,6586.04545,7960.01579,8250.24471,5453.8304,5120.26638,5752.40614],p=[13618.85,12438.3281,6800.47315,5791.30954,13182.7201,12360.2039,7554.88336,7234.64,12772.461,11346.9951,6586.04545,7960.01579,8250.24471,5453.8304,5120.26638,5752.40614],

q=[130.76731,623.10121,484.34539,381.7512,112.65023,516.03795,665.47482,606.93448,193.00764,971.94397,844.79315,288.13595,1315.9135,163.94719,247.47046,221.32931]q=[130.76731,623.10121,484.34539,381.7512,112.65023,516.03795,665.47482,606.93448,193.00764,971.94397,844.79315,288.13595,1315.9135,163.94719,247.47046,221.32931]

(4)生成缩略图:利用双线性插值法将图1规格化成大小为64×64,同时转换到YCbCr空间,用Y分量进行表示,得到如图6所示的缩略图;(4) Generate a thumbnail: Utilize the bilinear interpolation method to normalize Fig. 1 into a size of 64 × 64, convert to YCbCr space at the same time, represent it with the Y component, and obtain the thumbnail as shown in Fig. 6;

(5)提取缩略图特征:对图6进行奇异值分解,得到第1、2个奇异值,即s1=9323.15671,s2=130.76731;(5) Extract the features of the thumbnail: perform singular value decomposition on Figure 6 to obtain the first and second singular values, namely s 1 =9323.15671, s 2 =130.76731;

(6)特征归一化:用向量u和v表示图像块和缩略图的第1、2个奇异值,即(6) Feature normalization: use vectors u and v to represent the first and second singular values of image blocks and thumbnails, namely

u=[13618.85,12438.3281,6800.47315,5791.30954,13182.7201,12360.2039,7554.88336,7234.64,12772.461,11346.9951,6586.04545,7960.01579,8250.24471,5453.8304,5120.26638,5752.40614,9323.15671],u=[13618.85,12438.3281,6800.47315,5791.30954,13182.7201,12360.2039,7554.88336,7234.64,12772.461,11346.9951,6586.04545,7960.01579,8250.24471,5453.8304,5120.26638,5752.40614,9323.15671],

v=[130.76731,623.10121,484.34539,381.7512,112.65023,516.03795,665.47482,606.93448,193.00764,971.94397,844.79315,288.13595,1315.9135,163.94719,247.47046,221.32931,130.76731]v=[130.76731,623.10121,484.34539,381.7512,112.65023,516.03795,665.47482,606.93448,193.00764,971.94397,844.79315,288.13595,1315.9135,163.94719,247.47046,221.32931,130.76731]

对u和v进行归一化得到向量x和y:Normalize u and v to get vectors x and y:

x=[1.5486,1.16,-0.69593,-1.0281,1.4051,1.1343,-0.44758,-0.553,1.27,0.80075,-0.76651,-0.31421,-0.21867,-1.1392,-1.249,-1.0409,0.13452],x=[1.5486, 1.16, -0.69593, -1.0281, 1.4051, 1.1343, -0.44758, -0.553, 1.27, 0.80075, -0.76651, -0.31421, -0.21867, -1.1392, -1.249, -1.0409, 0.0]

y=[-0.97634,0.46352,0.057717,-0.24232,-1.0293,0.1504,0.58744,0.41624,-0.79432,1.4837,1.1119,-0.51611,2.4897,-0.8793,-0.63504,-0.71149,-0.97634]y=[-0.97634, 0.46352, 0.057717, -0.24232, -1.0293, 0.1504, 0.58744, 0.41624, -0.79432, 1.4837, 1.1119, -0.51611, 2.4897, -0.8793, -0.635704] 1, 9

(7)特征置乱:对归一化向量x和y的前16个元素进行位置重排,并保留第17个元素不变,得到置乱后向量x′和y′:(7) Feature scrambling: rearrange the positions of the first 16 elements of the normalized vectors x and y, and keep the 17th element unchanged to obtain the scrambled vectors x' and y':

x′=[-0.69593,1.16,-0.31421,-1.249,-1.0409,-0.76651,1.5486,0.80075,1.4051,-0.21867,-1.0281,-0.44758,-1.1392,-0.553,1.1343,1.27,0.13452],x'=[-0.69593, 1.16, -0.31421, -1.249, -1.0409, -0.76651, 1.5486, 0.80075, 1.4051, -0.21867, -1.0281, -0.44758, -1.1392, -0.553, 1.13403, 1.347, 2]

y′=[0.71149,-1.0293,1.1119,-0.24232,-0.51611,0.58744,-0.79432,2.4897,1.4837,-0.63504,-0.97634,0.41624,0.1504,-0.8793,0.057717,0.46352,-0.97634]y'=[0.71149, -1.0293, 1.1119, -0.24232, -0.51611, 0.58744, -0.79432, 2.4897, 1.4837, -0.63504, -0.97634, 0.41624, 0.1504, -0.8793, 0.057406]3, 5

(8)Hash提取,计算(1≤i≤16),即可得到图1的图像Hash:h(1)=[0.87166,1.0269,2.1359,1.5662,1.2623,1.8048,1.4258,3.5295,2.7688,0.49116,1.1627,1.5093,1.7006,0.69434,1.4383,1.8337]。(8) Hash extraction, calculation (1≤i≤16), the Hash of the image in Figure 1 can be obtained: h (1) = [0.87166, 1.0269, 2.1359, 1.5662, 1.2623, 1.8048, 1.4258, 3.5295, 2.7688, 0.49116, 1.1627, 1.5093, 1.7006, 0.69434 , 1.4383, 1.8337].

(9)相似性判断,提取图2的图像Hash得到h(2)=[0.9612,1.1092,2.3191,1.7667,1.4140,2.0047,1.1778,3.5129,2.8024,0.7206,1.1775,1.7879,1.8365,0.7194,1.6644,1.9184];设定阈值T=1.0,计算h(1)和h(2)的L1范数,得到d=0.64987;由于d小于T,因此可认为图1和图2是相似的图像。(9) Similarity judgment, extract the image Hash in Figure 2 to get h (2) = [0.9612, 1.1092, 2.3191, 1.7667, 1.4140, 2.0047, 1.1778, 3.5129, 2.8024, 0.7206, 1.1775, 1.7879, 1.8365, 0.7194, 1.6644, 1.9184]; set the threshold T=1.0, calculate the L1 norm of h (1) and h (2) , and obtain d=0.64987; since d is smaller than T, it can be considered that Fig. 1 and Fig. 2 are similar images.

本发明用100幅不同图像(大小为256×256~1994×2592)作为测试数据,提取它们的图像Hash(取M=256,t=64)并计算两两Hash间的L1范数,共有4950个结果,其统计分布图如图7所示。其中,最小距离为1.6458,最大距离为7.5218,距离均值为4.3755,标准差为0.8587。从实施例发现,任意两幅不同图像的Hash,其距离均大于设定阈值T=1.0,说明本发明具有较好的唯一性。The present invention uses 100 different images (with a size of 256×256~1994×2592) as test data, extracts their image Hash (taking M=256, t=64) and calculates the L1 norm between pairs of Hash, there are 4950 The results are shown in Figure 7. Among them, the minimum distance is 1.6458, the maximum distance is 7.5218, the average distance is 4.3755, and the standard deviation is 0.8587. It is found from the embodiment that the distances between the hashes of any two different images are greater than the set threshold T=1.0, which shows that the present invention has better uniqueness.

Claims (2)

1.一种基于缩略图和奇异值分解的图像Hash方法,其特征在于:先对输入图像预处理,再进行非重叠分块,然后将奇异值分解应用于每个图像块,取第1和第2个奇异值作为块特征,用双线性插值法将输入图像转换成与图像块大小一致的图像并取亮度分量表示,生成原图像的缩略图,同时将奇异值分解应用于缩略图,取第1和第2个奇异值作为特征,将图像块和缩略图的特征值归一化,并对图像块的特征序列进行位置重排,以缩略图的第1、2个奇异值为基准,计算每对奇异值与它的欧氏距离,串连所有距离值即为图像Hash,判断两个图像Hash相似性时,计算它们的L1范数,如果小于设定阈值,认为其对应的图像相似,否则认为是不同图像。1. A kind of image Hash method based on thumbnail and singular value decomposition, it is characterized in that: earlier to input image preprocessing, carry out non-overlapping block again, then apply singular value decomposition to each image block, get the first and The second singular value is used as the block feature, and the input image is converted into an image with the same size as the image block by bilinear interpolation method and represented by the brightness component to generate a thumbnail of the original image, and the singular value decomposition is applied to the thumbnail, Take the first and second singular values as features, normalize the feature values of the image block and thumbnail, and rearrange the position of the feature sequence of the image block, based on the first and second singular values of the thumbnail , calculate the Euclidean distance between each pair of singular values and it, concatenate all the distance values to be the image Hash, when judging the similarity of two image Hash, calculate their L1 norm, if it is less than the set threshold, consider the corresponding image similar, otherwise they are considered different images. 2.根据权利要求1所述的基于缩略图和奇异值分解的图像Hash方法,其特征在于:具体步骤如下:2. the image Hash method based on thumbnail and singular value decomposition according to claim 1, is characterized in that: concrete steps are as follows: (1)图像预处理:对输入图像I进行预处理,包括图像尺寸规格化和颜色空间转换。先采用双线性插值法,将图像规格化成M×M大小;如果输入为彩色图像,则将其转换到YCbCr空间,用Y分量代表图像,记预处理后的图像为J;(1) Image preprocessing: Preprocessing the input image I, including image size normalization and color space conversion. First use the bilinear interpolation method to normalize the image into M×M size; if the input is a color image, convert it to the YCbCr space, use the Y component to represent the image, and record the preprocessed image as J; (2)图像分块:将J分割成大小为t×t的非重叠块,一共有N=M2/t2个图像块,图像归格化时,取M为t的整数倍,按从上往下从左到右的次序对分块编号,记第i个图像块为Bi(1≤i≤N);(2) Image block: Divide J into non-overlapping blocks with a size of t×t. There are N=M 2 /t 2 image blocks in total. Number the blocks in order from top to bottom from left to right, and record the i-th image block as Bi (1≤i≤N); (3)计算图像块特征:设Bi的奇异值分解记为[Ui Si Vi]=SVD(Bi),其中Ui和Vi是酉矩阵,Si是对角矩阵,Si对角线上的元素为Bi的奇异值,取Bi的第1、2个奇异值作为图像块特征,分别记为pi和qi,即pi=Si(1,1)和qi=Si(2,2),分别串连图像块的第1、2个特征,可得到描述整幅图像的特征向量p=[p1,p2,...,pN]和q=[q1,q2,...,qN];(3) Calculate image block features: Let the singular value decomposition of Bi be recorded as [ U i S i V i ]=SVD(B i ), where U i and V i are unitary matrices, S i is a diagonal matrix, S The elements on the diagonal of i are the singular values of Bi , and the first and second singular values of Bi are taken as the image block features, which are recorded as p i and q i respectively, that is, p i =S i (1,1) and q i =S i (2, 2), connect the first and second features of the image block respectively, and obtain the feature vector p=[p 1 , p 2 ,..., p N ] describing the entire image and q=[q 1 , q 2 , . . . , q N ]; (4)生成缩略图:利用双线性插值法,将图像I规格化成大小为t×t的缩略图,对于彩色图像,将其转换到YCbCr空间,取Y分量代表图像,记最终的缩略图为R;(4) Generate thumbnails: Use bilinear interpolation to normalize the image I into a thumbnail with a size of t×t. For a color image, convert it to the YCbCr space, take the Y component to represent the image, and record the final thumbnail for R; (5)提取缩略图特征:对R进行奇异值分解,取其第1、2个奇异值作为特征,分别记为s1和s2(5) extract thumbnail feature: carry out singular value decomposition to R, get its 1st, 2nd singular value as feature, denote as s 1 and s 2 respectively; (6)特征归一化:分别用向量u和v表示图像块和图像缩略图的特征,即ui=pi(1≤i≤N),uN+1=s1;vi=qi(1≤i≤N),vN+1=s2,分别对u和v的元素进行归一化,即xi=(uiu)/δu,yi=(viv)/δv,其中,μu和μv分别为u和v的均值,δu和δv分别为它们的标准差;(6) Feature normalization: use vectors u and v to represent the features of the image block and image thumbnail respectively, namely u i =p i (1≤i≤N), u N+1 =s 1 ; v i =q i (1≤i≤N), v N+1 = s 2 , normalize the elements of u and v respectively, that is, x i = (u iu )/δ u , y i = (v iv )/δ v , wherein, μ u and μ v are the average value of u and v respectively, and δ u and δ v are their standard deviations respectively; (7)特征置乱:在密钥控制下,用伪随机发生器分别对归一化向量x和y的前N个元素进行位置重排,并保留第N+1个元素不变,得到置乱后向量x′和y′;(7) Feature scrambling: Under the control of the key, use a pseudo-random generator to rearrange the positions of the first N elements of the normalization vectors x and y, and keep the N+1th element unchanged, and get the set Random back vectors x' and y'; (8)Hash提取:计算(1≤i≤N),即可得到图像Hash h=[h1,h2,...,hN];(8) Hash extraction: calculation (1≤i≤N), the image Hash h=[h 1 , h 2 ,..., h N ] can be obtained; (9)相似性判断:设h(1)和h(2)分别为两个图像Hash序列,
Figure FSA00000430364400012
Figure FSA00000430364400013
分别表示它们的第i个元素,计算距离
Figure FSA00000430364400014
如果d小于设定阈值T,认为h(1)和h(2)所对应的图像相似,否则认为是不同图像。
(9) Similarity judgment: Let h (1) and h (2) be two image Hash sequences respectively,
Figure FSA00000430364400012
and
Figure FSA00000430364400013
represent their i-th elements respectively, and calculate the distance
Figure FSA00000430364400014
If d is smaller than the set threshold T, the images corresponding to h (1) and h (2) are considered to be similar, otherwise they are considered to be different images.
CN201110033139A 2011-01-29 2011-01-29 Image Hash method based on thumbnail and singular value decomposition Expired - Fee Related CN102129549B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110033139A CN102129549B (en) 2011-01-29 2011-01-29 Image Hash method based on thumbnail and singular value decomposition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110033139A CN102129549B (en) 2011-01-29 2011-01-29 Image Hash method based on thumbnail and singular value decomposition

Publications (2)

Publication Number Publication Date
CN102129549A true CN102129549A (en) 2011-07-20
CN102129549B CN102129549B (en) 2012-09-05

Family

ID=44267629

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110033139A Expired - Fee Related CN102129549B (en) 2011-01-29 2011-01-29 Image Hash method based on thumbnail and singular value decomposition

Country Status (1)

Country Link
CN (1) CN102129549B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102881008A (en) * 2012-08-16 2013-01-16 广西师范大学 Circular loop statistic characteristic-based anti-rotation image Hash method
CN104778689A (en) * 2015-03-30 2015-07-15 广西师范大学 An Image Summarization Method Based on Mean Quadratic Image and Locality Preserving Projection
CN106179992A (en) * 2016-08-26 2016-12-07 保定市立中车轮制造有限公司 A kind of wheel hub Automated Sorting System and method for sorting thereof
CN109598726A (en) * 2018-10-26 2019-04-09 哈尔滨理工大学 A kind of adapting to image target area dividing method based on SLIC
CN109685112A (en) * 2018-11-29 2019-04-26 昆明理工大学 It is a kind of based on color difference algorithm determination method similar with the image of DHash
CN114240827A (en) * 2021-11-04 2022-03-25 山东师范大学 Half-parameter sensing encryption visual security analysis method and system based on hash
CN118657799A (en) * 2024-08-16 2024-09-17 武汉泰铭恒创信息技术股份有限公司 A traffic police intelligent management method and system based on big data

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030293A (en) * 2007-03-30 2007-09-05 西安电子科技大学 Digital watermark method against geometrical attack based on image characteristic region
WO2009046438A1 (en) * 2007-10-05 2009-04-09 Dolby Laboratories Licensing Corp. Media fingerprints that reliably correspond to media content
CN101702230A (en) * 2009-11-10 2010-05-05 大连理工大学 Stable digital watermarking method based on feature points
CN101710334A (en) * 2009-12-04 2010-05-19 大连理工大学 Large-scale image library retrieving method based on image Hash

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030293A (en) * 2007-03-30 2007-09-05 西安电子科技大学 Digital watermark method against geometrical attack based on image characteristic region
WO2009046438A1 (en) * 2007-10-05 2009-04-09 Dolby Laboratories Licensing Corp. Media fingerprints that reliably correspond to media content
CN101702230A (en) * 2009-11-10 2010-05-05 大连理工大学 Stable digital watermarking method based on feature points
CN101710334A (en) * 2009-12-04 2010-05-19 大连理工大学 Large-scale image library retrieving method based on image Hash

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102881008A (en) * 2012-08-16 2013-01-16 广西师范大学 Circular loop statistic characteristic-based anti-rotation image Hash method
CN102881008B (en) * 2012-08-16 2016-06-01 广西师范大学 Based on the anti-rotation image Hash method of annulus statistical nature
CN104778689A (en) * 2015-03-30 2015-07-15 广西师范大学 An Image Summarization Method Based on Mean Quadratic Image and Locality Preserving Projection
CN104778689B (en) * 2015-03-30 2018-01-05 广西师范大学 Image summarization method based on mean secondary image and local preserving projection
CN106179992A (en) * 2016-08-26 2016-12-07 保定市立中车轮制造有限公司 A kind of wheel hub Automated Sorting System and method for sorting thereof
CN106179992B (en) * 2016-08-26 2018-04-13 保定市立中车轮制造有限公司 A kind of wheel hub Automated Sorting System and its method for sorting
CN109598726A (en) * 2018-10-26 2019-04-09 哈尔滨理工大学 A kind of adapting to image target area dividing method based on SLIC
CN109685112A (en) * 2018-11-29 2019-04-26 昆明理工大学 It is a kind of based on color difference algorithm determination method similar with the image of DHash
CN114240827A (en) * 2021-11-04 2022-03-25 山东师范大学 Half-parameter sensing encryption visual security analysis method and system based on hash
CN118657799A (en) * 2024-08-16 2024-09-17 武汉泰铭恒创信息技术股份有限公司 A traffic police intelligent management method and system based on big data
CN118657799B (en) * 2024-08-16 2024-10-29 武汉泰铭恒创信息技术股份有限公司 Traffic police intelligent management method and system based on big data

Also Published As

Publication number Publication date
CN102129549B (en) 2012-09-05

Similar Documents

Publication Publication Date Title
Swaminathan et al. Robust and secure image hashing
Qu et al. A convolutive mixing model for shifted double JPEG compression with application to passive image authentication
Tang et al. Robust image hash function using local color features
CN102129549B (en) Image Hash method based on thumbnail and singular value decomposition
Samanta et al. Analysis of perceptual hashing algorithms in image manipulation detection
Saleh et al. Evaluation of image forgery detection using multi-scale weber local descriptors
Thakur et al. Blind approach for digital image forgery detection
Wang et al. LBP-SVD based copy move forgery detection algorithm
Hussain et al. Copy-move image forgery detection using multi-resolution weber descriptors
CN111429337B (en) Image hash acquisition method based on transform domain and shape characteristics
Sharma et al. Image forgery and it’s detection technique: a review
Maind et al. Image copy move forgery detection using block representing method
Zhao et al. Perceptual image hashing based on color structure and intensity gradient
Xue et al. Ssl: A novel image hashing technique using sift keypoints with saliency detection and lbp feature extraction against combinatorial manipulations
Roy et al. Various approaches to perceptual image hashing systems-a survey
Thanki et al. Sparse watermarking technique for improving security of biometric system
Tang et al. Structural feature-based image hashing and similarity metric for tampering detection
Transform Robust image hashing using radon transform and invariant features
Setyawan et al. Spatio-temporal digital video hashing using edge orientation histogram and discrete cosine transform
Neelima et al. Perceptual hash function for images based on hierarchical ordinal pattern
Wang et al. A novel image signature method for content authentication
Patil et al. Image hashing by LoG-QCSLBP
Kaur et al. Study of various copy move forgery attack detection techniques in digital images
Setyawan et al. Digital image hashing using local histogram of oriented gradients
Thabit et al. Robust reversible watermarking application for fingerprint image security

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120905

Termination date: 20190129