Decompressed WebP image quantization parameter estimation method, device and terminal

By classifying macroblocks and using frequency domain periodic features to drive the decompressed WebP images, and by optimizing the quantization step size using an adaptive sampling strategy, the problem of feature extraction dimension mismatch and coefficient distribution model mismatch in WebP images using the JPEG method is solved. This achieves high-precision quantization parameter estimation and improves the accuracy and efficiency of image processing.

CN121147331APending Publication Date: 2025-12-16SHENZHEN UNIV
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202511077831.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-01
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

In existing technologies, when JPEG quantization estimation methods are directly applied to WebP images, problems such as feature extraction dimension mismatch and coefficient distribution model mismatch occur, leading to reduced accuracy in image compression history analysis and affecting applications such as digital forensics, steganography detection, and compression artifact elimination.

Method used

By classifying macroblocks of the decompressed WebP image, extracting frequency domain periodic features using Discrete Fourier Transform (DFT), and optimizing the quantization step size using an adaptive sampling strategy, effective estimation of multiple quantization step sizes for WebP images is achieved.

Benefits of technology

It improves the accuracy and efficiency of WebP image processing, solves the problems of feature extraction dimension mismatch and coefficient distribution model mismatch, and provides high-precision technical support for digital image authenticity verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121147331A_ABST
    Figure CN121147331A_ABST
Patent Text Reader

Abstract

The invention discloses a decompressed WebP image quantization parameter estimation method and device and a terminal, and the method comprises the steps: obtaining a target image, classifying macro blocks of the target image, and obtaining a plurality of target macro block groups, the target image being a compressed and decompressed WebP image; performing frequency domain periodic feature driving on the multiple target macro block groups to obtain quantization step coarse estimation; and performing adaptive optimization and candidate quantization step size correction on the quantization step size coarse estimation to obtain a target optimal quantization step size. According to the method, the problems of mismatching of feature extraction dimensions and mismatching of coefficient distribution models when an existing quantitative estimation method for JPEG is directly applied to WebP images in the prior art are solved, and key technical support with high precision and high efficiency is provided for authenticity verification of digital images.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of image processing, in particular to a WebP image quantization parameter estimation method and device after decompression and a terminal. BACKGROUND

[0002] With the rapid development of digital image processing technology, image compression coding has become a key technology in information transmission and storage. In practical applications, image files often need to be processed through multiple stages of transcoding. For example, images stored in WebP lossy compression format will be transcoded into TIFF, PNG or PPM lossless bitmap format. Although this transcoding operation meets the compatibility requirements of image formats, it will cause the loss of key parameter information in the original compression process, such as macroblock division mode and quantization step coefficient, thereby bringing technical difficulties to the authenticity verification of image content.

[0003] That is, when performing format transcoding, lossy compression will produce characteristic traces, greatly reducing the effectiveness of existing detection algorithms and reducing the completeness of WebP image recovery. Specifically, the volume of WebP lossy image is 25% to 34% smaller than that of JPEG image, and therefore more and more websites and software applications begin to support WebP lossy image. Moreover, the compression mechanism based on VP8 / VP9 coding standard unique to WebP format is significantly different from JPEG.

[0004] At present, the quantization parameter estimation technology for decompressed images mainly focuses on JPEG format. Related technologies have built a relatively systematic quantization parameter estimation framework by analyzing image spatial domain statistical characteristics and frequency domain coefficient distribution characteristics. However, when the existing quantization estimation method for JPEG is directly applied to WebP image, problems such as feature extraction dimension mismatch and coefficient distribution model mismatch will occur, resulting in reduced estimation accuracy. This technical gap not only affects the accuracy of image compression history analysis, but also forms a key technical bottleneck in digital forensics, steganography detection and compression artifact elimination applications.

[0005] Therefore, there is an urgent need for a quantization parameter estimation method suitable for WebP image format to improve the traceability of WebP image processing link.

[0006] Therefore, the prior art still needs to be improved and improved. SUMMARY

[0007] In view of the above defects of the prior art, the present application provides a WebP image quantization parameter estimation method and device after decompression and a terminal, which aims to solve the problem that when the existing quantization estimation method for JPEG is directly applied to WebP image, the feature extraction dimension mismatch and coefficient distribution model mismatch will occur.

[0008] To solve the above technical problems, the technical solutions adopted by the present application are as follows:

[0009] In a first aspect, the present application provides a method and device for estimating quantization parameters of a decompressed WebP image, and a terminal, the method comprising:

[0010] obtaining a target image, classifying macroblocks of the target image to obtain a plurality of target macroblock groups, the target image being a decompressed WebP image;

[0011] driving the plurality of target macroblock groups with frequency domain periodicity features to obtain a coarse estimate of a quantization step;

[0012] adaptively optimizing the coarse estimate of the quantization step and correcting a candidate quantization step to obtain a target optimal quantization step.

[0013] In an implementation, the classifying macroblocks of the target image to obtain a plurality of target macroblock groups comprises:

[0014] inputting Y channel pixels of the target image into a macroblock classification flow of a WebP encoder to generate macroblock category labels corresponding to an original compression process, and obtaining the plurality of target macroblock groups.

[0015] In an implementation, the driving the plurality of target macroblock groups with frequency domain periodicity features to obtain a coarse estimate of a quantization step comprises:

[0016] performing discrete cosine transform on the plurality of target macroblock groups to construct a plurality of DCT coefficient absolute value histograms;

[0017] performing discrete Fourier transform on the plurality of DCT coefficient absolute value histograms to extract frequency domain features of the plurality of DCT coefficient absolute value histograms;

[0018] obtaining frequency peaks of the frequency domain features of the plurality of DCT coefficient absolute value histograms to obtain the coarse estimate of the quantization step.

[0019] In an implementation, the performing discrete Fourier transform on the plurality of DCT coefficient absolute value histograms comprises:

[0020] performing discrete Fourier transform on the plurality of DCT coefficient absolute value histograms based on a first formula;

[0021] The first formula is:

[0022] A = |DFT(h)|;

[0023]

[0024] wherein h is a target histogram, A is an amplitude spectrum of the target histogram, L is a length of the target histogram, and F is a normalized frequency of the target histogram.

[0025] In an implementation, the adaptive optimization of the coarse quantization step estimation and the candidate quantization step correction result in a target optimal quantization step, including:

[0026] The energy accumulation analysis of the plurality of DCT coefficient absolute value histograms results in a plurality of energy distribution graphs.

[0027] The candidate quantization step neighborhood search of the energy distribution graphs results in a first optimal quantization step group.

[0028] The sampling length of the plurality of DCT coefficient absolute value histograms is dynamically adjusted according to the coarse quantization step estimation, the sampling interval adaptive optimization is realized in the frequency domain, and the target optimal quantization step is selected through the neighborhood search of the first optimal quantization step group.

[0029] In an implementation, the dynamic adjustment of the sampling length of the plurality of DCT coefficient absolute value histograms according to the coarse quantization step estimation includes:

[0030] The sampling length of the plurality of DCT coefficient absolute value histograms is adjusted based on a dynamic adjustment formula, and the dynamic adjustment formula is:

[0031]

[0032] wherein b' is the sampling length of a histogram, q e is the coarse quantization step estimation, and A is the amplitude spectrum of the target histogram.

[0033] In an implementation, the neighborhood search through the first optimal quantization step group results in the target optimal quantization step, including:

[0034] The target optimal quantization step is selected based on a target selection formula.

[0035] The target selection formula is:

[0036]

[0037] wherein q f is the target optimal quantization step, h is a target histogram, Q is a candidate quantization step, and n is a multiple factor.

[0038] In a second aspect, the application provides a decompressed WebP image quantization parameter estimation device, including:

[0039] The classification module is used to acquire the target image, classify the macroblocks of the target image, and obtain multiple groups of target macroblocks. The target image is a compressed and decompressed WebP image.

[0040] The driving module is used to drive the multiple groups of target macroblocks with frequency domain periodic features to obtain a coarse estimate of the quantization step size.

[0041] An adaptive module is used to adaptively optimize the coarse estimate of the quantization step size and correct the candidate quantization step size to obtain the target optimal quantization step size.

[0042] A third aspect of the present invention provides a terminal, the terminal including a processor and a computer-readable storage medium communicatively connected to the processor, the computer-readable storage medium being adapted to store a plurality of instructions, the processor being adapted to invoke the instructions in the computer-readable storage medium to perform the steps of implementing the decompressed WebP image quantization parameter estimation method described in any of the preceding claims.

[0043] In a fourth aspect, the present invention provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the steps of the decompressed WebP image quantization parameter estimation method described in any of the preceding claims.

[0044] Compared with existing technologies, this invention provides a method, apparatus, and terminal for estimating quantization parameters of decompressed WebP images. The method involves acquiring a target image, classifying its macroblocks to obtain multiple target macroblock groups (the target image being a compressed and decompressed WebP image), then applying frequency domain periodic feature-driven optimization to the multiple target macroblock groups to obtain a coarse estimate of the quantization step size. Finally, adaptive optimization and candidate quantization step size correction are performed on the coarse quantization step size estimate to obtain the optimal target quantization step size. This invention's proposed method for estimating quantization parameters of decompressed WebP images, by classifying macroblocks of the decompressed image, extracting frequency domain periodic features, and combining this with an adaptive sampling strategy optimization, effectively estimates multiple quantization step sizes. This solves the problems of feature extraction dimension mismatch and coefficient distribution model mismatch that occur when existing quantization estimation methods for JPEG are directly applied to WebP images, providing key technical support with both high accuracy and high efficiency for digital image authenticity verification. Attached Figure Description

[0045] Figure 1 A flowchart illustrating an embodiment of the WebP image quantization parameter estimation method provided by the present invention;

[0046] Figure 2A network structure diagram of an embodiment of the WebP image quantization parameter estimation method provided by the present invention;

[0047] Figure 3 A denoising flowchart of an embodiment of the WebP image quantization parameter estimation method provided by the present invention;

