CN110443804B - Resampling tampering identification method and device for JPEG image and computer equipment - Google Patents
Resampling tampering identification method and device for JPEG image and computer equipment Download PDFInfo
- Publication number
- CN110443804B CN110443804B CN201910952846.8A CN201910952846A CN110443804B CN 110443804 B CN110443804 B CN 110443804B CN 201910952846 A CN201910952846 A CN 201910952846A CN 110443804 B CN110443804 B CN 110443804B
- Authority
- CN
- China
- Prior art keywords
- jpeg
- resampling
- image
- jpeg image
- pure color
- 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.)
- Active
Links
- 238000012952 Resampling Methods 0.000 title claims abstract description 181
- 238000000034 method Methods 0.000 title claims abstract description 70
- 238000001228 spectrum Methods 0.000 claims abstract description 64
- 238000001914 filtration Methods 0.000 claims abstract description 39
- 238000013139 quantization Methods 0.000 claims abstract description 19
- 239000007787 solid Substances 0.000 claims abstract description 15
- 238000004590 computer program Methods 0.000 claims description 31
- 239000011159 matrix material Substances 0.000 claims description 31
- 238000005315 distribution function Methods 0.000 claims description 27
- 238000004364 calculation method Methods 0.000 claims description 20
- 238000007476 Maximum Likelihood Methods 0.000 claims description 12
- 238000012216 screening Methods 0.000 claims description 12
- 238000001514 detection method Methods 0.000 abstract description 15
- 230000008569 process Effects 0.000 abstract description 15
- 230000000694 effects Effects 0.000 abstract description 6
- 230000000903 blocking effect Effects 0.000 abstract description 4
- 238000005516 engineering process Methods 0.000 description 6
- 230000006835 compression Effects 0.000 description 5
- 238000007906 compression Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 230000006872 improvement Effects 0.000 description 3
- 230000000737 periodic effect Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 244000025254 Cannabis sativa Species 0.000 description 1
- 241000282326 Felis catus Species 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000001186 cumulative effect Effects 0.000 description 1
- 239000003814 drug Substances 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000009022 nonlinear effect Effects 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4007—Scaling of whole images or parts thereof, e.g. expanding or contracting based on interpolation, e.g. bilinear interpolation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/132—Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/176—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/60—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
- H04N19/625—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using discrete cosine transform [DCT]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/80—Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20048—Transform domain processing
- G06T2207/20052—Discrete cosine transform [DCT]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20048—Transform domain processing
- G06T2207/20056—Discrete and fast Fourier transform, [DFT, FFT]
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Discrete Mathematics (AREA)
- Quality & Reliability (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The application relates to a resampling tampering identification method of a JPEG image, a resampling tampering identification device of a JPEG image, a computer device and a computer readable storage medium. The method comprises the following steps: the method comprises the steps of obtaining a JPEG non-solid color block of a JPEG image after the JPEG image is converted into a gray image, and filtering the JPEG non-solid color block to eliminate JPEG quantization noise in the JPEG image to obtain a new JPEG image; dividing the new JPEG image into a plurality of subgraphs, acquiring a resampling frequency spectrum of each subgraph, and calculating a resampling factor estimation value of each subgraph according to the resampling frequency spectrum; and carrying out resampling factor interval estimation according to the resampling factor estimation value of each subgraph, and determining whether the JPEG image is subjected to resampling tampering according to the estimation result. The method solves the problem that the JPEG blocking effect influences resampling detection by using deblocking filtering, effectively avoids the interference of a large-area smooth block on estimation by limiting the range of an interested area in the process of estimating the resampling period, and improves the tampering detection effect of the JPEG image.
Description
Technical Field
The present application relates to the field of image detection technologies, and in particular, to a method, an apparatus, a computer device, and a computer-readable storage medium for identifying a resampling tampering of a JPEG image.
Background
Digital images, which are images digitized from analog images, having pixels as basic elements, and which can be stored and processed by digital computers or digital circuits; in recent years, digital images have become one of the most common information media in people's daily life. With the popularization of image editing software such as photoshop (ps), image tampering becomes very easy. Although the tampered pictures widely spread on the internet are mostly used for entertainment and have small influence, in the professional fields of justice, medicine, news industry, publishing industry and the like, the authenticity and integrity of the pictures need to be absolutely guaranteed; therefore, a passive digital image evidence obtaining technology for identifying the source of an image, confirming the integrity and authenticity of the image and predicting the tampering history of the image is developed. Compared with an image active evidence obtaining technology, the image passive evidence obtaining technology can detect the image obtained by any digital imaging equipment without embedding extra information (watermark) in advance before the image to be detected is tampered, so that the application range is wider. The resampling evidence obtaining technology is a commonly used digital image passive evidence obtaining technology, and aims to judge whether a given image is subjected to resampling operation.
At present, the resampling detection method mostly removes low-frequency components of an image through a differential filtering operation, then calculates a two-dimensional fourier spectrum of the image or a one-dimensional fourier spectrum of a variance sequence of a differential image, and identifies a periodic signal from the spectrum as a basis for resampling detection. However, this method is usually only for lossless picture formats and does not take into account the effects of other tampering operations besides resampling operations.
The JPEG format is the most common picture format on the internet, and the JPEG format is output by default after the general image editing software is tampered. JPEG is a lossy compression format, and the process of Discrete Cosine Transform (DCT) also introduces periodic noise, so that the noise can be mistakenly identified by a resampling detection method; therefore, JPEG quantization noise and a resampled signal cannot be distinguished according to the existing resampling evidence obtaining method, so that the effects of evidence obtaining and tampering detection on a JPEG image are poor.
Disclosure of Invention
Based on this, it is necessary to provide a resampling tampering identification method of a JPEG image, a resampling tampering identification apparatus of a JPEG image, a computer device, and a computer-readable storage medium, in view of the above-described technical problems.
In one aspect, an embodiment of the present invention provides a method for identifying resampling tampering of a JPEG image, where the method includes:
acquiring a JPEG image;
if the JPEG image is a gray level image, acquiring a JPEG non-solid color block of the JPEG image;
filtering the JPEG non-pure color block to eliminate JPEG quantization noise in the JPEG image and obtain a new JPEG image;
dividing the new JPEG image into a plurality of subgraphs, acquiring a resampling frequency spectrum of each subgraph, and calculating a resampling factor estimation value of each subgraph according to the resampling frequency spectrum;
and carrying out resampling factor interval estimation according to the resampling factor estimation value of each subgraph, and determining whether the JPEG image is subjected to resampling tampering according to the estimation result.
In one embodiment, the step of obtaining the JPEG non-pure color block of the JPEG image comprises:
acquiring a DCT coefficient matrix of the JPEG image;
screening DCT pure color blocks of the DCT coefficient matrix;
acquiring JPEG pure color blocks corresponding to the DCT pure color blocks;
and removing the JPEG pure color blocks in the JPEG image to obtain JPEG non-pure color blocks.
In one embodiment, the step of screening DCT pure color blocks of the DCT coefficient matrix includes:
acquiring the number of nonzero coefficients of the low-frequency part of each DCT block of the DCT coefficient matrix;
comparing the number of the nonzero coefficients with a set threshold;
and if the number of the nonzero coefficients is smaller than the set threshold value, determining the corresponding DCT blocks as DCT pure color blocks.
In one embodiment, the step of filtering the JPEG non-solid block comprises:
determining a noise variance of JPEG compressed noise of the JPEG non-solid color block;
and performing boundary wiener filtering on the JPEG non-pure color block according to the noise variance.
In one embodiment, before the step of determining a new JPEG image, the method further comprises:
and interpolating the JPEG pure color blocks to improve the JPEG pure color blocks.
In one embodiment, the step of interpolating the JPEG pure color block includes:
and carrying out bicubic interpolation on the JPEG pure color blocks based on adjacent blocks.
In one embodiment, the multiple subgraphs overlap each other; the width of each sub-image is consistent with the JPEG image, and the height is a set value;
and/or the step of obtaining the resample frequency spectrum of each subgraph and calculating the resample factor estimated value of each subgraph according to the resample frequency spectrum comprises the following steps:
acquiring a three-order row differential graph of each subgraph, and calculating a column variance sequence of each three-order row differential graph;
obtaining a Fourier spectrum of each sub-graph according to the column variance sequence;
obtaining a resampled frequency spectrum of each subgraph from the Fourier frequency spectrum;
determining the reciprocal of the resampled spectrum as the resample factor estimate for each sub-graph.
In one embodiment, the step of performing resampling factor interval estimation according to the resampling factor estimation value of each sub-graph and determining whether the JPEG image is subjected to resampling tampering according to the estimation result includes:
accumulating and normalizing the resampling factor estimation value of each subgraph according to a plurality of subintervals to obtain an empirical distribution function; the plurality of subintervals are obtained by dividing a preset resampling factor interval;
and performing maximum likelihood estimation according to the empirical distribution function, and determining whether the JPEG image is subjected to resampling tampering according to an estimation result.
In one embodiment, the step of performing maximum likelihood estimation according to the empirical distribution function and determining whether the JPEG image is subjected to resampling tampering according to the estimation result includes:
if the calculation result of the empirical distribution function is larger than a preset confidence threshold, determining that the JPEG image is subjected to resampling tampering, and taking a subinterval corresponding to the calculation result as a resampling tampering interval of the JPEG image;
and if the calculation result of the empirical distribution function is not greater than a preset confidence threshold, determining that the JPEG image is not subjected to resampling tampering.
In one embodiment, before the step of obtaining the JPEG non-solid blocks of the JPEG image, the method further comprises:
and if the JPEG image is a color image, selecting a color channel for the JPEG image. In another aspect, an embodiment of the present invention provides an apparatus for recognizing resampling tampering of a JPEG image, where the apparatus includes:
the image acquisition module is used for acquiring a JPEG image;
the block acquisition module is used for acquiring JPEG non-pure color blocks of the JPEG image if the JPEG image is a gray level image;
the filtering module is used for filtering the JPEG non-pure color block so as to eliminate JPEG quantization noise in the JPEG image and obtain a new JPEG image;
the computing module is used for dividing the new JPEG image into a plurality of subgraphs, acquiring the resampling frequency spectrum of each subgraph and computing the resampling factor estimation value of each subgraph according to the resampling frequency spectrum;
an estimation module for estimating the resampling factor interval according to the resampling factor estimation value of each sub-image and determining whether the JPEG image is falsified by resampling according to the estimation result
In another aspect, an embodiment of the present invention provides a computer device, including a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the method for identifying the resampling tampering of the JPEG image when executing the computer program.
In still another aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of a method for resampling tampering identification of a JPEG image.
One of the above technical solutions has the following advantages or beneficial effects: the JPEG image is converted into a gray image, a JPEG non-solid color block of the JPEG image is obtained, and the JPEG non-solid color block is filtered to eliminate JPEG quantization noise in the JPEG image, so that the problem that the resampling detection is influenced by a JPEG blocking effect is solved by utilizing the deblocking filtering for the first time; meanwhile, dividing the obtained new JPEG image into a plurality of subgraphs, and calculating a resampling factor estimation value of each subgraph according to the obtained resampling frequency spectrum; and finally, resampling factor interval estimation is carried out according to the resampling factor estimation value of each sub-image, whether the JPEG image is subjected to resampling tampering is determined, namely in the process of estimating the resampling period, the interference of a large-area flat sliding block on estimation is effectively avoided by limiting the range of the region of interest, the tampering detection effect of the JPEG image is improved, and the precision and the accuracy of the resampling tampering identification result of the JPEG image are high.
Drawings
FIG. 1 is a schematic flow chart diagram of a method for resampling tamper identification of JPEG images in one embodiment;
FIG. 2 is a schematic flow chart of a resampling tampering identification method for a JPEG image in another embodiment;
FIG. 3 is a schematic block diagram of a resampling tampering identification apparatus for JPEG images in one embodiment;
FIG. 4 is a schematic structural view of a resampling tampering identification apparatus for JPEG images in another embodiment;
FIG. 5 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase 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. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In one embodiment, as shown in fig. 1, there is provided a resampling tampering identification method for JPEG images, comprising the steps of:
s202, acquiring a JPEG image.
The JPEG image may be understood as an image in JPEG format, specifically, the image may be obtained by a user taking a picture by using an electronic device (having a photographing function), or may be a photo stored in the electronic device, a storage device, or a network, which is not limited specifically.
The JPEG image here refers to an image that requires tamper recognition, and may be a single photo album including a plurality of photos or a single photo. The size of the JPEG image, scene elements and the like are not particularly limited; it may contain scene elements such as at least one of landscape, beach, blue sky, green grass, snow, night scene, darkness, backlighting, sunrise/sunset, fireworks, spotlights, indoors, long distance, macro, text documents, portrait, baby, cat, dog, delicacy, etc. Of course, the above is not exhaustive and many other categories of scene elements are also included.
S204, if the JPEG image is a gray level image, acquiring a JPEG non-pure color block of the JPEG image.
The purpose of the step is to obtain the gray level image of the JPEG image, namely when the JPEG image is the gray level image, the JPEG non-pure color block of the JPEG image can be directly obtained, and when the JPEG image is not the gray level image, the JPEG image needs to be converted into the gray level image, and then the JPEG non-pure color block of the gray level image is obtained.
In this step, acquiring the JPEG non-pure color block of the JPEG image means performing block processing on the JPEG image, and acquiring a block to be processed of JPEG which is not a JPEG pure color block, wherein the JPEG pure color block may also be referred to as a smooth block. Generally, the blocks in the JPEG image include a smooth block, a texture block, and an edge block, and the obtaining of the JPEG non-solid color block of the JPEG image is understood to be obtaining of the non-smooth block, further the texture block, the edge block, and the like in the JPEG image.
S206, filtering the JPEG non-pure color block to eliminate JPEG quantization noise in the JPEG image and obtain a new JPEG image.
In the step, the purpose of eliminating JPEG quantization noise in the JPEG image can be achieved by filtering the JPEG non-pure color block, so that the problem that the resampling detection is influenced by the JPEG blocking effect is solved by utilizing the deblocking filtering.
When JPEG quantization noise is eliminated, boundary wiener filtering operation can be carried out on the JPEG non-pure color block, and other filtering forms can be selected; in addition, the specific filtering operation process can be set according to actual conditions, and is not limited herein.
And S208, dividing the new JPEG image into a plurality of subgraphs, acquiring the resampling frequency spectrum of each subgraph, and calculating the resampling factor estimation value of each subgraph according to the resampling frequency spectrum.
The subgraph is also called interesting subgraph, and the step can effectively avoid the interference of a large-area smooth block on the estimation by limiting the range of an interesting area.
The subgraph can be divided in various ways, for example, in a specific embodiment, the subgraphs can be overlapped with each other; and the width of each sub-image is consistent with the JPEG image, and the height is a set value. The partitioning method facilitates the computation of the resampling factor estimate for each sub-graph.
And S210, carrying out resampling factor interval estimation according to the resampling factor estimation value of each subgraph, and determining whether the JPEG image is subjected to resampling tampering according to the estimation result.
Through the steps, whether the JPEG image is subjected to resampling tampering can be finally determined according to the estimation result, and specific tampered positions and interval distribution can be obtained if the JPEG image is subjected to resampling tampering, so that the comprehensiveness and the accuracy of the JPEG image resampling tampering detection result are improved.
In the above embodiments of the present invention, the execution main body may be an image tampering identification device or apparatus, and specifically may be a digital signal processor, various terminals (a mobile phone, a tablet computer, a desktop computer, a notebook computer, a wearable device, etc.), a server, a client, or a cloud intelligent terminal, and may also be selected and changed according to actual situations.
In the resampling tampering identification method for the JPEG image in the above embodiment, the JPEG image is converted into the gray image, the JPEG non-solid color block of the JPEG image is obtained, and the JPEG non-solid color block is filtered to eliminate JPEG quantization noise in the JPEG image, so that the problem that the resampling detection is affected by the JPEG blocking effect is solved by using the deblocking filtering for the first time; meanwhile, dividing the obtained new JPEG image into a plurality of subgraphs, and calculating a resampling factor estimation value of each subgraph according to the obtained resampling frequency spectrum; and finally, resampling factor interval estimation is carried out according to the resampling factor estimation value of each sub-image, whether the JPEG image is subjected to resampling tampering is determined, namely in the process of estimating the resampling period, the interference of a large-area flat sliding block on estimation is effectively avoided by limiting the range of the region of interest, the tampering detection effect of the JPEG image is improved, and the precision and the accuracy of the resampling tampering identification result of the JPEG image are high.
In some embodiments, step S204 may specifically include: acquiring a DCT coefficient matrix of a JPEG image; screening DCT pure color blocks of the DCT coefficient matrix; acquiring JPEG pure color blocks corresponding to the DCT pure color blocks; and removing the JPEG pure color blocks in the JPEG image to obtain JPEG non-pure color blocks.
Wherein, DCT refers to Discrete Cosine Transform (DCT for Discrete Cosine Transform), which is a kind of Transform related to fourier Transform; specifically, a corresponding DCT coefficient matrix can be obtained by a grayscale image matrix of the JPEG image.
And screening DCT pure color blocks of the DCT coefficient matrix, judging whether the number of the nonzero coefficients of the low-frequency part in the DCT coefficient matrix and a set threshold value meet a preset relation, and if so, determining the DCT pure color blocks. The set threshold may be empirical data, and the size of the set threshold may also be obtained by screening and integrating a large amount of experimental data.
After the DCT pure color blocks are obtained, the DCT pure color blocks can be marked, corresponding JPEG pure color blocks are obtained through the marked DCT pure color blocks, the JPEG pure color blocks in the JPEG image are removed, and JPEG non-pure color blocks are obtained; the specific mark form can be selected according to the actual situation, and is not limited here.
A specific embodiment is that the step of screening DCT pure color blocks of the DCT coefficient matrix includes: acquiring the number of nonzero coefficients of the low-frequency part of each DCT block of the DCT coefficient matrix; comparing the number of the nonzero coefficients with a set threshold; and if the number of the nonzero coefficients is smaller than a set threshold value, determining the corresponding DCT block as a DCT pure color block.
In some embodiments, step S206 may specifically include: determining a noise variance of JPEG compressed noise of the JPEG non-pure color block; and performing boundary wiener filtering on the JPEG non-pure color block according to the noise variance.
The JPEG compression noise is considered as a stable gaussian noise on the non-pure color block, and the noise variance thereof can be calculated according to an empirical formula and a DCT quantization table.
The method for restoring the linear image comprises the following steps of filtering through a boundary Wiener filter, accurately distinguishing JPEG quantization noise and a resampling signal, and enabling the resampling identification process to have better robustness.
As shown in fig. 2, in some embodiments, in the resampling tampering identification process, before determining a new JPEG image, the resampling tampering identification method for JPEG images further includes: s212, interpolating the JPEG pure color blocks to improve the JPEG pure color blocks and a JPEG image; by interpolating the JPEG pure color blocks, the JPEG image is smoother and easier to process.
Due to the fact that the quantization error caused by JPEG compression is detected to have a strong nonlinear effect, different texture regions of an image have different statistical characteristics, and therefore the image is distinguished and processed respectively through DCT coefficient sparsity, and the image has strong pertinence and tampering detection effects.
As an optional implementation manner, step S212 may specifically include: performing bicubic interpolation on the JPEG pure color block based on the adjacent blocks; the interpolation method can effectively improve the JPEG pure color block and is convenient for resampling, tampering and identifying the flat sliding block in the JPEG image.
In some embodiments, step S208 may specifically include: acquiring a three-order row differential graph of each subgraph, and calculating a column variance sequence of each three-order row differential graph; obtaining a Fourier spectrum of each subgraph according to the column variance sequence; obtaining a resample frequency spectrum of each subgraph from the Fourier frequency spectrum; the inverse of the resampled spectrum is determined as the resample factor estimate for each sub-graph.
In some embodiments, step S210 may specifically include: accumulating and normalizing the resampling factor estimation value of each subgraph according to a plurality of subintervals to obtain an empirical distribution function; the multiple subintervals are obtained by dividing a preset resampling factor interval; and performing maximum likelihood estimation according to the empirical distribution function, and determining whether the JPEG image is subjected to resampling tampering according to an estimation result.
In some embodiments, the step of performing maximum likelihood estimation according to an empirical distribution function and determining whether the JPEG image is subjected to resampling tampering according to the estimation result may specifically include: if the calculation result of the empirical distribution function is larger than a preset confidence threshold, determining that the JPEG image is subjected to resampling tampering, and taking a subinterval corresponding to the calculation result as a resampling tampering interval of the JPEG image; and if the calculation result of the empirical distribution function is not greater than the preset confidence coefficient threshold, determining that the JPEG image is not subjected to resampling tampering.
In some embodiments, before the step of obtaining the JPEG non-pure color blocks of the JPEG image in S204, the method for identifying the resampling tampering of the JPEG image further includes: and if the JPEG image is a color image, selecting a color channel of the JPEG image, wherein the color channel can be selected as a G channel.
With reference to fig. 2, a method for estimating a resampling factor of a JPEG image based on deblocking filtering according to the present application is explained below with an embodiment.
The resampling tampering identification method of the JPEG image specifically comprises the following steps:
and S1, selecting a color channel of the JPEG image to be tested. If the image to be measured is a gray image, directly performing S2; if the image to be detected is a color image, selecting a G channel and then executing S2;
and S2, performing interpolation improvement on the pure color blocks. And screening the pure color blocks of the DCT coefficient matrix of the gray scale image obtained in the step S1 one by 8 blocks, and carrying out interpolation improvement on the pure color blocks by utilizing adjacent blocks. The operation of improving the pure color blocks specifically comprises the following steps:
s21, selecting a pure color block: if the gray scale image matrix obtained in S1 is expressed as
Then the corresponding block DCT coefficient matrix is expressed as
(ii) a Wherein the nth DCT block is a matrix with a size of 8 x 8
. If the low frequency part in the matrix
If the number of non-zero coefficients is less than the set threshold value T, the block
Marked as pure color blocks. Specifically, the set threshold T may be selected to be 4.
S22, interpolating the improved pure color block: for the pure color block marked in S21, interpolation improvement is performed by using the adjacent blocks, and the interpolation process is performed on the gray matrix
The interpolation method can be selected as bicubic interpolation. It should be noted that the size of the interpolation window is here typically 8 times larger, i.e. for pixel points
The selected point of interpolation is
、
、
、
. For the condition that the size of the point neighborhood of the image boundary is insufficient, a symmetric continuation method can be selected to increase interpolation points.
And S3, boundary filtering. And selecting boundary pixels of the non-pure color blocks which are not marked in the step S2 to carry out point-by-point wiener filtering, wherein the noise power spectrum is calculated by a JPEG quantization table. The block boundary filtering specifically includes:
s31, calculating the noise variance: it should be noted that, JPEG compression noise is regarded as smooth gaussian noise on non-pure color blocks, and its noise variance can be calculated according to an empirical formula as follows:
wherein,
is the variance of the noise and is,
is a DCT quantization table
The information may be directly recorded in the header.
S32, boundary wiener filtering: for unlabeled blocks in S21
Select its corresponding gray block
Is detected by the boundary pixel
、
、
And
performing point-by-point wiener filtering:
wherein
The pixel points are the pixel points after the noise removal,
calculated from S31, and
and
is a pixel point
Has a window size of
Local mean and variance of (c):
optionally, m and n are both 1, i.e. 3 × 3 windows are used for boundary wiener filtering.
S4, dividing the subgraph and calculating the frequency spectrum. And dividing the picture obtained in the step S3 into a plurality of overlapped square subgraphs, calculating the power spectrum of the variance signal of each subgraph, selecting the frequency of the maximum peak from the power spectrum, and calculating to obtain the estimation of the resampling factor. The process of dividing interesting subgraphs and calculating the resampling factor estimation specifically may include:
s41, dividing interesting subgraphs: the size obtained after the deblocking filtering of S2 and S3 is
Gray scale map of
Divided into mutually overlapping subgraphs
Each sub-picture having the same width as the original picture
And a height of fixed size
:
S42, calculating a third-order row differential graph for each subgraph
: the third-order row difference is calculated by convolution:
wherein
The simplest third order difference operator may be chosen. Of course, the user may replace the difference operator with another third-order difference operator, or a difference operator with a different order, or any other kind of high-pass filter, which is not limited in this embodiment.
Wherein
Is the column mean sequence of the corresponding subgraph. Another alternative is to
And directly calculating a two-dimensional power spectrum, and selecting components on x and y coordinate axes to be superposed to form a one-dimensional power spectrum.
S44, resampling factor estimation: sequence of column variances for each subgraph
Computing a sequence of discrete Fourier transforms
And as a fourier spectrum. If the position of the highest peak is selected from the second half of the frequency spectrum as the resampled frequency spectrum
Then the resampling factor estimate for the subgraph
Comprises the following steps:
and S5, counting the frequency of occurrence of all the estimates obtained in the S4 in each interval, and taking the maximum likelihood estimation as the final resampling factor interval estimation. The process of selecting the resampling factor maximum likelihood estimation may specifically include:
s51, interval division: interval resampling factor
Is divided into lengths of
Are not overlapped with each other
The individual interval:
. Alternatively,
0.05, and there were 20 intervals which did not overlap each other.
S52, factor statistics: obtained in S44
Resampling factor estimate
Push button
Performing cumulative statistics and normalization to obtain empirical distribution
:
S53, maximum likelihood estimation: according to user-selected confidence level
Selecting
Is greater than
Corresponding to
As the final interval estimate.
If the interval does not exist, the image to be detected is not subjected to resampling operation.
If there is no single such interval, but the sum of the probabilities of two adjacent intervals
Is greater than
Then the final interval is estimated as
And outputting the result.
Experiments prove that the resampling tampering identification method of the JPEG image is not only superior to the existing resampling detection method, but also superior to the existing method in the robustness of JPEG compression strength; in addition, the method has better robustness to the size of the resampling factor, thereby ensuring the high accuracy of the resampling tampering identification result of the JPEG image.
It should be understood that for the foregoing method embodiments, although the steps in the flowcharts are shown in order indicated by the arrows, the steps are not necessarily performed in order indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in the flow charts of the method embodiments may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least a portion of the sub-steps or stages of other steps.
Based on the same idea as the resampling tampering identification method of the JPEG image in the above embodiments, the present document also provides a resampling tampering identification apparatus of a JPEG image.
In one embodiment, as shown in fig. 3, there is provided a resampling tampering identification apparatus for JPEG images, including: an image acquisition module 401, a block acquisition module 402, a filtering module 403, a calculation module 404 and an estimation module 405, wherein:
an image acquisition module 401, configured to acquire a JPEG image;
a block obtaining module 402, configured to obtain a JPEG non-solid color block of the JPEG image if the JPEG image is a grayscale image;
a filtering module 403, configured to filter the JPEG non-pure color block to eliminate JPEG quantization noise in the JPEG image, so as to obtain a new JPEG image;
a calculating module 404, configured to divide the new JPEG image into multiple subgraphs, obtain a resampling spectrum of each subgraph, and calculate a resampling factor estimation value of each subgraph according to the resampling spectrum;
and the estimation module 405 is configured to perform resampling factor interval estimation according to the resampling factor estimation value of each sub-graph, and determine whether the JPEG image is subjected to resampling tampering according to an estimation result.
In some embodiments, the block obtaining module 402 is specifically configured to: acquiring a DCT coefficient matrix of a JPEG image; screening DCT pure color blocks of the DCT coefficient matrix; acquiring JPEG pure color blocks corresponding to the DCT pure color blocks; and removing the JPEG pure color blocks in the JPEG image to obtain JPEG non-pure color blocks.
In some embodiments, the block obtaining module 402 is further configured to: acquiring the number of nonzero coefficients of the low-frequency part of each DCT block of the DCT coefficient matrix; comparing the number of the nonzero coefficients with a set threshold; and if the number of the nonzero coefficients is smaller than a set threshold value, determining the corresponding DCT block as a DCT pure color block.
In some embodiments, the filtering module 403 is specifically configured to: determining a noise variance of JPEG compressed noise of the JPEG non-pure color block; and performing boundary wiener filtering on the JPEG non-pure color block according to the noise variance.
In some embodiments, as shown in fig. 4, the resampling tampering identification apparatus for a JPEG image further includes: and the interpolation module 406 is configured to interpolate the JPEG pure color block to improve the JPEG pure color block.
In some embodiments, the interpolation module 406 is specifically configured to: the JPEG pure color block is bi-cubic interpolated based on neighboring blocks.
In some embodiments, multiple subgraphs overlap each other; the width of each sub-image is consistent with that of the JPEG image, and the height of each sub-image is a set value;
in some embodiments, the calculation module 404 is specifically configured to: acquiring a three-order row differential graph of each subgraph, and calculating a column variance sequence of each three-order row differential graph; obtaining a Fourier spectrum of each subgraph according to the column variance sequence; obtaining a resample frequency spectrum of each subgraph from the Fourier frequency spectrum; the inverse of the resampled spectrum is determined as the resample factor estimate for each sub-graph.
In some embodiments, the estimation module 405 is specifically configured to: accumulating and normalizing the resampling factor estimation value of each subgraph according to a plurality of subintervals to obtain an empirical distribution function; the multiple subintervals are obtained by dividing a preset resampling factor interval; and performing maximum likelihood estimation according to the empirical distribution function, and determining whether the JPEG image is subjected to resampling tampering according to an estimation result.
In some embodiments, the estimation module 405 is further specifically configured to: if the calculation result of the empirical distribution function is larger than a preset confidence threshold, determining that the JPEG image is subjected to resampling tampering, and taking a subinterval corresponding to the calculation result as a resampling tampering interval of the JPEG image; and if the calculation result of the empirical distribution function is not greater than the preset confidence coefficient threshold, determining that the JPEG image is not subjected to resampling tampering.
In some embodiments, the block obtaining module 402 is further configured to: and if the JPEG image is a color image, performing color channel selection on the JPEG image, and then executing the step of acquiring the JPEG non-pure color blocks of the JPEG image.
For the specific limitation of the resampling tampering identification device for JPEG images, reference may be made to the above limitation on the resampling tampering identification method for JPEG images, and details are not described here. The modules in the resampling tampering identification device for JPEG images can be wholly or partially realized by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In addition, in the above-mentioned embodiment of the resampling tampering identification apparatus for JPEG images, the logical division of each program module is only an example, and in practical applications, the above-mentioned function distribution may be performed by different program modules according to needs, for example, due to the configuration requirements of corresponding hardware or the convenience of implementation of software, that is, the internal structure of the resampling tampering identification apparatus for JPEG images is divided into different program modules to perform all or part of the above-described functions.
In one embodiment, a computer device is provided, which may be a server device or an image processing device, etc., and its internal structure diagram may be as shown in fig. 5. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is for storing resampled tamper identification data for the JPEG image. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of resampling tamper recognition of a JPEG image.
Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program: acquiring a JPEG image; if the JPEG image is a gray level image, acquiring a JPEG non-pure color block of the JPEG image; filtering the JPEG non-pure color block to eliminate JPEG quantization noise in the JPEG image and obtain a new JPEG image; dividing the new JPEG image into a plurality of subgraphs, acquiring a resampling frequency spectrum of each subgraph, and calculating a resampling factor estimation value of each subgraph according to the resampling frequency spectrum; and carrying out resampling factor interval estimation according to the resampling factor estimation value of each subgraph, and determining whether the JPEG image is subjected to resampling tampering according to the estimation result.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring a DCT coefficient matrix of a JPEG image; screening DCT pure color blocks of the DCT coefficient matrix; acquiring JPEG pure color blocks corresponding to the DCT pure color blocks; and removing the JPEG pure color blocks in the JPEG image to obtain JPEG non-pure color blocks.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring the number of nonzero coefficients of the low-frequency part of each DCT block of the DCT coefficient matrix; comparing the number of the nonzero coefficients with a set threshold; and if the number of the nonzero coefficients is smaller than a set threshold value, determining the corresponding DCT block as a DCT pure color block.
In one embodiment, the processor, when executing the computer program, further performs the steps of: determining a noise variance of JPEG compressed noise of the JPEG non-pure color block; and performing boundary wiener filtering on the JPEG non-pure color block according to the noise variance.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and interpolating the JPEG pure color blocks to improve the JPEG pure color blocks.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the JPEG pure color block is bi-cubic interpolated based on neighboring blocks.
In one embodiment, multiple subgraphs overlap each other; the width of each sub-image is consistent with that of the JPEG image, and the height of each sub-image is a set value;
in one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring a three-order row differential graph of each subgraph, and calculating a column variance sequence of each three-order row differential graph; obtaining a Fourier spectrum of each subgraph according to the column variance sequence; obtaining a resample frequency spectrum of each subgraph from the Fourier frequency spectrum; the inverse of the resampled spectrum is determined as the resample factor estimate for each sub-graph.
In one embodiment, the processor, when executing the computer program, further performs the steps of: accumulating and normalizing the resampling factor estimation value of each subgraph according to a plurality of subintervals to obtain an empirical distribution function; the multiple subintervals are obtained by dividing a preset resampling factor interval; and performing maximum likelihood estimation according to the empirical distribution function, and determining whether the JPEG image is subjected to resampling tampering according to an estimation result.
In one embodiment, the processor, when executing the computer program, further performs the steps of: if the calculation result of the empirical distribution function is larger than a preset confidence threshold, determining that the JPEG image is subjected to resampling tampering, and taking a subinterval corresponding to the calculation result as a resampling tampering interval of the JPEG image; and if the calculation result of the empirical distribution function is not greater than the preset confidence coefficient threshold, determining that the JPEG image is not subjected to resampling tampering.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and if the JPEG image is a color image, selecting a color channel for the JPEG image.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: acquiring a JPEG image; if the JPEG image is a gray level image, acquiring a JPEG non-pure color block of the JPEG image; filtering the JPEG non-pure color block to eliminate JPEG quantization noise in the JPEG image and obtain a new JPEG image; dividing the new JPEG image into a plurality of subgraphs, acquiring a resampling frequency spectrum of each subgraph, and calculating a resampling factor estimation value of each subgraph according to the resampling frequency spectrum; and carrying out resampling factor interval estimation according to the resampling factor estimation value of each subgraph, and determining whether the JPEG image is subjected to resampling tampering according to the estimation result.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a DCT coefficient matrix of a JPEG image; screening DCT pure color blocks of the DCT coefficient matrix; acquiring JPEG pure color blocks corresponding to the DCT pure color blocks; and removing the JPEG pure color blocks in the JPEG image to obtain JPEG non-pure color blocks.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring the number of nonzero coefficients of the low-frequency part of each DCT block of the DCT coefficient matrix; comparing the number of the nonzero coefficients with a set threshold; and if the number of the nonzero coefficients is smaller than a set threshold value, determining the corresponding DCT block as a DCT pure color block.
In one embodiment, the computer program when executed by the processor further performs the steps of: determining a noise variance of JPEG compressed noise of the JPEG non-pure color block; and performing boundary wiener filtering on the JPEG non-pure color block according to the noise variance.
In one embodiment, the computer program when executed by the processor further performs the steps of: and interpolating the JPEG pure color blocks to improve the JPEG pure color blocks.
In one embodiment, the computer program when executed by the processor further performs the steps of: the JPEG pure color block is bi-cubic interpolated based on neighboring blocks.
In one embodiment, multiple subgraphs overlap each other; the width of each sub-image is consistent with that of the JPEG image, and the height of each sub-image is a set value;
in one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a three-order row differential graph of each subgraph, and calculating a column variance sequence of each three-order row differential graph; obtaining a Fourier spectrum of each subgraph according to the column variance sequence; obtaining a resample frequency spectrum of each subgraph from the Fourier frequency spectrum; the inverse of the resampled spectrum is determined as the resample factor estimate for each sub-graph.
In one embodiment, the computer program when executed by the processor further performs the steps of: accumulating and normalizing the resampling factor estimation value of each subgraph according to a plurality of subintervals to obtain an empirical distribution function; the multiple subintervals are obtained by dividing a preset resampling factor interval; and performing maximum likelihood estimation according to the empirical distribution function, and determining whether the JPEG image is subjected to resampling tampering according to an estimation result.
In one embodiment, the computer program when executed by the processor further performs the steps of: if the calculation result of the empirical distribution function is larger than a preset confidence threshold, determining that the JPEG image is subjected to resampling tampering, and taking a subinterval corresponding to the calculation result as a resampling tampering interval of the JPEG image; and if the calculation result of the empirical distribution function is not greater than the preset confidence coefficient threshold, determining that the JPEG image is not subjected to resampling tampering.
In one embodiment, the computer program when executed by the processor further performs the steps of: and if the JPEG image is a color image, selecting a color channel for the JPEG image.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The terms "comprises" and "comprising," as well as any variations thereof, of the embodiments herein are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or (module) elements is not limited to only those steps or elements but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Reference herein to "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
References to "first \ second" herein are merely to distinguish between similar objects and do not denote a particular ordering with respect to the objects, it being understood that "first \ second" may, where permissible, be interchanged with a particular order or sequence. It should be understood that "first \ second" distinct objects may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced in sequences other than those illustrated or described herein.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (12)
1. A method of resampling tamper identification of a JPEG image, the method comprising:
acquiring a JPEG image;
if the JPEG image is a gray level image, acquiring a JPEG pure color block and a JPEG non-pure color block of the JPEG image;
interpolating the JPEG pure color blocks to improve the JPEG pure color blocks;
filtering the JPEG non-pure color block to eliminate JPEG quantization noise in the JPEG image; obtaining a new JPEG image according to the interpolated JPEG pure color block and the filtered JPEG non-pure color block;
dividing the new JPEG image into a plurality of subgraphs, acquiring a resampling frequency spectrum of each subgraph, and calculating a resampling factor estimation value of each subgraph according to the resampling frequency spectrum; wherein the plurality of subgraphs overlap each other;
carrying out resampling factor interval estimation according to the resampling factor estimation value of each subgraph, and determining whether the JPEG image is subjected to resampling tampering according to the estimation result;
wherein,
the step of obtaining the resampling frequency spectrum of each subgraph and calculating the resampling factor estimation value of each subgraph according to the resampling frequency spectrum comprises the following steps:
acquiring a three-order row differential graph of each subgraph, and calculating a column variance sequence of each three-order row differential graph;
obtaining a Fourier spectrum of each sub-graph according to the column variance sequence;
obtaining a resampled frequency spectrum of each subgraph from the Fourier frequency spectrum;
determining the reciprocal of the resampled spectrum as the resample factor estimate for each sub-graph.
2. The method according to claim 1, wherein the step of obtaining JPEG pure color blocks and JPEG non-pure color blocks of the JPEG image comprises:
acquiring a DCT coefficient matrix of the JPEG image;
screening DCT pure color blocks of the DCT coefficient matrix;
acquiring a JPEG pure color block corresponding to the DCT pure color block as the JPEG pure color block of the JPEG image;
and removing the JPEG pure color blocks in the JPEG image to obtain the JPEG non-pure color blocks of the JPEG image.
3. The method according to claim 2, wherein said step of screening said DCT pure color blocks of said DCT coefficient matrix comprises:
acquiring the number of nonzero coefficients of the low-frequency part of each DCT block of the DCT coefficient matrix;
comparing the number of the nonzero coefficients with a set threshold;
and if the number of the nonzero coefficients is smaller than the set threshold value, determining the corresponding DCT blocks as DCT pure color blocks.
4. The method of claim 1, wherein the step of filtering the JPEG non-solid block comprises:
determining a noise variance of JPEG compressed noise of the JPEG non-solid color block;
and performing boundary wiener filtering on the JPEG non-pure color block according to the noise variance.
5. The method according to any of claims 1 to 4, wherein the step of interpolating the JPEG pure color block comprises:
and carrying out bicubic interpolation on the JPEG pure color blocks based on adjacent blocks.
6. The method of any of claims 1 to 4, wherein each sub-graph has a width that is consistent with the JPEG image and a height that is a set value.
7. The method according to any one of claims 1 to 4, wherein the step of performing resampling factor interval estimation according to the resampling factor estimation value of each sub-graph and determining whether the JPEG image is subjected to resampling tampering according to the estimation result comprises:
accumulating and normalizing the resampling factor estimation value of each subgraph according to a plurality of subintervals to obtain an empirical distribution function; the plurality of subintervals are obtained by dividing a preset resampling factor interval;
and performing maximum likelihood estimation according to the empirical distribution function, and determining whether the JPEG image is subjected to resampling tampering according to an estimation result.
8. The method according to claim 7, wherein the step of performing maximum likelihood estimation according to the empirical distribution function and determining whether the JPEG image is resampled and tampered according to the estimation result comprises:
if the calculation result of the empirical distribution function is larger than a preset confidence threshold, determining that the JPEG image is subjected to resampling tampering, and taking a subinterval corresponding to the calculation result as a resampling tampering interval of the JPEG image;
and if the calculation result of the empirical distribution function is not greater than a preset confidence threshold, determining that the JPEG image is not subjected to resampling tampering.
9. The method according to any of claims 1 to 4, wherein the step of obtaining JPEG non-solid color blocks of the JPEG image is preceded by the method further comprising:
and if the JPEG image is a color image, selecting a color channel for the JPEG image.
10. An apparatus for resampling tampering identification of a JPEG image, the apparatus comprising:
the image acquisition module is used for acquiring a JPEG image;
the block acquisition module is used for acquiring a JPEG pure color block and a JPEG non-pure color block of the JPEG image if the JPEG image is a gray level image;
the interpolation module is used for interpolating the JPEG pure color block so as to improve the JPEG pure color block;
the filtering module is used for filtering the JPEG non-pure color block so as to eliminate JPEG quantization noise in the JPEG image; obtaining a new JPEG image according to the interpolated JPEG pure color block and the filtered JPEG non-pure color block;
the computing module is used for dividing the new JPEG image into a plurality of subgraphs, acquiring the resampling frequency spectrum of each subgraph and computing the resampling factor estimation value of each subgraph according to the resampling frequency spectrum; the method is further used for obtaining a third-order row differential graph of each subgraph and calculating a column variance sequence of each third-order row differential graph; obtaining a Fourier spectrum of each sub-graph according to the column variance sequence; obtaining a resampled frequency spectrum of each subgraph from the Fourier frequency spectrum; determining the reciprocal of the resampled frequency spectrum as a resample factor estimated value of each subgraph;
and the estimation module is used for estimating the resampling factor interval according to the resampling factor estimation value of each sub-image and determining whether the JPEG image is subjected to resampling tampering according to the estimation result.
11. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 9 when executing the computer program.
12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910952846.8A CN110443804B (en) | 2019-10-09 | 2019-10-09 | Resampling tampering identification method and device for JPEG image and computer equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910952846.8A CN110443804B (en) | 2019-10-09 | 2019-10-09 | Resampling tampering identification method and device for JPEG image and computer equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110443804A CN110443804A (en) | 2019-11-12 |
CN110443804B true CN110443804B (en) | 2020-02-11 |
Family
ID=68440632
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910952846.8A Active CN110443804B (en) | 2019-10-09 | 2019-10-09 | Resampling tampering identification method and device for JPEG image and computer equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110443804B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111695515B (en) * | 2020-06-12 | 2024-06-28 | 百度在线网络技术(北京)有限公司 | Video image detection method and device, electronic equipment and storage medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103903236B (en) * | 2014-03-10 | 2016-08-31 | 北京信息科技大学 | The method and apparatus of face image super-resolution rebuilding |
CN108682007B (en) * | 2018-04-28 | 2021-09-10 | 华中师范大学 | JPEG image resampling automatic detection method based on depth random forest |
-
2019
- 2019-10-09 CN CN201910952846.8A patent/CN110443804B/en active Active
Non-Patent Citations (3)
Title |
---|
图像滤波检测和重采样检测方法研究;李心爱;《中国优秀硕士论文全文数据库 信息科技辑》;20180215(第2期);第I138-1833页 * |
基于量化噪声的JPEG图像篡改检测;王虹 等;《计算机工程与应用》;20121031;第48卷(第19期);第205-208页 * |
复制—粘贴篡改的盲取证技术研究;王一星;《中国优秀硕士学位论文全文数据库 信息科技辑》;20131231(第S1期);第I138-50页 * |
Also Published As
Publication number | Publication date |
---|---|
CN110443804A (en) | 2019-11-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Ferrara et al. | Image forgery localization via fine-grained analysis of CFA artifacts | |
Hsu et al. | Video forgery detection using correlation of noise residue | |
Kang et al. | A context-adaptive SPN predictor for trustworthy source camera identification | |
Al-Ani et al. | On the SPN estimation in image forensics: a systematic empirical evaluation | |
US8594447B2 (en) | Method of estimating blur kernel from edge profiles in a blurry image | |
CN109064504B (en) | Image processing method, apparatus and computer storage medium | |
Choi et al. | CFA pattern identification of digital cameras using intermediate value counting | |
Goljan et al. | Sensor fingerprint digests for fast camera identification from geometrically distorted images | |
EP2466901B1 (en) | Depth data upsampling | |
Danielyan et al. | Noise variance estimation in nonlocal transform domain | |
CN107909544B (en) | Image correction method and system | |
CN114429474A (en) | Human body key point detection method and device and computer storage medium | |
Ponomarenko et al. | Adaptive visually lossless JPEG-based color image compression | |
CN110428402B (en) | Image tampering identification method and device, computer equipment and storage medium | |
CN112085094B (en) | Document image reproduction detection method, device, computer equipment and storage medium | |
CN110991310A (en) | Portrait detection method, portrait detection device, electronic equipment and computer readable medium | |
CN111598088B (en) | Target detection method, device, computer equipment and readable storage medium | |
CN110443804B (en) | Resampling tampering identification method and device for JPEG image and computer equipment | |
Kamble et al. | No reference noise estimation in digital images using random conditional selection and sampling theory | |
CN103020908B (en) | The method and apparatus of image noise reduction | |
CN113569713A (en) | Stripe detection method and device for video image and computer readable storage medium | |
CN113744294A (en) | Image processing method and related device | |
CN111083359B (en) | Image processing method and apparatus, electronic device, and computer-readable storage medium | |
CN112966639A (en) | Vehicle detection method and device, electronic equipment and storage medium | |
Lukin et al. | DCT-based color image denoising: Efficiency analysis and prediction |
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 | ||
CP02 | Change in the address of a patent holder | ||
CP02 | Change in the address of a patent holder |
Address after: 7, 9-12 / F, Zhujiang Yide building, 362 Dongfeng Middle Road, Yuexiu District, Guangzhou, Guangdong 510000 Patentee after: DIGITAL GUANGDONG NETWORK CONSTRUCTION Co.,Ltd. Address before: 510300 room 230, building 14, No. 788, Guangzhou Avenue South, Haizhu District, Guangzhou City, Guangdong Province Patentee before: DIGITAL GUANGDONG NETWORK CONSTRUCTION Co.,Ltd. |