CN107147909B - Variance-based recompression JPEG image original quantization step length estimation method - Google Patents

Variance-based recompression JPEG image original quantization step length estimation method Download PDF

Info

Publication number
CN107147909B
CN107147909B CN201710159675.4A CN201710159675A CN107147909B CN 107147909 B CN107147909 B CN 107147909B CN 201710159675 A CN201710159675 A CN 201710159675A CN 107147909 B CN107147909 B CN 107147909B
Authority
CN
China
Prior art keywords
histogram
variance
quantization
quantization step
sequence
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
Application number
CN201710159675.4A
Other languages
Chinese (zh)
Other versions
CN107147909A (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.)
National Sun Yat Sen University
Original Assignee
National Sun Yat Sen University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by National Sun Yat Sen University filed Critical National Sun Yat Sen University
Priority to CN201710159675.4A priority Critical patent/CN107147909B/en
Publication of CN107147909A publication Critical patent/CN107147909A/en
Application granted granted Critical
Publication of CN107147909B publication Critical patent/CN107147909B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods 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/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/625Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using discrete cosine transform [DCT]

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Discrete Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a variance-based original quantization step length estimation method for a recompressed JPEG image. The variance sequence of the ratio value of the histogram at intervals of a certain period has periodic fluctuation, the periodic fluctuation is more obvious compared with the periodic fluctuation of the histogram, and the accuracy of estimating the original quantization step is higher. The invention has good accuracy under the condition that the first quantization step is smaller than or larger than the second quantization step.

Description