[0048] Figure 4 A schematic diagram of the structural principle of an embodiment of the WebP image quantization parameter estimation device provided by the present invention;

[0049] Figure 5 A schematic diagram illustrating the principle of an embodiment of the terminal provided by the present invention. Detailed Implementation

[0050] To make the objectives, technical solutions, and effects of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0051] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.

[0052] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0053] The method for estimating quantization parameters of decompressed WebP images provided by this invention can be applied to terminals with computing capabilities. The terminal can execute the method for estimating quantization parameters of decompressed WebP images provided by this invention to estimate multiple quantization step sizes of the decompressed WebP images.

[0054] Example 1

[0055] This embodiment presents a method for estimating quantization parameters of decompressed WebP images. In this embodiment, existing quantization estimation methods for JPEG images, when directly applied to WebP images, suffer from issues such as mismatched feature extraction dimensions and coefficient distribution models. A quantization step size estimation method based on Discrete Fourier Transform (DFT) frequency domain analysis and an adaptive sampling strategy is proposed. This method for estimating quantization parameters of decompressed WebP images deeply integrates a macroblock classification recompression mechanism and frequency domain periodic feature extraction technology, enabling effective estimation of multiple sets of quantization step sizes unique to WebP images. This successfully overcomes the performance bottleneck faced by existing technologies in the field of WebP compression history tracing.

[0056] Specifically, the decompressed WebP image quantization parameter estimation method uses Discrete Fourier Transform (DFT) to extract the periodic patterns in the Discrete Cosine Transform (DCT) coefficient histogram. At the same time, it combines an adaptive sampling optimization strategy to effectively eliminate the influence of frequency domain resolution distortion, thereby improving the applicability of quantization estimation.

[0057] Furthermore, the technical framework of the decompressed WebP image quantization parameter estimation method has broad scalability and can be applied to multiple scenarios such as image tampering forensics, steganalysis, and compression artifact removal, providing key technical support for digital image authenticity verification with both high precision and high efficiency.

[0058] Specifically, such as Figure 1 As shown, in one embodiment of the WebP image quantization parameter estimation method provided by the present invention, the WebP image quantization parameter estimation includes the following steps:

[0059] S100. Obtain the target image, classify the macroblocks of the target image to obtain multiple groups of target macroblocks, wherein the target image is a compressed and decompressed WebP image.

[0060] The macroblock classification of the target image yields multiple groups of target macroblocks, including:

[0061] The Y channel pixels of the target image are input into the macroblock classification process of the WebP encoder to generate macroblock category labels corresponding to the original compression process, thereby obtaining the multiple groups of target macroblocks.

[0062] Specifically, refer to Figure 2The quantization parameter estimation method for decompressed WebP images described in this embodiment is applicable to quantization parameter estimation of decompressed WebP images. By restoring macroblock classification information and analyzing frequency domain periodic features, it solves the problems of feature extraction dimension mismatch and coefficient distribution model mismatch that occur when existing quantization estimation methods for JPEG are directly applied to WebP images. Furthermore, it can also solve the problem of tampering and evidence collection caused by the loss of quantization parameters after WebP image transcoding. In particular, it is suitable for the multi-group quantization step size characteristic unique to WebP, and parameter estimation is performed using up to 4 groups of quantization step size, fixed quantization step size at AC position, and mixed quantization step size at DC position.

[0063] WebP, as a modern image format, effectively reduces file size while maintaining image quality thanks to its efficient compression algorithm, and is widely used in various network image transmission scenarios. However, during image compression and decompression, the internal structure and features of the image undergo certain changes, requiring accurate quantization step size estimation to more accurately reconstruct the image before compression. Figure 3 Therefore, accurate classification of decompressed WebP image macroblocks is of great significance for subsequent in-depth analysis of image characteristics and tracing compression history.

[0064] In this embodiment, multiple groups of target macroblocks are obtained by performing detailed classification operations on the macroblocks of the target image. The target image is a WebP image that has been compressed and then decompressed. The specific process of classifying the macroblocks of the target image to obtain multiple groups of target macroblocks is as follows:

[0065] First, the Y-channel pixels of the target image are extracted. In image processing, images are typically represented using the YUV color space. The Y-channel represents luminance information and contains most of the key visual features of the image, playing a crucial role in accurately classifying macroblocks. Compared to chromaticity information (U and V channels), luminance information better reflects the structure and texture changes of an image; therefore, choosing Y-channel pixels as the classification criterion can improve the accuracy and reliability of classification.

[0066] Next, these extracted Y-channel pixels are input into the WebP encoder's preset macroblock classification process. During the original compression process, the WebP encoder classifies macroblocks and assigns them corresponding category labels based on the characteristics of the image content, such as texture complexity and edge information, so that different compression strategies can be used for optimization, thereby minimizing image quality loss while ensuring compression efficiency. Thus, after decompression, by re-inputting the Y-channel pixels of the target image into this classification process, the classification logic of the original compression process can be simulated, generating macroblock category labels corresponding to the original compression process.

