Method and system for high-magnification compression and decompression of display image

Through technical means such as mean downsampling and macroblock division, high-magnification image compression is achieved, solving the problem that the compression ratio cannot be improved in the prior art, and significantly reducing the storage space requirement.

CN119893114APending Publication Date: 2025-04-25XIAMEN SHENGSHENG MICROELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411965582.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

In the image compression for display, the compression ratio cannot be effectively improved, resulting in insufficient reduction of storage space and transmission bandwidth.

Method used

A high-ratio compression and decompression method is adopted to achieve efficient image compression through mean downsampling, macroblock division, channel selection and maximum and minimum value difference encoding.

Benefits of technology

While maintaining the basic image information, it significantly reduces the required storage space and achieves high compression magnification, which is suitable for high compression rate applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119893114A_ABST
    Figure CN119893114A_ABST
Patent Text Reader

Abstract

The invention discloses a high-magnification compression and decompression method for a display image, which is used for retaining main edge information and a light and shade relationship of the image by combining a block down-sampling method and a block compression method, and comprises two parts, namely a compression method and a decompression method for the display image. The compression method comprises the following steps: performing M-row and N-column mean value down-sampling on a display image, performing H-row and W-column macro block division on down-sampled data, calculating a statistical value in a macro block, selecting a channel, classifying pixel points in the macro block, and performing compressed data coding on a classification category and a sampling value of a sampling unit where a maximum value and a minimum value are located. The decompression method comprises the following steps: decoding compressed data, carrying out H-row W-column macro block reduction on a classification category and a sampling value of a sampling unit where a maximum value and a minimum value are located, and carrying out M-row N-column copy up-sampling on macro block data to obtain a decompressed display image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an image compression algorithm, belongs to the field of image processing, and particularly relates to a high-rate compression and decompression method and system for displaying images. Background Art

[0002] Image compression is widely used in the display industry. Image compression can reduce storage space and transmission bandwidth while maintaining a certain image quality.

[0003] From the perspective of compression purposes, image compression can be divided into two categories, namely image compression for display and image compression for information extraction. Image compression technology for display refers to compression technology in which the compressed and decompressed image is output to the screen as display data. Usually, this type of compression requires low compression distortion rate, small compression error, and the human eye cannot distinguish the visual impact of compression. It has high requirements for compression effect, so the compression ratio of this type of compression algorithm is usually not high. Image compression technology for information extraction refers to compression technology in which the compressed and decompressed image is only used for image processing and image compensation modules, and not for screen display. When the image processing and image compensation modules do not have high requirements for the display effect of the compressed image, it is only necessary to retain the basic key information in the image to facilitate feature extraction of subsequent algorithms.

[0004] Traditional compression algorithms usually use image compression technology for display in the image compression for information extraction, without distinguishing the two. The advantage of this solution is that it can use existing image compression technology, reduce development time and ensure good compression effect, but there is also the problem that the compression ratio cannot be improved.

[0005] In view of the above problems, the present invention proposes a high-ratio compression and decompression method and system for displaying images. Summary of the invention

[0006] The present invention provides a high-rate compression and decompression method for displaying an image, comprising:

[0007] Step 1: perform mean downsampling of M rows and N columns on the display image;

[0008] Step 2: The downsampled data is further divided into macroblocks of H rows and W columns, each macroblock is composed of sampling values ​​of H rows and W columns of sampling units;

[0009] Step 3: Calculate the statistical value within the macroblock;

[0010] Step 4: channel selection and pixel classification within macroblock;

[0011] Step 5: Compress the data encoding of the sampling values ​​of the sampling units where the classification categories and the maximum and minimum values ​​are located.

[0012] In the step 1, the display image is divided into pixel sampling units of M rows and N columns, wherein each pixel is composed of three sub-pixels of R, G, and B; for the (R, G, B) pixels of M rows and N columns in each sampling unit, the mean values ​​of the R, G, and B channels are calculated respectively as the down-sampled data of the sampling unit, and the sampling values ​​(DS_R, DS_G, DS_B) of the R, G, and B channels are calculated using the following formulas:

[0013]

[0014] The step three comprises: respectively calculating the maximum value, minimum value, mean value and maximum and minimum value difference of the down-sampled values ​​in different sampling units of the same channel in the macroblock, wherein DS_R max ,DS_G max ,DS_B max The maximum value of the sampling value of each sampling unit of the R, G, and B channels in the macroblock, DS_R min ,DS_G min ,DS_B min The minimum value of the sampling value of each sampling unit of the R, G, and B channels in the macroblock, DS_R ave ,DS_G ave ,DS_B ave They are the mean values ​​of the sampling values ​​of each sampling unit of the R, G, and B channels in the macroblock, respectively, and are calculated as follows:

[0015] DS_R ave =(DS_R min +DS_R max ) / 2

[0016] DS_G ave =(DS_G min +DS_G max ) / 2

[0017] DS_B ave =(DS_B min +DS_B max ) / 2

[0018] DS_R diff ,DS_G diff ,DS_B diff They are the maximum and minimum differences of the sampling values ​​of each sampling unit of the R, G, and B channels in the macroblock:

[0019] DS_R diff =DS_R max -DS_R min

[0020] DS_Gdiff =DS_G max -DS_G min .

[0021] DS_B diff =DS_B max -DS_B min

[0022] The fourth step comprises:

[0023] Channel selection using DS_R diff ,DS_G diff ,DS_B diff Determine by relative size, if DS_R diff The largest of the three values, the channel selects the R channel; if DS_G diff The largest of the three values, the channel selects the G channel; if DS_B diff If the value is the largest among the three, the channel selected is channel B.

[0024] The step five comprises:

[0025] (1) If the channel selects the R channel, for each sampling unit in the macroblock, if DS_R ≥ DS_R ave , then the classification category of the sampling unit is 1, otherwise, the classification category of the sampling unit is 0, and the classification category of each sampling unit in the macroblock is stored in the compressed data;

[0026] At the same time, select DS_R of the R channel respectively max and DS_R min The sampling units are the i-th max Row j max Column (DS_R(i max ,j max ),DS_G(i max ,j max ),DS_B(i max ,j max )) and the i min Row j min Column (DS_R(i min ,j min ),DS_G(i min ,j min ),DS_B(i min ,j min )), where DS_R(i max ,j max )=DS_R max ,DS_R(i min ,j min )=DS_R min

[0027] Each macroblock needs to store the sampling values ​​of the R, G, and B channels of the sampling unit where the maximum and minimum values ​​are located;

[0028] (2) If the channel selected is the G or B channel, the statistical value of the G or B channel is used for calculation.

[0029] The present invention also provides a high-magnification decompression method for displaying images, which is used to decompress data compressed by the high-magnification compression method for displaying images, comprising:

[0030] Step 6: Decoding compressed data;

[0031] Step 7, classify the categories and the sampling values ​​of the sampling units where the maximum and minimum values ​​are located, and perform H-row and W-column macroblock restoration;

[0032] Step 8: Perform M-row and N-column replication and up-sampling on the macroblock data to obtain a decompressed display image.

[0033] In step 6, the classification category of each sampling unit of the macroblock and the sampling value (DS_R(i max ,j max ),DS_G(i max ,j max ),DS_B(i max ,j max )) and (DS_R(i min ,j min ),DS_G(i min ,j min ),DS_B(i min ,j min )).

[0034] In step 7, if the classification category of the sampling unit in the i-th row and j-th column is 1, the sampling value of the sampling unit where the maximum value is located (DS_R(i max ,j max ),DS_G(i max ,j max ),DS_B(i max ,j max ));

[0035] If the classification category of the sampling unit in the i-th row and j-th column is 0, the sampling value of the sampling unit with the minimum value (DS_R(i min ,j min ),DS_G(i min ,j min ),DS_B(i min ,j min )).