Variance-based recompression JPEG image original quantization step length estimation method
Technical Field
The invention relates to the technical field of image digital evidence obtaining, in particular to a variance-based original quantization step length estimation method for a recompressed JPEG image.
Background
In recent years, computer networks and multimedia technologies have been rapidly developed, and high-definition digital cameras, smart phones, and the like have been widely popularized. A great deal of image editing software, such as Photoshop and the like, enables people to edit and modify images more and more easily. In many occasions, such as judicial law, news publishing and scientific research, the integrity, authenticity and reliability of images need to be ensured urgently, and thus the digital evidence obtaining technology comes into force.
The most commonly used image format today is JPEG, and in the process of tampering, it is often accompanied by a double compression of the image. Estimating the original quantization step size of a double-compressed JPEG image is an important aid for tamper detection and for recovering the operational history of the image.
Most of the current methods for estimating the original quantization step size are based on the double compression effect (DQ effect) of the JPEG image, and when the first quantization step size is larger than the second quantization step size, the DQ effect is not obvious enough, so that the performance of the algorithm is not very ideal. The range of action of most algorithms is limited to the case where the first quantization step is smaller than the second quantization step.
Disclosure of Invention
The invention provides a variance-based original quantization step length estimation method for a recompressed JPEG image, which can effectively estimate the original quantization step length of the recompressed JPEG image, and aims to overcome at least one defect in the prior art. The invention has good accuracy under the condition that the first quantization step is smaller than or larger than the second quantization step.
In order to solve the technical problems, the technical scheme of the invention is as follows:
a variance-based original quantization step length estimation method for a recompressed JPEG image comprises the following steps:
s1: obtaining a bias histogram: extracting a histogram of a JPEG image to be detected, biasing the extracted histogram, dividing the histogram into different regions, giving different weights for calculating the variance to the different regions to obtain a biased histogram h2
S2: and (3) variance calculation: traversing possible values according to the offset histogram obtained in the step S1, and calculating to obtain a corresponding variance to form a variance sequence, wherein the variance sequence has periodic fluctuation;
s3: selecting a candidate value: for the variance sequence calculated in step S2, the minimum value is selected as the first quantization step q1Candidate value q ofcAdding them to qcCandidate set
Figure BDA0001248137760000021
S4: histogram comparison: performing analog secondary quantization on each candidate value calculated in step S3, namely performing first quantization on the original histogram, performing second quantization on the histogram after the first quantization to obtain a corresponding comparison histogram, comparing the comparison histogram with the extracted histogram of the picture to be tested, and comparing the q corresponding to the closest histogramcI.e. the final q1And (6) estimating the value.
In a preferred embodiment, the process of histogram offset in step S1 is as follows:
dividing the histogram into four different regions, namely a first abandoned region, a light weight region, a heavy weight region and a second abandoned region, by using three parameters { o1, o2, M }, and giving different weights to DCT coefficients in the different regions for calculating variance values;
since the histogram of the image DCT coefficients is left-right symmetric, the right half positive half axis is taken as an example. The regions with the abscissa of [0, o1] and (M, + ∞) are the first and second reject regions, respectively, and the weight of the region is 0. The region with the abscissa of (o1, o2) is a light-weight region whose weight is (0, o2-o 1). The region with the abscissa [ o2, M ] is a medium-weight region, and the weight of the region is o2-o 1.
The parameters o1, o2, M are set as follows: m is the number of DCT coefficients with values other than 0 in the histogram, { o1, o2} depending on the second quantization step q2And (4) selecting.
In a preferred embodiment, in step S2, the variance calculation process is as follows:
for the offset histogram obtained in S1, traversing all possible values, setting the period as w, and calculating the ratio of the histogram lattice values in the histogram with the distance as the period w:
Figure BDA0001248137760000022
wherein s is a ratio in a ratio sequence S (w), u2Obtaining a ratio sequence S (w) for the second quantized DCT coefficient, and obtaining a variance sequence from the variance of the ratio sequence:
Figure BDA0001248137760000023
wherein M isSThe number of elements in the ratio sequence S.
In a preferred embodiment, the analog quadratic quantization process of step S4 is as follows:
firstly, cutting the image to be detected, and cutting out the four front rows and the four left rowsExtracting the histogram of the pixels to obtain the original unquantized DCT coefficient histogram; then, the original unquantized DCT coefficients are first quantized by the candidate values and then are quantized by q2And carrying out second quantization to obtain a DCT coefficient histogram of analog double quantization corresponding to the candidate value.
In a preferred embodiment, in step S4, the histogram comparison formula is as follows:
Figure BDA0001248137760000031
wherein the content of the first and second substances,
Figure BDA0001248137760000032
represents the finally obtained q1Estimate, n represents the number of bins in the histogram, h2(i) The value of the ith bin in the histogram representing the test image,
Figure BDA0001248137760000033
representative candidate value qcThe value of the ith bin in the simulated double quantized histogram of (1).
Compared with the prior art, the technical scheme of the invention has the beneficial effects that: the invention provides a variance-based original quantization step length estimation method for a recompressed JPEG image. The variance sequence of the ratio value of the histogram at intervals of a certain period has periodic fluctuation, the periodic fluctuation is more obvious compared with the periodic fluctuation of the histogram, and the accuracy of estimating the original quantization step is higher. The invention has good accuracy under the condition that the first quantization step is smaller than or larger than the second quantization step.
Drawings
FIG. 1 is a flow chart of a variance-based method for estimating the raw quantization step size of a recompressed JPEG image.
Fig. 2 is an image to be detected.
Fig. 3 is a schematic diagram of region division.
FIG. 4 is a resulting variance sequence of the method of the present invention.
Fig. 5 is a table of quantization step sizes for the actual image.
Fig. 6 is a table of the estimated quantization step size for the image according to the present invention.
Detailed Description
The drawings are for illustrative purposes only and are not to be construed as limiting the patent;
for the purpose of better illustrating the embodiments, certain features of the drawings may be omitted, enlarged or reduced, and do not represent the size of an actual product;
it will be understood by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted.
The technical solution of the present invention is further described below with reference to the accompanying drawings and examples.
Example 1
As shown in fig. 1, a variance-based original quantization step size estimation method for a recompressed JPEG image comprises the following steps:
s1: obtaining a bias histogram: extracting a histogram of a JPEG image to be detected, biasing the extracted histogram, dividing the histogram into different regions, giving different weights for calculating the variance to the different regions to obtain a biased histogram h2
S2: and (3) variance calculation: traversing possible values according to the offset histogram obtained in the step S1, and calculating to obtain a corresponding variance to form a variance sequence, wherein the variance sequence has periodic fluctuation;
s3: selecting a candidate value: for the variance sequence calculated in step S2, the minimum value is selected as the first quantization step q1Candidate value q ofcAdding them to qcCandidate set
Figure BDA0001248137760000041
S4: histogram comparison: for each candidate value calculated in step S3, performing analog second quantization, i.e. first quantizing the original histogram and then performing the first quantization on the histogram after the first quantizationPerforming secondary quantization to obtain a corresponding comparison histogram, comparing the comparison histogram with the extracted histogram of the picture to be tested, and obtaining q corresponding to the closest histogramcI.e. the final q1And (6) estimating the value.
In a specific implementation process, the process of histogram offset in step S1 is as follows:
dividing the histogram into four different regions, namely a first abandoned region, a light weight region, a heavy weight region and a second abandoned region, by using three parameters { o1, o2, M }, and giving different weights to DCT coefficients in the different regions for calculating variance values;
since the histogram of the image DCT coefficients is left-right symmetric, the right half positive half axis is taken as an example. The areas with abscissa [0, o1] and (M, + oo) are the first and second discard areas, respectively, and the weight of the area is 0. The region with the abscissa of (o1, o2) is a light-weight region whose weight is (0, o2-o 1). The region with the abscissa [ o2, M ] is a medium-weight region, and the weight of the region is o2-o 1.
The parameters o1, o2, M are set as follows: m is the number of DCT coefficients with values other than 0 in the histogram, { o1, o2} depending on the second quantization step q2Selecting, as shown in table 1:
TABLE 1
q 2 3 4 5 6 7 8 9 10 11 12 13 14
o1 2 3 4 3 5 4 5 4 6 5 4 3
o 2 3 4 5 6 7 8 6 9 7 7 5 4
In a specific implementation procedure, in step S2, the variance calculation procedure is as follows:
for the offset histogram obtained in S1, traversing all possible values, setting the period as w, and calculating the ratio of the histogram lattice values in the histogram with the distance as the period w:
Figure BDA0001248137760000042
wherein s is a ratio in a ratio sequence S (w), u2Obtaining a ratio sequence S (w) for the second quantized DCT coefficient, and obtaining a variance sequence from the variance of the ratio sequence:
Figure BDA0001248137760000051
wherein M isSThe number of elements in the ratio sequence S.
In a specific implementation process, the analog quadratic quantization process of step S4 is as follows:
firstly, shearing an image to be detected, shearing pixels in the front four rows and the left four columns of the image, and extracting a histogram of the pixels to obtain an original unquantized DCT coefficient histogram; then, the original unquantized DCT coefficients are first quantized by the candidate values and then are quantized by q2And carrying out second quantization to obtain a DCT coefficient histogram of analog double quantization corresponding to the candidate value.
In a specific implementation, in step S4, the histogram comparison formula is as follows:
Figure BDA0001248137760000052
wherein the content of the first and second substances,
Figure BDA0001248137760000053
represents the finally obtained q1Estimate, n represents the number of bins in the histogram, h2(i) The value of the ith bin in the histogram representing the test image,
Figure BDA0001248137760000054
representative candidate value qcThe value of the ith bin in the simulated double quantized histogram of (1).
The experimental effect of this variance-based recompression JPEG image raw quantization step estimation method is shown in FIGS. 2-5. Fig. 2 shows an image to be examined, which has a first secondary quality factor of 80 and a second secondary quality factor of 75. The first quantization step size is 3, the second quantization step size is 3, and the second quantization step size is 7 at the 8 × 8 DCT frequency (1, 2). The schematic diagram of region division is shown in fig. 3. FIG. 4 is a diagram of the variance sequence obtained by the method of the present invention, and it is apparent from the diagram that there is a periodic fluctuation with a period of 3. Resulting in a first quantization step candidate set 3,6,9, 12. And obtaining a quantization step size estimated value of 3 after histogram comparison. Fig. 5 is a table of actual quantization step size of the image, and fig. 6 is a table of quantization step size of the estimation of the image by the present algorithm.
The same or similar reference numerals correspond to the same or similar parts;
the terms describing positional relationships in the drawings are for illustrative purposes only and are not to be construed as limiting the patent;
it should be understood that the above-described embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the claims of the present invention.

