CN117953085A - Graphic data compression method for computer image processing - Google Patents
Graphic data compression method for computer image processing Download PDFInfo
- Publication number
- CN117953085A CN117953085A CN202311849533.2A CN202311849533A CN117953085A CN 117953085 A CN117953085 A CN 117953085A CN 202311849533 A CN202311849533 A CN 202311849533A CN 117953085 A CN117953085 A CN 117953085A
- Authority
- CN
- China
- Prior art keywords
- image
- block
- order
- pixel
- flat
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 43
- 238000013144 data compression Methods 0.000 title claims abstract description 13
- 238000007906 compression Methods 0.000 claims abstract description 32
- 230000006835 compression Effects 0.000 claims abstract description 30
- 230000000903 blocking effect Effects 0.000 claims abstract description 23
- 230000011218 segmentation Effects 0.000 claims abstract description 20
- 238000002474 experimental method Methods 0.000 claims abstract description 16
- 238000003709 image segmentation Methods 0.000 claims abstract description 8
- 239000011159 matrix material Substances 0.000 claims description 13
- 230000000694 effects Effects 0.000 claims description 4
- 230000004927 fusion Effects 0.000 claims description 3
- 238000013139 quantization Methods 0.000 claims description 3
- 230000035945 sensitivity Effects 0.000 claims description 3
- 230000008030 elimination Effects 0.000 claims 1
- 238000003379 elimination reaction Methods 0.000 claims 1
- 230000009286 beneficial effect Effects 0.000 description 3
- 230000000007 visual effect Effects 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003595 spectral effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The invention relates to the technical field of image processing, and discloses a graphic data compression method for computer image processing, which comprises the following steps: s1, fitting data: for different images, if the images are divided according to the same size, the spatial correlation degree among the blocks in different blocks is different; s2, image segmentation; s3, multi-level image segmentation; s4, plain block flatness judgment; s5, eliminating blocking effect of image blocking; s6, performing a polynomial fitting experiment. The graphic data compression method for computer image processing ensures the high compression ratio of the image and simultaneously gives consideration to the high quality of the image; compared with the method of dividing the fourth-order pixel block, the compressed image has subjective quality similar to that of the method of dividing the fourth-order pixel block; compared with the method using the eight-order pixel block segmentation, the method has subjective quality which is far higher than that of the method using the eight-order pixel block segmentation; although the latter has a higher compression ratio than the method using sixteen-order pixel block division.
Description
Technical Field
The invention relates to the technical field of image processing, in particular to a graphic data compression method for computer image processing.
Background
Image compression refers to a technique of representing an original pixel matrix with fewer bits in a lossy or lossless manner, also called image coding; the image data can be compressed because of redundancy in the data. Redundancy of image data is mainly expressed as: spatial redundancy caused by correlation between adjacent pixels in an image; the time redundancy caused by correlation exists between different frames in the image sequence; the purpose of data compression is to reduce the number of bits required to represent data by removing these data redundancies due to the correlation of different color planes or spectral bands, and compression of image data is very important because of the huge amount of image data, which is very difficult to store, transmit, and process.
However, when an image is encoded in the existing computer image compression process, all inter-frame and intra-frame prediction modes corresponding to each encoding block are required to be used for prediction, and a prediction mode with the minimum rate distortion cost value is selected as the optimal prediction mode of the encoding block, so that the complexity of image encoding is high; meanwhile, the image quality is low and the definition is poor.
In summary, the problems of the prior art are: when an image is coded in the existing computer image compression process, all inter-frame and intra-frame prediction modes corresponding to each coding block are required to be used for prediction, and a prediction mode with the minimum rate distortion cost value is selected from the inter-frame and intra-frame prediction modes to be used as the optimal prediction mode of the coding block, so that the image coding complexity is high; meanwhile, the image quality is low and the definition is poor, so a graphic data compression method for computer image processing is provided to solve the problems.
Disclosure of Invention
(One) solving the technical problems
Aiming at the defects of the prior art, the invention provides a graphic data compression method for computer image processing, which has the advantages of high compression quality, high compression efficiency and the like, and solves the problems of poor compression quality and efficiency.
(II) technical scheme
In order to achieve the purposes of high compression quality and compression efficiency, the invention provides the following technical scheme:
a graphic data compression method for computer image processing, comprising the steps of:
S1, fitting data: for different images, if the images are divided according to the same size, the spatial correlation degree among the blocks in different blocks is different, and how to use the information correlation among different parts of the images is the key for obtaining the high compression ratio;
S2, image segmentation: adopting flat judgment to pixel blocks with different orders obtained by multi-level segmentation of the image, wherein a judgment function is marked as flat N block N (i,j), and a function return value is 0 (representing that the pixel block is non-flat) or1 (representing that the pixel block is flat);
S3, multi-level image segmentation: dividing the image into 16×16 pixel blocks, denoted as block 16 (i,j); applying a function flat 16 block 16 (i,j) to each 16-order pixel block, if flat 16 block 16 (i,j) =1, adopting plane fitting, otherwise dividing the 16-order pixel block into 8-order pixel blocks, and marking as block S (i,j); applying a function flat S block S (i,j) to each 8-order pixel block, if flat S block S (i,j) =1, adopting plane fitting, otherwise dividing the 8-order pixel block into 4-order pixel blocks, and recording as block 4 (i,j); applying a function flat 4 block 4 (i,j) to each 4-order pixel block, if flat 4 block 4 (i,j) =1, adopting plane fitting, otherwise adopting hyperbolic tangent function fitting;
S4, plain block flatness judgment: because the sensitivity of human eyes to chrominance signals is lower than that of the human eyes to luminance signals, part of color information in an image can be removed by utilizing the characteristic, an RGB image is converted into a YCbCr image, three channels Y, cb and Cr are separated, differential processing is carried out on the three channels Y, cb and Cr, a strict threshold value s is set for the luminance channel Y, a loose threshold value s is set for the color channels Cb and Cr, and the threshold values are different for different channels and different levels of pixel blocks;
S5, eliminating blocking effect of image blocking: before multi-level blocking of an image, copying and expanding a pixel matrix of the image by a factor of 3 (the first row and the first column of the pixel matrix are marked as 0; for example, an expanded 512 multiplied by 512 pixel image is changed into 682 multiplied by 682 pixel image), when non-overlapping blocking is carried out, the effect of dislocation blocking can be realized by each step of pixel block (the minimum is four steps), when the image is restored, boundary fusion is carried out according to dislocation information among the blocks, the rows and the columns generated by image expansion are eliminated, the original image I is assumed to be M multiplied by N, and the M 'multiplied by N' is obtained after the expansion of the rows and the columns; and performing multi-level blocking, wherein the size of each pixel block is B 1,B2,...,Bi, and B 1≤B2≤...≤Bi is adopted. To achieve equal division of pixel blocks, the pixel matrix of M 'x N' is further expanded to ceil (matrix I 'of M' x B i)×Bi×ceil(N'/Bi)×Bi;
S6, polynomial fitting experiment: first, a classical polynomial fitting experiment was used on the images. In a polynomial fitting method, an image is divided into non-overlapping pixel blocks of 4×4, 8×8 or 16×16, then a polynomial is adopted to fit a compressed image, the fitting function generally comprises a first-order polynomial function, a second-order polynomial function and a higher-order polynomial function, the image quality and the image compression ratio are comprehensively considered, a second-order polynomial is selected for experiments (the higher the polynomial order is, the better the image quality is, the lower the compression ratio is), and quantization and coding operations are not adopted for the experiments for facilitating comparison among methods;
The second order polynomial function is as follows:
F(x,y)=P0+P1x+P2y+P3X2+P4y2
To highlight the advantages of multi-level blocking, the following experiments were taken:
(1) Dividing an image into non-overlapping pixel blocks of fourth order, eighth order and sixteen order, and adopting second-order polynomial fitting;
(2) And carrying out multi-level segmentation on the image, adopting plane fitting for flat pixel blocks, and adopting second-order polynomial fitting for non-flat pixel blocks.
Preferably, N in the steps and S2 is the pixel block order (N e {4,8,16 }), block N (i,j) is the N-order pixel block to be determined, and (i, j) represents the coordinates of the pixel block in the image.
Preferably, the algorithm threshold set in step S4 is set as follows: sy4=50, sy8=30, sy16=10, scbcr4=100, scbcr8=70, scbcr16=40, for example, sy4=50 indicates that the flat judgment threshold of the Y channel 4-order pixel block is 50, and scbcr4=100 indicates that the flat judgment threshold of the CB and CR channel 4-order pixel blocks is 100.
Preferably, in the step S5, ceil (X) represents that X is rounded upward, and the expansion mode is copy-expanded (eliminated in image restoration) by tail rows and tail columns.
(III) beneficial effects
Compared with the prior art, the invention provides a graphic data compression method for computer image processing, which has the following beneficial effects:
The graphic data compression method for computer image processing ensures the high compression ratio of the image and simultaneously gives consideration to the high quality of the image; compared with the method of dividing the fourth-order pixel block, the compressed image has subjective quality similar to that of the method of dividing the fourth-order pixel block; compared with the method using the eight-order pixel block segmentation, the method has subjective quality which is far higher than that of the method using the eight-order pixel block segmentation; compared with the method using sixteen-order pixel block segmentation, the latter has higher compression ratio, but the structure and detail of the image are subjectively greatly destroyed and distorted, so that unacceptable visual experience is caused, therefore, the superior performance of multi-level segmentation is shown, while the multi-level segmentation method improves the quality and the compression ratio of the image, but the generated blockiness is still unavoidable, so that the staggered segmentation is adopted to eliminate the blockiness, and the image compression quality is further improved.
Detailed Description
The technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Aiming at improving the image compression quality and compression efficiency, a graphic data compression method for computer image processing is provided, which comprises the following steps:
S1, fitting data: for different images, if the images are divided according to the same size, the spatial correlation degree among the blocks in different blocks is different, and how to use the information correlation among different parts of the images is the key for obtaining the high compression ratio;
S2, image segmentation: adopting flat judgment on pixel blocks with different orders obtained by multi-level segmentation of an image, wherein a judgment function is recorded as a flat N block N (i,j), a function return value is 0 (representing that the pixel blocks are non-flat) or 1 (representing that the pixel blocks are flat), N is the order of the pixel blocks (N epsilon {4,8,16 }), block N (i,j) is the N-order pixel block to be judged, and (i, j) represents the coordinates of the pixel blocks in the image;
S3, multi-level image segmentation: dividing the image into 16×16 pixel blocks, denoted as block 16 (i,j); applying a function flat 16 block 16 (i,j) to each 16-order pixel block, if flat 16 block 16 (i,j) =1, adopting plane fitting, otherwise dividing the 16-order pixel block into 8-order pixel blocks, and marking as block S (i,j); applying a function flat S block S (i,j) to each 8-order pixel block, if flat S block S (i,j) =1, adopting plane fitting, otherwise dividing the 8-order pixel block into 4-order pixel blocks, and recording as block 4 (i,j); applying a function flat 4 block 4 (i,j) to each 4-order pixel block, if flat 4 block 4 (i,j) =1, adopting plane fitting, otherwise adopting hyperbolic tangent function fitting;
S4, plain block flatness judgment: because the sensitivity of human eyes to chrominance signals is lower than that of the human eyes to luminance signals, a part of color information in an image can be removed by utilizing the characteristic, an RGB image is converted into a YCbCr image, three channels Y, cb and Cr are separated, differential processing is carried out on the three channels Y, cb and Cr, a strict threshold value s is set for the luminance channel Y, a loose threshold value s is set for the color channels Cb and Cr, the threshold values are also different for different channels and different levels of pixel blocks, and the threshold values of the proposed algorithm are set as follows: sy4=50, sy8=30, sy16=10, scbcr4=100, scbcr8=70, scbcr16=40, for example, sy4=50 indicates that the flat judgment threshold of the Y channel 4-order pixel block is 50, and scbcr4=100 indicates that the flat judgment threshold of the CB and CR channel 4-order pixel blocks is 100;
S5, eliminating blocking effect of image blocking: before multi-level blocking of an image, copying and expanding a pixel matrix of the image by a factor of 3 (the first row and the first column of the pixel matrix are marked as 0; for example, an expanded 512 multiplied by 512 pixel image is changed into 682 multiplied by 682 pixel image), when non-overlapping blocking is carried out, the effect of dislocation blocking can be realized by each step of pixel block (the minimum is four steps), when the image is restored, boundary fusion is carried out according to dislocation information among the blocks, the rows and the columns generated by image expansion are eliminated, the original image I is assumed to be M multiplied by N, and the M 'multiplied by N' is obtained after the expansion of the rows and the columns; and performing multi-level blocking, wherein the size of each pixel block is B 1,B2,...,Bi, and B 1≤B2≤...≤Bi is adopted. In order to realize equal division of pixel blocks, the pixel matrix of M 'X N' is further expanded into ceil (matrix I 'of M' X B i)×Bi×ceil(N'/Bi)×Bi) before the pixel blocks are divided, wherein ceil (X) represents that X is rounded upwards, and the expansion mode is duplicated and expanded by tail rows and tail columns (eliminated during image restoration);
S6, polynomial fitting experiment: first, a classical polynomial fitting experiment was used on the images. In a polynomial fitting method, an image is divided into non-overlapping pixel blocks of 4×4, 8×8 or 16×16, then a polynomial is adopted to fit a compressed image, the fitting function generally comprises a first-order polynomial function, a second-order polynomial function and a higher-order polynomial function, the image quality and the image compression ratio are comprehensively considered, a second-order polynomial is selected for experiments (the higher the polynomial order is, the better the image quality is, the lower the compression ratio is), and quantization and coding operations are not adopted for the experiments for facilitating comparison among methods;
The second order polynomial function is as follows:
F(x,y)=P0+P1x+P2y+P3X2+P4y2
To highlight the advantages of multi-level blocking, the following experiments were taken:
(1) Dividing an image into non-overlapping pixel blocks of fourth order, eighth order and sixteen order, and adopting second-order polynomial fitting;
(2) And carrying out multi-level segmentation on the image, adopting plane fitting for flat pixel blocks, and adopting second-order polynomial fitting for non-flat pixel blocks.
The beneficial effects of the invention are as follows: as the size of the divided pixel blocks is increased, the image quality is gradually reduced, the compression ratio is gradually increased and the block effect is more serious, the space correlation among blocks in different blocks is fully utilized by multi-level block division, and the high compression ratio of the image is ensured and the high quality of the image is also considered; compared with the method of dividing the fourth-order pixel block, the compressed image has subjective quality similar to that of the method of dividing the fourth-order pixel block; compared with the method using the eight-order pixel block segmentation, the method has subjective quality which is far higher than that of the method using the eight-order pixel block segmentation; compared with the method using sixteen-order pixel block segmentation, the latter has higher compression ratio, but the structure and detail of the image are subjectively greatly destroyed and distorted, so that unacceptable visual experience is caused, therefore, the superior performance of multi-level segmentation is shown, while the multi-level segmentation method improves the quality and the compression ratio of the image, but the generated blockiness is still unavoidable, so that the staggered segmentation is adopted to eliminate the blockiness, and the image compression quality is further improved.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.
Claims (4)
1. A graphic data compression method for computer image processing, comprising the steps of:
S1, fitting data: for different images, if the images are divided according to the same size, the spatial correlation degree among the blocks in different blocks is different, and how to use the information correlation among different parts of the images is the key for obtaining the high compression ratio;
S2, image segmentation: adopting flat judgment to pixel blocks with different orders obtained by multi-level segmentation of the image, wherein a judgment function is marked as flat N block N (i,j), and a function return value is 0 (representing that the pixel block is non-flat) or1 (representing that the pixel block is flat);
S3, multi-level image segmentation: dividing the image into 16×16 pixel blocks, denoted as block 16 (i,j); applying a function flat 16 block 16 (i,j) to each 16-order pixel block, if flat 16 block 16 (i,j) =1, adopting plane fitting, otherwise dividing the 16-order pixel block into 8-order pixel blocks, and marking as block S (i,j); applying a function flat S block S (i,j) to each 8-order pixel block, if flat S block S (i,j) =1, adopting plane fitting, otherwise dividing the 8-order pixel block into 4-order pixel blocks, and recording as block 4 (i,j); applying a function flat 4 block 4 (i,j) to each 4-order pixel block, if flat 4 block 4 (i,j) =1, adopting plane fitting, otherwise adopting hyperbolic tangent function fitting;
S4, plain block flatness judgment: because the sensitivity of human eyes to chrominance signals is lower than that of the human eyes to luminance signals, part of color information in an image can be removed by utilizing the characteristic, an RGB image is converted into a YCbCr image, three channels Y, cb and Cr are separated, differential processing is carried out on the three channels Y, cb and Cr, a strict threshold value s is set for the luminance channel Y, a loose threshold value s is set for the color channels Cb and Cr, and the threshold values are different for different channels and different levels of pixel blocks;
S5, eliminating blocking effect of image blocking: before multi-level blocking of an image, copying and expanding a pixel matrix of the image by a factor of 3 (the first row and the first column of the pixel matrix are marked as 0; for example, an expanded 512 multiplied by 512 pixel image is changed into 682 multiplied by 682 pixel image), when non-overlapping blocking is carried out, the effect of dislocation blocking can be realized by each step of pixel block (the minimum is four steps), when the image is restored, boundary fusion is carried out according to dislocation information among the blocks, the rows and the columns generated by image expansion are eliminated, the original image I is assumed to be M multiplied by N, and the M 'multiplied by N' is obtained after the expansion of the rows and the columns; and performing multi-level blocking, wherein the size of each pixel block is B 1,B2,...,Bi, and B 1≤B2≤...≤Bi is adopted. To achieve equal division of pixel blocks, the pixel matrix of M 'x N' is further expanded to ceil (matrix I 'of M' x B i)×Bi×ceil(N'/Bi)×Bi;
S6, polynomial fitting experiment: firstly, a classical polynomial fitting experiment is adopted on an image, in a polynomial fitting method, an image is divided into non-overlapping pixel blocks of 4 multiplied by 4, 8 multiplied by 8 or 16 multiplied by 16, then a polynomial fitting compression image is adopted, the fitting function generally comprises a first-order polynomial function, a second-order polynomial function and a higher-order polynomial function, the image quality and the image compression ratio are comprehensively considered, a second-order polynomial is selected for the experiment (the higher the polynomial order is, the better the image quality is, the lower the compression ratio is), and quantization and coding operations are not adopted for the experiment for facilitating comparison among methods;
The second order polynomial function is as follows:
F(x,y)=P0+P1x+P2y+P3X2+P4y2
To highlight the advantages of multi-level blocking, the following experiments were taken:
(1) Dividing an image into non-overlapping pixel blocks of fourth order, eighth order and sixteen order, and adopting second-order polynomial fitting;
(2) And carrying out multi-level segmentation on the image, adopting plane fitting for flat pixel blocks, and adopting second-order polynomial fitting for non-flat pixel blocks.
2. The method of claim 1, wherein N is a pixel block order (N e {4,8,16 }) in S2, block N (i,j) is an N-th order pixel block to be determined, and (i, j) indicates coordinates of the pixel block in the image.
3. The method for compressing graphic data for computer image processing according to claim 1, wherein the algorithm threshold set in step S4 is set as follows: sy4=50, sy8=30, sy16=10, scbcr4=100, scbcr8=70, scbcr16=40, for example, sy4=50 indicates that the flat judgment threshold of the Y channel 4-order pixel block is 50, and scbcr4=100 indicates that the flat judgment threshold of the CB and CR channel 4-order pixel blocks is 100.
4. The method for compressing graphic data for computer image processing according to claim 1, wherein said step S5 is performed in such a manner that ceil (X) represents that X is rounded up and that the expansion is performed in a copy expansion (image restoration time elimination) by tail columns.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311849533.2A CN117953085A (en) | 2023-12-29 | 2023-12-29 | Graphic data compression method for computer image processing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311849533.2A CN117953085A (en) | 2023-12-29 | 2023-12-29 | Graphic data compression method for computer image processing |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117953085A true CN117953085A (en) | 2024-04-30 |
Family
ID=90799614
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311849533.2A Pending CN117953085A (en) | 2023-12-29 | 2023-12-29 | Graphic data compression method for computer image processing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117953085A (en) |
-
2023
- 2023-12-29 CN CN202311849533.2A patent/CN117953085A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108366259B (en) | High-fidelity H.264/AVC video three-coefficient reversible steganography method | |
CN108322747B (en) | Coding unit division optimization method for ultra-high definition video | |
CN108769677B (en) | High dynamic range video dynamic range scalable coding method based on perception | |
EP2168382B1 (en) | Method for processing images and the corresponding electronic device | |
CN109889852B (en) | HEVC intra-frame coding optimization method based on adjacent values | |
CN113055674B (en) | Compressed video quality enhancement method based on two-stage multi-frame cooperation | |
CN113544705A (en) | Method and apparatus for picture encoding and decoding | |
CN114640857B (en) | Image compression method and 3D noise reduction method based on improved Huffman coding | |
CN112188217B (en) | JPEG compressed image decompression effect removing method combining DCT domain and pixel domain learning | |
CN110677624B (en) | Monitoring video-oriented foreground and background parallel compression method based on deep learning | |
CN112422989A (en) | Video coding method | |
KR102067612B1 (en) | Method of coding a matrix, in particular a matrix representative of a fixed or video image | |
CN104902281A (en) | Hamming code plus one-based information hiding method of HEVC video | |
CN117953085A (en) | Graphic data compression method for computer image processing | |
Li et al. | A high performance image compression technique for multimedia applications | |
CN114827616B (en) | Compressed video quality enhancement method based on space-time information balance | |
KR20010110053A (en) | Method for compressing dynamic image information and system therefor | |
CN112235574B (en) | Efficient video coding standard quantization parameter cascading method for on-site inspection tool image | |
CN110248193B (en) | Reversible information hiding method based on improved difference expansion | |
CN112911298A (en) | HEVC video dual-compression detection method and system based on boundary effect | |
CN109218726B (en) | Laser-induced breakdown spectroscopy image lossy lossless joint compression method | |
Poolakkachalil et al. | Analysis of Stereoscopic Image Compression Using Arithmetic Coding and Huffman Coding | |
CN117459737B (en) | Training method of image preprocessing network and image preprocessing method | |
CN114079770B (en) | HEVC post-processing method combining non-local low rank and adaptive quantization constraint | |
CN114866773B (en) | Quantization parameter cascade method for eliminating time domain jitter effect |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |