A frequency-domain-based image global manipulation forensics method
Through the frequency domain-based image global manipulation forensics method, the frequency feature extraction of image histogram and detail map and the KNN classifier are used to solve the problem that the existing technology cannot effectively detect multi-operation images, and achieve efficient image operation recognition and link detection.
Patent Information
- Application Number
- CN202310259885.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-16
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2043-03-16
AI Technical Summary
Existing global manipulation forensics methods cannot effectively detect situations where images are processed by multiple operations, and different forensics scenarios require the design of different methods, which increases research costs and workload.
A frequency-domain-based image global manipulation forensics method is adopted. By collecting and processing original image samples, the frequency features of image histogram and detail map are extracted, and the KNN classifier is used for model training and testing to construct forensic frequency features to identify image manipulation history.
It achieves efficient distinction of multiple image operations and effective detection of operation chains with a length greater than 2, with an accuracy rate of over 97%, reducing the adverse effects of malicious image forgery.
Smart Images

Figure CN116612291B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a frequency domain-based global image manipulation evidence collection method, and belongs to the technical fields of computer vision, digital image processing, signal processing, machine learning, and the like. Background Art
[0002] With the rapid development of information technology and the widespread adoption of digital devices, numerous powerful yet easy-to-use image editing tools have emerged. However, these tools often modify images in ways that are imperceptible to the naked eye, significantly undermining people's trust in digital images. Consequently, it is difficult for people to determine the authenticity of an image. To verify the authenticity and originality of digital images, digital image forensics has emerged. This technology analyzes the characteristics of the image under test to verify its authenticity. Digital image forensics can be broadly categorized into active and passive forensics. Active forensics utilizes watermark information embedded in the image to verify its authenticity, while passive forensics does not rely on any prior information and directly uses the image's inherent features to determine its authenticity and integrity. As a key branch of information security, passive digital image forensics has garnered significant research attention. Numerous passive forensics methods have been developed, generally categorized as local forgery and global manipulation. Local forgery involves tampering with certain areas of an image, thereby altering its semantic content. Typical examples of local forgery include splicing and copy-and-move forgeries. Global manipulation typically uses common image operations to process the entire image, altering its visual appearance or concealing traces of local forgeries. Common image operations include contrast enhancement, median filtering, JPEG compression, and resampling. Furthermore, an image may be manipulated by more than one image operation, forming a complete chain of operations in the order in which they are applied. Therefore, detecting an image's global manipulation history can reveal when and what operations were performed on the image, a crucial step in verifying image authenticity.
[0003] At present, many forensic methods have been proposed to detect global manipulation of images. Based on the maximum length of the detectable image operation chain, these methods can be roughly divided into single operation forensics and multiple operation forensics. Single operation forensics mainly includes specific operation identification and general forensic technology. Specific operation identification achieves forensics of the operation under consideration by analyzing the operation under consideration, while general forensic technology detects multiple operations simultaneously by using a set of identical features in a special area. Multiple operation forensics analyzes the interaction between operations based on the detection of a single operation, thereby identifying the operations and the order of operations that the image has undergone. Existing forensic methods can achieve the detection purpose to a certain extent, but they still have some defects: (1) Existing single operation forensics methods can only identify one or more image operations under consideration, cannot detect other operations, and do not consider the situation where the image is processed by multiple operations. (2) Existing multiple operation forensics methods can only distinguish the operation under consideration and the order of operations, and cannot detect other operations and operation chains with a length greater than 2. (3) Different methods need to be designed for different forensic scenarios, which increases research costs and workload. Summary of the Invention
[0004] The present invention aims to solve the problems existing in existing global manipulation evidence collection methods. A frequency domain-based image global manipulation evidence collection method is proposed, which includes the following steps:
[0005] (1) Collect and organize publicly available original image samples for global image manipulation forensics;
[0006] (2) Use one or more typical image operations to process the collected raw image samples and complete the construction of the dataset;
[0007] (3) Extract forensic frequency features from image histograms and detail maps based on the frequency domain;
[0008] (4) Using the KNN classifier to train the model of the evidence frequency features obtained in step (3);
[0009] (5) Use the model trained in step (4) to test the forensic frequency features extracted from the test image to obtain the final classification results.
[0010] Furthermore, the image operations include contrast enhancement, median filtering, JPEG compression and resampling.
[0011] Furthermore, the step (2) specifically includes: calculating the histogram frequency distribution characteristics; calculating the amplitude spectrum mean of the detail image in the horizontal direction and the vertical direction, and finally obtaining the frequency distribution characteristics of the detail image; and concatenating the histogram frequency distribution characteristics and the frequency distribution characteristics of the detail image to construct the forensic frequency characteristics.
[0012] Furthermore, the steps for calculating the histogram frequency distribution feature are as follows:
[0013] Perform a one-dimensional discrete Fourier transform on the image histogram h and calculate the amplitude spectrum H M :
[0014] H M (i) = log 10 (abs(DFT(h)+1)
[0015] Among them, DFT is the calculation formula of discrete Fourier transform, abs is the operation of finding the absolute value, and i represents the corresponding frequency component;
[0016] For H M Perform maximum and minimum value normalization:
[0017]
[0018] min(H M ) indicates H M The minimum value, max(H M ) indicates H M The maximum value of
[0019] Feature extraction is performed only in the normalized frequency interval [-1 / 2, 0], and all frequency components in this interval are divided into equal intervals. frequency subintervals, and then calculate the average amplitude value in each subinterval:
[0020]
[0021] in, It is a downward evidence collection operation, N h is the number of frequencies contained in each subinterval, and we get a dimensional histogram frequency distribution characteristics.
[0022] Furthermore, the calculation of the frequency distribution characteristics of the detail image includes the following steps:
[0023] For a size of S w ×S h Image I m , S w , S h Represents the width and height of the image, I m The detail graph is defined as follows:
[0024]
[0025] Among them, f HIt is a high-pass filter with a size of (2a+1)×(2a+1), i, j represents the position (i, j) of the detail image, l1, l2 represents the position in the high-pass filter;
[0026] Three high-pass filters of different sizes are selected to extract detail images from the image, and the filter sizes are 3×3, 5×5 and 7×7 respectively.
[0027] For each detail image, each row and column is regarded as a one-dimensional signal in the horizontal direction and the vertical direction respectively. Taking the horizontal signal as an example, a one-dimensional discrete Fourier transform is performed on each column signal and the amplitude spectrum is calculated.
[0028]
[0029] Among them, dm(:,i) is the i-th column of the detail image, and then the average of the amplitude spectrum of all column signals is calculated:
[0030]
[0031] In the vertical direction, the same operation is performed on each row of the detail image dm to calculate the one-dimensional amplitude spectrum of the detail image in the vertical direction. Then calculate and The average value of the amplitude spectrum of the detail image dm in the horizontal and vertical directions is obtained:
[0032]
[0033] To DM M Standard normalization:
[0034]
[0035] mean(DM M ) indicates DM M The mean value, std(DM M ) indicates DM M The standard deviation of
[0036] All frequency components in this interval are divided into equal intervals. frequency subintervals, and then calculate the average amplitude value in each subinterval:
[0037]
[0038] Among them, N dm is the number of frequencies contained in each subinterval.
[0039] The present invention also provides an electronic device, comprising: a memory for storing executable instructions;
[0040] The processor is configured to implement the above-mentioned frequency domain-based global image manipulation forensics method when executing the executable instructions stored in the memory.
[0041] Finally, the present invention provides a computer-readable storage medium storing executable instructions for implementing the above-mentioned frequency domain-based global image manipulation forensics method when executed by a processor.
[0042] The advantages and beneficial effects of the above solution of the present invention are as follows:
[0043] This invention utilizes computer vision, digital image processing, signal processing, and machine learning technologies to achieve global image manipulation forensics. This method is based on the frequency domain, extracting forensic frequency features from the image's histogram and detail map, and then using a KNN classifier to perform classification, resulting in superior detection performance. This invention has the following advantages:
[0044] (1) Using the Matlab platform for training and testing is low-cost;
[0045] (2) It is a frequency-domain-based feature extraction method that can extract general forensic features used to reveal the global manipulation history of various images by relying only on the frequency domain of the image histogram and detail map. It is simple and effective.
[0046] (3) The evidence frequency features extracted by the present invention can simultaneously distinguish multiple operation chains containing different operations and different lengths, and also have a good distinguishing effect on the global manipulation method based on neural network.
[0047] (4) The present invention also has a certain positioning effect on locally manipulated images.
[0048] (5) High detection performance. For specific image operations, its average classification accuracy is higher than 97%. For any different image operations, its accuracy in distinguishing these operations at the same time is higher than 92%. For operation chains with a length greater than 1, it still has good detection performance when detecting operation chains with a length of 4.
[0049] (6) It can assist in related fields such as image forensics and image security, thereby reducing the adverse effects of malicious image forgery, which is of practical significance and has achieved good results. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is a system flow chart of the present invention;
[0051] Figure 2is a comparison diagram of the original image and the images after other operations; (a1)-(a5) in the figure are the original image and the images after different image operations; (b1)-(b5) are the corresponding histograms of the original image and the images after different image operations; (c1)-(c5) are the differences between the histograms of different images and the original image; (d1)-(d5) are the detail images generated after different images are passed through high-pass filters [-1, 2, -1; 2, -4, 2; -1, 2, -1];
[0052] Figure 3 is the amplitude spectrum; (a) is the average amplitude spectrum extracted from the histogram of 1338 images; (a1)-(a2) are the average amplitude spectra extracted from the detail images of 1338 images in the horizontal and vertical directions. DETAILED DESCRIPTION
[0053] The following will describe the technical solutions in the embodiments of the present invention in detail with reference to the accompanying drawings. The described embodiments are only a part of the embodiments of the present invention.
[0054] System flow chart as follows Figure 1 As shown, a frequency domain-based image global manipulation forensics method includes the following steps:
[0055] Step 1: Collect and organize publicly available original image samples for global image manipulation forensics.
[0056] Step 2: Use one or more typical image operations to process the collected original image samples and complete the construction of the data set; the typical image operations include contrast enhancement, median filtering, JPEG compression and resampling.
[0057] Step 3: Use the frequency domain to extract forensic features of the image. This step includes extracting the frequency distribution features of the histogram and extracting the frequency distribution features of the detail map.
[0058] In the fourth step, the KNN classifier is used to train the model of the forensic frequency features obtained in step three.
[0059] In the fifth step, the forensic frequency features extracted from the test image are tested using the model trained in step four to obtain the final classification results.
[0060] The forensic feature extraction of the image histogram and detail map based on the frequency domain includes the following steps:
[0061] The detail map changes. For images with different manipulation histories, the degree and manner of change of their histograms and detail maps are different. The present invention only focuses on the changes brought about by global manipulation on the frequency distribution of image histograms and detail maps.
[0062] Perform a one-dimensional discrete Fourier transform on the image histogram h and calculate the amplitude spectrum H M (i)
[0063] H M (i) = log 10 (abs(DFT(h)+1)
[0064] Among them, DFT is the calculation formula of discrete Fourier transform, and abs is the operation of finding the absolute value. In order to eliminate the abnormal points in the amplitude spectrum, H M Perform maximum and minimum value normalization:
[0065]
[0066] Considering that the amplitude spectrum obtained by Fourier transform has conjugate symmetry, feature extraction will only be performed in the normalized frequency interval [-1 / 2,0]. In order to obtain the frequency distribution of the histogram, all frequency components in this interval are divided into equal intervals as follows frequency subintervals, and then calculate the average amplitude value in each subinterval:
[0067]
[0068] in, It is a downward evidence collection operation, N h is the number of frequencies contained in each subinterval, and the above formula calculates a dimensional histogram frequency distribution characteristics.
[0069] For a size of S w ×S h Image I m , S w , S h Represents the width and height of the image, I m The detail graph is defined as follows:
[0070]
[0071] Where i, j represent the position (i, j) of the detail image, l1, l2 represent the position in the high-pass filter. H It is a high-pass filter with a size of (2a+1)×(2a+1). In order to extract the manipulation traces of the image from different angles, a total of three high-pass filters of different sizes are selected to extract the detail map of the image. The filter sizes are 3×3, 5×5 and 7×7 respectively. Then, for each detail map, each row and each column are regarded as a one-dimensional signal in the horizontal direction and vertical direction respectively. Taking the signal in the horizontal direction as an example, a one-dimensional discrete Fourier transform is performed on each column signal and the amplitude spectrum is calculated.
[0072]
[0073] Among them, dm(:,i) is the i-th column of the detail image. Then calculate the average value of the amplitude spectrum of all column signals:
[0074]
[0075] The above formula calculates the one-dimensional amplitude spectrum of the detail image in the horizontal direction In the vertical direction, the same operation is performed on each row of the detail image dm to calculate the one-dimensional amplitude spectrum of the detail image in the vertical direction. For S w ≠S h , zero-padded the shorter row / column signals so that all signals have the same length before performing the discrete Fourier transform. Then calculate and The average value of dm in the horizontal and vertical directions is obtained:
[0076]
[0077] Considering that the amplitude spectrum of the detailed graph contains information such as periodicity, the DM M Standard normalization, in order to utilize more information in the data, is defined as follows:
[0078]
[0079] mean(DM M ) indicates DM M The mean value, std(DM M ) indicates DM M The standard deviation of .
[0080] In order to obtain the frequency distribution of the detail image, all frequency components in the interval are divided into equal intervals as follows: frequency subintervals, and then calculate the average amplitude value in each subinterval:
[0081]
[0082] Among them, N dm is the number of frequencies contained in each subinterval. Since three high-pass filters of different sizes are used, we get a dimensional detail map frequency distribution features, capturing the impact of image operations on the detail map DM frequency distribution from different angles.
[0083] Finally, by concatenating FH and FDM, we construct a forensic frequency feature to detect various image operation chains, which is defined as follows:
[0084] [FH,FDM]
[0085] Experimental methods:
[0086] In this experiment, we collected and organized a variety of publicly tampered images, and used 50% of them as training sets to train the KNN classifier, and used the other 50% as test sets to test the detection performance of the proposed frequency-domain-based global manipulation forensics method.
[0087] The first step is to process all collected image samples using typical operations such as contrast enhancement, image sharpening, image filtering, JPEG compression and resampling. Each image has undergone at least one image operation, that is, to generate images with different manipulation histories for each image.
[0088] Step 2: Use Matlab to run the program and input the forensic frequency features and corresponding labels extracted from the training set images into the KNN classifier to obtain the trained model.
[0089] Step 3: Use the trained model to test the forensic frequency features obtained from the test set images and calculate the classification accuracy of the detection based on the corresponding labels.
[0090] Experiments demonstrate that the proposed method, after training, can effectively distinguish images with different manipulation histories. For specific image manipulations, its average classification accuracy exceeds 97%. For any different image manipulations, its accuracy in distinguishing these manipulations simultaneously exceeds 92%. Furthermore, for manipulation chains longer than one, the method maintains good detection performance even when detecting manipulation chains of length four.
[0091] from Figure 2 As can be seen from (b), the histogram of the original image shows a continuous distribution, while the distribution of the histogram of the image after different operations changes in different ways and degrees. For example, a large number of zero gaps and peaks appear in the image after histogram equalization. In addition, Figure 2 As can be observed in (d), the image details also change after different operations. For example, the image details are smoother after median filtering, while block artifacts appear in the image after JPEG compression.
[0092] from Figure 3 It can be seen that for images that have undergone different operations, the amplitude spectrum of their histograms and detail images will be modified in different ways and degrees. For example, after histogram equalization and gamma correction, the high-frequency components of the amplitude spectrum of the histogram tend to increase significantly, such as Figure 3As shown in (a), after JPEG compression, the image's detail map contains 8×8 block artifacts, resulting in periodic peaks at n / 8 (n = ±1, ±2, ±3). Therefore, we can use the traces of the detail map and spectrogram in the frequency domain to extract features for detecting global image manipulation.
[0093] The above embodiments should be understood as merely illustrating the present invention and not as limiting the scope of protection of the present invention. After reading the contents of the present invention, technicians may make various changes or modifications to the present invention, and these equivalent changes and modifications also fall within the scope defined by the claims of the present invention.
Claims
1. A frequency domain-based image global manipulation forensics method, characterized by: The following steps are involved: (1) Use one or more image operations to process the collected raw image samples and complete the construction of the dataset; (2) Extracting forensic frequency features from the image histogram and detail image based on the frequency domain, including: calculating the histogram frequency distribution features; calculating the amplitude spectrum mean of the detail image in the horizontal and vertical directions, and finally obtaining the frequency distribution features of the detail image; and constructing the forensic frequency features by concatenating the histogram frequency distribution features and the frequency distribution features of the detail image; The calculation steps of the histogram frequency distribution feature are as follows: Perform a one-dimensional discrete Fourier transform on the image histogram h and calculate the amplitude spectrum H M : H M (i)=log 10 (abs(DFT(h)+1) Among them, DFT is the calculation formula of discrete Fourier transform, abs is the operation of finding the absolute value, and i represents the corresponding frequency component; For H M Perform maximum and minimum value normalization: min(H M ) indicates H M The minimum value, max(H M ) indicates H M The maximum value of Feature extraction is performed only in the normalized frequency interval [-1 / 2, 0], and all frequency components in this interval are divided into equal intervals. frequency subintervals, and then calculate the average amplitude value in each subinterval: in, It is a downward evidence collection operation, N h is the number of frequencies contained in each subinterval, and we get a Dimensional histogram frequency distribution characteristics; The calculation of the frequency distribution characteristics of the detail image includes the following steps: For a size of S w ×S h Image I m , S w , S h Represents the width and height of the image, I m The detail graph is defined as follows: Among them, f H It is a high-pass filter with a size of (2a+1)×(2a+1), i, j represents the position (i, j) of the detail image, l1, l2 represents the position in the high-pass filter; For each detail image, each row and column is regarded as a one-dimensional signal in the horizontal direction and the vertical direction respectively. Taking the horizontal signal as an example, a one-dimensional discrete Fourier transform is performed on each column signal and the amplitude spectrum is calculated. Among them, dm(:,i) is the i-th column of the detail image, and then the average of the amplitude spectrum of all column signals is calculated: In the vertical direction, the same operation is performed on each row of the detail image dm to calculate the one-dimensional amplitude spectrum of the detail image in the vertical direction. Then calculate and The average value of the amplitude spectrum of the detail image dm in the horizontal and vertical directions is obtained: To DM M Standard normalization: mean(DM M ) indicates DM M The mean value, std(DM M ) indicates DM M The standard deviation of All frequency components in this interval are divided into equal intervals. frequency subintervals, and then calculate the average amplitude value in each subinterval: Among them, N dm is the number of frequencies contained in each subinterval; (3) Using KNN classifier to train the model of the evidence frequency features obtained in step (2); (4) Use the model trained in step (3) to test the forensic frequency features extracted from the test image to obtain the final classification results.
2. The frequency-domain-based global image manipulation evidence collection method according to claim 1, characterized in that: The image operations include contrast enhancement, median filtering, JPEG compression and resampling.
3. The frequency-domain-based global image manipulation evidence collection method according to claim 1, characterized in that: Three high-pass filters of different sizes are selected to extract detail images from the image, and the filter sizes are 3×3, 5×5 and 7×7 respectively.
4. An electronic device, characterized in that: include: a memory for storing executable instructions; The processor is configured to implement the frequency domain-based global image manipulation forensics method according to any one of claims 1 to 3 when executing the executable instructions stored in the memory.
5. A computer-readable storage medium, characterized in that Executable instructions are stored for implementing the frequency domain-based global image manipulation evidence collection method according to any one of claims 1 to 3 when executed by a processor.
Citation Information
Patent Citations
Style migration forged image detection device and method based on Fourier transform
CN111127407A
Image contrast enhancement detection method based on histogram
CN114677333A