[0067] Finally, based on the generated macroblock category labels, the macroblocks in the target image are divided into different groups, resulting in multiple target macroblock groups. Macroblocks within each target macroblock group have similar features and attributes. This classification method facilitates subsequent personalized analysis and processing of macroblocks of different categories. For example, different quantization step size estimation methods can be used for macroblocks of different categories, thereby improving the accuracy and effectiveness of overall image processing.

[0068] S200. Apply frequency domain periodic feature driving to the multiple groups of target macroblocks to obtain a coarse estimate of the quantization step size.

[0069] The step of performing frequency domain periodic feature-driven quantization on the multiple groups of target macroblocks to obtain a coarse estimate of the quantization step size includes:

[0070] Perform discrete cosine transform on the multiple groups of target macroblocks to construct multiple histograms of absolute values ​​of DCT coefficients;

[0071] A discrete Fourier transform is performed on the histograms of absolute values ​​of the multiple DCT coefficients to extract the frequency domain features of the histograms of absolute values ​​of the multiple DCT coefficients.

[0072] The frequency peak value of the frequency domain feature of the histogram of the absolute values ​​of the multiple DCT coefficients is obtained to obtain a coarse estimate of the quantization step size.

[0073] The step of performing a discrete Fourier transform on the histograms of the absolute values ​​of the multiple DCT coefficients includes:

[0074] Perform Discrete Fourier Transform on the absolute value histograms of the multiple DCT coefficients based on the first formula;

[0075] The first formula is:

[0076] A = |DFT(h)|;

[0077]

[0078] Where h is the target histogram, A is the amplitude spectrum of the target histogram, L is the length of the target histogram, and F is the normalized frequency of the target histogram.

[0079] In this embodiment, a coarse estimate of the quantization step size is achieved by analyzing the frequency domain periodicity characteristics of the multiple target macroblock groups. The core process includes: performing Discrete Cosine Transform (DCT) on the grouped macroblocks, constructing a histogram of the absolute values ​​of the DCT coefficients, extracting the frequency domain features of the histogram using Discrete Fourier Transform (DFT), and determining the initial value of the quantization step size using the reciprocal of the frequency peak value.

[0080] In this embodiment, the number of target macroblock groups is at most 4, and each group contains M×N 8×8 macroblocks. In one embodiment, M=N=4.

[0081] Specifically, a histogram is constructed for the absolute values ​​of the DCT coefficients of the multiple target macroblock groups, with a range of [0, b), where the initial value of b is 200. The amplitude spectrum and normalized frequency are extracted by Discrete Fourier Transform (DFT), and the initial value of the candidate quantization step size is determined by using the reciprocal of the peak frequency of the amplitude spectrum.

[0082] Specifically, in this embodiment, for the plurality of DCT coefficient absolute value histograms, the plurality of DCT coefficient absolute value histograms are defined as the target histogram h undergoing Discrete Fourier Transform (DFT) to obtain the amplitude spectrum A of the target histogram and the normalized frequency F calculated based on the length L of the target histogram h, as shown in the formula:

[0083] A = |DFT(h)|;

[0084]

[0085] The initial value of the candidate quantization step size is determined by the reciprocal of the peak frequency of the amplitude spectrum, which is the coarse estimate of the quantization step size. The formula is as follows:

[0086] f p =argmax(A(f));

[0087] Where h is the target histogram, A is the amplitude spectrum of the target histogram, L is the length of the target histogram, F is the normalized frequency of the target histogram, and q e This is a coarse estimate of the quantization step size.

[0088] S300. Adaptive optimization and candidate quantization step size correction are performed on the coarse estimate of the quantization step size to obtain the target optimal quantization step size.

[0089] The adaptive optimization and candidate quantization step size correction of the coarse quantization step size to obtain the target optimal quantization step size includes:

[0090] Energy accumulation analysis was performed on the histograms of absolute values ​​of the multiple DCT coefficients to obtain multiple energy distribution maps;

[0091] Perform a neighborhood search on the energy distribution map to select the first optimal quantization step size group;

[0092] Based on the coarse estimation of the quantization step size, the sampling length of the histogram of absolute values ​​of the multiple DCT coefficients is dynamically adjusted to achieve adaptive optimization of the sampling interval in the frequency domain. The target optimal quantization step size is obtained by performing a neighborhood search through the first optimal quantization step size group.

[0093] The step of coarsely estimating and dynamically adjusting the sampling length of the histogram of absolute values ​​of the multiple DCT coefficients based on the quantization step size includes:

[0094] The sampling length of the histogram of absolute values ​​of the multiple DCT coefficients is adjusted based on a dynamic adjustment formula, which is:

[0095]

[0096] Where b' is the sampling length of the histogram, q e The quantization step size is roughly estimated, and A is the amplitude spectrum of the target histogram.

[0097] The step of performing a neighborhood search through the first optimal quantization step size group to obtain the target optimal quantization step size includes:

[0098] The optimal quantization step size of the target is obtained based on the target selection formula.

[0099] The target selection formula is:

[0100]

