CN111787179A - Image hash acquisition method, image security authentication method and device - Google Patents

Image hash acquisition method, image security authentication method and device Download PDF

Info

Publication number
CN111787179A
CN111787179A CN202010479906.1A CN202010479906A CN111787179A CN 111787179 A CN111787179 A CN 111787179A CN 202010479906 A CN202010479906 A CN 202010479906A CN 111787179 A CN111787179 A CN 111787179A
Authority
CN
China
Prior art keywords
image
gradient
matrix
row
column
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
CN202010479906.1A
Other languages
Chinese (zh)
Other versions
CN111787179B (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.)
Shanghai University of Electric Power
Original Assignee
Shanghai University of Electric Power
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 Shanghai University of Electric Power filed Critical Shanghai University of Electric Power
Priority to CN202010479906.1A priority Critical patent/CN111787179B/en
Publication of CN111787179A publication Critical patent/CN111787179A/en
Application granted granted Critical
Publication of CN111787179B publication Critical patent/CN111787179B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/32Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
    • H04N1/32101Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
    • H04N1/32144Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title embedded in the image data, i.e. enclosed or integrated in the image, e.g. watermark, super-imposed logo or stamp
    • H04N1/32149Methods relating to embedding, encoding, decoding, detection or retrieval operations
    • H04N1/32267Methods relating to embedding, encoding, decoding, detection or retrieval operations combined with processing of the image
    • H04N1/32272Encryption or ciphering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • G06F16/5838Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/44Secrecy systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Library & Information Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Power Engineering (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Image Processing (AREA)

Abstract

The invention relates to an image hash acquisition method, an image security authentication method and an image security authentication device. The image hash acquisition method comprises the following steps: step S1, preprocessing the image; step S2, generating a gradient normalization image according to the preprocessed image; step S3, carrying out non-overlapping blocking processing on the gradient normalized image, solving a block gradient mean value to form a gradient mean value matrix, and extracting local features of the image based on the gradient mean value matrix; s4, performing column accumulation operation on the gradient mean matrix to obtain a column-row accumulation matrix, and extracting the image global characteristics based on the column-row accumulation matrix; and step S5, combining the image local features and the image global features to form an intermediate hash sequence, and encrypting the intermediate hash sequence by using a key to obtain a final hash sequence. Compared with the prior art, the method has better performance effects in the aspects of robustness, distinctiveness, safety and the like.

Description

Image hash acquisition method, image security authentication method and device
Technical Field
The invention relates to the technical field of image processing, in particular to an image hash obtaining method, an image security authentication method and an image security authentication device.
Background
With the popularity of internet environments and free image editing software, digital images are increasingly likely to be subject to content tampering due to malicious tampering, and image authentication and image retrieval are becoming more important due to the increasing number of digital counterfeiting phenomena such as image copying caused by private purposes. The Hash function firstly extracts the characteristics of the digital image, then maps the extracted multimedia characteristics into a short sequence code, and carries out image authentication by comparing the Hash sequence of the original image and the image to be authenticated. The design principle of image hash is mainly robustness against unexpected distortion caused by content holding operation and geometric deformation, sensitivity to malicious change of image content, and certain degree of security.
The performance of an image hash algorithm depends on the extraction mode of image features to a great extent, Wang et al construct a hash sequence by combining a Watson visual model, Zernike moments and DCT coefficients to extract local features and global features of an image, and the hash algorithm can detect content change and content forgery caused by malicious attacks and has better perception robustness. Qin et al constructs a hash sequence by combining local texture features with color angle features of an image, and performs sequence code compression by PCA to ensure compactness of the hash sequence, and the algorithm has better robustness to content maintenance operations such as JPEG compression, image scaling and the like. Shen et al extracts color change information from the color opponent component of an image, applies quadtree decomposition to the intensity component of the image to extract the structural features of the image, and the two combine to construct an image hash sequence. Tang et al generated a visual saliency map for the Y component of the YCbCr color space using a PFT visual model, extracted a low frequency subband for the visual saliency map that underwent dual-tree complex wavelet transform, and constructed a hash using the relationship between any concentric feature matrices of the low frequency subband diagram. Huang et al extracts the statistical features of the texture image, such as contrast, correlation, gradient, and homogeneity, as global features of the image, and combines the global features with DCT transform to construct an image hash. Tang et al construct a tensor by using the block mean of L components in the CIE L a b color space as an eigen matrix, and perform Tucker decomposition on the tensor to generate a hash sequence.
Disclosure of Invention
The present invention aims to overcome the defects of the prior art and provide an image hash acquisition method, an image security authentication method and an image security authentication device with good performance effects in the aspects of robustness, distinctiveness, security, etc.
The purpose of the invention can be realized by the following technical scheme:
an image hash acquisition method, comprising the steps of:
step S1, preprocessing the image;
step S2, generating a gradient normalization image according to the preprocessed image;
step S3, carrying out non-overlapping blocking processing on the gradient normalized image, solving a block gradient mean value to form a gradient mean value matrix, and extracting local features of the image based on the gradient mean value matrix;
s4, performing column accumulation operation on the gradient mean matrix to obtain a column-row accumulation matrix, and extracting the image global characteristics based on the column-row accumulation matrix;
and step S5, combining the image local features and the image global features to form an intermediate hash sequence, and encrypting the intermediate hash sequence by using a key to obtain a final hash sequence.
Preferably, step S1 is specifically: and (3) carrying out bilinear interpolation on the original image to adjust the size of the original image to be M multiplied by M, and carrying out Gaussian low-pass filtering to obtain a secondary image.
Preferably, step S2 specifically includes:
step S2-1, calculating gradient values of R, G, B component images of the secondary image:
Figure BDA0002516946630000021
Figure BDA0002516946630000022
Figure BDA0002516946630000023
wherein, IR(x,y)、IG(x, y) and IB(x, y) red, green and blue channels of the RGB color space, respectively, GR、GGAnd GBRespectively corresponding gradient values of the corresponding color channels;
step S2-2, performing summation operation on the gradient values corresponding to each color channel to obtain a gradient image of the secondary image:
G=GR+GG+GB
wherein G is the gradient value of the secondary image;
step S2-3, carrying out normalization processing on the gradient values of the secondary images to obtain gradient normalized images:
GR(i)=G(i)/Gmax
wherein G ismaxThe maximum value of the gradient values of the secondary image, G (i) is the gradient value corresponding to each pixel of the secondary image, and GR (i) is the normalized gradient value corresponding to each pixel of the secondary image.
Preferably, step S3 specifically includes:
step S3-1, performing non-overlapped block segmentation processing with image block size b × b on the gradient normalized image with size M × M, and obtaining the gradient mean value of each image block to obtain a gradient mean value matrix M with size (M/b) × (M/b)I
Step S3-2, gradient mean matrix MIPerforming WLBP operation on other gradient mean values except the first row, the first column, the last row and the last column to obtain gradient change values, correspondingly performing row-column sequencing on the gradient change values according to corresponding gradient mean value positions to obtain a gradient change matrix A with the size of (M/b-2) × (M/b-2), wherein the WLBP operation is as follows:
Figure BDA0002516946630000031
Figure BDA0002516946630000032
wherein x iscIs a gradient mean matrix MIAny other gradient mean than the first row, first column, last row and last column, WLBPP,R,ξ(xc) Is xcCorresponding gradient change value, xnIs a gradient mean matrix MIIn the distribution with xcThe mean gradient value in the neighborhood of P with R as the center, ξ as the threshold constant and R, P as the set constant;
step S3-3, expanding the gradient change matrix A according to rows to form a matrix with the size of 1 × (M/b-2)2A line vector ofHWill be a row vector AHThe following procedure gave a size of (M/b-2)2Binarization sequence H of-1G
Figure BDA0002516946630000033
Wherein A isH(p) is a row vector AHP element of (A)H(p +1) is a row vector AHP +1 th element of (1), HG(p) is the sequence HGP-th element of (1, 2, … …), (M/b-2)2-1;
The binarization sequence HGNamely the hash sequence for characterizing the local features of the image.
Preferably, step S4 specifically includes:
step S4-1, gradient mean matrix MIObtaining a row gradient accumulation matrix E by rows according to the following formular
Figure BDA0002516946630000041
Wherein E isr(i, j) is a row gradient accumulation matrix ErRow and column i and j, MI(i, j) is a gradient mean matrix MIRow (i) and column (j)An element;
step S4-2, accumulating matrix E for row gradientrAfter normalization, calculating the mean value and variance of each row to form a row feature matrix E 'of 2 rows and M/b columns, transposing the row feature matrix E' to obtain a matrix E of M/b rows and 2 columns, and normalizing the matrix E according to the following formula to obtain a normalized row feature matrix R:
Figure BDA0002516946630000042
wherein R (i, j) is the ith row and jth column element in the matrix R, E (i, j) is the ith row and jth column element in the matrix E, and mujIs the mean, σ, of the jth column in the matrix EjIs the standard deviation of the jth column in the matrix E;
step S4-3, transposing the matrix R and expanding the matrix R according to the rows to obtain a row vector ERWill be a row vector ERObtaining a binary sequence H with the size of 2 × (M/b) -1 by the following operationR
Figure BDA0002516946630000043
Wherein E isR(q) is a row vector ERQ element of (1), ER(q +1) is a row vector ERQ +1 th element of (1), HR(q) is the sequence HRQ is 1, 2, … …, 2 × (M/b) -1;
step S4-4, gradient mean matrix MIObtaining a column gradient accumulation matrix E by column according to the following formulac
Figure BDA0002516946630000044
Wherein E isc(i, j) is a column gradient accumulation matrix EcRow and column i and j, MI(i, j) is a gradient mean matrix MIRow i and column j;
step S4-5, adding up matrix E to the column gradientcNormalization, transposition and inversion are sequentially performed in the manner of step S4-2 and step S4-3The binarization operation obtains a binary sequence H with the size of 2 × (M/b) -1C
The binarization sequence HR、HCNamely the hash sequence representing the global features of the image.
Preferably, step S5 specifically includes:
step S5-1, binarization sequence HG、HR、HCJoin to form an intermediate hash sequence Hm
Hm=[HG、HR、HC];
Step S5-2, using 1000 pseudo random number sequences S generated by random generator to intermediate hash sequence HmIs reordered to obtain a final hash sequence h, h being (M/b-2) in length2-1+(M/b)×4-2bits。
An image security authentication method, comprising the steps of:
step 1, adopting the image hash acquisition method to respectively acquire hash sequences h of an original image and an image to be authenticated1And h2
And 2, calculating the difference of the Hash sequences of the original image and the image to be authenticated, wherein if the difference is not greater than a threshold value T, the image passes the safety authentication, and otherwise, the image does not pass the safety authentication.
Preferably, the difference between the hash sequences of the original image and the image to be authenticated is determined by a hamming distance D (h)1,h2) And (4) measuring.
An image hash acquisition apparatus includes a first memory and a first processor;
the first memory is used for storing a computer program;
the first processor is configured to implement the image hash acquisition method when executing the computer program.
An image security authentication apparatus, the apparatus comprising a second memory and a second processor;
the second memory is used for storing a computer program;
and the second processor is used for realizing the image security authentication method when executing the computer program.
Compared with the prior art, the invention has the following advantages:
the invention takes the gradient change characteristics as the local characteristics of the image, can effectively describe the relationship between adjacent gradient values of the gradient image and reflect the local change of the gradient values of the image; the statistical characteristics of the image gradient accumulation graph are used as the global characteristics of the image, and the algorithm performance is improved, so that the image hash acquisition method can better meet the basic performance requirements of the image hash: the method has the advantages of robustness, distinctiveness and safety, the Hash sequence is compact, the operation efficiency is high, and the method can be applied to image copy detection, content authentication and similarity retrieval.
Drawings
FIG. 1 is a flow chart of an image hash acquisition method of the present invention;
FIG. 2 is an example of the present invention for determining WLBP;
FIG. 3 is a flow chart of the image security authentication of the present invention;
FIG. 4 is a diagram illustrating the robustness test results of the image hash acquisition method for various content retention operations according to the present invention;
fig. 5 is a diagram of a result of a distinctive experiment of the image hash acquisition method of the present invention.
Fig. 6 is a diagram of a security experiment result of the image hash acquisition method of the present invention.
Detailed Description
The invention is described in detail below with reference to the figures and specific embodiments. Note that the following description of the embodiments is merely a substantial example, and the present invention is not intended to be limited to the application or the use thereof, and is not limited to the following embodiments.
Examples
Aiming at the problems that the phenomenon of digital forgery is more common and the problems of image authentication and image security are more challenging, the invention provides an image hashing method combining gradient change characteristics and gradient accumulation characteristics. Image hashing is mainly used for image authentication by comparing hash sequences between an original image and an image to be authenticated. The method takes the gradient change characteristics as the local characteristics of the image, can effectively describe the relationship between adjacent gradient values of the gradient image and reflect the local change of the gradient values of the image; and the statistical characteristics of the image gradient accumulation graph are used as the global characteristics of the image, so that the algorithm performance is improved. The method has good robustness for common content keeping operation, good distinctiveness, safety and image authentication performance, and the generated hash sequence is compact and has high operation efficiency.
As shown in fig. 1, an image hash acquisition method includes the following steps:
step S1, preprocessing the image;
step S2, generating a gradient normalization image according to the preprocessed image;
step S3, carrying out non-overlapping blocking processing on the gradient normalized image, solving a block gradient mean value to form a gradient mean value matrix, and extracting local features of the image based on the gradient mean value matrix;
s4, performing column accumulation operation on the gradient mean matrix to obtain a column-row accumulation matrix, and extracting the image global characteristics based on the column-row accumulation matrix;
and step S5, combining the image local features and the image global features to form an intermediate hash sequence, and encrypting the intermediate hash sequence by using a key to obtain a final hash sequence.
Step S1 specifically includes: and (3) carrying out bilinear interpolation on the original image to adjust the size of the original image to be M multiplied by M, and carrying out Gaussian low-pass filtering to obtain a secondary image.
Step S2 specifically includes:
step S2-1, calculating gradient values of R, G, B component images of the secondary image:
Figure BDA0002516946630000071
Figure BDA0002516946630000072
Figure BDA0002516946630000073
wherein, IR(x,y)、IG(x, y) and IB(x, y) red, green and blue channels of the RGB color space, respectively, GR、GGAnd GBRespectively corresponding gradient values of the corresponding color channels;
step S2-2, performing summation operation on the gradient values corresponding to each color channel to obtain a gradient image of the secondary image:
G=GR+GG+GB
wherein G is the gradient value of the secondary image;
step S2-3, carrying out normalization processing on the gradient values of the secondary images to obtain gradient normalized images:
GR(i)=G(i)/Gmax
wherein G ismaxThe maximum value of the gradient values of the secondary image, G (i) is the gradient value corresponding to each pixel of the secondary image, and GR (i) is the normalized gradient value corresponding to each pixel of the secondary image.
Step S3 specifically includes:
step S3-1, performing non-overlapped block segmentation processing with image block size b × b on the gradient normalized image with size M × M, and obtaining the gradient mean value of each image block to obtain a gradient mean value matrix M with size (M/b) × (M/b)I
Step S3-2, gradient mean matrix MIPerforming WLBP operation on other gradient mean values except for the first row, the first column, the last row and the last column to obtain gradient change values, and correspondingly performing row-column sequencing on the gradient change values according to corresponding gradient mean value positions to obtain a gradient change matrix A with the size of (M/b-2) × (M/b-2), namely, the y-th row and y-th column elements in the gradient change matrix A are a gradient mean value matrix MIAnd performing a WLBP operation on the (x +1) th row and (y +1) th column elements to obtain gradient change values, wherein x is 1, 2, … …, M/b-2, y is 1, 2, … … and M/b-2, and the WLBP operation is as follows:
Figure BDA0002516946630000074
Figure BDA0002516946630000075
wherein x iscIs a gradient mean matrix MIAny other gradient mean than the first row, first column, last row and last column, WLBPP,R,ξ(xc) Is xcCorresponding gradient change value, xnIs a gradient mean matrix MIIn the distribution with xcMean gradient in P neighborhood centered at radius R, ξ a threshold constant and R, P a set constant, FIG. 2 an example of determining WLBP, x in FIG. 2cCorresponding WLBP was determined at 0.2126, P ═ 8, R ═ 1, and ξ ═ 0.5P,R,ξ(xc)=64。
Step S3-3, expanding the gradient change matrix A according to rows to form a matrix with the size of 1 × (M/b-2)2A line vector ofHWill be a row vector AHThe following procedure gave a size of (M/b-2)2Binarization sequence H of-1G
Figure BDA0002516946630000081
Wherein A isH(p) is a row vector AHP element of (A)H(p +1) is a row vector AHP +1 th element of (1), HG(p) is the sequence HGP-th element of (1, 2, … …), (M/b-2)2-1;
Binarization sequence HGNamely the hash sequence for representing the local characteristics of the image.
Step S4 specifically includes:
step S4-1, gradient mean matrix MIObtaining a row gradient accumulation matrix E by rows according to the following formular
Figure BDA0002516946630000082
Wherein E isr(i, j) is a row gradient accumulation matrix ErRow and column i and j, MI(i, j) is a gradient mean matrix MIRow i and column j;
step S4-2, accumulating matrix E for row gradientrAfter normalization, calculating the mean value and variance of each row to form a row feature matrix E 'of 2 rows and M/b columns, transposing the row feature matrix E' to obtain a matrix E of M/b rows and 2 columns, and normalizing the matrix E according to the following formula to obtain a normalized row feature matrix R:
Figure BDA0002516946630000083
wherein R (i, j) is the ith row and jth column element in the matrix R, E (i, j) is the ith row and jth column element in the matrix E, and mujIs the mean, σ, of the jth column in the matrix EjIs the standard deviation of the jth column in the matrix E;
step S4-3, transposing the matrix R and expanding the matrix R according to the rows to obtain a row vector ERWill be a row vector ERObtaining a binary sequence H with the size of 2 × (M/b) -1 by the following operationR
Figure BDA0002516946630000084
Wherein E isR(q) is a row vector ERQ element of (1), ER(q +1) is a row vector ERQ +1 th element of (1), HR(q) is the sequence HRQ is 1, 2, … …, 2 × (M/b) -1;
step S4-4, gradient mean matrix MIObtaining a column gradient accumulation matrix E by column according to the following formulac
Figure BDA0002516946630000091
Wherein E isc(i, j) is a column gradient accumulation matrix EcRow and column i and j, MI(i, j) is the mean moment of gradientMatrix MIRow i and column j;
step S4-5, adding up matrix E to the column gradientcSequentially carrying out normalization, transposition and binarization operations according to the steps S4-2 and S4-3 to obtain a binary sequence H with the size of 2 × (M/b) -1C
Binarization sequence HR、HCNamely the hash sequence representing the global features of the image.
Preferably, step S5 specifically includes:
step S5-1, binarization sequence HG、HR、HCJoin to form an intermediate hash sequence Hm
Hm=[HG、HR、HC];
Step S5-2, using 1000 pseudo random number sequences S generated by random generator to intermediate hash sequence HmIs reordered to obtain a final hash sequence h, h being (M/b-2) in length2-1+(M/b)×4-2bits。
As shown in fig. 3, an image security authentication method includes the following steps:
step 1, adopting the image hash acquisition method to respectively acquire hash sequences h of an original image and an image to be authenticated1And h2
Step 2, calculating the difference of the Hash sequences of the original image and the image to be authenticated, if the difference is not larger than a threshold value T, the image passes the safety authentication, otherwise, the image does not pass the safety authentication, wherein the threshold value T is obtained according to subsequent experiments, and the difference of the Hash sequences of the original image and the image to be authenticated passes a Hamming distance D (h)1,h2) And (4) measuring.
An image hash acquisition apparatus includes a first memory and a first processor; a first memory for storing a computer program; a first processor for implementing the above image hash acquisition method when executing the computer program.
An image security authentication apparatus, the apparatus comprising a second memory and a second processor; a second memory for storing a computer program; a second processor for implementing the above image security authentication method when executing the computer program.
In this embodiment, the following settings are made for the parameters: the normalized image size M is 256, the standard deviation of 3 × 3 gaussian low pass filtering is 1, the image block size b is 16, P is 8, R is 1, and ξ is 0.5, so that the length L of the final hash sequence h is 257 bits.
A. And (3) robustness analysis:
the experimental samples in the robustness performance analysis are taken from five standard images of airplan, House, Lena, babon and Peppers in a standard image library, and 11 content holding operations are performed on the five standard images, wherein specific attack types, editing software types and corresponding parameter settings are shown in table 1:
TABLE 1 parameters used for various conventional image processing in robustness performance analysis
Figure BDA0002516946630000101
Fig. 4 is a graph showing the results of robustness tests of various types of content holding operations, and (a) to (k) in fig. 4 are the content holding operations in sequence of 11 in table 1: the method comprises the following steps of brightness adjustment, contrast adjustment, gamma correction, mean filtering, image scaling, watermark embedding, JPEG compression, 3 multiplied by 3 Gaussian low-pass filtering, multiplicative noise, salt and pepper noise and robustness experiment result graphs corresponding to the Gaussian noise, wherein the abscissa of a subgraph is set by corresponding conventional image processing parameters, and the ordinate is the Hamming distance between an original image obtained by the Hash method and a corresponding conventional processed image. In 11 experimental result sub-graphs, the minimum distance value is 0, the maximum distance value is 76, and the distances between other operations except the mean filtering and the original graph are all obviously less than 50 and far less than the optimal threshold value obtained in the subsequent experiments.
B. Differential performance analysis:
the total number of different image experimental samples in the differential performance analysis was 1000, which were taken from 700 images in the group trout database and 300 images in the VOC2007 database of washington university. FIG. 5 plots the distance distribution between image pairs, where "DifThe curve of the reagent images is
Figure BDA0002516946630000102
Distance distribution between pairs of Different images, the "visual similar images" curve represents the distance distribution between (21 × 20)/2 × 1000 ═ 210000 pairs of similar images resulting from the retention of the contents of 1000 Different images as shown in Table 2, the abscissa is the Hamming distance between pairs of hash sequences, the ordinate is the number of pairs of images the "visual similar images" curve abscissa end points are 0 and 77, the "differential images" curve abscissa end points are 68 to 175, pairs of similar images and Different pairs of images have only overlapping portions between 68 to 77, and the number of overlapping images is small, so that the number of images that can pass through the collision probability PCAnd error detection ratio PEAnd selecting a proper threshold value to classify the similar image and the different image.
Table 2 parameters used for various conventional image processing in the differential performance analysis
Figure BDA0002516946630000111
Wherein the collision rate PCAnd error detection ratio PEThe definition is as follows:
Figure BDA0002516946630000112
Figure BDA0002516946630000113
the threshold determination mode is as follows:
when the selected threshold is small, the similar image pairs may be wrongly judged as different image pairs, resulting in a large error detection rate; when the selected threshold is large, it is also possible to mistake different image pairs for similar image pairs, resulting in a high collision rate, i.e. a collision rate PCAnd error detection ratio PEAre in a mutually inhibitory relationship. As can be seen from table 3, in the overlap region, the collision rate and the error detection rate are small for different thresholds, and when the threshold T is 70, the collision rate P is highCIs 1.602 × 10-5Error detection ratio PEIs 2.381 × 10-5And a better balance is obtained between the two, so the optimal threshold value is taken as T70.
TABLE 3 threshold and Collision Rate error detection Rate
Figure BDA0002516946630000121
C. And (3) safety analysis:
and selecting standard images Peppers in a standard image library as an experimental sample for testing the safety performance. The 1000 error keys randomly generated by the random generator are used for generating the hash sequences of the images Peppers, and the hamming distances between the 1000 hash sequences and the hash sequences generated by the correct keys are respectively calculated, as a result, as shown in fig. 6, the minimum hamming distance is 100, the maximum hamming distance is 156, which is much larger than the optimal threshold value T, that is, when the keys are different, the hash sequences of the same image generated by the hash method are also quite different, so that the hash method provided by the patent can meet the security requirement.
D. Copy performance analysis: 100 images are randomly selected from 1000 different images downloaded from a network as query images, 13 content holding operations are performed on the query images, 26 × 1000 copies of the images are generated, 2600 copies of the images are generated, and specific attack types and corresponding parameter settings are shown in table 4.
Table 4 attack types and parameter settings
Figure BDA0002516946630000122
The 2600 copied images are added into the original 1000 images to form a test image library with 3600 total images, copy performance analysis is performed, table 5 shows the analysis results of recall ratio and precision ratio under different threshold values, when the selected threshold value is 67, the recall ratio reaches 100%, all the copied images can be detected, and when the selected threshold value is 80, the recall ratio is 98.99%, and the precision ratio is 94.11%.
Wherein, the precision ratio P and the recall ratio R are defined as follows:
Figure BDA0002516946630000131
Figure BDA0002516946630000132
TABLE 5 threshold and recall ratio
Figure BDA0002516946630000133
In summary, the hashing method provided by the patent can better meet the basic performance requirement of image hashing: the method has the advantages of robustness, distinctiveness and safety, the Hash sequence is compact, the operation efficiency is high, and the method can be applied to image copy detection, content authentication and similarity retrieval.
The above embodiments are merely examples and do not limit the scope of the present invention. These embodiments may be implemented in other various manners, and various omissions, substitutions, and changes may be made without departing from the technical spirit of the present invention.