Claims (5)

1. A variance-based original quantization step length estimation method for a recompressed JPEG image is characterized by comprising the following steps:
s1: obtaining a bias histogram: extracting a histogram of DCT (discrete cosine transformation) coefficients of a JPEG (joint photographic experts group) image to be detected, biasing the extracted histogram, dividing the histogram into different regions, giving different weights for calculating variance to the different regions, and obtaining a biased histogram h2
S2: and (3) variance calculation: traversing possible values according to the offset histogram obtained in the step S1, and calculating to obtain a corresponding variance to form a variance sequence, wherein the variance sequence has periodic fluctuation;
s3: selecting a candidate value: for the variance sequence calculated in step S2, the minimum value is selected as the first quantization step q1Candidate value q ofcAdding them to qcCandidate set
Figure FDA0002125153260000011
S4: histogram comparison: performing analog secondary quantization on each candidate value calculated in step S3, namely performing first quantization on the original histogram, performing second quantization on the histogram after the first quantization to obtain a corresponding comparison histogram, comparing the comparison histogram with the extracted histogram of the picture to be tested, and comparing the q corresponding to the closest histogramcI.e. the final q1And (6) estimating the value.
2. The variance-based recompression JPEG image raw quantization step size estimation method as claimed in claim 1, wherein in step S1, the histogram bias procedure is as follows:
dividing the histogram into four different regions, namely a first abandoned region, a light weight region, a heavy weight region and a second abandoned region, by using five parameters {0, o1, o2, M, + ∞ }, wherein different weights are given to DCT coefficients in the different regions for calculating variance values;
the parameters o1, o2, M are set as follows: m is the number of DCT coefficients with values other than 0 in the histogram, { o1, o2} depending on the second quantization step q2Selecting, specifically as shown in the following table:
q2 3 4 5 6 7 8 9 10 11 12 13 14 o1 2 3 4 3 5 4 5 4 6 5 4 3 o2 3 4 5 6 7 8 6 9 7 7 5 4
3. the variance-based recompression JPEG image raw quantization step size estimation method of claim 1, wherein in step S2, the variance calculation procedure is as follows:
for the offset histogram obtained in S1, traversing all possible values, setting the period as w, and calculating the ratio of the histogram lattice values in the histogram with the distance as the period w:
wherein s is a ratio in a ratio sequence S (w), u2Obtaining a ratio sequence S (w) for the second quantized DCT coefficient, and obtaining a variance sequence from the variance of the ratio sequence:
Figure FDA0002125153260000022
wherein M isSThe number of elements in the ratio sequence S.
4. The variance-based recompression JPEG image raw quantization step size estimation method as claimed in claim 1, wherein said analog quadratic quantization process of S4 is as follows:
firstly, shearing an image to be detected, shearing pixels in the front four rows and the left four columns of the image, and extracting a histogram of the pixels to obtain an original unquantized DCT coefficient histogram; then, the original unquantized DCT coefficients are first quantized by the candidate values and then are quantized by q2And carrying out second quantization to obtain a DCT coefficient histogram of analog double quantization corresponding to the candidate value.
5. The variance-based recompression JPEG image raw quantization step size estimation method of claim 1, wherein in step S4, the histogram comparison formula is as follows:
Figure FDA0002125153260000023
wherein the content of the first and second substances,
Figure FDA0002125153260000024
represents the finally obtained q1Estimate, n represents the number of bins in the histogram, h2(i) The value of the ith bin in the histogram representing the test image,
Figure FDA0002125153260000025
representative candidate value qcThe value of the ith bin in the simulated double quantized histogram of (1).
CN201710159675.4A 2017-03-17 2017-03-17 Variance-based recompression JPEG image original quantization step length estimation method Active CN107147909B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710159675.4A CN107147909B (en) 2017-03-17 2017-03-17 Variance-based recompression JPEG image original quantization step length estimation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710159675.4A CN107147909B (en) 2017-03-17 2017-03-17 Variance-based recompression JPEG image original quantization step length estimation method