[0101] Where, q f Let h be the target optimal quantization step size, Q be the target histogram, and n be the candidate quantization step size.

[0102] Specifically, after obtaining the coarse estimate of the quantization step size, the coarse estimate of the quantization step size is optimized to the optimal value through energy accumulation analysis, dynamic sampling adjustment, and a neighborhood search strategy. The core process consists of three steps: energy distribution analysis, neighborhood candidate selection, and adaptive sampling optimization.

[0103] Specifically, this includes: introducing the coarsely estimated quantization step size as a candidate quantization step size, obtaining a candidate quantization step size neighborhood search module, and combining the histogram energy accumulation value to select the optimal step size; dynamically adjusting the histogram sampling length according to the initial value, realizing adaptive optimization of the sampling interval in the frequency domain, and selecting the optimal step size by combining the candidate step size neighborhood search module with the histogram energy accumulation value to reduce the influence of inverse distribution distortion in the low-frequency region.

[0104] Specifically, q is coarsely estimated based on the quantization step size. e The histogram length b' is dynamically adjusted using the following formula:

[0105]

[0106] The target histogram h of the DCT coefficients is reconstructed based on the adjusted histogram length b' and a Discrete Fourier Transform (DFT) is performed to optimize the number of frequency samples.

[0107] Through the candidate quantization step size correction module, in q e Within the neighborhood [q e -2, q e +2] Filtering the optimal step size q f The target selection formula is:

[0108]

[0109] Where, q f Let h be the target optimal quantization step size, h be the target histogram, and Q be the candidate quantization step size, whose value is around the initial estimated value q. e The five consecutive integer values ​​of the factor, where n represents the multiplier factor, and the range of values ​​is n = 1, 2, 3, 4, 5.

[0110] The quantization parameter estimation method for decompressed WebP images described in this embodiment addresses the problem of quantization parameter estimation in decompressed WebP images. It effectively solves the problem of quantization parameter loss during WebP image transcoding by combining Discrete Fourier Transform (DFT) frequency domain analysis with an adaptive sampling strategy. This method is specifically designed for the unique multi-dimensional quantization characteristics of the WebP format, accurately estimating its four core parameters: four independent quantization step sizes, the quantization step size at fixed positions for AC coefficients, the mixed quantization step size for DC coefficients, and the chroma component quantization parameters, thus completely restoring the unique quantization step size system of WebP.

[0111] Furthermore, the method can also be applied to image tampering forensics, steganalysis, and compression artifact removal scenarios. By estimating quantized parameters, it reveals the compression history of images. The average detection accuracy for WebP images with sizes ranging from 128×128 to 256×256 is significantly improved compared to traditional JPEG quantization estimation methods, and the detection speed reaches more than 3.35 images / s.

[0112] Specifically, in one application example, the method for estimating the quantization parameters of the decompressed WebP image is validated based on an experimental dataset, as follows:

[0113] First, the experimental dataset was obtained. The experimental dataset was constructed based on the publicly available BOSSBase and RAISE datasets, covering grayscale and color image scenes, and WebP images with different compression intensities were generated using the official WebP compression tool.

[0114] Specifically, 10,000 images are randomly selected from the original 512×512 grayscale images of BOSSBase and cropped from the center to generate sub-images of 128×128 and 256×256 sizes;

[0115] The Y channel of 8162 uncompressed TIFF color images from the RAISE dataset was extracted (and converted to grayscale), and then cropped to the same size. The cropped images were then subjected to lossy WebP compression using the libwebp tool, with quantization factors (QF) set to 70, 75, 80, 85, 90, and 95, generating WebP images with different compression intensities. The compressed WebP images were then decompressed and saved in PNM format (lossless bitmap format) to simulate format transcoding in real-world scenarios. Each PNM image was labeled with the four quantization step size groups corresponding to the original WebP compression parameters, and stratified sampling based on QF values ​​was used to ensure a balanced sample distribution. Finally, the images were decompressed to TIFF format. The accuracy (ACC) was calculated as follows: for each WebP quantization step size group, the quantization step size at the AC position of the Y channel was used, and the corresponding quantization step size at the DC position and other channels could be derived from the quantization step size table. Calculation method: The quantization step size of each AC position is independently counted. If the estimated value is exactly the same as the true value, it is counted as correct; if there is any deviation, it is not counted. The final accuracy is the average of the accuracy of all groups. The formula is expressed as:

[0116]

[0117] Among them, C i Let T be the number of correctly matched samples in the i-th group. i Let G be the total number of samples in the i-th group, and G be the actual number of quantization step size groups. WebP is usually 4 groups, but may be 3 groups in special scenarios.

[0118] Specifically, WebP images employ four different quantization steps during compression to quantize macroblocks, and the DCT coefficient distribution exhibits a periodic pattern with the quantization step size as the period. By analyzing the histogram of the absolute values ​​of the DCT coefficients in the decompressed image, frequency domain periodic features are extracted using DFT, and frequency resolution is optimized by combining an adaptive sampling strategy, ultimately achieving effective estimation of multiple quantization step sizes.