Claims (10)

1. An image hash acquisition method is characterized by comprising the following steps:
step S1, preprocessing the image;
step S2, generating a gradient normalization image according to the preprocessed image;
step S3, carrying out non-overlapping blocking processing on the gradient normalized image, solving a block gradient mean value to form a gradient mean value matrix, and extracting local features of the image based on the gradient mean value matrix;
s4, performing column accumulation operation on the gradient mean matrix to obtain a column-row accumulation matrix, and extracting the image global characteristics based on the column-row accumulation matrix;
and step S5, combining the image local features and the image global features to form an intermediate hash sequence, and encrypting the intermediate hash sequence by using a key to obtain a final hash sequence.
2. The image hash acquisition method according to claim 1, wherein step S1 specifically is: and (3) carrying out bilinear interpolation on the original image to adjust the size of the original image to be M multiplied by M, and carrying out Gaussian low-pass filtering to obtain a secondary image.
3. The image hash acquisition method according to claim 2, wherein step S2 specifically includes:
step S2-1, calculating gradient values of R, G, B component images of the secondary image:
Figure FDA0002516946620000011
Figure FDA0002516946620000012
Figure FDA0002516946620000013
wherein, IR(x,y)、IG(x, y) and IB(x, y) red, green and blue channels of the RGB color space, respectively, GR、GGAnd GBRespectively corresponding gradient values of the corresponding color channels;
step S2-2, performing summation operation on the gradient values corresponding to each color channel to obtain a gradient image of the secondary image:
G=GR+GG+GB
wherein G is the gradient value of the secondary image;
step S2-3, carrying out normalization processing on the gradient values of the secondary images to obtain gradient normalized images:
GR(i)=G(i)/Gmax
wherein G ismaxThe maximum value of the gradient values of the secondary image, G (i) is the gradient value corresponding to each pixel of the secondary image, and GR (i) is the normalized gradient value corresponding to each pixel of the secondary image.
4. The image hash acquisition method according to claim 1, wherein step S3 specifically includes:
step S3-1, performing non-overlapped block segmentation processing with image block size b × b on the gradient normalized image with size M × M, and obtaining the gradient mean value of each image block to obtain a gradient mean value matrix M with size (M/b) × (M/b)I
Step S3-2, gradient mean matrix MIPerforming WLBP operation on other gradient mean values except the first row, the first column, the last row and the last column to obtain gradient change values, correspondingly performing row-column sequencing on the gradient change values according to corresponding gradient mean value positions to obtain a gradient change matrix A with the size of (M/b-2) × (M/b-2), wherein the WLBP operation is as follows:
Figure FDA0002516946620000021
Figure FDA0002516946620000022
wherein x iscIs a gradient mean matrix MIAny other gradient mean than the first row, first column, last row and last column, WLBPP,R,ξ(xc) Is xcCorresponding gradient change value, xnIs a gradient mean matrix MIIn the distribution with xcThe mean gradient value in the neighborhood of P with R as the center, ξ as the threshold constant and R, P as the set constant;
step S3-3, expanding the gradient change matrix A according to rows to form a matrix with the size of 1 × (M/b-2)2A line vector ofHWill be a row vector AHThe following procedure gave a size of (M/b-2)2Binarization sequence H of-1G
Figure FDA0002516946620000023
Wherein A isH(p) is a row vector AHP element of (A)H(p +1) is a row vector AHP +1 th element of (1), HG(p) is the sequence HGP-th element of (1, 2, … …), (M/b-2)2-1;
The binarization sequence HGNamely the hash sequence for characterizing the local features of the image.
5. The image hash acquisition method according to claim 4, wherein step S4 specifically includes:
step S4-1, gradient mean matrix MIObtaining a row gradient accumulation matrix E by rows according to the following formular
Figure FDA0002516946620000031
Wherein E isr(i, j) is a row gradient accumulation matrix ErRow and column i and j, MI(i, j) is a gradient mean matrix MIRow i and column j;
step S4-2, accumulating matrix E for row gradientrAfter normalization, calculating the mean value and variance of each row to form a row feature matrix E 'of 2 rows and M/b columns, transposing the row feature matrix E' to obtain a matrix E of M/b rows and 2 columns, and normalizing the matrix E according to the following formula to obtain a normalized row feature matrix R:
Figure FDA0002516946620000032
wherein R (i, j) is the ith row and jth column element in the matrix R, E (i, j) is the ith row and jth column element in the matrix E, and mujIs the mean, σ, of the jth column in the matrix EjIs the standard deviation of the jth column in the matrix E;
step S4-3, transposing the matrix R and expanding the matrix R according to the rows to obtain a row vector ERWill be a row vector ERObtaining a binary sequence H with the size of 2 × (M/b) -1 by the following operationR
Figure FDA0002516946620000033
Wherein E isR(q) is a row vector ERQ element of (1), ER(q +1) is a row vector ERQ +1 th element of (1), HR(q) is the sequence HRQ is 1, 2, … …, 2 × (M/b) -1;
step S4-4, gradient mean matrix MIObtaining a column gradient accumulation matrix E by column according to the following formulac
Figure FDA0002516946620000034
Wherein E isc(i, j) is a column gradient accumulation matrix EcRow and column i and j, MI(i, j) is a gradient mean matrix MIRow i and column j;
step S4-5, adding up matrix E to the column gradientcSequentially carrying out normalization, transposition and binarization operations according to the steps S4-2 and S4-3 to obtain a binary sequence H with the size of 2 × (M/b) -1C
The binarization sequence HR、HCNamely the hash sequence representing the global features of the image.
6. The image hash acquisition method according to claim 5, wherein step S5 specifically includes:
step S5-1, binarization sequence HG、HR、HCJoin to form an intermediate hash sequence Hm
Hm=[HG、HR、HC];
Step S5-2, using 1000 pseudo random number sequences S generated by random generator to intermediate hash sequence HmIs reordered to obtain a final hash sequence h, h being (M/b-2) in length2-1+(M/b)×4-2bits。
7. An image security authentication method, characterized in that the method comprises the following steps:
step 1, respectively acquiring hash sequences h of an original image and an image to be authenticated by adopting the image hash acquisition method as claimed in any one of claims 1 to 61And h2
And 2, calculating the difference of the Hash sequences of the original image and the image to be authenticated, wherein if the difference is not greater than a threshold value T, the image passes the safety authentication, and otherwise, the image does not pass the safety authentication.
8. The image security authentication method as claimed in claim 7, wherein the difference between the hash sequences of the original image and the image to be authenticated is determined by a hamming distance D (h)1,h2) And (4) measuring.
9. An image hash acquisition apparatus, comprising a first memory and a first processor;
the first memory is used for storing a computer program;
the first processor, configured to, when executing the computer program, implement the image hash acquisition method according to any one of claims 1 to 6.
10. An image security authentication apparatus, characterized in that the apparatus comprises a second memory and a second processor;
the second memory is used for storing a computer program;
the second processor, when executing the computer program, is configured to implement the image security authentication method according to claim 7.
CN202010479906.1A 2020-05-30 2020-05-30 Image hash acquisition method, image security authentication method and device Active CN111787179B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010479906.1A CN111787179B (en) 2020-05-30 2020-05-30 Image hash acquisition method, image security authentication method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010479906.1A CN111787179B (en) 2020-05-30 2020-05-30 Image hash acquisition method, image security authentication method and device

