CN101674389B - Method for testing compression history of BMP image based on loss amount of image information - Google Patents
Method for testing compression history of BMP image based on loss amount of image information Download PDFInfo
- Publication number
- CN101674389B CN101674389B CN200910187789A CN200910187789A CN101674389B CN 101674389 B CN101674389 B CN 101674389B CN 200910187789 A CN200910187789 A CN 200910187789A CN 200910187789 A CN200910187789 A CN 200910187789A CN 101674389 B CN101674389 B CN 101674389B
- Authority
- CN
- China
- Prior art keywords
- image
- bmp
- jpeg
- compression
- loss amount
- 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
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
Abstract
The invention relates to a method for testing the compression history of a BMP image based on the loss amount of image information, belonging to the technical field of signal and information processing. The method is characterized by comprising the steps of: under the condition of only obtaining a digital image, cutting the BMP image to be tested into 4 rows and 4 lines; evaluating an original image; compressing the image to be tested and the evaluated original image into two JPEG images, the quality factor of which is 100; extracting the characteristic by comparing the loss amount of the image information of the two JPEG images; and testing the compression history of the large quantities of the images with a Fisher linear classifier in a classifying way, or judging the compression history of the single BMP image with original compression quality factor by means of threshold value segmentation. The method can exactly identify and prove the compression history of the many or single BMP image(s). The method is applicable to the field of information security.
Description
Technical field
The invention belongs to the Signal and Information Processing technical field, relate to and detect the historical digital image evidence collecting method of BMP (bitmap) image compression.
Background technology
Mainly containing two kinds of methods at present detects the compression histories of BMP image.A kind of blocking effect that is produced by JPEG (Joint Photographic Experts Group) compression that is based on is carried out the historical algorithm that detects of BMP image compression.If people such as Fan propose in " Identification of bitmap compression history:JPEGdetection and quantizer estimation " before the width of cloth BMP image not through the JPEG compression; Then the margin of image element between the piece should be close; Otherwise margin of image element then can be because of the blocking effect of JPEG compression difference, utilize compression histories that this Characteristics Detection goes out the BMP image afterwards the maximum principle of similitude also capable of using estimate original quantum step.Although the method in the literary composition has obtained a reasonable testing result; But this method computational complexity is bigger; And along with the increase of compression quality factor; Can not judge that the probability that whether process JPEG compresses before the BMP image becomes big, especially after the factor of quality is greater than 95, because the not obvious algorithm detection accuracy rate that causes of blocking effect sharply descends.Another kind of typical method is based on the detection method of Benford rule.2007, people such as Fu found that through a large amount of experiments first position effective digital of the JPEG coefficient of the jpeg image that single compresses meets broad sense Benford rule and distributes.The Benford rule is a formula commonly used in the economics.People such as Fu utilize this distribution character of the first significant digits of JPEG coefficient to classify through SVM (Support Vector Machine) grader in " A generalized Benford ' s law for JPEG coefficients and itsapplications in image forensics " literary composition can detect the BMP image before whether through the JPEG compression, and the rough estimate original compression factor of quality.In the literary composition experimental result show the method in the original compression factor of quality up to 99 o'clock, detect accuracy rate and still can reach 100%.But the application of Benford rule has a lot of restrictive conditions, like data the restriction of maximum and minimum value can not be set, and numerical value is change continuously in a very wide scope, and neither completely random is concentrated etc. only degree.Though therefore this kind method has reached very high accuracy rate in the experiment of document; But these restrictive conditions make the use of this method that certain limitation arranged; Like image such as the single image of tone such as large stretch of blue sky, greenery patches and do not meet this rule, picture size hour also can be influential.
Summary of the invention
The technical problem that the present invention will solve provides a kind ofly carries out the method that the JPEG compression histories detects to single width or large quantities of BMP image.
Technical scheme of the present invention is following:
1.JPEG compression is to the influence of image JPEG coefficient
Image is called the JPEG coefficient through the DCT coefficient after piecemeal DCT (the Discrete Cosine Transform) transform and quantization, and it can directly read from jpeg image file.0 number is a principal element that influences the JPEG compression quality in the JPEG coefficient.Find that through experiment if be the jpeg image of different quality factor with same width of cloth BMP image compression, along with the increase of JPEG compression quality factor, picture quality constantly improves thereupon, 0 percentage also can constantly reduce thereupon in 64 JPEG coefficients.
Therefore with 0 be defined as the information loss amount of image after at 64 locational number percentages of DCT through the JPEG compression, then the image information loss amount is big more, the jpeg image quality is poor more.If n (j) be in all DCT pieces on j JPEG coefficient positions 0 number with, m is the number of 8*8DCT piece, then the image information loss amount can be expressed as
The average information loss amount is expressed as
Shown among Fig. 1 and times got the result that a width of cloth BMP image calculates average information loss amount average after with the jpeg image of its boil down to factor of quality Q=75~100, visible increase along with Q, average constantly reduces.
Therefore, with a BMP image I to be measured
BmpThe jpeg image I of boil down to Q=100
Jpeg1, if I
BmpBe the JPEG compression of Q1 (Q1<100) through the factor of quality, then the image information loss amount can directly convert the image information loss amount of the jpeg image of Q=100 greater than an original BMP image into before.As long as through the image information loss amount of BMP image more to be measured and original BMP, just can judge BMP image to be measured before whether through the JPEG compression.Because JPEG compression is a lossy compression method, the original image before we can't return to the image through the JPEG compression before a width of cloth, so the applicant has adopted the method that testing image is sheared 4 row, 4 row to estimate original BMP image.
2. shear 4 row, 4 row and estimate original image
One width of cloth jpeg image is sheared the image that can regard as behind four lines four row after the calibration, and is as shown in Figure 2.Because after piece image sheared 4 row 4 row, the image information loss amount was little, if before the image through the JPEG compression; After it is sheared 4 row 4 row; Can destroy the 8*8 partitioned organization of former JPEG compression, carry out then only having last compression visible after the JPEG compression once more.
With BMP image cut 4 row 4 row to be measured, then if compress through JPEG before the image, can destroy original pinch effect after shearing, can be similar to and regard the original original image that does not compress of a width of cloth as through JPEG; If do not compress before the image, even,, still can regard a width of cloth original image as because the image information loss amount is little then through the shearing manipulation of 4 row, 4 row through JPEG.
Therefore the present invention comes the approximate evaluation original image through testing image being sheared four lines four row, and carries out through the statistical nature that relatively extracts testing image with the information loss amount of testing image that the BMP image compression is historical to be detected.
3. the feature extraction of reflection image information loss amount
According to the JPEG compression influence to image JPEG coefficient, the present invention has extracted JPEG coefficients statistics characteristic behind BMP image to be measured and the jpeg image of estimating former figure boil down to Q=100 and has carried out that the BMP image compression is historical to be detected.
Is after the factor of quality is 90 jpeg image with a width of cloth by TIFF (the Tagged Image File Format) image compression of camera picked-up; Again reading also again, decompress(ion) is condensed to a width of cloth BMP image; As shown in Figure 3; See the difference that to feel between it and the original tiff image from visual angle, but through after 64 dimension p (j) characteristics of extracting the two respectively, can find on the same DCT coefficient positions that 0 number percentage has very big difference; On 64 positions of former tiff image in the JPEG coefficient 0 ratio weight average much smaller than before through the BMP image of JPEG compression, as shown in Figure 4.
Therefore the present invention utilizes this phenomenon, supposes a given BMP image I to be measured
Bmp, to obtaining estimating former figure I behind its shearing four lines four row
Est, the jpeg image I that is Q=100 with this two width of cloth image compression respectively
Jpeg1And I
Jpeg2, the JPEG coefficient of the Y passage through reading this two width of cloth jpeg image respectively calculates p according to formula 1
I1(j) and P
I2(j), j=1,2 ..., 64, i.e. image information loss amount on 64 DCT coefficient positions.Order
Z
1=NUM(p
I1(j)>p
I2(j)),Z
2=NUM(p
I1(j)<p
I2(j))
Wherein NUM () is for asking the number function.
Thereby obtain 2 dimensional feature Z
1And Z
2, as the few tolerance of image information loss amount increase and decrease.If BMP image I to be measured
BmpBefore not through JPEG compression, then image I
EstWith I
BmpThe image information loss amount should be similar to, show as Z
1≈ Z
2If I
BmpThrough JPEG compression, then because the JPEG compression is a lossy compression method, even decompress(ion) is condensed to the BMP image, still can lose some details, so be after 100 the jpeg image with its boil down to factor of quality again, the image information loss amount increases, and causes I before
EstIn some locational image information loss amount can increase, therefore, 2 dimensional features of being asked can show as Z
1>>Z
2
In sum, the present invention is following to the historical concrete steps that detect of BMP image compression:
Detect a width of cloth BMP image I
BmpWhether through the JPEG compression, at first to it be sheared and obtain the former figure I of width of cloth estimation after 4 row 4 are listed as before
Est, the jpeg image I that is Q=100 with this two width of cloth image compression respectively again
Jpeg1And I
Jpeg2Utilize in their the JPEG coefficient image information loss amount to carry out feature extraction; Last Fisher linear classifier capable of using carries out the compression histories of classification based training and test detection BMP image; The proportionate relationship of extraction characteristic also capable of using is carried out Threshold Segmentation, need not training and testing and just can judge single image.
Concrete performing step of the present invention is as shown in Figure 5.
Effect benefit of the present invention is: digital picture is as judicial evidence, most importantly will judge that exactly whether it is through distorting.Before judging a width of cloth BMP image, whether compress, can make preliminary differentiation, supervise chain for the evidence of judicial department effective technical guarantee is provided the authenticity of image through JPEG.The present invention is applicable to information security field, can carry out the detection of compression histories to a given BMP image effectively.
Description of drawings
Fig. 1 is the variation diagram of image averaging information loss amount average with JPEG compression quality factor.
Among the figure: abscissa is the factor of quality of 75-100, and ordinate is the value of average.
Fig. 2 is the acquisition methods figure that former figure method of estimation is a calibration image.
Fig. 3 is the visual comparsion chart of the BMP image of original tiff image and the JPEG compression of passing through Q=90 originally.
Among the figure: (a) being original tiff image, (b) is the original BMP image that compresses through the JPEG of Q=90.
Fig. 4 is 0 a proportion map in the JPEG coefficient on 64 DCT positions.
Among the figure: the cross lines are 90 bmp image through 0 proportion in the JPEG coefficient after the compression of Q=100 for the original compression factor of quality, and the square lines are original tiff image.
Fig. 5 is the whole performing step sketch map of the inventive method.
Embodiment
Below in conjunction with technical scheme and accompanying drawing, be described in detail embodiment of the present invention.
300 width of cloth tiff images of having selected in the experiment to be absorbed by Kodak DC290 camera comprise two kinds of resolution as original lossless image, are respectively 720*480 and 1440*960, and with the former figure difference of this 300 width of cloth TIFF boil down to Q={60; 70,80,85,90; 95,96,97; 98, change into the BMP image behind the jpeg image of 99} again, as original BMP image through the JPEG compression.Because along with reducing of compression quality factor Q, image impairment information is many more, picture quality also can be poor more, theoretically; The detection effect of algorithm also can be good more, so the present invention has selected 3 lower compression quality factor Q={60 commonly used, 70; 80,85} is used for the validity of testing algorithm, has selected to be up to 6 higher compression quality factor Q={90 of 99,95; 96,97,98,99}.Obtained 300*10=3000 width of cloth image so altogether.
Utilize the 2 dimension JPEG coefficient characteristics of extracting, consider that intrinsic dimensionality is few, use the fisher linear classifier in the experiment, 200 width of cloth are used for training in 300 width of cloth images; 100 width of cloth are used for testing, and original tiff image was respectively Q={60,70,80 with original through the factor of quality; 85,90,95,96; 97,98, the BMP image of the JPEG compression of 99} carries out man-to-man class test.Test result is as shown in table 1.
Table 1 the present invention is experimental result one to one
?Q= | ?60 | 70 | 80 | 85 | 90 | 95 | 96 | 97 | 98 | 99 |
Former figure (%) | ?100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 99 |
Original through the BMP of overcompression image (%) | ?100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 91 |
Average accuracy rate (%) | ?100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 95 |
Even method proposed by the invention at original compression factor of quality Q up to 98 o'clock, still can 100% accurately classification because during Q=99, JPEG compression losses information is less, detect comparatively difficulty, but accuracy rate has also reached 95%.In actual conditions, the factor of quality of original compression was unknown, so we have carried out mixed survey experiment to this method, was Q={60 from the original compression factor of quality promptly; 70,80,85,90; 95,96,97; 98, choose 20 width of cloth pictures different in the BMP image of 99} respectively and form 200 width of cloth training images, every mass factor is chosen 10 width of cloth images composition test set respectively from 100 remaining width of cloth images again; Former tiff image selects 200 width of cloth as training, and 100 width of cloth utilize the fisher linear classifier to classify as test; Then original BMP image classification accuracy rate is 100%, and lower through the BMP of overcompression image classification accuracy rate before, is 92%; The consideration reason is that the image of Q=99 in the training and testing image is more, and the image proportion of compression quality factor Q=99 is very little before in the practical application, therefore removes Q=99 mixed survey model accuracy rate afterwards and has all reached 100%.
Select 5 width of cloth blue skies, the original image in greenery patches utilizes mixed survey model of the present invention to test, and 5 width of cloth images all accurately are judged as original image.
In addition, find through experiment, original image with before through the characteristic Z of the BMP image of JPEG compression
1With Z
2Ratio have than big difference, therefore, can consider and need not train, whether judge before the image through the JPEG compression with threshold segmentation method.If
Table 2 has shown the result who 300 width of cloth images is calculated the Z value respectively.
The Z value result of calculation of table 2300 width of cloth image
Z | Former figure | Q=60 | Q=70 | Q=80 | Q=85 | Q=90 | Q=95 | Q=96 | ?Q=97 | Q=98 | Q=99 |
Minimum value | 0.44 | 10.20 | 7.43 | 3.54 | 3.82 | 6.43 | 3.62 | 4.78 | 2.6 | 1.47 | 0.84 |
Maximum | 1.90 | Inf | Inf | Inf | Inf | Inf | Inf | Inf | Inf | Inf | 62 |
300 width of cloth original images have been listed in the table and before through the maximum and the minimum value of the Z value of the BMP image of different quality factor compression, wherein Inf representes infinity, and Z is described
2=0.In image 300 width of cloth of Z during Q=99<2.0 35 width of cloth are only arranged, in image 300 width of cloth of Z during Q=98<2.0 2 width of cloth are only arranged, in image 300 width of cloth of Z among the former figure>2.0 2 width of cloth are only arranged.Therefore, can with 2.0 as distinguish original image with originally through a threshold value of the BMP of overcompression image, a given width of cloth BMP image only needs to calculate its Z value, can judge tentatively just whether it originally compresses through JPEG.
Calculate original image and this 5 width of cloth original image boil down to Q={85 on blue sky, meadow respectively, 95, the jpeg image of 99} decompress(ion) again is condensed to behind the BMP image to such an extent that Z value result is as shown in table 3.
Table 35 width of cloth blue sky, greenery patches image Z value result
The Z value | Former figure | Q=85 | Q=95 | Q=99 |
The 1st width of cloth | 0.97 | Inf | Inf | 20.33 |
The 2nd width of cloth | 0.68 | Inf | Inf | 4.17 |
The 3rd width of cloth | 0.97 | Inf | 63 | 7.00 |
The 4th width of cloth | 0.72 | Inf | Inf | 4.18 |
The 5th width of cloth | 1.27 | 63 | 61 | 3.29 |
It is thus clear that the Z value of original image is all in threshold value below 2.0, even and before through the BMP image original compression factor of quality of JPEG compression up to 99 o'clock, still in threshold value more than 2.0, so the present invention stands good to the single tone images of sheet.
Claims (2)
1. one kind based on the historical detection method of the BMP image compression of image information loss amount; It is characterized in that only obtaining under the situation of digital picture; Through original image is estimated in BMP image cut 4 row to be measured 4 row backs; And with testing image with estimate that the former figure boil down to factor of quality is 100 jpeg image, relatively the image information loss amount of this two width of cloth jpeg image is extracted characteristic
The former figure that calculates testing image and estimation weighs the image information loss amount through 0 proportion on 64 positions in the JPEG compression back JPEG coefficient of Q=100, obtains 2 dimensional features through comparing both image information loss amount sizes;
The S1-1.2 dimensional feature:
Z
1=NUM(p
I1(j)>p
I2(j)),Z
2=NUM(p
I1(j)<p
I2(j))
Wherein NUM () is for asking number function, p
I1(j) and p
I2(j), j=1,2 ..., 64, be respectively testing image and estimate the image information loss amount of former figure on 64 DCT coefficient positions;
S1-2. image information loss amount:
Wherein n (j) be in all DCT pieces on j JPEG coefficient positions 0 number with, m is the number of 8*8DCT piece in the image;
If Z
1≈ Z
2, show that then BMP image to be measured is before through the JPEG compression; If Z
1>>Z
2, show that then BMP image to be measured has passed through the JPEG compression before; Also can the 2 dimensional features input Fisher linear classifier that extract be carried out classification based training and test to detect BMP image to be measured before whether through the JPEG compression a large amount of BMP images.
2. the historical detection method of a kind of BMP image compression according to claim 1 based on the image information loss amount; It is characterized in that testing image is sheared 4 row, 4 column weights newly to save as the BMP image and be used for eliminating former JPEG pinch effect, obtains being similar to the former figure of estimation of former BMP image statistics characteristic.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910187789A CN101674389B (en) | 2009-09-30 | 2009-09-30 | Method for testing compression history of BMP image based on loss amount of image information |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910187789A CN101674389B (en) | 2009-09-30 | 2009-09-30 | Method for testing compression history of BMP image based on loss amount of image information |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101674389A CN101674389A (en) | 2010-03-17 |
CN101674389B true CN101674389B (en) | 2012-09-12 |
Family
ID=42021363
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN200910187789A Expired - Fee Related CN101674389B (en) | 2009-09-30 | 2009-09-30 | Method for testing compression history of BMP image based on loss amount of image information |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101674389B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101710989B (en) * | 2009-11-06 | 2011-07-13 | 中山大学 | Method for identifying JPEG compressed digital picture |
CN101833774A (en) * | 2010-04-27 | 2010-09-15 | 无锡朗能科技有限公司 | Simple color image compression method |
CN102903100B (en) * | 2012-09-06 | 2015-04-29 | 宁波大学 | Detection method for digital photo image compression history |
CN103067713B (en) * | 2013-01-06 | 2017-04-12 | 中国科学院深圳先进技术研究院 | Method and system of bitmap joint photographic experts group (JPEG) compression detection |
CN104715257B (en) * | 2013-12-11 | 2017-11-10 | 中国科学院深圳先进技术研究院 | A kind of image median filter detection method and device |
CN105049867A (en) * | 2015-08-19 | 2015-11-11 | 广东财经大学 | Method for recognizing whether bitmap having been compressed by JPEG |
CN110363207A (en) * | 2018-04-09 | 2019-10-22 | 阿里巴巴集团控股有限公司 | Image detection and the generation method of sorter model, device and equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1916958A (en) * | 2006-07-20 | 2007-02-21 | 中山大学 | Method of detecting distorts of JPEG image |
CN101504760A (en) * | 2009-02-27 | 2009-08-12 | 上海师范大学 | Digital image concealed information detecting and positioning method |
CN101710989A (en) * | 2009-11-06 | 2010-05-19 | 中山大学 | Method for identifying JPEG compressed digital picture |
-
2009
- 2009-09-30 CN CN200910187789A patent/CN101674389B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1916958A (en) * | 2006-07-20 | 2007-02-21 | 中山大学 | Method of detecting distorts of JPEG image |
CN101504760A (en) * | 2009-02-27 | 2009-08-12 | 上海师范大学 | Digital image concealed information detecting and positioning method |
CN101710989A (en) * | 2009-11-06 | 2010-05-19 | 中山大学 | Method for identifying JPEG compressed digital picture |
Non-Patent Citations (1)
Title |
---|
戴蒙,林家骏,毛家发.JPEG二次压缩的分析与检测.《中国图象图形学报》.2006,第11卷(第11期),1619-1622页. * |
Also Published As
Publication number | Publication date |
---|---|
CN101674389A (en) | 2010-03-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101674389B (en) | Method for testing compression history of BMP image based on loss amount of image information | |
Cozzolino et al. | Fast adaptive nonlocal SAR despeckling | |
CN103475898B (en) | Non-reference image quality assessment method based on information entropy characters | |
CN102413328B (en) | Double compression detection method and system of joint photographic experts group (JPEG) image | |
CN101877127B (en) | Image reference-free quality evaluation method and system based on gradient profile | |
Bianchi et al. | Detection of non-aligned double JPEG compression with estimation of primary compression parameters | |
CN107622489B (en) | Image tampering detection method and device | |
CN102176208B (en) | Robust video fingerprint method based on three-dimensional space-time characteristics | |
CN101605272B (en) | Method for evaluating objective quality of partial reference type image | |
CN102194208B (en) | Image falsification detecting and falsification positioning method based on image signature | |
CN103037212B (en) | The adaptive block compressed sensing method for encoding images of view-based access control model perception | |
CN102521606B (en) | Method for classifying pixel blocks of JPEG images and image falsification detecting and falsified area positioning methods based on same | |
CN109492615B (en) | Crowd density estimation method based on CNN low-level semantic feature density map | |
CN110766007B (en) | Certificate shielding detection method, device, equipment and readable storage medium | |
CN103067713B (en) | Method and system of bitmap joint photographic experts group (JPEG) compression detection | |
CN101916442A (en) | Method for robustly positioning tampered region by utilizing GLCM characteristic | |
CN115984850A (en) | Lightweight remote sensing image semantic segmentation method based on improved Deeplabv3+ | |
Muhammad et al. | A non-intrusive method for copy-move forgery detection | |
CN105120294A (en) | JPEG format image source identification method | |
CN104103064A (en) | Reference-free noise image quality evaluation method based on gradient similarity | |
CN104837028A (en) | Video same-bit-rate dual-compression detection method | |
CN102819842A (en) | Displacement JPEG (joint photographic experts group) double-compression tampering blind detection method based on condition symbiotic probability matrix | |
CN102968793B (en) | Based on the natural image of DCT domain statistical property and the discrimination method of computer generated image | |
CN103903214A (en) | Method for assessing DCT-domain image steganography capacity based on MCUU model | |
CN101527041B (en) | Picture counterfeiting detection method based on shadow matte consistency |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20120912 Termination date: 20150930 |
|
EXPY | Termination of patent right or utility model |