[0119] In the first experiment, to verify the average detection performance and speed of the WebP image quantization estimation method based on adaptive sampling DFT described in this embodiment under different image sizes, experiments were conducted using WebP image datasets of 128×128 and 256×256 sizes. The results are shown in Table 1. As can be seen from the table, the decompressed WebP image quantization parameter estimation method described in this embodiment achieves an average accuracy of 64.81% and a detection speed of 11.9 Img / s on the 128×128 size BOSSBase dataset; and an average accuracy of 68.62% and a detection speed of 3.35 Img / s on the 256×256 size dataset. This indicates that the method has high detection efficiency and stability on images of different sizes.

[0120] Table 1: Average accuracy and detection speed at different sizes:

[0121] Image size Average accuracy (ACC) Detection speed (Img / s) 128×128 64.81% 11.90 256×256 68.62% 3.35

[0122] In the second experiment, to verify the detection performance of the WebP image quantization estimation method based on adaptive sampling DFT described in this embodiment under different compression intensities (QF values), experiments were conducted on 128×128 and 256×256 images from the BOSSBase dataset. The results are shown in Table 2. As can be seen from the table, under low QF values ​​(70-80), the detection accuracy of the WebP image quantization estimation method based on adaptive sampling DFT described in this embodiment is significantly improved. For example, the accuracy for 128×128 images is 47.00% when QF=70, and the accuracy for 256×256 images is 64.30% when QF=80. Previously, the best method achieved an accuracy of 21.68% for 256×256 images on the BOSSBase dataset with a QF value of 70, and an accuracy of 38.75% with a QF value of 80. Under high QF values ​​(85-95), the accuracy further improves to 81.53%-86.85%.

[0123] Table 2: Detection performance for different QF values ​​on the BOSSBase dataset:

[0124]

[0125]

[0126] In the third experiment, to verify the generalization ability of the proposed method in color image scenarios, experiments were conducted on 128×128 images from the RAISE dataset. The results are shown in Table 3. As can be seen from the table, the WebP image quantization estimation method based on adaptive sampling DFT described in this embodiment shows a detection performance on the RAISE dataset that is consistent with the trend of the BOSSBase dataset. Under low QF values, the accuracy is significantly better than existing technologies (e.g., the accuracy is 30.03% when QF=70, while the previous best method only achieved an accuracy of 22.90%), and the accuracy can reach 73.40% under high QF values.

[0127] Table 3: Detection performance of this method on the RAISE dataset with a size of 128×128:

[0128] QF value 70 75 80 85 90 95 Accuracy 30.03% 32.10% 43.53% 52.70% 60.68% 73.40%

[0129] In the fourth experiment, to verify the contribution of the candidate quantization step size correction module and the adaptive sampling length module to the detection performance of the WebP image quantization estimation method based on adaptive sampling DFT described in this embodiment, an ablation experiment was conducted to compare the accuracy of different module combinations. The results are shown in Table 4. As can be seen from the table, after adding the candidate quantization step size correction module, the average accuracy increased from 34.27% to 62.30%; after further introducing the adaptive sampling length module, the average accuracy further increased to 64.81%, indicating that the two modules have a significant effect on improving the accuracy of quantization estimation.

[0130] Table 4: Ablation experiments verify the detection performance of different modules:

[0131] Module combination Average accuracy Original DFT quantization estimation 34.27% Add candidate quantization step correction module 62.30% Add adaptive sampling length module 64.81%

[0132] The experimental results above demonstrate that the WebP image quantization estimation method based on adaptive sampling DFT proposed in this embodiment has significant technical advantages and application value in the field of WebP image quantization parameter estimation.

[0133] In summary, this embodiment provides a method for estimating quantization parameters of decompressed WebP images. It involves acquiring a target image, classifying its macroblocks to obtain multiple groups of target macroblocks (the target image being a compressed and decompressed WebP image), and then applying frequency domain periodic features to these groups to obtain a coarse estimate of the quantization step size. Finally, it performs adaptive optimization and candidate quantization step size correction on the coarse estimate to obtain the optimal target quantization step size. The proposed method for estimating quantization parameters of decompressed WebP images, by classifying macroblocks of the decompressed image, extracting frequency domain periodic features, and combining this with an adaptive sampling strategy optimization, effectively estimates multiple groups of quantization step sizes. This solves the problem of feature extraction dimension mismatch and coefficient distribution model mismatch when existing quantization estimation methods for JPEG are directly applied to WebP images, providing a key technical support that combines high accuracy and high efficiency for digital image authenticity verification.

[0134] It should be understood that although the steps in the flowcharts shown in the accompanying drawings are displayed sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.

[0135] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink), DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0136] Example 2

[0137] Based on the above embodiments, the present invention also provides a device for estimating quantization parameters of decompressed WebP images, such as... Figure 4 As shown, the device for estimating the quantization parameters of the decompressed WebP image includes:

[0138] The classification module is used to acquire the target image, classify the macroblocks of the target image, and obtain multiple groups of target macroblocks. The target image is a compressed and decompressed WebP image, as described in Embodiment 1.

[0139] The driving module is used to drive the multiple groups of target macroblocks with frequency domain periodic features to obtain a coarse estimate of the quantization step size, as described in Embodiment 1.

[0140] An adaptive module is used to adaptively optimize the coarse estimate of the quantization step size and correct the candidate quantization step size to obtain the target optimal quantization step size, as described in Embodiment 1.

[0141] Example 3

[0142] Based on the above embodiments, the present invention also provides a terminal, such as... Figure 5 As shown, the terminal includes a processor 10 and a memory 20. Figure 5 Only some of the terminal components are shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0143] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory. In other embodiments, the memory 20 may be an external storage device of the terminal, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc. Further, the memory 20 may include both internal and external storage devices. The memory 20 is used to store application software and various types of data installed on the terminal. The memory 20 can also be used to temporarily store data that has been output or will be output. In one embodiment, the memory 20 stores a decompressed WebP image quantization parameter estimation program 30, which can be executed by the processor 10 to implement the decompressed WebP image quantization parameter estimation method of this application.

[0144] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor, or other chip, used to run program code stored in the memory 20 or process data, such as executing the decompressed WebP image quantization parameter estimation method.

[0145] In one embodiment, when the processor 10 executes the decompressed WebP image quantization parameter estimation program 30 in the memory 20, the following steps are performed:

[0146] The target image is acquired, and the macroblocks of the target image are classified to obtain multiple groups of target macroblocks. The target image is a compressed and decompressed WebP image.

[0147] Frequency domain periodic feature-driven quantization is applied to the multiple groups of target macroblocks to obtain a coarse estimate of the quantization step size;

[0148] The coarse quantization step size is adaptively optimized and the candidate quantization step size is corrected to obtain the target optimal quantization step size.

[0149] In one implementation, classifying the macroblocks of the target image to obtain multiple groups of target macroblocks includes:

[0150] The Y channel pixels of the target image are input into the macroblock classification process of the WebP encoder to generate macroblock category labels corresponding to the original compression process, thereby obtaining the multiple groups of target macroblocks.

[0151] In one implementation, the step of performing frequency-domain periodic feature-driven analysis on the multiple groups of target macroblocks to obtain a coarse estimate of the quantization step size includes:

[0152] Perform discrete cosine transform on the multiple groups of target macroblocks to construct multiple histograms of absolute values ​​of DCT coefficients;

[0153] A discrete Fourier transform is performed on the histograms of absolute values ​​of the multiple DCT coefficients to extract the frequency domain features of the histograms of absolute values ​​of the multiple DCT coefficients.

[0154] The frequency peak value of the frequency domain feature of the histogram of the absolute values ​​of the multiple DCT coefficients is obtained to obtain a coarse estimate of the quantization step size.

[0155] In one implementation, performing a discrete Fourier transform on the histograms of absolute values ​​of the plurality of DCT coefficients includes:

[0156] Perform Discrete Fourier Transform on the absolute value histograms of the multiple DCT coefficients based on the first formula;

[0157] The first formula is:

[0158] A = |DFT(h)|;

[0159]

[0160] Where h is the target histogram, A is the amplitude spectrum of the target histogram, L is the length of the target histogram, and F is the normalized frequency of the target histogram.

[0161] In one implementation, the step of adaptively optimizing and correcting candidate quantization step sizes for the coarse estimate of the quantization step size to obtain the target optimal quantization step size includes:

[0162] Energy accumulation analysis was performed on the histograms of absolute values ​​of the multiple DCT coefficients to obtain multiple energy distribution maps;

[0163] Perform a neighborhood search on the energy distribution map to select the first optimal quantization step size group;

[0164] Based on the coarse estimation of the quantization step size, the sampling length of the histogram of absolute values ​​of the multiple DCT coefficients is dynamically adjusted to achieve adaptive optimization of the sampling interval in the frequency domain. The target optimal quantization step size is obtained by performing a neighborhood search through the first optimal quantization step size group.

[0165] In one implementation, the step of dynamically adjusting the sampling length of the plurality of DCT coefficient absolute value histograms based on the coarse estimation of the quantization step size includes:

[0166] The sampling length of the histogram of absolute values ​​of the multiple DCT coefficients is adjusted based on a dynamic adjustment formula, which is:

[0167]

[0168] Where b' is the sampling length of the histogram, q e The quantization step size is roughly estimated, and A is the amplitude spectrum of the target histogram.

[0169] In one implementation, the step of performing a neighborhood search through a first optimal quantization step size group to obtain the target optimal quantization step size includes:

[0170] The optimal quantization step size of the target is obtained based on the target selection formula.

[0171] The target selection formula is:

[0172]

[0173] Where, q f Let h be the target optimal quantization step size, h be the target histogram, Q be the candidate quantization step size, and n be the multiplier factor.

[0174] Example 4

[0175] The present invention also provides a computer-readable storage medium storing one or more programs, which can be executed by one or more processors to implement the steps of the decompressed WebP image quantization parameter estimation method as described above.

[0176] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for estimating quantization parameters of a decompressed WebP image, characterized in that, The method for estimating the quantization parameters of the decompressed WebP image includes: The target image is acquired, and the macroblocks of the target image are classified to obtain multiple groups of target macroblocks. The target image is a compressed and decompressed WebP image. Frequency domain periodic feature-driven quantization is applied to the multiple groups of target macroblocks to obtain a coarse estimate of the quantization step size; The coarse quantization step size is adaptively optimized and the candidate quantization step size is corrected to obtain the target optimal quantization step size.

2. The method for estimating quantization parameters of decompressed WebP images according to claim 1, characterized in that, The macroblock classification of the target image yields multiple groups of target macroblocks, including: The Y channel pixels of the target image are input into the macroblock classification process of the WebP encoder to generate macroblock category labels corresponding to the original compression process, thereby obtaining the multiple groups of target macroblocks.

3. The method for estimating quantization parameters of decompressed WebP images according to claim 1, characterized in that, The step of performing frequency domain periodic feature-driven quantization on the multiple groups of target macroblocks to obtain a coarse estimate of the quantization step size includes: Perform discrete cosine transform on the multiple groups of target macroblocks to construct multiple histograms of absolute values ​​of DCT coefficients; A discrete Fourier transform is performed on the histograms of absolute values ​​of the multiple DCT coefficients to extract the frequency domain features of the histograms of absolute values ​​of the multiple DCT coefficients. The frequency peak value of the frequency domain feature of the histogram of the absolute values ​​of the multiple DCT coefficients is obtained to obtain a coarse estimate of the quantization step size.

4. The method for estimating quantization parameters of decompressed WebP images according to claim 3, characterized in that, The step of performing a discrete Fourier transform on the histograms of the absolute values ​​of the multiple DCT coefficients includes: Perform Discrete Fourier Transform on the absolute value histograms of the multiple DCT coefficients based on the first formula; The first formula is: A = |DFT(h)|; Where h is the target histogram, A is the amplitude spectrum of the target histogram, L is the length of the target histogram, and F is the normalized frequency of the target histogram.

5. The method for estimating quantization parameters of decompressed WebP images according to claim 3, characterized in that, The adaptive optimization and candidate quantization step size correction of the coarse quantization step size to obtain the target optimal quantization step size includes: Energy accumulation analysis was performed on the histograms of absolute values ​​of the multiple DCT coefficients to obtain multiple energy distribution maps; Perform a neighborhood search on the energy distribution map to select the first optimal quantization step size group; Based on the coarse estimation of the quantization step size, the sampling length of the histogram of absolute values ​​of the multiple DCT coefficients is dynamically adjusted to achieve adaptive optimization of the sampling interval in the frequency domain. The target optimal quantization step size is obtained by performing a neighborhood search through the first optimal quantization step size group.

6. The method for estimating quantization parameters of decompressed WebP images according to claim 5, characterized in that, The step of coarsely estimating and dynamically adjusting the sampling length of the histogram of absolute values ​​of the multiple DCT coefficients based on the quantization step size includes: The sampling length of the histogram of absolute values ​​of the multiple DCT coefficients is adjusted based on a dynamic adjustment formula, which is: Where b' is the sampling length of the histogram, q e The quantization step size is roughly estimated, and A is the amplitude spectrum of the target histogram.

7. The method for estimating quantization parameters of decompressed WebP images according to claim 6, characterized in that, The step of performing a neighborhood search through the first optimal quantization step size group to obtain the target optimal quantization step size includes: The optimal quantization step size of the target is obtained based on the target selection formula. The target selection formula is: Where, q f Let h be the target optimal quantization step size, h be the target histogram, Q be the candidate quantization step size, and n be the multiplier factor.

8. A device for estimating quantization parameters of a decompressed WebP image, characterized in that, include: The classification module is used to acquire the target image, classify the macroblocks of the target image, and obtain multiple groups of target macroblocks. The target image is a compressed and decompressed WebP image. The driving module is used to drive the multiple groups of target macroblocks with frequency domain periodic features to obtain a coarse estimate of the quantization step size. An adaptive module is used to adaptively optimize the coarse estimate of the quantization step size and correct the candidate quantization step size to obtain the target optimal quantization step size.

9. A terminal, characterized in that, The terminal includes: a processor and a computer-readable storage medium communicatively connected to the processor. The computer-readable storage medium is adapted to store multiple instructions, and the processor is adapted to call the instructions in the computer-readable storage medium to execute the steps of the decompressed WebP image quantization parameter estimation method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more programs, which can be executed by one or more processors to implement the steps of the decompressed WebP image quantization parameter estimation method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Method and device for estimating processing of quantifying step size of pictures

    CN102801975A

  • Perceptual image and video coding

    CN105635735A

  • Method and device for estimating JPEG (Joint Photographic Experts Group) compression quantization step size of bitmap

    CN106485738A

  • Method and device for evaluating first-compression quantification step size of JPEG (Joint Photographic Experts Group) double-compressed image

    CN106488250A

  • JPEG to WebP image coding method and apparatus

    CN108156457A