CN104796726B - A kind of method of detection image compression vestige - Google Patents

A kind of method of detection image compression vestige Download PDF

Info

Publication number
CN104796726B
CN104796726B CN201510171256.3A CN201510171256A CN104796726B CN 104796726 B CN104796726 B CN 104796726B CN 201510171256 A CN201510171256 A CN 201510171256A CN 104796726 B CN104796726 B CN 104796726B
Authority
CN
China
Prior art keywords
image
quality factor
matrix
compression
similarity
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.)
Expired - Fee Related
Application number
CN201510171256.3A
Other languages
Chinese (zh)
Other versions
CN104796726A (en
Inventor
牛少彰
韩洪立
李叶舟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing University of Posts and Telecommunications
Original Assignee
Beijing University of Posts and Telecommunications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing University of Posts and Telecommunications filed Critical Beijing University of Posts and Telecommunications
Priority to CN201510171256.3A priority Critical patent/CN104796726B/en
Publication of CN104796726A publication Critical patent/CN104796726A/en
Application granted granted Critical
Publication of CN104796726B publication Critical patent/CN104796726B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of method of detection image compression vestige, belong to technical field of image processing, solve the technical problem that can not quickly, accurately detect the compression vestige by the image of multiple JPEG compression.The method of detection image compression vestige includes:Obtain the first image and its first quality factor used in current compression;Processing is compressed to the first image using the second quality factor, obtains the second image, the second quality factor is less than the first quality factor;Processing is compressed to the second image using the first quality factor, obtains the 3rd image;Judge whether the similarity of the 3rd image and the first image reaches default similarity, wherein, if the similarity for determining the 3rd image and the first image reaches default similarity, the first image is understood before by the first quality factor compression processing, has first passed through the compression processing of the second quality factor.The present invention is applied to the tampering detection of image detection, particularly image.

Description

A kind of method of detection image compression vestige
Technical field
The present invention relates to technical field of image processing, specifically, is related to a kind of method of detection image compression vestige.
Background technology
To digital photos distort operation can all change its characteristic attribute substantially, this cause to distorted image evidence obtaining turn into can Can, method is also not quite similar.Have currently for distorted image evidence obtaining main direction of studying based on the direction of illumination in digital photos With the inconsistency research of project objects, the research based on camera parameter characteristics, based on the inconsistent characteristic of digital photos Scene Research etc..Distorted image evidence obtaining skill based on dual JPEG (Joint Photographic Experts Group) compressions Art also has made great progress, and is still needed to greatly specific to the forensic technologies of distorting of low quality factors jpeg image on network at present Quantifier elimination works, and also has great significance.
In fact, many photos, picture on network typically can all be compressed for the convenient needs propagated on network The jpeg image relatively low into quality factor, and at the same time, image processing software widely use so as to image modification, Distort etc. simpler easy.After some interpolaters obtain these pictures for some improper purposes from network, warp Cross after purposefully distorting and be published to again on network.Because the jpeg format image obtained from network has already been through compression, Quality factor is typically relatively low, and interpolater is usurped to not influence image visual effect by image progress local content Often preservation can be compressed to it with of a relatively high quality factor after changing.As a whole, jpeg image is entirely distorting process In often introduce the weight contracting of uncertain number.This also causes many for the dual JPEG compression feature of tampered image to enter The method of the further distorted image detection of row receives serious limitation.
Inventor is had found under certain condition, if can completely finds image and undergone successively on the basis of many experiments The compression vestige crossed, it can be recovered with the approximation carried out progressively by the image of multiple JPEG compression to some, to reduce its phase To original state.Therefore, how quickly, accurately detect turns into problem by the compression vestige of the image of multiple JPEG compression It is crucial.
The content of the invention
It is an object of the invention to provide a kind of method of detection image compression vestige, to solve quickly, accurately to examine Survey the technical problem of the compression vestige by the image of multiple JPEG compression.
The invention provides a kind of method of detection image compression vestige, this method includes:
Obtain the first image and its first quality factor used in current compression;
Processing is compressed to the first image using the second quality factor, obtains the second image, the second quality factor is less than First quality factor;
Processing is compressed to the second image using the first quality factor, obtains the 3rd image;
Judge whether the similarity of the 3rd image and the first image reaches default similarity, wherein, if determining the 3rd figure The similarity of picture and the first image reaches default similarity, then understands the first image by the compression processing of the first quality factor Before, it have passed through the compression processing of the second quality factor.
Wherein, processing is compressed to the first image using the second quality factor, before obtaining the second image, in addition to:
The first quantization matrix corresponding to the first quality factor is obtained, determines the acquisition rule of the first quantization matrix.
Wherein, processing is compressed to the first image using the second quality factor, obtaining the second image includes:
According to the acquisition of identified first quantization matrix rule, obtain corresponding second quality factor second quantifies square Battle array;
Using the second quantization matrix, processing is compressed to the first image, obtains the second image.
Wherein, processing is compressed to the first image using the second quality factor, obtaining the second image includes:
Processing is compressed to the first image respectively using several second quality factors, obtains several the second images.
Wherein, judge whether the similarity of the 3rd image and the first image reaches default similarity and include:
The matrix of differences of the discrete cosine transform coefficient between the first image and each second image is calculated, it is poor as each first Value matrix;
The matrix of differences of the discrete cosine transform coefficient between each second image and corresponding 3rd image is calculated, as each Second matrix of differences;
The error amount of each first matrix of differences and corresponding second matrix of differences is calculated, and obtains each error amount sum;
The error amount of one first matrix of differences and corresponding second matrix of differences is obtained, judges itself and each error amount sum Whether ratio is less than preset value.
Wherein, judge whether the similarity of the 3rd image and the first image reaches default similarity and include:
Obtain the dct coefficient matrix of the first image and the 3rd image;
Judge in two dct coefficient matrix coefficients, whether nonzero coefficient identical ratio is more than default ratio Example.
Wherein, the first image and the second image are jpeg format.
Wherein, the preset value is 0.003 to 0.01.
Wherein, the preset ratio is 95%.
Present invention offers following beneficial effect:Disclosed in the embodiment of the present invention detection image compression vestige method be Based on the quantization error uniformity of the first image and the 3rd image come what is detected, can be quickly detected from experienced by small arrogant Quality factor compression the first image compression vestige, and simple to operate, accuracy rate is high.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification Obtain it is clear that or being understood by implementing the present invention.The purpose of the present invention and other advantages can be by specification, rights Specifically noted structure is realized and obtained in claim and accompanying drawing.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, required in being described below to embodiment Accompanying drawing does simple introduction:
Fig. 1 is the schematic flow sheet of the method for detection image compression vestige provided in an embodiment of the present invention;
Fig. 2 is quantization error uniformity schematic diagram provided in an embodiment of the present invention;
Fig. 3 is I provided in an embodiment of the present invention3With I1DCT coefficient matching degree schematic diagram;
Fig. 4 (a) to (d) is the quantization error consistency detection result signal of compressed images provided in an embodiment of the present invention Figure;
Fig. 5 is original image schematic diagram provided in an embodiment of the present invention;
Fig. 6 is tampered image schematic diagram provided in an embodiment of the present invention;
Fig. 7 is tampered image block positioning schematic diagram provided in an embodiment of the present invention;
Fig. 8 is the enlarged diagram of the tampered image block in Fig. 7;
Fig. 9 is the schematic diagram of the tampered region in Fig. 8;
Figure 10 (a) to (b) is the schematic diagram of the testing result of tampered image;
Figure 11 is difference schematic diagram of each image block with the DCT coefficient of corresponding quantization matrix of location window.
Embodiment
Embodiments of the present invention are described in detail below with reference to drawings and Examples, and how the present invention is applied whereby Technological means solves technical problem, and the implementation process for reaching technique effect can fully understand and implement according to this.Need to illustrate As long as not forming conflict, each embodiment in the present invention and each feature in each embodiment can be combined with each other, The technical scheme formed is within protection scope of the present invention.
The embodiments of the invention provide a kind of method of detection image compression vestige, as shown in figure 1, this method includes:
Step S101, the first image and its first quality factor used in current compression are obtained.
For the compressed encoding of image, the first step of compression is needed image separation into many fritters, and will be every Individual fritter enters line translation, is allowed to be for conversion into time-domain signal by spatial domain signal.The conversion of this spatial domain to time domain uses 8*8's more Discrete cosine transform (Discrete Cosine Transform, abbreviation DCT).After dct transform, 8*8 spatial domain pixel square Battle array is for conversion into 8*8 frequency-region signal matrix, i.e. DCT coefficient matrix.
Then corresponding quantization matrix by different acquisition rules, can be transferred according to the quality factor needed for compression To carry out computing to the DCT coefficient matrix of image, obtain the DCT coefficient matrix of the image after compression processing.
Therefore, in the first quality factor used in the first image of acquisition, current compression, the first quality factor should also be obtained Corresponding first quantization matrix, to determine the acquisition of the first quantization matrix rule, prepared for ensuing detecting step.
For convenience of description, the embodiment of the present invention illustrates so that the picture after compressing processing is jpeg format as an example.This Jpeg image mass parameter is defined as 1-20 in inventive embodiments, respectively corresponding mass factor 5%-100%, 20 corresponding to note Individual quantization matrix is Q1,Q2,…,Q20.Now, the first quantization matrix can be Q2,Q3,…,Q20In any one.
Step S102, processing is compressed to the first image using the second quality factor, obtains the second image, the second mass The factor is less than the first quality factor.
Second quality factor for being less than the first quality factor is determined, first quantization matrix determined by obtains afterwards Rule is taken, the second quantization matrix of corresponding second quality factor is obtained, processing is compressed to the first image.
Obviously, the number of larger, less than the first quality factor the second quality factor of value in the first quality factor is more When, several second quality factors can be also extracted simultaneously, obtain the second quantization matrix corresponding to each second quality factor, it is right respectively First image is compressed processing, obtains several the second images.Detected simultaneously using multiple second quality factors, to carry The efficiency of high detection.
Step S103, processing is compressed to the second image using the first quality factor, obtains the 3rd image.
In order to detect the first image before processing is compressed using the first quality factor, if having passed through the second mass The compression processing of the factor.The embodiment of the present invention is compressed processing again to the second image, obtains the 3rd image.
Step S104, judge whether the similarity of the 3rd image and the first image reaches default similarity.
Wherein, if the similarity for determining the 3rd image and the first image has reached default similarity, the first figure is understood Compression processing as before by the first quality factor compression processing, have passed through the second quality factor.Otherwise, if can not judge It is identical to the 3rd image and the first image, it may be possible to which that the first image is merely through first compression;Or first image in the first matter Before the amount factor is compressed, quality factor used in the compression undergone is more than the first quality factor, therefore can not detect.
Specifically, when the number of the second acquired quality factor is more, can in order to improve the accuracy of testing result By calculating the matrix of differences of the discrete cosine transform coefficient between the first image and each second image, as each first difference square Battle array;Meanwhile the matrix of differences of the discrete cosine transform coefficient between each second image and corresponding 3rd image is calculated, as each Second matrix of differences;Afterwards, the error amount of each first matrix of differences and corresponding second matrix of differences is calculated, and obtains each error It is worth sum;Finally, obtain the error amount of one first matrix of differences and corresponding second matrix of differences, judge itself and each error amount it Whether the ratio of sum be less than preset value (such as arbitrary value in 0.003-0.01), so as to judge the 3rd image and the first image Similarity whether reach default similarity.
Or if only one second quality factor of acquisition participates in image procossing, it can pass through and obtain the first image and the 3rd image Dct coefficient matrix;Judge in two dct coefficient matrix coefficients, nonzero coefficient identical ratio Whether preset ratio (such as more than 95%) is more than, so as to judge whether the similarity of the 3rd image and the first image reaches pre- If similarity.Wherein, the identical numerical value for meaning nonzero coefficient of nonzero coefficient and its in dct coefficient matrix Position all same.
It should be noted that the preset value and preset ratio in the embodiment of the present invention are all according to abundant experimental results institute The empirical value of selection.The two values can suitably be adjusted when actually detected, to obtain more accurate testing result, reach optimal Detection results.
Therefore, the method for the detection image compression vestige disclosed in the embodiment of the present invention is to be based on the first image and the 3rd figure The quantization error uniformity of picture can be quickly detected from experienced the first of quality factor compression from small to large come what is detected The compression vestige of image, and it is simple to operate, accuracy rate is high.
Hereinafter, the theoretical foundation of quantization error uniformity of the present invention will be briefly described:
In order to be illustrated to quantization error uniformity, it might as well assume that original BMP images I carries out what is obtained after dct transform DCT coefficient matrix is I_org, and original image I DCT coefficient matrix I_org is carried out operating below respectively.
First, by original image I_org quantization matrixesIt is compressed and preserves, obtains image I1(jpeg format).
Then, by original image I_org quantization matrixesAfter being compressed and preserving, then use quantization matrixTo it JPEG compression preservation is carried out, obtains undergoing the image I of dual JPEG compression2(jpeg format).
In the embodiment of the present invention, undergo first small rear big quality factor compression this case only for image and illustrate, Here there is αk< αk+1.By image I2Use quantization matrixCarry out third time compression and obtain image I3, for image I3Any one 8 The DCT quantization parameter matrixes (i, j) (i, j=1,2 ..., 8) of × 8 transform blocks (being illustrated here with 8 × 8 conventional piecemeals) In any value V (i, j) situations below should be met:
If set in formula (1)Wherein λ is integer part, and Δ is fractional part, is to be more than or equal to Zero number.N=0,1,2,3 ... representCoefficient value, value depends on original image I.δ in formula (1)1It is image I1When (jpeg format) de-compresses into BMP format-patterns, gray value data is rounded, and more than 255 part values For DCT coefficient that dct transform obtains is carried out after 255 processing again compared to I1DCT coefficient between error amount.
It is and then above formula (1) abbreviation is as follows:
Can be as follows by formula (2) further abbreviation:
To in (3) formulaIndividually studied, for convenience of description, introduce new parameter, Δ ', Formula (4) is then readily obtained, it is as follows:
For further easy analysis, the transposition of (4) formula can be obtained,
Formula (5) is substituted into formula (3), then there is formula (6) establishment.
(6), which are arranged, to be obtained,
When analyzing (7) formula, formula (8) establishment might as well be first set, the reasonability of the formula will hereinafter be said It is bright.
Now, it is contemplated that αk< αk+1, thereforeSet up, then have:
If 1. Δ=0, by αk< αk+1Know λ >=2 and be integer, then
If 2. 0 < Δs < 1,Then
From above formula (9), (10), in αk< αk+1In the case of when, if having formula (8) establishment, have to formula (7)Therefore image I3(jpeg format) should be with I1(jpeg format) is identical.
For convenience of description, unify I, I here1、I2、I3、Δ、Δ1、Δ2It is interpreted as Image DCT coefficient matrix.Such as Fig. 2 It is shown, image I1Quantified matrixCompression is transformed into I2During the DCT coefficient error amount (or noise) that introduces should be with I2Through Quantization matrixCompression is transformed into I1Caused by error it is equal.
In Fig. 2Represent the quantified matrixes of image IIt is compressed into image I1Caused DCT coefficient error matrix is Δ. Equally,Represent to be same as above corresponding relation.Then there is relationship below establishment in Fig. 2 in each expression formula.
From (11) formula, Image DCT system errors matrix Δ1=-Δ2.Therefore, image is by I1Quantified matrixPressure Contracting is changed into I2With image by I2Quantified matrixCompression is changed into I3(or I1) caused by error matrix opposite number (the two each other Sum is zero) error matrix Δ1、Δ2With uniformity.This also just illustrates the reasonability of quantization error consistency algorithm.
To be illustrated to above formula (8), parameter δ is first discussed1
αk< αk+1When, haveSet up (having been explained in formula (9), (10)), to set up formula (8), Ying You:
Introduce parameterAnd
The solution for easily seeking formula (12) is δ1< θ and δ1> θ '.
θ can be soughtmin=1/2, θ 'max=-1/2.Then as | δ1| < θmin=| θ 'max| there must be formula (8) establishment when=1/2.Should Establishment condition does not cover whole situations as abundant unnecessary condition.In addition, it is necessary to illustrate Two Person in rare cases can be equal, and the difference of general the former with the latter is at least above 1.Simultaneously because the position of the two equal appearance DCT high frequency components are typically in, and the DCT high fdrequency components of most of transform block are zero.Here what is proved is stringent condition, Even if the two it is equal also have as a rule formula (8) establishment.
Parameter δ is discussed from actual angle1.In order to better illustrate, 50 groups of original images are chosen from " CASIA " database Data are tested.Raw image data is compressed into image I respectively by top-operation process1With image I2
α in Fig. 3kRepresent image I2Numbered corresponding to the preceding quantization matrix once undergone, αk+1Represent I2The amount currently undergone Change and numbered corresponding to matrix.To I2Use quantization matrixImage I is obtained after carrying out data recovery3.Count I1With I3DCT coefficient Equal part (removes I during statistics1With I3In be zero DCT coefficient part) proportion.It is flat that 50 pictures are carried out with statistics , statistical result is as shown in figure 3, dashed-triangular area is I in figure2Statistics knot after experience is first small during big quality factor compression Fruit, the region can be analyzed and learn I from Fig. 31With I3DCT coefficient it is essentially identical, this also just experimentally demonstrate to experience It is first it is small after the image of big quality factor compression carry out the feasibility of data recovery.First big after small quality factor is undergone for image The situation of compression does not apply to the method.
More than, for the theoretical foundation of the method for detection image provided in an embodiment of the present invention compression vestige.
For the 20 quantization matrix Q used in text1,Q2,…,Q20If original image I0(BMP forms) is quantified successively Matrix1< α2< ... < αm, m is to I0The total degree being compressed) compression and preservation after obtain it is to be checked Altimetric image I (jpeg format).
The substantially step of detection method provided in an embodiment of the present invention based on quantization error uniformity is as follows:
First, the quantization matrix that image to be detected I currently undergoes can be obtainedImage I is used into quantization matrix respectivelyIt is compressed and preserves, obtained image is designated asRespectively calculate I DCT coefficient matrix withDCT coefficient matrix matrix of differences, be designated as
Then, the image that will be obtainedUse quantization matrixIt is compressed and preserves, obtained image It is designated asIt is corresponding to calculateWithMatrix of differences, be designated as
Finally, need to findIn degree highest image close with I gray value data, detailed process is such as Under:
Each quantization error matrix is calculated respectivelyAndIn each coefficient absolute value it Be designated as respectivelyAndAnd seek each corresponding differenceIt is designated as
Now, it is only necessary to findIn minimum value, image corresponding to the minimum value be and original graph As the close degree highest image of I gray value datas.For each σk(1≤k≤αm- 1), calculateHerein Threshold T h=3 ‰ is set, if r≤Th once undergoes quantization matrix Q before can determine that imagek(k=αm-1) compression, otherwise examine Survey and terminate.Wherein Th=3 ‰ can suitably adjust this threshold value when actually detected as empirical value, more accurate to obtain Testing result, reach optimal Detection results.Again by Ik(k=αm-1, m > 1) and it is above-mentioned as new image to be detected I repetitions Detecting step, until detect whole compression vestiges.
By taking image " lena " (256 × 256, bmp form) as an example, successively with quantization matrix Q4、Q7、Q8、Q9(corresponding mass The factor is followed successively by 20%, 35%, 40%, 45%) image is compressed, and with quantifying error consistency algorithm to compression Image " lena " afterwards is detected.
Abscissa represents corresponding quantization matrix in Fig. 4 (a) to (d), and ordinate represents DCT coefficient error amount.Specifically, Fig. 4 (a) is that to image " lena " progress after compression, testing result, abscissa 1-8 are corresponding first using error consistency is quantified Ordinate value be followed successively by(being consistent with variable declarations above), abscissa are the multiple points difference drawn at 9 It correspond toTwo groups of DCT coefficient error amounts are corresponded into line, two ends connected in Fig. 4 (a) close to horizontal linear Quantization matrix corresponding to point is the compression vestige detected, wherein right side is the current quantization matrix of the image detected, left side For the quantization matrix once compressed to image before being found by quantifying error consistency.Remaining each Fig. 4 (b) to (d) It is similar.With reference to Fig. 4 (a) to (d) testing result, it can learn that image have passed through Q successively4、Q7、Q8、Q9The pressure of quantization matrix Contracting, testing result are consistent with the fact.
Further, the method that the embodiment of the present invention is provided can be used for whether detection picture occurred to distort.Specifically such as Under:
Part is carried out to Fig. 5 original images " travel " (400 × 296, jpeg format) to distort, and is added one " traveller " Image (jpeg format), the quality factor of this " traveller " image is unknown, wouldn't know local tampered image block whether with it is original The dct transform Grid Align of image.The original quality factor in Fig. 5 is P=45% (i.e. by quantization matrix Q9Compression), figure 5 be tampered image.Assuming that uploading to network because interpolater does not know the preservation of number, and after distorting introduces server Automatic compression, all in all uncertain weight of big quality factor it may be contracted after first small.The embodiment of the present invention In, to using quantization matrix Q successively again after tampered image12,Q13,Q14,Q15It is compressed.
Detection process is will be apparent from below:
First, it need to quickly determine that image have passed through the multiple JPEG compression of what kind of first small rear big quality factor, specific mistake Journey is as follows:
1) can be detected respectively from three R (Red), G (Green), B (Blue) passages for colored picture to be checked, this In illustrated by taking R passages as an example.Image is integrally detected using error consistency algorithm is quantified, determines that image local is usurped Change after completing and experienced the compression of what kind of first small rear big quality factor.
2) some (such as 3 × 3 deciles) impartial piecemeals are divided the image into, quantization error consistency detection is carried out to each piece, Obtain Multiple Compression testing result.
3) quantization error consistency detection result and the detection of each piecemeal after image equalization piecemeal of entire image are analyzed As a result, the process of distorted image is determined with this, and primarily determines that tampered image block.
4) piecemeal detection is carried out again to identified tampered image block, become more meticulous detection range, repeats 2)~4) step, Complete the detection and localization of tampered region in tampered image block.
During above, when carrying out piecemeal to tampered image, piecemeal is more, and corresponding testing result is relatively finer, but It is to take also can accordingly increase.Typically by first big piecemeal coarse localization tampered image block, after carried out by small piecemeal it is fine Detection, it is all relatively preferable in detection time and the degree of accuracy.
Below as it is above-mentioned 1)~4) detecting step original image " travel " tampered image (Fig. 6) is carried out it is specific Detection process.
1. the gray value data of tampered image R passages is extracted, in order to improve detection speed.The tampered image is carried out 3 × 3 piecemeals, from left to right it is labeled as 1-9 successively from top to bottom.Fig. 5 can regard the R passage gray-scale maps of image as, and 3 are carried out to Fig. 5 After × 3 piecemeals, quantization error consistency detection is carried out to each piecemeal and analyzes testing result, Primary Location suspicious region, Testing result is as shown in table 1.
Test position Testing result
Entire image Q15、Q14、Q13、Q12
1 piecemeal Q15、Q14、Q13、Q12、Q9
2 piecemeals Q15、Q14、Q13、Q12、Q9
3 piecemeals Q15、Q14、Q13、Q12、Q9
4 piecemeals Q15、Q14、Q13、Q12、Q9
5 piecemeals Q15、Q14、Q13、Q12、Q9
6 piecemeals Q15、Q14、Q13、Q12、Q9
7 piecemeals Q15、Q14、Q13、Q12、Q9
8 piecemeals Q15、Q14、Q13、Q12
9 piecemeals Q15、Q14、Q13、Q12、Q9
Table 1
From the analysis of table 1, other piecemeals are different from the heavy compressed detected vestige that the 8th piecemeal of tampered image occurs Detected compression vestige, and the Multiple Compression and original image Multiple Compression detection vestige one detected in the 8th piecemeal Cause.It is 45% (Q that analysis, which understands that original image have passed through quality factor,9) compression, one is locally distorted in original image afterwards After image block, it is 60% (Q to have carried out quality factor to entirety12) compression it is follow-up have passed through successively again quality factor for 65%, 70%th, 75% three second compressions.As being the Primary Location detection figure to tampered image block in Fig. 7.
2. being accurately positioned tampered region (as shown in Figure 8), i.e., the oriented tampered image block of previous step is carried out further Piecemeal, so as to finely positioning tampered region.
According to the compression vestige detected, in order to reduce the amount of calculation detected using error consistency is quantified, improve Accuracy of detection, data recovery process first can be carried out according to dct transform grid to tampered image block.By image data restoration to firm warp It is 60% (Q to cross quality factor12) state after compression, it is consistent that comprehensive quantization error is compared to image according to 8 × 8 piecemeals Property detection.In detection process, will can't detect and previous pass through quality factor is 45% (Q9) compression 8 × 8 piecemeals mark into Black.As shown in Figure 9.
It will be seen from figure 9 that 8 × 8 image blocks comprising tampered region are all marked as black substantially, without distorting Region have the less part by flase drop.Because interpolater is meaningful to distorting for image and limited, typically find Distort the region for comparing concentration.
After tampered region has been accurately positioned, complete detection can be carried out to oriented tampered region:
After it have found the compression vestige of image experience, by carrying out Q successively to tampered region14,Q13,Q12Quantization matrix Compression, can be progressively to carry out data recovery to these tampered regions, can be by image data restoration to just passing through after distorting Cross quantization matrix Q12State after compression.Sliding window detection is carried out to oriented tampered image block, to determine tampered image block The aligned position of quality factor and dct transform grid.
Figure 10 (a) is testing result when not carrying out image data restoration, and Figure 10 (b) is after image carries out data recovery Testing result.Figure 10 (a) and 10 (b) are contrasted it can be found that existing in 64 slide positions corresponding in Figure 10 (b) One and quality factor are 25% (Q5) have closely related " valley point ", and the detection feature unobvious in Figure 10 (a), it is difficult to Make similar judgement.This also illustrates detected again after carrying out progressively data recovery to image to be detected to a certain extent Relatively good testing result can be obtained.Meanwhile according to the related conclusions of prior art, may infer that the piecemeal is tampered image Block, the quality factor of tampered image block is 25%.
To determine the DCT Grid Aligns position of tampered image block, by different curves in Figure 10 (b) in Q5Error corresponding to point Value is compared to each other, and using DCT coefficient difference corresponding to image block as ordinate, numbering is as horizontal corresponding to each image block Coordinate, become by finding " valley point " of distribution curve to position the local tampered image block DCT coefficient being inserted into original image The aligned position (location window of 8 × 8 sizes being have chosen in detection process, so sharing 64 image blocks) of draping lattice.
By to 64 image blocks in location window in Q5Under DCT coefficient quantization error comparison, can be with from Figure 11 It was found that there is an obvious drop point at " 61 " place, 1 row 4 that this point correspond in table 2 arranges, that is to say, that office in image The column alignment of 1 row 4 of the DCT coefficient conversion grid for the image block that portion is distorted and original image DCT coefficient conversion grid.
Table 2
The embodiment of the present invention analyzes on network the characteristics of jpeg images that some are tampered, low quality factors, and On the basis of existing dual JPEG compression etection theory analyze and summarized, undergone for tampered image first small rear big Quality factor compresses this situation and proposes multiple JPEG compression detection scheme, achieves preferable Detection results.View data The it is proposed that approximation recovers thought causes image can not use some existing jpeg image tampering detections after it have passed through Multiple Compression Algorithm detects or the situation of Detection results difference is improved to a certain extent.
While it is disclosed that embodiment as above, but described content only to facilitate understand the present invention and adopt Embodiment, it is not limited to the present invention.Any those skilled in the art to which this invention pertains, this is not being departed from On the premise of the disclosed spirit and scope of invention, any modification and change can be made in the implementing form and in details, But the scope of patent protection of the present invention, still should be subject to the scope of the claims as defined in the appended claims.

Claims (9)

  1. A kind of 1. method of detection image compression vestige, it is characterised in that including:
    Obtain the first image and its first quality factor used in current compression;
    Processing is compressed to the first image using the second quality factor, obtains the second image, the second quality factor is less than first Quality factor;
    Processing is compressed to the second image using the first quality factor, obtains the 3rd image;
    Judge whether the similarity of the 3rd image and the first image reaches default similarity, wherein, if determine the 3rd image and The similarity of first image reaches default similarity, then understands the first image before by the first quality factor compression processing, It has passed through the compression processing of the second quality factor, the similarity of the 3rd image and the first image is based on described first image and the The matrix of differences of discrete cosine transform coefficient between two images and between second image and the 3rd image, or, it is described The dct coefficient matrix of 3rd image and the first image, it is determined that the 3rd image and the first image similar journey Degree, similarity of the default similarity between the 3rd image set in advance and the first image.
  2. 2. according to the method for claim 1, it is characterised in that place is compressed to the first image using the second quality factor Reason, before obtaining the second image, in addition to:
    The first quantization matrix corresponding to the first quality factor is obtained, determines the acquisition rule of the first quantization matrix.
  3. 3. according to the method for claim 2, it is characterised in that place is compressed to the first image using the second quality factor Reason, obtaining the second image includes:
    According to the acquisition of identified first quantization matrix rule, the second quantization matrix for corresponding to the second quality factor is obtained;
    Using the second quantization matrix, processing is compressed to the first image, obtains the second image.
  4. 4. according to the method described in any one of claims 1 to 3, it is characterised in that using the second quality factor to the first image Processing is compressed, obtaining the second image includes:
    Processing is compressed to the first image respectively using several second quality factors, obtains several the second images.
  5. 5. according to the method for claim 4, it is characterised in that judge whether the similarity of the 3rd image and the first image reaches Include to default similarity:
    The matrix of differences of the discrete cosine transform coefficient between the first image and each second image is calculated, as each first difference square Battle array;
    The matrix of differences of the discrete cosine transform coefficient between each second image and corresponding 3rd image is calculated, as each second Matrix of differences;
    The error amount of each first matrix of differences and corresponding second matrix of differences is calculated, and obtains each error amount sum;
    The error amount of one first matrix of differences and corresponding second matrix of differences is obtained, judges its ratio with each error amount sum Whether preset value is less than.
  6. 6. the method according to claims 1 to 3, it is characterised in that judging the similarity of the 3rd image and the first image is It is no to reach default similarity and include:
    Obtain the dct coefficient matrix of the first image and the 3rd image;
    Judge in two dct coefficient matrix coefficients, whether nonzero coefficient identical ratio is more than preset ratio.
  7. 7. according to the method for claim 1, it is characterised in that
    First image and the second image are jpeg format.
  8. 8. according to the method for claim 5, it is characterised in that
    The preset value is 0.003 to 0.01.
  9. 9. according to the method for claim 6, it is characterised in that
    The preset ratio is 95%.
CN201510171256.3A 2015-04-10 2015-04-10 A kind of method of detection image compression vestige Expired - Fee Related CN104796726B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510171256.3A CN104796726B (en) 2015-04-10 2015-04-10 A kind of method of detection image compression vestige

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510171256.3A CN104796726B (en) 2015-04-10 2015-04-10 A kind of method of detection image compression vestige

Publications (2)

Publication Number Publication Date
CN104796726A CN104796726A (en) 2015-07-22
CN104796726B true CN104796726B (en) 2018-02-02

Family

ID=53561181

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510171256.3A Expired - Fee Related CN104796726B (en) 2015-04-10 2015-04-10 A kind of method of detection image compression vestige

Country Status (1)

Country Link
CN (1) CN104796726B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110910380B (en) * 2019-11-29 2022-09-20 绿盟科技集团股份有限公司 Detection method and device for synthesized picture
CN111954000B (en) * 2020-07-07 2021-04-27 广西交通设计集团有限公司 Lossless compression method for high-speed toll collection picture set

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102413328A (en) * 2011-11-11 2012-04-11 中国科学院深圳先进技术研究院 Double compression detection method and system of joint photographic experts group (JPEG) image
CN102903100A (en) * 2012-09-06 2013-01-30 宁波大学 Detection method for digital photo image compression history
CN102957915A (en) * 2012-11-15 2013-03-06 西安理工大学 Double JPEG (Joint Photographic Experts Group) compressed image-targeted tempertamper detection and tempertamper locating method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4810088B2 (en) * 2004-12-17 2011-11-09 キヤノン株式会社 Image processing apparatus, image processing method, and program thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102413328A (en) * 2011-11-11 2012-04-11 中国科学院深圳先进技术研究院 Double compression detection method and system of joint photographic experts group (JPEG) image
CN102903100A (en) * 2012-09-06 2013-01-30 宁波大学 Detection method for digital photo image compression history
CN102957915A (en) * 2012-11-15 2013-03-06 西安理工大学 Double JPEG (Joint Photographic Experts Group) compressed image-targeted tempertamper detection and tempertamper locating method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
多重JPEG压缩图像的压缩痕迹检测;韩洪立等;《应用科学学报》;20141130;第596-604页 *