[0036] In step eight, the sampling value of a single sampling unit is replicated and up-sampled in M ​​rows and N columns to obtain M rows and N columns of the same pixel points, and the R, G, B channel values ​​of the pixel points are the R, G, B channel sampling values ​​of the sampling unit.

[0037] The invention also provides a high-magnification compression and decompression system for displaying images, comprising a compression part and a decompression part.

[0038] (I) The compression part includes:

[0039] Row data buffer unit: obtains input data and performs row data storage buffer;

[0040] Downsampling unit: obtains buffer data in the row data buffer unit, performs downsampling in the sampling unit, and stores and buffers the sampled values ​​in the sampling value buffer unit;

[0041] Sampling value buffer unit: obtains sampling values ​​and performs sampling value storage buffer;

[0042] Macroblock compression unit: obtains the buffer data of the sampling value buffer unit, divides the data into macroblocks, and performs statistics within the macroblocks to obtain the classification information required for the compressed data and the partial sampling values ​​that need to be encoded;

[0043] Compressed data encoding unit: encodes the data information to be compressed and outputs it as a macroblock compressed data stream;

[0044] (II) The decompression part includes:

[0045] Compressed data decoding unit: decodes the macroblock compressed data stream into the data information required for decompression and transmits it to the macroblock restoration unit;

[0046] Macroblock restoration unit: restores the macroblock using the decompressed data information, and transmits the restored macroblock data to the sampling value buffer unit;

[0047] Sampling value buffer unit: the sampling value buffer unit stores and buffers the restored macroblock data;

[0048] Upsampling unit: The upsampling unit obtains the buffer data in the sampling value buffer unit, performs upsampling, obtains the decompressed output data, and outputs it.

[0049] The high-ratio compression and decompression method for display images proposed in the present invention has an adjustable compression ratio and a simple algorithm implementation. While retaining basic image information, the required storage space can be reduced to a large extent. The method is a compression and decompression method suitable for high-compression ratio applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1The compression method of the present invention is shown;

[0051] Figure 2 Shown is the decompression method of the present invention;

[0052] Figure 3 The sampling unit composition of the present invention is shown;

[0053] Figure 4 Shown is a macroblock of the present invention;

[0054] Figure 5 Shown is a compressed structural diagram of the system of the present invention;

[0055] Figure 6 Shown is a decompression structure diagram of the system of the present invention. DETAILED DESCRIPTION

[0056] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0057] See also Figure 1 , which is shown as a high-ratio compression method for displaying images, including:

[0058] Step 1: perform mean downsampling of M rows and N columns on the display image;

[0059] Step 2: The downsampled data is further divided into macroblocks of H rows and W columns. Each macroblock consists of sample values ​​of H rows and W columns of sampling units. Figure 4 shown.

[0060] Step 3: Calculate the statistical value within the macroblock;

[0061] Step 4: channel selection and pixel classification within macroblock;

[0062] Step 5: Compress the data encoding of the sampling values ​​of the sampling units where the classification categories and the maximum and minimum values ​​are located.

[0063] In step 1, the displayed image is divided into pixel sampling units with M rows and N columns, where each pixel consists of three sub-pixels: R, G, and B. The sampling unit is composed of Figure 3 For each sampling unit with M rows and N columns (R, G, B) pixels, the mean of each channel of R, G, and B is calculated as the down-sampled data of the sampling unit. The sampling values ​​of the R, G, and B channels (DS_R, DS_G, DS_B) are calculated using the following formula:

[0064]

[0065] Step 3 includes: calculating the maximum, minimum, mean and maximum-minimum difference of the downsampled values ​​in different sampling units of the same channel in the macroblock, where DS_R max ,DS_G max ,DS_B max The maximum value of the sampling value of each sampling unit of the R, G, and B channels in the macroblock, DS_R min ,DS_G min ,DS_B min The minimum value of the sampling value of each sampling unit of the R, G, and B channels in the macroblock, DS_R ave ,DS_G ave ,DS_B ave They are the mean values ​​of the sampling values ​​of each sampling unit of the R, G, and B channels in the macroblock, respectively, and are calculated as follows:

[0066] DS_R ave =(DS_R min +DS_R max ) / 2

[0067] DS_G ave =(DS_G min +DS_G max ) / 2

[0068] DS_B ave =(DS_B min +DS_B max ) / 2

[0069] DS_R diff ,DS_G diff ,DS_B diff They are the maximum and minimum differences of the sampling values ​​of each sampling unit of the R, G, and B channels in the macroblock:

[0070] DS_R diff =DS_R max -DS_R min

[0071] DS_G diff =DS_G max -DS_G min .

[0072] DS_B diff =DS_B max -DS_B min

[0073] Step 4 includes:

[0074] Channel selection using DS_R diff ,DS_G diff ,DS_B diff Determine by relative size, if DS_R diff The largest of the three values, the channel selects the R channel; if DS_G diff The largest of the three values, the channel selects the G channel; if DS_B diff If the value is the largest among the three, the channel selected is channel B.

[0075] Step five includes:

[0076] (1) If the channel selects the R channel, for each sampling unit in the macroblock, if DS_R ≥ DS_R ave , then the classification category of the sampling unit is 1, otherwise, the classification category of the sampling unit is 0, and the classification category of each sampling unit in the macroblock is stored in the compressed data;

[0077] At the same time, select DS_R of the R channel respectively max and DS_R min The sampling units are the i-th max Row j max Column (DS_R(i max ,j max ),DS_G(i max ,j max ),DS_B(i max ,j max )) and the i min Row j min Column (DS_R(i min ,j min ),DS_G(i min ,j min ),DS_B(i min ,j min )), where DS_R(i max ,j max )=DS_R max ,DS_R(i min ,j min )=DS_R min

[0078] Each macroblock needs to store the sampling values ​​of the R, G, and B channels of the sampling unit where the maximum and minimum values ​​are located;

[0079] (2) If the channel selected is the G or B channel, the statistical value of the G or B channel is used for calculation.

[0080] See also Figure 2 , which is shown as a high-magnification decompression method for displaying images, including:

[0081] Step 6: Decoding compressed data;

[0082] Step 7, classify the categories and the sampling values ​​of the sampling units where the maximum and minimum values ​​are located, and perform H-row and W-column macroblock restoration;

[0083] Step 8: Perform M-row and N-column replication and up-sampling on the macroblock data to obtain a decompressed display image.

[0084] In step 6, the classification category of each sampling unit of the macroblock and the sampling value (DS_R(i max ,j max ),DS_G(i max ,j max ),DS_B(i max ,j max )) and (DS_R(i min ,j min ),DS_G(i min ,j min ),DS_B(i min ,j min )).

[0085] In step 7, if the classification category of the sampling unit in the i-th row and j-th column is 1, the sampling value of the sampling unit where the maximum value is located (DS_R(i max ,j max ),DS_G(i max ,j max ),DS_B(i max ,j max ));

[0086] If the classification category of the sampling unit in the i-th row and j-th column is 0, the sampling value of the sampling unit with the minimum value (DS_R(i min ,j min ),DS_G(i min ,j min ),DS_B(i min ,j min )).

[0087] In step eight, the sampling value of a single sampling unit is replicated and up-sampled in M ​​rows and N columns to obtain M rows and N columns of the same pixel points, and the R, G, B channel values ​​of the pixel points are the R, G, B channel sampling values ​​of the sampling unit.

[0088] See also Figure 5-6 , which is shown as a high-ratio compression and decompression system for displaying images, including a compression part and a decompression part.

[0089] (I) The compression part includes:

[0090] Row data buffer unit: obtains input data and performs row data storage buffer;

[0091] Downsampling unit: obtains buffer data in the row data buffer unit, performs downsampling in the sampling unit, and stores and buffers the sampled values ​​in the sampling value buffer unit;

[0092] Sampling value buffer unit: obtains sampling values ​​and performs sampling value storage buffer;

[0093] Macroblock compression unit: obtains the buffer data of the sampling value buffer unit, divides the data into macroblocks, and performs statistics within the macroblocks to obtain the classification information required for the compressed data and the partial sampling values ​​that need to be encoded;

[0094] Compressed data encoding unit: encodes the data information to be compressed and outputs it as a macroblock compressed data stream;

[0095] (II) The decompression part includes:

[0096] Compressed data decoding unit: decodes the macroblock compressed data stream into the data information required for decompression and transmits it to the macroblock restoration unit;

[0097] Macroblock restoration unit: restores the macroblock using the decompressed data information, and transmits the restored macroblock data to the sampling value buffer unit;

[0098] Sampling value buffer unit: the sampling value buffer unit stores and buffers the restored macroblock data;

[0099] Upsampling unit: The upsampling unit obtains the buffer data in the sampling value buffer unit, performs upsampling, obtains the decompressed output data, and outputs it.

[0100] The compression method proposed in the present invention combines block downsampling with block compression, which can further improve the compression rate based on block compression. The advantage of this method is that the compression rate can be flexibly changed according to application requirements. In addition, this method highlights the light and dark contrast and boundaries of basic information in the image, and ignores subtle changes in details in the picture.

[0101] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is limited by the appended claims and their equivalents.

Claims

1. A high-rate compression method for displaying an image, characterized in that: include: Step 1: perform mean downsampling of M rows and N columns on the display image; Step 2: The downsampled data is further divided into macroblocks of H rows and W columns, each macroblock is composed of sampling values ​​of H rows and W columns of sampling units; Step 3: Calculate the statistical value within the macroblock; Step 4: channel selection and pixel classification within macroblock; Step 5: Compress the data encoding of the sampling values ​​of the sampling units where the classification categories and the maximum and minimum values ​​are located.

2. A high-rate compression method for displaying an image according to claim 1, characterized in that: In the step 1, the display image is divided into pixel sampling units of M rows and N columns, wherein each pixel is composed of three sub-pixels of R, G, and B; for the (R, G, B) pixels of M rows and N columns in each sampling unit, the mean values ​​of the R, G, and B channels are calculated respectively as the down-sampled data of the sampling unit, and the sampling values ​​(DS_R, DS_G, DS_B) of the R, G, and B channels are calculated using the following formulas:

3. A high-rate compression method for displaying an image according to claim 2, characterized in that: The step three comprises: respectively calculating the maximum value, minimum value, mean value and maximum and minimum value difference of the down-sampled values ​​in different sampling units of the same channel in the macroblock, Among them, DS_R max ,DS_G max ,DS_B max The maximum value of the sampling value of each sampling unit of the R, G, and B channels in the macroblock, DS_R min ,DS_G min ,DS_B min The minimum value of the sampling value of each sampling unit of the R, G, and B channels in the macroblock, DS_R ave ,DS_G ave ,DS_B ave They are the mean values ​​of the sampling values ​​of each sampling unit of the R, G, and B channels in the macroblock, respectively, and are calculated as follows: DS_R ave =(DS_R min +DS_R max ) / 2 DS_G ave =(DS_G min +DS_G max ) / 2 DS_B ave =(DS_B min +DS_B max ) / 2 DS_R diff ,DS_G diff ,DS_B diff They are the maximum and minimum differences of the sampling values ​​of each sampling unit of the R, G, and B channels in the macroblock: DS_R diff =DS_R max -DS_R min DS_G diff =DS_G max -DS_G min 。 DS_B diff =DS_B max -DS_B min。 4. A high-rate compression method for displaying images according to claim 3, characterized in that: The fourth step comprises: Channel selection using DS_R diff ,DS_G diff ,DS_B diff Determine by relative size, if DS_R diff The largest of the three values, the channel selects the R channel; if DS_G diff The largest of the three values, the channel selects the G channel; if DS_B diff If the value is the largest among the three, the channel selected is channel B.

5. A high-rate compression method for displaying images according to claim 4, characterized in that: The step five comprises: (1) If the channel selects the R channel, for each sampling unit in the macroblock, if DS_R ≥ DS_R ave , then the classification category of the sampling unit is 1, otherwise, the classification category of the sampling unit is 0, and the classification category of each sampling unit in the macroblock is stored in the compressed data; At the same time, select DS_R of the R channel respectively max and DS_R min The sampling units are the i-th max Row j max Column (DS_R(i max ,j max ),DS_G(i max ,j max ),DS_B(i max ,j max )) and the i min Row j min Column (DS_R(i min ,j min ),DS_G(i min ,j min ),DS_B(i min ,j min )), where DS_R(i max ,j max )=DS_R max ,DS_R(i min ,j min )=DS_R min Each macroblock needs to store the sampling values ​​of the R, G, and B channels of the sampling unit where the maximum and minimum values ​​are located; (2) If the channel selected is the G or B channel, the statistical value of the G or B channel is used for calculation.

6. A high-magnification decompression method for displaying images, used for decompressing data compressed by a high-magnification compression method for displaying images according to any one of claims 1 to 5, characterized in that: include: Step 6: Decoding compressed data; Step 7, classify the categories and the sampling values ​​of the sampling units where the maximum and minimum values ​​are located, and perform H-row and W-column macroblock restoration; Step 8: Perform M-row and N-column replication and up-sampling on the macroblock data to obtain a decompressed display image.

7. A high-magnification decompression method for display images according to claim 6, characterized in that: In step 6, the classification category of each sampling unit of the macroblock and the sampling value (DS_R(i max ,j max ),DS_G(i max ,j max ),DS_B(i max ,j max )) and (DS_R(i min ,j min ),DS_G(i min ,j min ),DS_B(i min ,j min )).

8. A high-magnification decompression method for display images according to claim 7, characterized in that: In step 7, if the classification category of the sampling unit in the i-th row and j-th column is 1, the sampling value of the sampling unit where the maximum value is located (DS_R(i max ,j max ),DS_G(i max ,j max ),DS_B(i max ,j max )); If the classification category of the sampling unit in the i-th row and j-th column is 0, the sampling value of the sampling unit with the minimum value (DS_R(i min ,j min ),DS_G(i min ,j min ),DS_B(i min ,j min )).

9. A high-magnification decompression method for display images according to claim 8, characterized in that: In step eight, the sampling value of a single sampling unit is replicated and up-sampled in M ​​rows and N columns to obtain M rows and N columns of the same pixel points, and the R, G, B channel values ​​of the pixel points are the R, G, B channel sampling values ​​of the sampling unit.

10. A high-rate compression and decompression system for displaying images, comprising a compression part and a decompression part, characterized in that: (I) The compression part includes: Row data buffer unit: obtains input data and performs row data storage buffer; Downsampling unit: obtains buffered data in the row data buffer unit, performs downsampling in the sampling unit, and stores and buffers the sampled values ​​in the sampling value buffer unit; Sampling value buffer unit: obtains sampling values ​​and performs sampling value storage buffer; Macroblock compression unit: obtains the buffer data of the sampling value buffer unit, divides the macroblocks, and performs statistics within the macroblocks to obtain the classification category information required for compressed data and the partial sampling values ​​that need to be encoded; Compressed data encoding unit: encodes the data information to be compressed and outputs it as a macroblock compressed data stream; (II) The decompression part includes: Compressed data decoding unit: decodes the macroblock compressed data stream into the data information required for decompression and transmits it to the macroblock restoration unit; Macroblock restoration unit: restores the macroblock using the decompressed data information, and transmits the restored macroblock data to the sampling value buffer unit; Sampling value buffer unit: the sampling value buffer unit stores and buffers the restored macroblock data; Upsampling unit: The upsampling unit obtains the buffer data in the sampling value buffer unit, performs upsampling, obtains the decompressed output data, and outputs it.