Image compression method based on adaptive quadtree segmentation and standard deviation optimization
Through the image compression method of adaptive quadtree segmentation and standard deviation optimization, the problems of oversegmentation and low computing efficiency in the traditional quadtree compression algorithm are solved, and image details retention and quality improvement under high compression rates are achieved, which is suitable for real-time image transmission and low bandwidth communication.
Patent Information
- Application Number
- CN202510329548.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-07-04
AI Technical Summary
The existing quad-tree compression method has problems such as oversegment, low computing efficiency and loss of details under high compression rates, making it difficult to meet quality requirements in high-precision image transmission and storage scenarios.
Adaptive quadtree segmentation and standard deviation optimization methods are adopted to optimize image compression efficiency and reconstruction quality through dynamic color standard deviation evaluation, area weighting and hierarchical priority control, avoid oversegment and retain high-frequency details.
It significantly improves image detail retention capability and peak signal-to-noise ratio at high compression rates, reduces computing complexity and storage requirements, and is suitable for real-time image transmission and low-bandwidth communication.
Smart Images

Figure CN120259451A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an image compression method, especially an image compression method based on adaptive quadtree segmentation and standard deviation optimization. Background Art
[0002] With the wide application of digital images in fields such as Internet communication, multimedia storage, and medical imaging, image compression technology has become the key to solving the problems of massive data transmission and storage efficiency. Traditional image compression algorithms are mostly based on discrete cosine transform (DCT) or predictive coding technology. Although they have high universality, they are prone to problems such as block effects and detail loss at high compression rates, and it is difficult to meet the requirements of scenarios with strict image quality requirements.
[0003] In recent years, compression methods based on region segmentation have gradually received attention. Especially, the quadtree segmentation technology, due to its hierarchical structure characteristics, can dynamically divide regions according to the local complexity of the image, thus achieving a balance between compression rate and reconstruction quality. In the prior art, a typical quadtree compression method recursively divides the image region and calculates a single color value for each sub-region for approximate representation. However, such methods have some significant defects: First, traditional quadtree algorithms usually use a fixed recursion depth or a simple color difference threshold as the segmentation termination condition, resulting in insufficient segmentation of regions with complex textures (such as blurred edges) or over-segmentation of smooth regions (such as reduced compression rate). Second, the existing methods do not fully consider the statistical characteristics of the color distribution within the region, making it difficult to adaptively distinguish high-detail regions from flat regions, resulting in resource waste. Moreover, most algorithms directly use the mean color approximation during region merging, ignoring the impact of color variance on the reconstruction quality, leading to the loss of high-frequency information. Especially at low compression rates, the peak signal-to-noise ratio (PSNR) drops significantly. Therefore, how to implement an adaptive quadtree segmentation strategy based on color statistical characteristics, while improving compression efficiency and ensuring the quality of the reconstructed image, has become an urgent technical challenge in the current image compression field, and is of great significance for promoting high-precision real-time image transmission and storage and reducing the resource load of edge computing devices.
[0004] Although improved solutions for dynamically adjusting the segmentation strategy have been proposed in the prior art, they still face limitations such as high computational complexity and insufficient control of quantization errors in regions with uneven color distributions, making it difficult to balance compression efficiency and reconstruction quality. Therefore, the present invention proposes an image compression method based on adaptive quadtree segmentation and standard deviation optimization, aiming to achieve the collaborative optimization of image compression efficiency and reconstruction quality through a dynamic color standard deviation evaluation and hierarchical priority control mechanism, combined with a regional area weighting strategy, significantly improving the detail retention ability and peak signal-to-noise ratio at high compression rates, providing an efficient and reliable compression solution for scenarios such as real-time image transmission and low-bandwidth communication, and having broad application prospects. Through the method of the present invention, it is possible to greatly reduce the data storage and transmission bandwidth requirements while ensuring image detail and color consistency, providing technical support for resource-constrained scenarios in the fields of image processing, transmission, etc. Summary of the Invention
[0005] Aiming at the problems of over-segmentation and low computational efficiency caused by the fixed quadtree segmentation strategy in the existing image compression technology, and the serious loss of details in the traditional mean approximation method at high compression rates, the present invention proposes an image compression method based on adaptive quadtree segmentation and standard deviation optimization. This method realizes the collaborative optimization of image compression efficiency and reconstruction quality through a dynamic color standard deviation evaluation and hierarchical priority control mechanism, combined with a regional area weighting strategy, effectively balancing the segmentation granularity of texture-complex regions and the quantization error of smooth regions, and significantly improving the peak signal-to-noise ratio and detail retention ability of the compressed image.
[0006] The image compression method based on adaptive quadtree segmentation and standard deviation optimization realizes regional segmentation through dynamic evaluation of color standard deviation, and enhances the accuracy and rapidity of the method by combining the error constraint of regional area weighting and the hierarchical priority processing strategy.
[0007] The method accurately distinguishes high-complexity textures and smooth regions by dynamically evaluating the color standard deviation of each region, and adaptively adjusts the segmentation granularity. At the same time, the regional area weighting error constraint mechanism further optimizes the segmentation decision, reducing the redundant calculation of large-size low-variance regions. The hierarchical priority processing strategy significantly improves the algorithm execution efficiency by focusing on high-standard deviation sub-regions. The synergistic effect of the three reduces data redundancy while ensuring the integrity of high-frequency details, ultimately achieving visual fidelity and real-time processing ability at high compression rates, and providing an efficient solution for low-bandwidth scenarios such as mobile image transmission and remote monitoring.
[0008] The features of the present invention are:
[0009] (1) By calculating the standard deviation of the RGB channels of the region in real time and combining the area-weighted benefit analysis, adaptively control the quadtree recursion depth, improving the balance of compression rate and reconstruction quality while reducing over-segmentation.
[0010] (2) Use the area of the region as the weight for calculating the standard deviation gain, ensuring that large-sized regions with low variance are preferentially terminated for segmentation, significantly reducing the amount of redundant data.
[0011] (3) Through the standard deviation-driven sub-region sorting strategy, preferentially process regions with high complexity, and combine mean color filling to achieve fast approximation, optimizing the time complexity of the algorithm while ensuring the PSNR metric. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 It is a schematic diagram of the overall process of the image compression method based on adaptive quadtree segmentation.
[0013] Figure 2 It is a flowchart of adaptive recursive segmentation based on RGB standard deviation.
[0014] Figure 3 It is a flowchart of area-weighted error constraint for regions.
[0015] Figure 4 It is a flowchart of standard deviation-driven priority processing and fast approximation. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0016] The following will describe in detail an image compression method based on adaptive quadtree segmentation and standard deviation optimization provided by the present invention with reference to the accompanying drawings.
[0017] The present invention provides an image compression method based on adaptive quadtree segmentation and standard deviation optimization. The method dynamically evaluates the color complexity of image regions, combines statistical features and hierarchical processing strategies to achieve collaborative optimization of compression efficiency and reconstruction quality. As Figure 1 shown, its core implementation logic includes three parts: First, dynamically control the quadtree recursive segmentation depth based on the real-time calculated standard deviation of the RGB channels to avoid over-segmentation problems caused by traditional fixed thresholds; then introduce an area-weighted mechanism to optimize the merging decision for low-variance regions, significantly reducing the amount of redundant data; finally, optimize the algorithm efficiency through standard deviation-driven priority sorting and mean approximation filling while ensuring visual fidelity. The method forms a complete technical chain from segmentation decision-making, error control to calculation acceleration, effectively solving the problems of detail loss and calculation time-consuming under high compression ratios.
[0018] 1. Adaptive recursive control based on dynamic evaluation of RGB channel standard deviation
[0019] As Figure 2As shown in the figure, the method first performs global block processing on the input image, preliminarily defines the entire image as a rectangular area, and performs RGB channel statistics on all pixels in the area. In each area to be processed, the pixel values p of the red, green, and blue channels are counted separately. c,i (c∈{R,G,B}, i is a pixel point), calculate the mean μ of each channel c , then based on the mean μ c Find the corresponding standard deviation σ c , thus obtaining the degree of discreteness of the color distribution in the region. The size of the standard deviation directly reflects the severity of the color change in the region: a larger standard deviation indicates that there are obvious color fluctuations and rich details in the region, while a smaller standard deviation indicates that the color of the region is uniform. c The calculation method is as follows:
[0020]
[0021] In order to achieve adaptive control of segmentation depth, the method introduces a segmentation benefit evaluation mechanism. After dividing the current area into four sub-areas, the system calculates the RGB standard deviation of each sub-area respectively, and uses the sum of squares of the standard deviation as a measure to compare the change in the overall color discreteness before and after segmentation. Here, the area of the region is introduced into the benefit calculation as an important weight factor, so that for large-size areas, even if their color discreteness is low, it is easier to be identified as not requiring further segmentation. When the calculated benefit value is lower than the preset dynamic threshold, or the area has met the termination condition (the area size reaches a single pixel or the sum of squares of the standard deviation is not greater than 0.1, that is, ∑ c∈{R,G,B} σ c 2 ≤0.1), the system stops further segmentation. This strategy effectively balances the image compression rate and reconstruction quality, retaining the details of the area with drastic color changes while avoiding excessive processing of low-complexity areas, thereby achieving the purpose of adaptively controlling the recursive segmentation depth.
[0022] 2. Error constraint mechanism of regional area weighting
[0023] like Figure 3 As shown in the figure, in order to prevent redundant segmentation of large-size, low-variance regions during image compression, the method introduces a regional area weighting strategy in the segmentation decision. Specifically, when evaluating the segmentation benefit, not only the change in the color standard deviation in the region is calculated, but also the change is multiplied by the regional area, so that under the same standard deviation difference, the overall error contribution of the large-size region is more significant due to its larger area, and the benefit value is higher. The calculation method of the segmentation benefit is as follows:
[0024]
[0025] Among them, σ c,k is the standard deviation of the k-th sub-region channel c.
[0026] This strategy is particularly applicable to large regions with uniform color distribution in practice. Although the standard deviation of these regions is low itself, due to their huge area, the error amplification effect is obvious, making the system easier to terminate the segmentation operation and directly adopt mean filling.
[0027] In the region merging stage, for the regions where the segmentation is terminated, calculate the mean color of their RGB three channels, and fill this color into the entire region. The merged regions only store their upper left and lower right coordinates and the mean color value in the compressed data stream, rather than storing each pixel one by one, thus significantly reducing the data volume. This error constraint mechanism based on region area weighting not only effectively reduces unnecessary segmentation operations, but also achieves significant optimization in data transmission and storage, while maintaining the consistency and stability of the overall visual effect of the image.
[0028] 3. Standard Deviation-Driven Priority Processing and Fast Approximation
[0029] As Figure 4 shown, in the recursive segmentation process, in order to optimize the calculation resource allocation and ensure the retention of key details of the image, this method adopts a standard deviation-driven priority processing strategy. In the specific implementation, after each quadtree segmentation generates four sub-regions, the system will calculate the sum of the squares of the RGB standard deviations of each sub-region ∑ c∈{R,G,B} σ c,k 2 and sort them in descending order according to this value, and give priority to processing the sub-regions with more drastic color changes and rich details, such as the parts with obvious edges or textures. This priority sorting mechanism ensures that under limited computing resources, the high-complexity regions can be carefully segmented first, thus effectively retaining high-frequency information and important visual details.
[0030] For the regions where the segmentation is terminated, directly fill them with the mean color (that is, round the RGB channel values respectively to obtain the mean color), and skip further recursive calculations. The mean approximation method sacrifices a small amount of accuracy (the color deviation in low-variance regions is small) in exchange for a significant improvement in computing efficiency. At the same time, by setting the threshold of the sum of the squares of the standard deviation (≤0.1), the quantization error of the merged regions is constrained to ensure that the peak signal-to-noise ratio remains at a high level. Specifically, the calculation method of the peak signal-to-noise ratio is as follows:
[0031]
[0032] Among them, W and H are the width and height of the image respectively; p c,x,y , They are the pixel values of the original image and the compressed image respectively.
[0033] In summary, the present invention collaboratively realizes an efficient and adaptive image segmentation and compression method by introducing a dynamic evaluation mechanism based on the standard deviation of the RGB channels, an error constraint weighted by the area of the region, and a priority processing and fast approximation strategy driven by the standard deviation.
Claims
1. An image compression method based on adaptive quadtree segmentation and standard deviation optimization, characterized in that: The method dynamically controls the recursive segmentation depth of the quadtree by calculating the standard deviation of the RGB channels of the image region in real time, combining the region area weighting strategy and the hierarchical priority processing mechanism, optimizing the balance between compression efficiency and reconstruction quality; evaluates the segmentation gain through the product of the region area and the standard deviation difference, and preferentially terminates the segmentation of large-size low-variance regions to reduce the amount of redundant data; and through the standard deviation-driven sub-region sorting strategy, preferentially processes regions with high complexity, and combines mean color filling to achieve fast approximation, reducing the algorithm time complexity while ensuring the peak signal-to-noise ratio.
2. According to claim 1, the image compression method based on adaptive quadtree segmentation and standard deviation optimization is characterized in that: The dynamic control of the quadtree recursive segmentation depth includes the following steps: calculating the mean and standard deviation of the RGB channels of the current region in real time, and determining whether to terminate the segmentation based on the sum of the squares of the standard deviations and a preset threshold; when the region size is a single pixel or the sum of the squares of the standard deviations is less than or equal to 0.1, stop the segmentation and merge the regions, otherwise divide them into four sub-regions and recursively process them, where the segmentation gain is dynamically evaluated through the product of the region area and the standard deviation difference between the current region and the sub-regions.
3. According to claim 1, the image compression method based on adaptive quadtree segmentation and standard deviation optimization is characterized in that: The specific implementation of the region area weighting strategy is as follows: in the segmentation decision, the region area is used as a weight factor to amplify the segmentation gain of large-size low-variance regions and directly merge them into a single color block. The merged region only stores its coordinates and the RGB mean color value, and fills it with the mean color after rounding to reduce the data storage and transmission volume.
4. The image compression method based on adaptive quadtree segmentation and standard deviation optimization according to claim 1, characterized in that: The hierarchical priority processing mechanism includes: after each quadtree segmentation, sorting in descending order according to the sum of the squares of the RGB standard deviations of the sub-regions, and preferentially processing sub-regions with high color complexity; for low-complexity regions where the segmentation is terminated, directly fill them with the mean color and skip the recursive calculation; and constraining the merging error through the sum-of-squares-of-standard-deviations threshold to ensure that the peak signal-to-noise ratio of the reconstructed image meets the preset standard.
Citation Information
Cited By
Dynamic texture atlas recombination and compression method and system based on airspace sparsity
CN121810824A