Also Published As

Publication number Publication date
CN104796726A (en) 2015-07-22

Similar Documents

Publication Publication Date Title
CN108052980B (en) Image-based air quality grade detection method
CN104243973B (en) Video perceived quality non-reference objective evaluation method based on areas of interest
CN109325550B (en) No-reference image quality evaluation method based on image entropy
CN105049851B (en) General non-reference picture quality appraisement method based on Color perception
CN103559696B (en) A kind of image interfusion method based on compressed sensing
Okarma Combined image similarity index
CN113205051B (en) Oil storage tank extraction method based on high spatial resolution remote sensing image
CN107959848A (en) Universal no-reference video quality evaluation algorithms based on Three dimensional convolution neutral net
CN108053396A (en) A kind of more distorted image quality without with reference to evaluation method
CN104574424B (en) Based on the nothing reference image blur evaluation method of multiresolution DCT edge gradient statistics
CN104796726B (en) A kind of method of detection image compression vestige
Dimauro A new image quality metric based on human visual system
CN110717892B (en) Tone mapping image quality evaluation method
CN102903100A (en) Detection method for digital photo image compression history
CN108513132A (en) A kind of method for evaluating video quality and device
CN106331730A (en) Double-compression detection method by using quantification factor same as H.264 video
George et al. A survey on full reference image quality assessment algorithms
CN107147909B (en) Variance-based recompression JPEG image original quantization step length estimation method
Fu et al. Screen content image quality assessment using Euclidean distance
CN110223273B (en) Image restoration evidence obtaining method combining discrete cosine transform and neural network
CN103796017B (en) Image discriminating device and method
CN106875383B (en) Content insensitive fuzzy image quality evaluation method based on Weibull statistical characteristics
CN106375773B (en) Altering detecting method is pasted in frame duplication based on dynamic threshold
CN104899893A (en) Image quality detection method based on vision attention
Li et al. Providing a desired quality of BPG compressed images for FSIM metric

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180202

CF01 Termination of patent right due to non-payment of annual fee