Publications (2)

Publication Number Publication Date
CN111787179A true CN111787179A (en) 2020-10-16
CN111787179B CN111787179B (en) 2022-02-15

Family

ID=72754552

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010479906.1A Active CN111787179B (en) 2020-05-30 2020-05-30 Image hash acquisition method, image security authentication method and device

Country Status (1)

Country Link
CN (1) CN111787179B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112232428A (en) * 2020-10-23 2021-01-15 上海电力大学 Image hash acquisition method based on three-dimensional characteristics and energy change characteristics
CN113095380A (en) * 2021-03-26 2021-07-09 上海电力大学 Image hash processing method based on adjacent gradient and structural features
CN114124393A (en) * 2021-11-12 2022-03-01 福建师范大学 Image electronic license issuing method based on polynomial commitment
CN114913350A (en) * 2022-04-19 2022-08-16 深圳市东信时代信息技术有限公司 Material duplicate checking method, device, equipment and storage medium
CN117034367A (en) * 2023-10-09 2023-11-10 北京点聚信息技术有限公司 Electronic seal key management method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9202267B1 (en) * 2013-03-14 2015-12-01 Marseille Networks, Inc. System and method to enhance and process a digital image
CN105263026A (en) * 2015-10-12 2016-01-20 西安电子科技大学 Global vector acquisition method based on probability statistics and image gradient information
CN107464268A (en) * 2016-06-02 2017-12-12 国家计算机网络与信息安全管理中心 A kind of joint coding method using global and local feature
CN109446882A (en) * 2018-09-05 2019-03-08 合肥工业大学智能制造技术研究院 Logo feature extraction and recognition methods based on the characteristic quantification that gradient direction divides

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9202267B1 (en) * 2013-03-14 2015-12-01 Marseille Networks, Inc. System and method to enhance and process a digital image
CN105263026A (en) * 2015-10-12 2016-01-20 西安电子科技大学 Global vector acquisition method based on probability statistics and image gradient information
CN107464268A (en) * 2016-06-02 2017-12-12 国家计算机网络与信息安全管理中心 A kind of joint coding method using global and local feature
CN109446882A (en) * 2018-09-05 2019-03-08 合肥工业大学智能制造技术研究院 Logo feature extraction and recognition methods based on the characteristic quantification that gradient direction divides

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
DAVARZANI R,MOZAFFARI S,YAGHMAIE K.: "Perceptual image hashing using center-symmetric local binary patterns", 《 MULTIMEDIA TOOLS &APPLICATIONS》 *
QIN CHUAN,HU YECEN,YAO HENG,ET AL.: "Perceptual image hashing based on Weber local binary pattern and color angle representation", 《IEEE ACCESS》 *
SHIWEI YE;YUAN SUN;YI SUN: "Matrix completion based on feature vector and function approximation", 《IEEE ACCESS》 *
YAN ZHAO;XIAORAN YUAN: "Perceptual Image Hashing Based on Color Structure and Intensity Gradient", 《IEEE ACCESS》 *
杨小伟;徐贵力;王彪;郭瑞鹏;田裕鹏: "一种基于局部梯度矢量的车辆检测方法", 《计算机与现代化》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112232428A (en) * 2020-10-23 2021-01-15 上海电力大学 Image hash acquisition method based on three-dimensional characteristics and energy change characteristics
CN112232428B (en) * 2020-10-23 2021-11-16 上海电力大学 Image hash acquisition method based on three-dimensional characteristics and energy change characteristics
CN113095380A (en) * 2021-03-26 2021-07-09 上海电力大学 Image hash processing method based on adjacent gradient and structural features
CN114124393A (en) * 2021-11-12 2022-03-01 福建师范大学 Image electronic license issuing method based on polynomial commitment
CN114124393B (en) * 2021-11-12 2023-05-12 福建师范大学 Image electronic license issuing method based on polynomial commitment
CN114913350A (en) * 2022-04-19 2022-08-16 深圳市东信时代信息技术有限公司 Material duplicate checking method, device, equipment and storage medium
CN114913350B (en) * 2022-04-19 2023-04-07 深圳市东信时代信息技术有限公司 Material duplicate checking method, device, equipment and storage medium
CN117034367A (en) * 2023-10-09 2023-11-10 北京点聚信息技术有限公司 Electronic seal key management method
CN117034367B (en) * 2023-10-09 2024-01-26 北京点聚信息技术有限公司 Electronic seal key management method