Publications (2)

Publication Number Publication Date
CN107147909A CN107147909A (en) 2017-09-08
CN107147909B true CN107147909B (en) 2020-01-21

Family

ID=59783576

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710159675.4A Active CN107147909B (en) 2017-03-17 2017-03-17 Variance-based recompression JPEG image original quantization step length estimation method

Country Status (1)

Country Link
CN (1) CN107147909B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108460715B (en) * 2018-01-23 2021-11-05 中山大学 Binary image steganography analysis method based on local texture pattern
CN109672891B (en) * 2018-12-25 2021-03-30 哈尔滨工业大学 Lossless secondary compression method of JPEG image
US10924741B2 (en) * 2019-04-15 2021-02-16 Novatek Microelectronics Corp. Method of determining quantization parameters

Citations (2)

* 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
CN106488250A (en) * 2015-08-26 2017-03-08 中国科学院深圳先进技术研究院 A kind of method and apparatus of the dual compressed first pressure quantization step of estimation JPEG

Patent Citations (2)

* 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
CN106488250A (en) * 2015-08-26 2017-03-08 中国科学院深圳先进技术研究院 A kind of method and apparatus of the dual compressed first pressure quantization step of estimation JPEG

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
JPEG合成图像的盲篡改检测及定位;刘丽娟;《北京石油化工学院学报》;20140615;第22卷(第2期);全文 *
一种估计JPEG双重压缩原始量化步长的新方法;王俊文;《电子与信息学报》;20090415;第31卷(第4期);全文 *
基于JPEG双压缩的原始量化表估计算法研究;齐宗飞;《中国优秀硕士学位论文全文数据库》;20110715;全文 *

Also Published As

Publication number Publication date
CN107147909A (en) 2017-09-08

Similar Documents

Publication Publication Date Title
Saad et al. DCT statistics model-based blind image quality assessment
JP4725690B2 (en) Video identifier extraction device
Fan et al. Maximum likelihood estimation of JPEG quantization table in the identification of bitmap compression history
CN107147909B (en) Variance-based recompression JPEG image original quantization step length estimation method
US20070092001A1 (en) Moving picture coding apparatus, method and computer program
Abbasi Aghamaleki et al. Malicious inter-frame video tampering detection in MPEG videos using time and spatial domain analysis of quantization effects
Min et al. Blind quality assessment of compressed images via pseudo structural similarity
JP2007104678A (en) Method of classifying images in connection with jpeg compression history
CN100411443C (en) Method for estimating the dominant motion in a sequence of images
Li et al. Anti-forensics of double JPEG compression with the same quantization matrix
CN103067713A (en) Method and system of bitmap joint photographic experts group (JPEG) compression detection
CN112560901A (en) Method for defending and confronting sample based on combination of image preprocessing and confronting training
JP5155210B2 (en) Image comparison apparatus and method, image search apparatus, program, and recording medium
CN108269221B (en) JPEG recompressed image tampering positioning method
US7274366B2 (en) Method and apparatus for detecting edge
US20070098274A1 (en) System and method for processing compressed video data
WO2010084738A1 (en) Collation weighting information extracting device
Chen et al. A universal reference-free blurriness measure
CN108230411B (en) Method and device for detecting tampered image
CN112911298B (en) HEVC video dual-compression detection method and system based on boundary effect
Song et al. Optimal Gabor filters for steganalysis of content-adaptive JPEG steganography
Afshin et al. A dictionary based approach to JPEG anti-forensics
Nafchi et al. MUG: A parameterless no-reference JPEG quality evaluator robust to block size and misalignment
KR100473944B1 (en) Text detecting method for digital image signal
CN104796726A (en) Method for detecting image compression traces

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