CN112802189A - Image hashing method based on color component three-dimensional space distance characteristics - Google Patents

Image hashing method based on color component three-dimensional space distance characteristics Download PDF

Info

Publication number
CN112802189A
CN112802189A CN202110154388.0A CN202110154388A CN112802189A CN 112802189 A CN112802189 A CN 112802189A CN 202110154388 A CN202110154388 A CN 202110154388A CN 112802189 A CN112802189 A CN 112802189A
Authority
CN
China
Prior art keywords
image
dimensional space
distance
component
method based
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
CN202110154388.0A
Other languages
Chinese (zh)
Other versions
CN112802189B (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 Electric Power University
Original Assignee
Shanghai Electric Power 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 Shanghai Electric Power University filed Critical Shanghai Electric Power University
Priority to CN202110154388.0A priority Critical patent/CN112802189B/en
Publication of CN112802189A publication Critical patent/CN112802189A/en
Application granted granted Critical
Publication of CN112802189B publication Critical patent/CN112802189B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Software Systems (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Data Mining & Analysis (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses an image hashing method based on color component three-dimensional space distance characteristics, which comprises the following steps: inputting an original image and carrying out image preprocessing; extracting three color components of the image, respectively blocking the three color components and then constructing a three-dimensional space; solving the coordinates of each small block in the three-dimensional space, and further constructing distance features; the distance features of the three color components are added together to construct a final hash sequence. The method has better robustness for common content keeping operation, better distinctiveness, key safety and image tampering detection performance, and shorter average time for generating the hash sequence.

Description

Image hashing method based on color component three-dimensional space distance characteristics
Technical Field
The invention relates to the technical field of image processing, in particular to an image hashing method based on color component three-dimensional space distance characteristics.
Background
With the development of science and technology, people can edit and process images conveniently by using tools such as computers, mobile phones and the like, such as image scaling, brightness change, contrast change and the like. Therefore, one image may have multiple copy types and may be tampered with. Therefore, identifying similar images and distinguishing different images or detecting whether the images are tampered become a problem, and the image hashing technology is an important method for solving the problem. Image hashing refers to mapping an image unidirectionally into a string of number sequences, which can be binary numbers or decimal numbers; the design principles of image hashing are mainly robust against unexpected distortion due to content retention operations and geometric distortions, sensitive to malicious alteration of image content, and key security.
In previous studies, different researchers have proposed different image hashing algorithms. Shen et al propose an image hash algorithm based on structure and gradient, the scheme transforms the image into a three-dimensional space, and extracts image features in combination with multiple viewing angles, the scheme has good robustness to most conventional attacks; tang et al propose an image hash algorithm based on tensor decomposition TD (temporal decomposition), which first preprocesses an image to obtain a luminance component, extracts a series of sub-blocks from the luminance component to find the mean value of the corresponding sub-blocks, then constructs a tensor, and performs Tucker decomposition on the tensor to obtain a hash sequence; tang et al propose the image Hash scheme of combining color vector angle and Canny operator, this scheme carries on the preconditioning to the picture at first, then withdraw color vector angle and image edge, get the statistical characteristic from color vector angle and image edge, construct the Hash sequence, this algorithm has better robustness to the conventional digital processing; based on ring segmentation and image hashing with invariant vector distance, statistical features are extracted from image rings to construct image hashing, and the algorithm has good robustness to rotary attacks.
Disclosure of Invention
This section is for the purpose of summarizing some aspects of embodiments of the invention and to briefly introduce some preferred embodiments. In this section, as well as in the abstract and the title of the invention of this application, simplifications or omissions may be made to avoid obscuring the purpose of the section, the abstract and the title, and such simplifications or omissions are not intended to limit the scope of the invention.
The present invention has been made in view of the above-mentioned conventional problems.
Therefore, the technical problem solved by the invention is as follows: the tampering detection accuracy is low due to poor classification effect, and the operation efficiency is low.
In order to solve the technical problems, the invention provides the following technical scheme: inputting an original image and carrying out image preprocessing; extracting three color components of the image, respectively blocking the three color components and then constructing a three-dimensional space; solving the coordinates of each small block in the three-dimensional space, and further constructing distance features; the distance features of the three color components are added together to construct a final hash sequence.
As a preferable scheme of the image hashing method based on the color component three-dimensional space distance feature, in the present invention: the image preprocessing comprises the steps of carrying out bilinear interpolation on the original image to adjust the size of the original image to be NxN, and carrying out Gaussian low-pass filtering to obtain a secondary image.
As a preferable scheme of the image hashing method based on the color component three-dimensional space distance feature, in the present invention: the three color components include an R component, a G component, and a B component.
As a preferable scheme of the image hashing method based on the color component three-dimensional space distance feature, in the present invention: the construction of the three-dimensional space comprises the steps of respectively partitioning the R component, the G component and the B component into M multiplied by M blocks with equal size; and taking the row direction of each small block as the x-axis direction, taking the column direction as the y-axis direction, and taking the average value of pixels in the small blocks as the coordinate in the z-axis direction to sequentially construct a three-dimensional space.
As a preferable scheme of the image hashing method based on the color component three-dimensional space distance feature, in the present invention: the construction of the spatial distance feature comprises the step of constructing the spatial distance feature by the coordinates of several adjacent small blocks in a three-dimensional space in the three-dimensional space formed by each color component.
As a preferable scheme of the image hashing method based on the color component three-dimensional space distance feature, in the present invention: the distance feature matrix comprises a distance feature matrix obtained by solving the R component, the G component and the B component, and the final distance feature matrix S is obtained by adding the three distance feature matrices:
Figure BDA0002934005160000021
as a preferable scheme of the image hashing method based on the color component three-dimensional space distance feature, in the present invention: the distance feature matrix obtaining process comprises the step of defining the coordinate of the R vector in the three-dimensional space as (i, j, L)1(i, j)); defining coordinates of three patches adjacent to the R vector in the three-dimensional space as (i, j +1, L)1(i,j+1))、(i+1,j,L1(i+1,j))、(i+1,j+1,L1(i +1, j + 1)); determining the coordinates (i, j +1, L)1(i,j+1))、(i+1,j,L1(i+1,j))、(i+1,j+1,L1(i +1, j +1)) three points in the three-dimensional space to form a trianglei,jIs (X)i,j,Yi,j,Zi,j) Finding the point (i, j, L)1(i, j)) and Oi,jThe distance D (i, j) of (a) constructs a spatial distance feature.
As a preferable scheme of the image hashing method based on the color component three-dimensional space distance feature, in the present invention: the barycentric coordinate Oi,jThe obtaining of (a) comprises obtaining a target value,
Figure BDA0002934005160000031
Figure BDA0002934005160000032
Figure BDA0002934005160000033
as a preferable scheme of the image hashing method based on the color component three-dimensional space distance feature, in the present invention: the calculation of the spatial distance feature matrix includes,
Figure BDA0002934005160000034
the distance feature matrix D is obtained from the above equation:
Figure BDA0002934005160000035
the invention has the beneficial effects that: the method has better classification effect, better robustness for common content retention operation, better distinctiveness, key security and image tampering detection performance, and shorter average time for generating the hash sequence.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise. Wherein:
fig. 1 is a schematic basic flow chart of an image hashing method based on a three-dimensional spatial distance characteristic of a color component according to an embodiment of the present invention;
fig. 2 is a schematic diagram of an image of three color components in a three-dimensional space according to an image hashing method based on a three-dimensional space distance characteristic of the color components according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating extraction of coordinates and distance features of a color component in a three-dimensional space according to an image hashing method based on a three-dimensional space distance feature of the color component according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a robustness experiment result of an image hashing method based on a three-dimensional spatial distance characteristic of a color component according to an embodiment of the present invention;
fig. 5 is a schematic diagram illustrating a differential experiment result of an image hashing method based on a three-dimensional spatial distance characteristic of a color component according to an embodiment of the present invention;
fig. 6 is a schematic diagram of security experiment analysis of an image hashing method based on a color component three-dimensional spatial distance feature according to an embodiment of the present invention;
fig. 7 is a schematic diagram of an original image and a tampered image of an image hashing method based on a three-dimensional spatial distance characteristic of a color component according to an embodiment of the present invention;
fig. 8 is a schematic diagram illustrating hash distance distribution of a similar image pair, a tampered image pair, and a different image pair of an image hash method based on a color component three-dimensional spatial distance feature according to an embodiment of the present invention;
fig. 9 is a schematic diagram of ROC curves of different algorithms based on distance characteristics of three-dimensional space of color components according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, specific embodiments accompanied with figures are described in detail below, and it is apparent that the described embodiments are a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making creative efforts based on the embodiments of the present invention, shall fall within the protection scope of the present invention.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, but the present invention may be practiced in other ways than those specifically described and will be readily apparent to those of ordinary skill in the art without departing from the spirit of the present invention, and therefore the present invention is not limited to the specific embodiments disclosed below.
Furthermore, reference herein to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one implementation of the invention. The appearances of the phrase "in one embodiment" in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments.
The present invention will be described in detail with reference to the drawings, wherein the cross-sectional views illustrating the structure of the device are not enlarged partially in general scale for convenience of illustration, and the drawings are only exemplary and should not be construed as limiting the scope of the present invention. In addition, the three-dimensional dimensions of length, width and depth should be included in the actual fabrication.
Meanwhile, in the description of the present invention, it should be noted that the terms "upper, lower, inner and outer" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of describing the present invention and simplifying the description, but do not indicate or imply that the referred device or element must have a specific orientation, be constructed in a specific orientation and operate, and thus, cannot be construed as limiting the present invention. Furthermore, the terms first, second, or third are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
The terms "mounted, connected and connected" in the present invention are to be understood broadly, unless otherwise explicitly specified or limited, for example: can be fixedly connected, detachably connected or integrally connected; they may be mechanically, electrically, or directly connected, or indirectly connected through intervening media, or may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
Example 1
Referring to fig. 1 to 3, an embodiment of the present invention provides an image hashing method based on a color component three-dimensional space distance feature, including:
s1: inputting an original image and carrying out image preprocessing; it should be noted that, in the following description,
the image pre-processing includes the steps of,
and (3) adjusting the size of the original image to be NxN by a bilinear interpolation method, and performing Gaussian low-pass filtering to obtain a secondary image.
S2: extracting three color components of the image, respectively blocking the three color components and then constructing a three-dimensional space; it should be noted that, in the following description,
the three color components include an R component, a G component, and a B component.
The construction of the three-dimensional space includes,
respectively partitioning the R component, the G component and the B component into M multiplied by M blocks with equal size; and taking the row direction of each small block as the x-axis direction, taking the column direction as the y-axis direction, and taking the average value of pixels in the small blocks as the coordinate of the z-axis direction to sequentially construct a three-dimensional space.
Specifically, color components R, G and B are extracted from the preprocessed image, the extracted R, G and B components are partitioned, a three-dimensional space is constructed by combining the partitioned small blocks and the average value of pixels in each small block, and the coordinates of each small block in the three-dimensional space are obtained.
Wherein, in the three-dimensional stereo space, the coordinates of each small block are defined as follows: as shown in fig. 3(a), the number of rows i in the respective color component of each patch is an x-axis coordinate, the number of columns j in the respective color component of each patch is a y-axis coordinate, and the average value L (i, j) of pixels within each patch is taken as a z-axis coordinate. Wherein the average value of each small block pixel in the R component, the G component and the B component is respectively L1(i,j),L2(i,j),L3(i, j), the coordinates of the small block of the R component located at the ith row and the jth column in the three-dimensional space are (i, j, L)1(i, j)), the G component and the B component, and so on.
S3: solving the coordinate of each small block in the three-dimensional space, and further constructing a distance characteristic; it should be noted that, in the following description,
the construction of the spatial distance feature includes,
in the three-dimensional space formed by each color component, the space distance feature is constructed by the coordinates of the adjacent small blocks in the three-dimensional space.
Further, the distance characteristic matrix includes,
and (3) solving distance feature matrixes of the R component, the G component and the B component, and adding the three distance feature matrixes to obtain a final distance feature matrix S:
Figure BDA0002934005160000061
further, the distance feature matrix obtaining process includes,
defining the coordinate of the R vector in three-dimensional space as (i, j, L)1(i,j));
Defining the coordinates of three small blocks adjacent to the R vector in a three-dimensional space as (i, j +1, L)1(i,j+1))、(i+1,j,L1(i+1,j))、(i+1,j+1,L1(i+1,j+1));
Find the coordinates (i, j +1, L)1(i,j+1))、(i+1,j,L1(i+1,j))、(i+1,j+1,L1(i +1, j +1)) three points in a three-dimensional spacei,jIs (X)i,j,Yi,j,Zi,j) Finding the point (i, j, L)1(i, j)) and Oi,jThe distance D (i, j) of (a) constructs a spatial distance feature.
Wherein, the barycentric coordinate Oi,jThe obtaining of (a) comprises obtaining a target value,
Figure BDA0002934005160000062
Figure BDA0002934005160000063
Figure BDA0002934005160000064
the calculation of the spatial distance feature matrix includes,
Figure BDA0002934005160000065
the distance feature matrix D is obtained from the above equation:
Figure BDA0002934005160000066
specifically, as shown in fig. 3(a), taking the R component as an example, the coordinates of the small block located in the ith row and jth column in the R component in the three-dimensional space are (i, j, L)1(i, j)), and the coordinates of the three patches adjacent thereto in the three-dimensional space are (i, j +1, L)1(i,j+1))、(i+1,j,L1(i+1,j))、(i+1,j+1,L1(i +1, j + 1)). As shown in FIG. 3(b), the value of (i, j +1, L) is obtained1(i,j+1))、(i+1,j,L1(i+1,j))、(i+1,j+1,L1(i +1, j +1)) three points in a three-dimensional spacei,jFinding the point (i, j, L)1(i, j)) and Oi,jThe distance D (i, j) of (a) constructs a spatial distance feature. O isi,jHas the coordinates of (X)i,j,Yi,j,Zi,j) Wherein X isi,j、Yi,j、Zi,jThe coordinates of (a) are respectively represented by the following formula:
Figure BDA0002934005160000071
Figure BDA0002934005160000072
Figure BDA0002934005160000073
d (i, j) is represented by the following formula:
Figure BDA0002934005160000074
the distance feature matrix D is obtained by calculating D (i, j) as shown in the following formula:
Figure BDA0002934005160000075
by analogy, the distance feature matrixes of the G component and the B component are solved, and the three distance feature matrixes are added to obtain a final distance feature matrix S:
Figure BDA0002934005160000076
s4: overlapping the distance features of the three color components together to construct a final hash sequence;
specifically, each row in the distance feature matrix S is sequentially connected to obtain an intermediate hash sequence HmAnd finally, scrambling is carried out to obtain a final hash sequence H (n), wherein n is 1,2.
The image hashing method based on the color component three-dimensional space distance features is used for identifying similar images and distinguishing different images or detecting whether the images are tampered, has good robustness for common content keeping operation, has good distinctiveness, key safety and image tampering detection performance, and has short average time for generating the hashing sequence.
Example 2
Referring to fig. 4 to 9, another embodiment of the present invention is shown, and for verifying and explaining the technical effects adopted in the method, the method of the present invention is adopted to perform an analysis test on aspects of robustness, distinctiveness, safety, and the like, and a comparison test is performed with the conventional method, so as to verify the real effects of the method by means of scientific demonstration.
In an embodiment, the parameters are set as follows: the normalized image size N is 256, the standard deviation of 3 × 3 gaussian low pass filtering is 1, and the image sub-block size M is 16, so the hash length L is 252 decimals.
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 6 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.
Fig. 4 is a diagram of a robustness experiment result of various content retention operations, in which the abscissa of each sub-graph is set as a corresponding conventional image processing parameter, and the ordinate is the euclidean distance between an original image obtained by the proposed hash method and a corresponding conventional processed image, and in 6 sub-graphs of the experiment result, the minimum distance value is 1.78, and the maximum distance value is 149.87, which is much smaller than the optimal threshold value obtained in the subsequent experiments.
Table 1: parameter tables for various conventional image processing in robustness performance analysis.
Attack type Description of software Description of the parameters Parameter setting
Brightness adjustment Photoshop Rank of -20 -10 10 20
Contrast adjustment Photoshop Rank of -20 -10 10 20
Image scaling MATLAB Ratio of 0.6 0.8 1.2 1.4 1.6 1.8
JPEG compression Light shadow magic hand Quality factor 30 40 50 60 70 80 90 100
3 x 3 Gauss Low pass Filter MATLAB Standard deviation of 0.1 0.2 0.3…… 0.9 1
Noise of spiced salt MATLAB Rank of 0.002 0.004 0.006 0.008 0.01
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 pairs of images, where the blue curve represents the distance distribution between different pairs of images and the red curve represents the distance distribution between similar pairs of images. The abscissa is the Euclidean distance between the hash sequence pairs, the ordinate is the number of image pairs, the abscissa end point values of the red curve are 0 and 410, the abscissa end point values of the blue curve are 341 to 2370, the similar image pairs and the different image pairs only have overlapping parts between 341 to 410, and the number of overlapping images is small, so the passing collision rate P is smallCAnd error detection ratio PEAnd selecting a proper threshold value to classify the similar image and the different image.
Table 2: table of parameters used for various conventional image processing in the discriminatory performance analysis.
Figure BDA0002934005160000081
Figure BDA0002934005160000091
Error detection and collision rate analysis:
the embodiment introduces the collision rate and the error detection rate to analyze the distinctiveness of the algorithm of the invention, and the calculation formula can be as follows:
Figure BDA0002934005160000092
Figure BDA0002934005160000093
wherein N isCAnd NDRepresenting respectively the number of different image pairs detected as being similar and the total number of different image pairs, NEAnd NSRepresenting respectively the number of similar image pairs detected as different image pairs and the total number of similar image teams, PCAnd PERespectively representing collision and error detection rates.
Threshold determination:
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 under different thresholds are small, and when the threshold T is 386, the collision rate P isCIs 1.80X 10-5Error detection ratio PEIs 2.86X 10-5And a better balance is obtained between the two, so the optimal threshold value is set as T386.
Table 3: and the threshold value and the collision rate error detection rate are related to the table.
Threshold value 341 359 377 386 402 410
P C 0 8.01×10-6 1.20×10-5 1.80×10-5 2.80×10-5 3.40×10-5
PE 2.43×10-4 9.52×10-5 4.76×10-5 2.86×10-5 9.52×10-6 0
And (3) safety analysis:
and selecting a standard image Airplane in a standard gallery as an experimental sample for testing the safety performance. The hash sequences of the image airplan are generated by 1000 error keys randomly generated by a random generator, and the euclidean distances between the 1000 hash sequences and the hash sequences generated by correct keys are respectively calculated, as a result, as shown in fig. 6, the minimum euclidean distance is 868.87, the average euclidean distance is 995.27, 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 invention can meet the security requirement.
Tamper detection experiments:
when a certain part of an image is tampered, the hamming distance of the tampered image and the hash code of the original image should be located between the similar image and the different image. To verify the tamper detection capability of the method of the present invention, 15000 images were taken from the VOC2012 database and several objects were added to each image, fig. 7 is an example of tampering. The euclidean distance profiles of the similar, tampered and different image pairs are plotted and the experimental results are shown in figure 8, with the abscissa T1 of the curve intersection of the similar image pair with the tampered image pair being 181 and the abscissa T2 of the curve intersection of the tampered image pair with the different image pair being 578. Selecting T1 and T2 as threshold values, judging the image to be detected as a similar image when the Euclidean distance between the image to be detected and the original image is smaller than T1, judging the image to be detected as a tampered image when the Euclidean distance between the image to be detected and the original image is larger than T1 and smaller than T2, and judging the image to be detected as a different image when the Euclidean distance between the image to be detected and the original image is larger than T2. Through calculation, the algorithm has the accuracy of 97.75%, 97.92% and 99.80% respectively to judge similar images, tampered images and different images, and the algorithm has better tampering detection performance.
Different blocks and different algorithms compare the experiment:
to analyze the impact of the number of blocks on the performance of the algorithm when the image is blocked, the performance of different algorithms is analyzed simultaneously. The embodiment introduces receiver operating characteristic curves (ROC) for performance comparison, and the performance mainly comprises robustness, distinctiveness and the like. The embodiment calculates the corresponding error acceptance rate (P) by different threshold valuesFPR) And correct acceptance rate (P)TPR) The graph in fig. 9 shows the calculation results thereof. In FIG. 9, the abscissa represents the false acceptance rate PFPROrdinate is the correct acceptance rate PTPRThe calculation formula can be expressed as:
Figure BDA0002934005160000101
Figure BDA0002934005160000102
wherein n is1Indicating the number of image pairs that are misjudged as similar, n2Indicating the number of image pairs correctly judged as similar, N1Representing the number of all pairs of different images, N2The number of all pairs of similar images is shown, obviously, the abscissa shows the distinctive performance, the ordinate shows the robust performance, and the closer the ROC curve is to the upper left corner shows the better performance.
In the experiment, 1000 images were used for the distinctiveness test. Visually similar images were generated, each of which could generate 20 similar images, at the attack settings in table 2. Therefore, the total number of the similar image pairs is 210000, the number of the different image pairs is 499500, when the images are respectively divided into 8 × 8 blocks, 16 × 16 blocks and 32 × 32 blocks, the length of the hash code of the method is 49 decimal numbers, 225 decimal numbers and 961 decimal numbers, and when the images are divided into 16 × 16 blocks, the hash length is longer, so that the experiment only selects the performance of the hash algorithm for comparing the images into 8 × 8 blocks and 16 × 16 blocks. As can be seen from fig. 9, the curve divided into 8 × 8 blocks is farther from the upper left corner than the curve divided into 16 × 16 blocks, and therefore the performance is worse, and the hash algorithm of the present embodiment chooses to divide the image into 16 × 16 blocks is a better choice in balancing between robustness and distinctiveness.
In order to compare the performance of the hash algorithm, the method of the invention is compared with the SG algorithm, the TD algorithm, the CVA-Canny algorithm and the Ring algorithm. The parameters compared are the same as those set forth in the respective published papers, and the algorithmic hash lengths compared are 156-bit binary, 96-bit binary, 40 decimal numbers (at least 160-bit binary), and 440-bit binary, respectively. The hash code length of the hash algorithm provided by the invention is 225 decimal numbers, and as can be seen from the table 4, the average calculation time of the method is 0.020s, the method is only longer than that of the SG algorithm, and the method is shorter than that of the TD algorithm, the CVA-Canny algorithm and the Ring algorithm. The method of the invention extracts the characteristics of the small blocks divided by each image component, so the length of the Hash code is longer, and as can be seen from FIG. 9, the ROC curve of the method of the invention is closer to the upper left corner than other algorithms, which shows that the classification effect of the method of the invention is better.
Table 4: a threshold and collision rate error detection table.
Figure BDA0002934005160000111
In summary, the hash algorithm provided by the invention can better meet the basic performance requirements of image hash: robustness, distinctiveness and safety, has higher tampering detection accuracy and high operating efficiency, and can be applied to image identification, image classification and image tampering detection.
It should be noted that the above-mentioned embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, which should be covered by the claims of the present invention.

Claims (9)

1. An image hashing method based on color component three-dimensional space distance features is characterized by comprising the following steps:
inputting an original image and carrying out image preprocessing;
extracting three color components of the image, respectively blocking the three color components and then constructing a three-dimensional space;
solving the coordinates of each small block in the three-dimensional space, and further constructing distance features;
the distance features of the three color components are added together to construct a final hash sequence.
2. The image hashing method based on color component three-dimensional space distance features according to claim 1, wherein: the image pre-processing includes the steps of,
and adjusting the size of the original image to be NxN by a bilinear interpolation method, and performing Gaussian low-pass filtering to obtain a secondary image.
3. The image hashing method based on color component three-dimensional space distance features according to claim 1, wherein: the three color components include an R component, a G component, and a B component.
4. The image hashing method based on color component three-dimensional space distance features according to claim 3, wherein: the construction of the three-dimensional space includes,
respectively partitioning the R component, the G component and the B component into M multiplied by M blocks with equal size;
and taking the row direction of each small block as the x-axis direction, taking the column direction as the y-axis direction, and taking the average value of pixels in the small blocks as the coordinate in the z-axis direction to sequentially construct a three-dimensional space.
5. The image hashing method based on color component three-dimensional space distance features according to claim 3 or 4, wherein: the construction of the spatial distance feature includes,
in the three-dimensional space formed by each color component, the space distance feature is constructed by the coordinates of the adjacent small blocks in the three-dimensional space.
6. The image hashing method based on color component three-dimensional space distance features according to claim 5, wherein: the distance characteristic matrix comprises a matrix of distance characteristics,
and calculating distance feature matrixes of the R component, the G component and the B component, and adding the three distance feature matrixes to obtain a final distance feature matrix S:
Figure FDA0002934005150000011
7. the image hashing method based on color component three-dimensional space distance features according to claim 6, wherein: the distance feature matrix acquisition process includes,
defining the coordinate of the R vector in three-dimensional space as (i, j, L)1(i,j));
Defining coordinates of three patches adjacent to the R vector in the three-dimensional space as (i, j +1, L)1(i,j+1))、(i+1,j,L1(i+1,j))、(i+1,j+1,L1(i+1,j+1));
Determining the coordinates (i, j +1, L)1(i,j+1))、(i+1,j,L1(i+1,j))、(i+1,j+1,L1(i +1, j +1)) three points in the three-dimensional space to form a trianglei,jIs (X)i,j,Yi,j,Zi,j) Finding the point (i, j, L)1(i, j)) and Oi,jThe distance D (i, j) of (a) constructs a spatial distance feature.
8. The image hashing method based on color component three-dimensional space distance features according to claim 7, wherein: the barycentric coordinate Oi,jThe obtaining of (a) comprises obtaining a target value,
Figure FDA0002934005150000021
Figure FDA0002934005150000022
Figure FDA0002934005150000023
9. the image hashing method based on color component three-dimensional space distance features according to claim 7 or 8, wherein: the calculation of the spatial distance feature matrix includes,
Figure FDA0002934005150000024
the distance feature matrix D is obtained from the above equation:
Figure FDA0002934005150000025
CN202110154388.0A 2021-02-04 2021-02-04 Image hashing method based on color component three-dimensional space distance characteristics Active CN112802189B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110154388.0A CN112802189B (en) 2021-02-04 2021-02-04 Image hashing method based on color component three-dimensional space distance characteristics

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110154388.0A CN112802189B (en) 2021-02-04 2021-02-04 Image hashing method based on color component three-dimensional space distance characteristics

Publications (2)

Publication Number Publication Date
CN112802189A true CN112802189A (en) 2021-05-14
CN112802189B CN112802189B (en) 2022-12-27

Family

ID=75814191

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110154388.0A Active CN112802189B (en) 2021-02-04 2021-02-04 Image hashing method based on color component three-dimensional space distance characteristics

Country Status (1)

Country Link
CN (1) CN112802189B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070244850A1 (en) * 2006-04-17 2007-10-18 Microsoft Corporation Perfect multidimensional spatial hashing
CN106412619A (en) * 2016-09-28 2017-02-15 江苏亿通高科技股份有限公司 HSV color histogram and DCT perceptual hash based lens boundary detection method
CN110427895A (en) * 2019-08-06 2019-11-08 李震 A kind of video content similarity method of discrimination based on computer vision and system
CN110490789A (en) * 2019-07-15 2019-11-22 上海电力学院 A kind of image hashing acquisition methods based on color and structure feature
CN110807828A (en) * 2019-10-28 2020-02-18 北京林业大学 Oblique photography three-dimensional reconstruction matching method
CN112232428A (en) * 2020-10-23 2021-01-15 上海电力大学 Image hash acquisition method based on three-dimensional characteristics and energy change characteristics

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070244850A1 (en) * 2006-04-17 2007-10-18 Microsoft Corporation Perfect multidimensional spatial hashing
CN106412619A (en) * 2016-09-28 2017-02-15 江苏亿通高科技股份有限公司 HSV color histogram and DCT perceptual hash based lens boundary detection method
CN110490789A (en) * 2019-07-15 2019-11-22 上海电力学院 A kind of image hashing acquisition methods based on color and structure feature
CN110427895A (en) * 2019-08-06 2019-11-08 李震 A kind of video content similarity method of discrimination based on computer vision and system
CN110807828A (en) * 2019-10-28 2020-02-18 北京林业大学 Oblique photography three-dimensional reconstruction matching method
CN112232428A (en) * 2020-10-23 2021-01-15 上海电力大学 Image hash acquisition method based on three-dimensional characteristics and energy change characteristics

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
YAN ZHAO,XIAORAN YUAN: "Perceptual Image Hashing Based on Color Structure and Intensity Gradient", 《IEEE ACCESS》 *
ZHAO SHAN,GAO GUO-HONG ZHAO,QIAN: "Color image retrieval using edge-spatial feature", 《2010 5TH INTERNATIONAL CONFERENCE ON COMPUTER SCIENCE & EDUCATION》 *
沈麒,赵琰等: "结合结构与梯度的图像哈希算法", 《浙江大学学报(工学版)》 *

Also Published As

Publication number Publication date
CN112802189B (en) 2022-12-27

Similar Documents

Publication Publication Date Title
Hsu et al. Camera response functions for image forensics: an automatic algorithm for splicing detection
CN108596197B (en) Seal matching method and device
EP2240887B1 (en) Feature-based signatures for image identification
Cheng et al. Robust affine invariant feature extraction for image matching
Wang et al. Perceptual hashing‐based image copy‐move forgery detection
Raghavendra et al. Presentation attack detection algorithms for finger vein biometrics: A comprehensive study
CN111787179B (en) Image hash acquisition method, image security authentication method and device
Yan et al. Multi-scale difference map fusion for tamper localization using binary ranking hashing
CN112232428B (en) Image hash acquisition method based on three-dimensional characteristics and energy change characteristics
Hou et al. Detection of hue modification using photo response nonuniformity
Nam et al. Content-aware image resizing detection using deep neural network
Liu An improved approach to exposing JPEG seam carving under recompression
CN113889232A (en) Privacy protection method based on medical image
Pun et al. Image alignment-based multi-region matching for object-level tampering detection
Muzaffer et al. A fast and effective digital image copy move forgery detection with binarized SIFT
Tang et al. Robust image hashing via visual attention model and ring partition
Zhao et al. Perceptual image hashing based on color structure and intensity gradient
Wang et al. Image sharpening detection based on difference sets
Shabanian et al. A new approach for detecting copy-move forgery in digital images
CN114244538A (en) Digital watermark method for generating media content perception hash based on multiple attacks
Gupta et al. Analytical global median filtering forensics based on moment histograms
Xue et al. SSL: A novel image hashing technique using SIFT keypoints with saliency detection and LBP feature extraction against combinatorial manipulations
CN112802189B (en) Image hashing method based on color component three-dimensional space distance characteristics
Liang et al. Robust hashing with local tangent space alignment for image copy detection
CN113095380B (en) Image hash processing method based on adjacent gradient and structural features

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