Also Published As

Publication number Publication date
CN111787179B (en) 2022-02-15

Similar Documents

Publication Publication Date Title
CN111787179B (en) Image hash acquisition method, image security authentication method and device
Tang et al. Robust image hashing with ring partition and invariant vector distance
Ouyang et al. Robust hashing for image authentication using quaternion discrete Fourier transform and log-polar transform
Qin et al. Perceptual hashing for color images based on hybrid extraction of structural features
Bayram et al. An efficient and robust method for detecting copy-move forgery
Qin et al. Robust image hashing using non-uniform sampling in discrete Fourier domain
Qin et al. Perceptual image hashing with selective sampling for salient structure features
Singh et al. Fast and efficient region duplication detection in digital images using sub-blocking method
Ustubioglu et al. A new copy move forgery detection technique with automatic threshold determination
Tang et al. Structural feature-based image hashing and similarity metric for tampering detection
Ulutas et al. A new copy move forgery detection method resistant to object removal with uniform background forgery
Ketenci et al. Copy-move forgery detection in images via 2D-Fourier transform
Nguyen et al. Detection of copy-move forgery in digital images using radon transformation and phase correlation
İmamoğlu et al. Detection of copy-move forgery using krawtchouk moment
Samanta et al. Analysis of perceptual hashing algorithms in image manipulation detection
Muzaffer et al. A fast and effective digital image copy move forgery detection with binarized SIFT
Dixit et al. Copy-move forgery detection exploiting statistical image features
Gong et al. Image copy-move forgery detection using SURF in opponent color space
CN112232428A (en) Image hash acquisition method based on three-dimensional characteristics and energy change characteristics
Xue et al. SSL: A novel image hashing technique using SIFT keypoints with saliency detection and LBP feature extraction against combinatorial manipulations
Sari et al. The effect of error level analysis on the image forgery detection using deep learning
Yohannan et al. Detection of copy-move forgery based on Gabor filter
Swaminathan et al. Security of feature extraction in image hashing
Ustubıoglu et al. Image forgery detection using colour moments
Zeng Rebuilding the credibility of sensor-based camera source identification

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant