CN102215384A - Image compressing method and system - Google Patents

Image compressing method and system Download PDF

Info

Publication number
CN102215384A
CN102215384A CN2010101421349A CN201010142134A CN102215384A CN 102215384 A CN102215384 A CN 102215384A CN 2010101421349 A CN2010101421349 A CN 2010101421349A CN 201010142134 A CN201010142134 A CN 201010142134A CN 102215384 A CN102215384 A CN 102215384A
Authority
CN
China
Prior art keywords
pixel
code length
block
huffman code
value
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.)
Granted
Application number
CN2010101421349A
Other languages
Chinese (zh)
Other versions
CN102215384B (en
Inventor
叶姜莉
付轩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to CN201010142134.9A priority Critical patent/CN102215384B/en
Publication of CN102215384A publication Critical patent/CN102215384A/en
Application granted granted Critical
Publication of CN102215384B publication Critical patent/CN102215384B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The invention discloses an image compressing method and system, wherein the image compressing method comprises the following steps of: acquiring the Huffman coding length of a 8*8 pixel block under a horizontal compression mode and the Huffman coding length of the 8*8 pixel block under a vertical compression mode; if the Huffman coding length of the 8*8 pixel block under the horizontal compression mode is longer than the Huffman coding length of the 8*8 pixel block under the vertical compression mode, taking a Huffman coding result of the 8*8 pixel block under the vertical compression mode as an image compression result of the 8*8 pixel block; and if not, taking the Huffman coding result of the 8*8 pixel block under the horizontal compression mode as the image compression result of the 8*8 pixel block.

Description

Method for compressing image and system
Technical field
The present invention relates to image processing field, relate more specifically to a kind of method for compressing image and system.
Background technology
Current, there are a lot of method for compressing image.What wherein, be most widely used is method for compressing image under the Joint Photographic Experts Group and the method for compressing image under the mpeg standard.
In the method for compressing image under the Joint Photographic Experts Group, any one 8*8 block of pixels of needs compressions is carried out discrete cosine transform (DCT), with the concentration of energy in this 8*8 block of pixels on the DCT coefficient of the lower pixel of this 8*8 block of pixels medium frequency of expression.Compression to a 8*8 block of pixels is to realize by abandoning the DCT coefficient that is in the pixel of the upper frequency outside the visible-range in this 8*8 block of pixels of expression.In addition, in the method for compressing image under the Joint Photographic Experts Group, also to the DCT coefficient that be kept be quantized,, adopt Run-Length Coding or Huffman coding that the DCT coefficient that is kept is encoded with further raising compression ratio at last to reduce their amplitude.
In mpeg standard, there are three kinds of method for compressing image of intraframe coding, forward predictive coded and bi-directional predictive coding (back two kinds are referred to as interframe encode).Wherein, for the image frame (I frame) that needs carry out intraframe coding, inner frame coding method comes it is compressed by the 8*8 block of pixels of using this image frame self.Carry out the image frame (P frame) of forward predictive coded for needs, the forward predictive coded method comes it is compressed by using the residual error between this image frame and its reference frame (previous I frame or P frame).And carry out the image frame (B frame) of bi-directional predictive coding for needs, the bi-directional predictive coding method comes it is compressed by the residual error between the reference frame (previous I frame or P frame and next P frame or I frame) that uses this frame picture and its former and later two directions.
Fig. 1 shows the logic diagram of the image encoding system under the mpeg standard.As shown in Figure 1, the image encoding system under the mpeg standard comprises intraprediction unit 102, inter prediction unit 104, DCT unit 106, quantifying unit 108, inverse quantization unit 110, inverse discrete cosine transformation (IDCT) unit 112 and variable length code (VLC) unit 114.
Each unit as shown in fig. 1, when I frame or P frame are encoded, the intraprediction unit use current block left side is that the pixel of top piece is predicted the block of pixels of input, inter prediction unit uses the reference frame in the reference frame storing device to predict, resulting prediction piece and input block of pixels are subtracted each other the residual block data process DCT unit conversion that obtains, quantifying unit quantizes, and is encoded into code stream output by VLC again.In the process of coding, comprising decode procedure, the data that quantize to obtain are through inverse quantization unit, residual error data that the IDCT unit obtains and the block of pixels of predicting that the piece addition obtains rebuilding, the block of pixels of reconstruction is stored in the reference frame that is used for interframe encode in the reference frame storing device.When encoding for the B frame, the block of pixels of reconstruction does not need as storing with reference to frame.
Wherein, when an image frame that needs is carried out interframe encode was encoded, the image encoding system shown in Fig. 1 need be usually located at its outside memory from one and read the reference frame that this need carry out the image frame of interframe encode.Because the data volume of the reference frame in the memory is all bigger usually, so when writing or reading these reference frames between memory and image encoding system, will bring a large amount of memory spendings and heavy burden to bandwidth of memory.
For current application, the high definition video image becomes a kind of trend, and such as MPEG-2, H.264, the video encoding standard that is most widely used the AVS all is similar to employing aforesaid image encoding system and comes the high definition video image is encoded.In this case, the burden of the bandwidth cost aspect of memory will be more heavy, thereby influence is to the coding rate of image frame.
Summary of the invention
One or more problems in view of the above the invention provides a kind of method for compressing image and system.
A kind of method for compressing image according to the embodiment of the invention comprises: obtain the 8*8 block of pixels at Huffman code length under the horizontal compact model and the Huffman code length under vertical shrink mode; If the 8*8 block of pixels at the Huffman code length under the horizontal compact model greater than its Huffman code length under vertical shrink mode, then with the image compression result of the Huffman coding result of 8*8 block of pixels under vertical shrink mode as the 8*8 block of pixels, otherwise with the image compression result of the Huffman coding result of 8*8 block of pixels under horizontal compact model as the 8*8 block of pixels.
A kind of image compression system according to the embodiment of the invention comprises: the code length acquiring unit is configured to obtain the 8*8 block of pixels at Huffman code length under the horizontal compact model and the Huffman code length under vertical shrink mode; The compression result selected cell, if be configured to the 8*8 block of pixels at the Huffman code length under the horizontal compact model greater than the Huffman code length of 8*8 block of pixels under vertical shrink mode, then with the image compression result of the Huffman coding result of 8*8 block of pixels under vertical shrink mode as the 8*8 block of pixels, otherwise with the image compression result of the Huffman coding result of 8*8 block of pixels under horizontal compact model as the 8*8 block of pixels.
By the present invention, can compress reference frame, thereby reduce the capacity of memory and reduce bandwidth.
Description of drawings
From below in conjunction with the present invention may be better understood the description of accompanying drawing to the specific embodiment of the present invention, wherein:
Fig. 1 shows the logic diagram of the image encoding system under the mpeg standard;
Fig. 2 shows the example of high-definition screen frame and basic coding unit wherein;
Fig. 3 shows the block diagram according to the image compression system of the embodiment of the invention;
Fig. 4 shows the flow chart according to the method for compressing image of the embodiment of the invention;
Fig. 5 shows the flow chart that obtains the processing of the Huffman code length of any one-row pixels in the 8*8 block of pixels according to the embodiment of the invention;
Fig. 6 shows the schematic diagram according to the process of the first difference pixel value of each pixel in any one-row pixels in the 8*8 block of pixels of the embodiment of the invention;
Fig. 7 shows the flow chart that obtains the processing of the Huffman code length of any row pixel in the 8*8 block of pixels according to the embodiment of the invention;
Fig. 8 shows the schematic diagram that obtains the process of the first difference pixel value of each pixel in any row pixel in the 8*8 block of pixels according to the embodiment of the invention; And
Fig. 9 shows the block diagram according to the realization example of the image compression system of the embodiment of the invention.
Embodiment
To describe the feature and the exemplary embodiment of various aspects of the present invention below in detail.Many details have been contained in following description, so that complete understanding of the present invention is provided.But, it will be apparent to one skilled in the art that the present invention can implement under the situation of some details in not needing these details.Description to embodiment only is in order to provide the clearer understanding to the present invention by example of the present invention is shown below.Any concrete configuration and the algorithm that are proposed below the present invention never is limited to, but any modification, replacement and the improvement that have covered coherent element, parts and algorithm under the premise of without departing from the spirit of the present invention.
For when the current image frame that needs is carried out interframe encode carries out interframe encode, read the reference frame of current image frame quickly and efficiently from memory reference frame, that be in the image encoding system outside of storing current image frame, the present invention proposes at first reference frame is compressed, the thought that the reference frame storing after will compressing is then used in the process for interframe encode in memory.According to the method for compressing image/system of the embodiment of the invention, be mainly used in reference frame is compressed.But, it should be appreciated by those skilled in the art that compression method of the invention process goes for any image is compressed equally, rather than only limit to reference frame.
Fig. 2 shows the example of high-definition screen frame and basic coding unit wherein.As shown in Figure 2, this high-definition screen frame comprises 1920 * 1080 pixels, and basic coding unit wherein is the 8*8 block of pixels.When image frame reference frame, shown in Figure 2 as another image frame is carried out image compression, method for compressing image/system according to the embodiment of the invention passes through the basic coding unit in this image frame (that is 8*8 block of pixels) handled the compression that realizes the whole image frame one by one.
Below in conjunction with Fig. 3 and Fig. 4 the process of any one basic coding unit being carried out the compression processing according to the image compression system of the embodiment of the invention is described.Wherein, Fig. 3 shows the block diagram according to the image compression system of the embodiment of the invention; Fig. 4 shows the flow chart according to the method for compressing image of the embodiment of the invention.
As shown in Figure 3, the image compression system according to the embodiment of the invention comprises code length acquiring unit 302 and compression result selected cell 304.Wherein, code length acquiring unit 302 obtains the 8*8 block of pixels at Huffman code length under the horizontal compact model and the Huffman code length under vertical shrink mode (that is execution in step S402).If greater than the Huffman code length of 8*8 block of pixels under vertical shrink mode, then compression result selected cell 304 is with the image compression result of the Huffman coding result of 8*8 block of pixels under vertical shrink mode as the 8*8 block of pixels at the Huffman code length under the horizontal compact model for the 8*8 block of pixels.If less than the Huffman code length of 8*8 block of pixels under vertical shrink mode, then compression result selected cell 304 is with the image compression result of the Huffman coding result of 8*8 block of pixels under horizontal compact model as the 8*8 block of pixels at the Huffman code length under the horizontal compact model for the 8*8 block of pixels.That is to say, compression result selected cell 304 is according to the Huffman code length of 8*8 block of pixels under level and vertical shrink mode, select the image compression result (that is, execution in step S404) of one of 8*8 block of pixels Huffman coding result under level and vertical shrink mode as the 8*8 block of pixels.
Next, the processing that code length acquiring unit 302 obtains the Huffman code length of 8*8 block of pixels under horizontal compact model is described.Particularly, the processing that code length acquiring unit 302 obtains the Huffman code length of 8*8 block of pixels under horizontal compact model comprises: at first, obtain the Huffman code length of each the row pixel in the 8*8 block of pixels; Then, with the stack result of Huffman code length of each the row pixel in the 8*8 block of pixels as the Huffman code length of 8*8 block of pixels under horizontal compact model.
Below, describe the processing of the Huffman code length that obtains (for example) the capable pixel of i in the 8*8 block of pixels in detail.Fig. 5 shows the flow chart that obtains the processing of the Huffman code length of any delegation (for example, i is capable) pixel in the 8*8 block of pixels according to the embodiment of the invention.As shown in Figure 5, the processing of obtaining the Huffman code length of the capable pixel of i in the 8*8 block of pixels comprises:
S502 obtains the first difference pixel value diff of j+1 pixel in the capable pixel of i 1(i, j+1), wherein i and j are integer, and 0≤i≤7,0≤j≤6.Fig. 6 shows the schematic diagram according to the process of the first difference pixel value of each pixel in any one-row pixels in the 8*8 block of pixels of the embodiment of the invention.As shown in Figure 6, the pixel value P of the 0th pixel in the capable pixel of i I, 0Remain unchanged, and the first difference pixel value diff of j+1 pixel in the capable pixel of i 1(i is by the pixel value P with j+1 pixel in the capable pixel of i j+1) I, j+1Pixel value P with j pixel in the capable pixel of i I, jSubtract each other and obtain, that is, and diff 1(i, j+1)=P I, j+1-P I, j
S504 obtains the pixel value P of the 0th pixel in the capable pixel of i I, 0The first difference pixel value diff of j+1 pixel when getting 0 each integer value in 6 at j in the capable pixel of i 1(i, j+1) the absolute value Abs_min (i) of a value of middle absolute value minimum;
S506 utilizes the first difference pixel value diff of j+1 pixel in the capable pixel of i 1(i j+1) with absolute value Abs_min (i), calculates the second order difference pixel value diff of j+1 pixel in the capable pixel of described i 2(i, j+1).Particularly, if the first difference pixel value diff of j+1 pixel in the capable pixel of i 1(i, j+1)>0, then by first difference pixel value diff with j+1 pixel in the capable pixel of i 1(i j+1) subtracts each other the second order difference pixel value diff that obtains j+1 pixel in the capable pixel of i with absolute value Abs_min (i) 2(i, j+1), that is, and diff 2(i, j+1)=diff 1(i, j+1)-Abs_min (i), otherwise by the first difference pixel value diff with j+1 pixel in the capable pixel of i 1(i j+1) obtains the second order difference pixel value diff of j+1 pixel in the capable pixel of i in the Calais mutually with absolute value Abs_min (i) 2(i, j+1), that is, and diff 2(i, j+1)=diff 1(i, j+1)-Abs_min (i);
S508 is by the pixel value P with the 0th pixel in the capable pixel of i I, 0Huffman code length (8 bit), the second order difference pixel value diff of j+1 pixel when j gets 0 each integer value in 6 in the capable pixel of i 2(i, Huffman code length Huf_H j+1) I, j+1, and Huffman code length Abs_H (i) addition of absolute value Abs_min (i), obtain the Huffman code length Sum_H (i) of the capable pixel of i, promptly
Figure GSA00000056731300061
In the process of obtaining the Huffman code length of the capable pixel of i in the 8*8 block of pixels shown in Figure 5, can think the pixel value P of the 0th pixel in the capable pixel of i I, 0Be the first difference pixel value and the second order difference pixel value of the 0th pixel in the capable pixel of i.In this case, can think that absolute value Abs_min (i) is the least absolute value in the absolute value of the first difference pixel value of all pixels in the capable pixel of i in the 8*8 block of pixels, and think that the Huffman code length Sum_H (i) of the capable pixel of i is the Huffman code length sum of the Huffman code length and the absolute value Abs_min (i) of the second order difference pixel value of all pixels in the capable pixel of i.
Next, the processing that code length acquiring unit 302 obtains the Huffman code length of 8*8 block of pixels under vertical shrink mode is described.Particularly, the processing that code length acquiring unit 302 obtains the Huffman code length of 8*8 block of pixels under vertical shrink mode comprises: at first, obtain the Huffman code length of each the row pixel in the 8*8 block of pixels; Then, with the stack result of the Huffman code length of each the row pixel in the 8*8 block of pixels as the Huffman code length of 8*8 block of pixels under vertical shrink mode.
Below, describe the processing of the Huffman code length that obtains (for example) the i row pixel in the 8*8 block of pixels in detail.Fig. 7 shows the flow chart according to the processing of the Huffman code length that obtains any row in the 8*8 block of pixels (for example, i row) pixel of the embodiment of the invention.As shown in Figure 7, the processing of obtaining the Huffman code length of i row pixel in the 8*8 block of pixels comprises:
S702 obtains the first difference pixel value diff of j+1 pixel in the i row pixel 1(j+1, i), wherein i and j are integer, and 0≤i≤7,0≤j≤6.Fig. 8 shows the schematic diagram of the process of the first difference pixel value of each pixel in any row pixel in the 8*8 block of pixels according to the embodiment of the invention.As shown in Figure 8, the pixel value P of the 0th pixel in the i row pixel 0, iRemain unchanged, and the first difference pixel value diff of j+1 pixel in the i row pixel 1(j+1 is by the pixel value P with j+1 pixel in the i row pixel i) J+1, iPixel value P with j pixel in the i row pixel J, iSubtract each other and obtain, that is, and diff 1(j+1, i)=P J+1, i-P J, i
S704 obtains the pixel value P of the 0th pixel in the i row pixel 0, iThe first difference pixel value diff of j+1 pixel when getting 0 each integer value in 6 at j in the i row pixel 1(j+1, i) the absolute value Abs_min (i) ' of a value of middle absolute value minimum;
S706 utilizes the first difference pixel value diff of j+1 pixel in the i row pixel 1(j+1 i) with absolute value Abs_min (i) ', calculates the second order difference pixel value diff of j+1 pixel in the i row pixel 2(j+1, i).Particularly, if the first difference pixel value diff of j+1 pixel in the i row pixel 1(j+1, i)>0, then code length acquiring unit 302 is by the first difference pixel value diff with j+1 pixel in the i row pixel 1(j+1 i) subtracts each other the second order difference pixel value diff that obtains j+1 pixel in the i row pixel with absolute value Abs_min (i) ' 2(j+1, i), that is, and diff 2(j+1, i)=diff 1(j+1, i)-Abs_min (i) ', otherwise code length acquiring unit 302 is by the first difference pixel value diff with j+1 pixel in the i row pixel 1(j+1 is i) with absolute value Abs_min (i) ' mutually the Calais obtain the second order difference pixel value diff of j+1 pixel in the i row pixel 2(j+1, i), that is, and diff 2(j+1, i)=diff 1(j+1, i)+Abs_min (i) ';
S708 is by the pixel value P with the 0th pixel in the i row pixel 0, iHuffman code length (8 bit), the second order difference pixel value diff of j+1 pixel when j gets 0 each integer value in 6 in the i row pixel 2(j+1, Huffman code length Huf_H i) J+1, i, and Huffman code length Abs_V (i) addition of absolute value Abs_min (i) ', obtain the Huffman code length Sum_V (i) of i row pixel,
Figure GSA00000056731300071
In the process of obtaining the Huffman code length of i row pixel in the 8*8 block of pixels shown in Figure 7, can think the pixel value P of the 0th pixel in the i row pixel 0, iBe the first difference pixel value and the second order difference pixel value of the 0th pixel in the i row pixel.In this case, can think that absolute value Abs_min (i) ' is the least absolute value in the absolute value of the first difference pixel value of all pixels in the i row pixel in the 8*8 block of pixels, and think that the Huffman code length Sum_V (i) of i row pixel is the Huffman code length sum of the Huffman code length and the absolute value Abs_min (i) ' of the second order difference pixel value of all pixels in the i row pixel.
Fig. 9 shows the block diagram according to the realization example of the image compression system of the embodiment of the invention.As shown in Figure 9, code length acquiring unit 302 comprises horizontal direction code length acquiring unit 3022 and vertical direction code length acquiring unit 3024.Wherein, all comprise first difference unit, second order difference unit, pixel value memory cell and coding unit in level and the vertical direction code length acquiring unit.
In the horizontal direction in the code length acquiring unit, step S502 in the first difference unit execution graph 5, step S504 and S506 in the second order difference unit execution graph 5, the pixel value of the 0th pixel in the capable pixel of pixel value cell stores i, coding unit is encoded to the pixel value of the 0th pixel in the capable pixel of i and the second order difference pixel value of the 1st~7 pixel in the capable pixel of i.
In vertical direction code length acquiring unit, step S702 in the first difference unit execution graph 7, step S704 and S706 in the second order difference unit execution graph 7, the pixel value of the 0th pixel in the pixel value cell stores i row pixel, coding unit is encoded to the pixel value of the 0th pixel in the i row pixel and the second order difference pixel value of the 1st~7 pixel in the i row pixel.
By the present invention, reference frame can be compressed to the 30%-50% of original data volume, thereby reduce to be used for reference frame memory capacity and reduce bandwidth.
Below the present invention has been described with reference to specific embodiments of the invention, but those skilled in the art all understand, can carry out various modifications, combination and change to these specific embodiments, and can not break away from the spirit and scope of the present invention that limit by claims or its equivalent.
Can come execution in step with hardware or software as required.Notice that without departing from the scope of the invention, the flow chart that can provide adds step, therefrom removes step or revise wherein step in this specification.In general, flow chart just is used to refer to a kind of possible sequence of the basic operation that is used to realize function.
Embodiments of the invention can utilize programming general purpose digital computer, utilize application-specific integrated circuit (ASIC), programmable logic device, field programmable gate array, light, chemistry, biological, system quantum or nanometer engineering, assembly and mechanism to realize.In general, function of the present invention can be realized by any means known in the art.Can use distributed or networked system, assembly and circuit.The communication of data or to transmit can be wired, wireless or by any other means.
Also will recognize, according to the needs of application-specific, one or more can perhaps even in some cases being removed or being deactivated in the key element shown in the accompanying drawing by more separating or more integrated mode realizes.Program or code that realization can be stored in the machine readable media are carried out above-mentioned any method to allow computer, also within the spirit and scope of the present invention.
In addition, it only is exemplary that any signal arrows in the accompanying drawing should be considered to, rather than restrictive, unless concrete indication is arranged in addition.Separate or the ability of combination when not knowing when term is also contemplated as to make, the combination of assembly or step also will be considered to put down in writing.

Claims (14)

1. method for compressing image comprises:
Obtain the 8*8 block of pixels at Huffman code length under the horizontal compact model and the Huffman code length under vertical shrink mode;
If the Huffman code length of described 8*8 block of pixels under described horizontal compact model is greater than the Huffman code length of described 8*8 block of pixels under described vertical shrink mode, then with the image compression result of the Huffman coding result of described 8*8 block of pixels under described vertical shrink mode as described 8*8 block of pixels, otherwise with the image compression result of the Huffman coding result of described 8*8 block of pixels under described horizontal compact model as described 8*8 block of pixels.
2. method for compressing image according to claim 1 is characterized in that, the processing of obtaining the Huffman code length of described 8*8 block of pixels under described horizontal compact model comprises:
Obtain the Huffman code length of each the row pixel in the described 8*8 block of pixels;
With the stack result of Huffman code length of each the row pixel in the described 8*8 block of pixels as the Huffman code length of described 8*8 block of pixels under described horizontal compact model.
3. method for compressing image according to claim 2 is characterized in that, the processing of obtaining the Huffman code length of the capable pixel of i in the described 8*8 block of pixels comprises:
By pixel value P with j+1 pixel in the capable pixel of described i I, j+1Pixel value P with j pixel in the capable pixel of described i I, jSubtract each other, obtain the first difference pixel value diff of j+1 pixel in the capable pixel of described i 1(i, j+1), wherein i and j are integer, and 0≤i≤7,0≤j≤6;
Obtain the pixel value P of the 0th pixel in the capable pixel of described i I, 0The first difference pixel value diff of j+1 pixel when getting 0 each integer value in 6 at j in the capable pixel of described i 1(i, j+1) the absolute value Abs_min (i) of a value of middle absolute value minimum;
Utilize the first difference pixel value diff of j+1 pixel in the capable pixel of described i 1(i j+1) with described absolute value Abs_min (i), calculates the second order difference pixel value diff of j+1 pixel in the capable pixel of described i 2(i, j+1); And
By pixel value P with the 0th pixel in the capable pixel of described i I, 0Huffman code length, the second order difference pixel value diff of j+1 pixel when j gets 0 each integer value in 6 in the capable pixel of described i 2(the Huffman code length of the capable pixel of described i is obtained in i, the Huffman code length addition of Huffman code length j+1) and described absolute value Abs_min (i).
4. method for compressing image according to claim 3 is characterized in that,
If the first difference pixel value diff of j+1 pixel in the capable pixel of described i 1(i, j+1)>0, then by first difference pixel value diff with j+1 pixel in the capable pixel of described i 1(i j+1) subtracts each other the second order difference pixel value diff that obtains j+1 pixel in the capable pixel of described i with described absolute value Abs_min (i) 2(i, j+1);
If the first difference pixel value diff of j+1 pixel in the capable pixel of described i 1(i, j+1)≤0, then by first difference pixel value diff with j+1 pixel in the capable pixel of described i 1(i j+1) obtains the second order difference pixel value diff of j+1 pixel in the capable pixel of described i in the Calais mutually with described absolute value Abs_min (i) 2(i, j+1).
5. method for compressing image according to claim 1 is characterized in that, the processing of obtaining the Huffman code length of described 8*8 block of pixels under described vertical shrink mode comprises:
Obtain the Huffman code length of each the row pixel in the described 8*8 block of pixels;
With the stack result of the Huffman code length of each the row pixel in the described 8*8 block of pixels as the Huffman code length of described 8*8 block of pixels under described vertical shrink mode.
6. method for compressing image according to claim 5 is characterized in that, the processing of obtaining the Huffman code length of the i row pixel in the described 8*8 block of pixels comprises:
By pixel value P with j+1 pixel in the described i row pixel J+1, iPixel value P with j pixel in the described i row pixel J, iSubtract each other, obtain the first difference pixel value diff of j+1 pixel in the described i row pixel 1(j+1, i), wherein i and j are integer, and 0≤i≤7,0≤j≤6;
Obtain the pixel value P of the 0th pixel in the described i row pixel 0, iThe first difference pixel value diff of j+1 pixel when getting 0 each integer value in 6 at j in the described i row pixel 1(j+1, i) the absolute value Abs_min (i) ' of a value of middle absolute value minimum;
Utilize the first difference pixel value diff of j+1 pixel in the described i row pixel 1(j+1 i) with described absolute value Abs_min (i) ', calculates the second order difference pixel value diff of j+1 pixel in the described i row pixel 2(j+1, i); And
By pixel value P with the 0th pixel in the described i row pixel 0, iHuffman code length, the second order difference pixel value diff of j+1 pixel when j gets 0 each integer value in 6 in the described i row pixel 2(the Huffman code length of described i row pixel is obtained in j+1, the Huffman code length addition of Huffman code length i) and described absolute value Abs_min (i) '.
7. method for compressing image according to claim 6 is characterized in that,
If the first difference pixel value diff of j+1 pixel in the described i row pixel 1(j+1, i)>0, then by first difference pixel value diff with j+1 pixel in the described i row pixel 1(j+1 i) subtracts each other the second order difference pixel value diff that obtains j+1 pixel in the described i row pixel with described absolute value Abs_min (i) ' 2(j+1, i);
If the first difference pixel value diff of j+1 pixel in the described i row pixel 1(j+1, i)≤0, then by first difference pixel value diff with j+1 pixel in the described i row pixel 1(j+1 i) obtains the second order difference pixel value diff of j+1 pixel in the described i row pixel in the Calais mutually with described absolute value Abs_min (i) ' 2(j+1, i).
8. image compression system comprises:
The code length acquiring unit is configured to obtain the 8*8 block of pixels at Huffman code length under the horizontal compact model and the Huffman code length under vertical shrink mode;
The compression result selected cell, if be configured to the Huffman code length of described 8*8 block of pixels under described horizontal compact model greater than the Huffman code length of described 8*8 block of pixels under described vertical shrink mode, then with the image compression result of the Huffman coding result of described 8*8 block of pixels under described vertical shrink mode as described 8*8 block of pixels, otherwise with the image compression result of the Huffman coding result of described 8*8 block of pixels under described horizontal compact model as described 8*8 block of pixels.
9. image compression system according to claim 8 is characterized in that, the processing that described code length acquiring unit obtains the Huffman code length of described 8*8 block of pixels under described horizontal compact model comprises:
Obtain the Huffman code length of each the row pixel in the described 8*8 block of pixels;
With the stack result of Huffman code length of each the row pixel in the described 8*8 block of pixels as the Huffman code length of described 8*8 block of pixels under described horizontal compact model.
10. image compression system according to claim 9 is characterized in that, the processing that described code length acquiring unit obtains the Huffman code length of the capable pixel of i in the described 8*8 block of pixels comprises:
By pixel value P with j+1 pixel in the capable pixel of described i I, j+1Pixel value P with j pixel in the capable pixel of described i I, jSubtract each other, obtain the first difference pixel value diff of j+1 pixel in the capable pixel of described i 1(i, j+1), wherein i and j are integer, and 0≤i≤7,0≤j≤6;
Obtain the pixel value P of the 0th pixel in the capable pixel of described i I, 0The first difference pixel value diff of j+1 pixel when getting 0 each integer value in 6 at j in the capable pixel of described i 1(i, j+1) the absolute value Abs_min (i) of a value of middle absolute value minimum;
Utilize the first difference pixel value diff of j+1 pixel in the capable pixel of described i 1(i j+1) with described absolute value Abs_min (i), calculates the second order difference pixel value diff of j+1 pixel in the capable pixel of described i 2(i, j+1); And
By pixel value P with the 0th pixel in the capable pixel of described i I, 0Huffman code length, the second order difference pixel value diff of j+1 pixel when j gets 0 each integer value in 6 in the capable pixel of described i 2(the Huffman code length of the capable pixel of described i is obtained in i, the Huffman code length addition of Huffman code length j+1) and described absolute value Abs_min (i).
11. image compression system according to claim 10 is characterized in that,
If the first difference pixel value diff of j+1 pixel in the capable pixel of described i 1(i, j+1)>0, then described code length acquiring unit is by the first difference pixel value diff with j+1 pixel in the capable pixel of described i 1(i j+1) subtracts each other the second order difference pixel value diff that obtains j+1 pixel in the capable pixel of described i with described absolute value Abs_min (i) 2(i, j+1);
If the first difference pixel value diff of j+1 pixel in the capable pixel of described i 1(i, j+1)≤0, then described code length acquiring unit is by the first difference pixel value diff with j+1 pixel in the capable pixel of described i 1(i j+1) obtains the second order difference pixel value diff of j+1 pixel in the capable pixel of described i in the Calais mutually with described absolute value Abs_min (i) 2(i, j+1).
12. image compression system according to claim 8 is characterized in that, the processing that described code length acquiring unit obtains the Huffman code length of described 8*8 block of pixels under described vertical shrink mode comprises:
Obtain the Huffman code length of each the row pixel in the described 8*8 block of pixels;
With the stack result of the Huffman code length of each the row pixel in the described 8*8 block of pixels as the Huffman code length of described 8*8 block of pixels under described vertical shrink mode.
13. image compression system according to claim 12 is characterized in that, the processing that described code length acquiring unit obtains the Huffman code length of the i row pixel in the described 8*8 block of pixels comprises:
By pixel value P with j+1 pixel in the described i row pixel J+1, iPixel value P with j pixel in the described i row pixel J, iSubtract each other, obtain the first difference pixel value diff of j+1 pixel in the described i row pixel 1(j+1, i), wherein i and j are integer, and 0≤i≤7,0≤j≤6;
Obtain the pixel value P of the 0th pixel in the described i row pixel 0, iThe first difference pixel value diff of j+1 pixel when getting 0 each integer value in 6 at j in the described i row pixel 1(j+1, i) the absolute value Abs_min (i) ' of a value of middle absolute value minimum;
Utilize the first difference pixel value diff of j+1 pixel in the described i row pixel 1(j+1 i) with described absolute value Abs_min (i) ', calculates the second order difference pixel value diff of j+1 pixel in the described i row pixel 2(j+1, i); And
By pixel value P with the 0th pixel in the described i row pixel 0, iHuffman code length, the second order difference pixel value diff of j+1 pixel when j gets 0 each integer value in 6 in the described i row pixel 2(the Huffman code length of described i row pixel is obtained in j+1, the Huffman code length addition of Huffman code length i) and described absolute value Abs_min (i) '.
14. image compression system according to claim 13 is characterized in that,
If the first difference pixel value diff of j+1 pixel in the described i row pixel 1(j+1, i)>0, then described code length acquiring unit is by the first difference pixel value diff with j+1 pixel in the described i row pixel 1(j+1 i) subtracts each other the second order difference pixel value diff that obtains j+1 pixel in the described i row pixel with described absolute value Abs_min (i) ' 2(j+1, i);
If the first difference pixel value diff of j+1 pixel in the described i row pixel 1(j+1, i)≤0, then described code length acquiring unit is by the first difference pixel value diff with j+1 pixel in the described i row pixel 1(j+1 i) obtains the second order difference pixel value diff of j+1 pixel in the described i row pixel in the Calais mutually with described absolute value Abs_min (i) ' 2(j+1, i).
CN201010142134.9A 2010-04-02 2010-04-02 Image compressing method and system Expired - Fee Related CN102215384B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010142134.9A CN102215384B (en) 2010-04-02 2010-04-02 Image compressing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010142134.9A CN102215384B (en) 2010-04-02 2010-04-02 Image compressing method and system

Publications (2)

Publication Number Publication Date
CN102215384A true CN102215384A (en) 2011-10-12
CN102215384B CN102215384B (en) 2014-03-26

Family

ID=44746481

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010142134.9A Expired - Fee Related CN102215384B (en) 2010-04-02 2010-04-02 Image compressing method and system

Country Status (1)

Country Link
CN (1) CN102215384B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103517068A (en) * 2012-06-21 2014-01-15 富士通株式会社 Image compression method and device
WO2021120067A1 (en) * 2019-12-18 2021-06-24 深圳市大疆创新科技有限公司 Data encoding method, data decoding method, data processing method, encoder, decoder, system, movable platform, and computer-readable medium
CN114640857A (en) * 2022-05-06 2022-06-17 江苏游隼微电子有限公司 Image compression method and 3D noise reduction method based on improved Huffman coding

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1259829A (en) * 1998-11-27 2000-07-12 英业达集团(西安)电子技术有限公司 Bidirectional image compression method
CN1725863A (en) * 2004-07-21 2006-01-25 三星电子株式会社 The method of intra-prediction and the equipment that are used for video data
CN1921630A (en) * 2005-08-27 2007-02-28 三星电子株式会社 Apparatus and method for video encoding/decoding and recording medium
CN101023674A (en) * 2004-09-16 2007-08-22 汤姆森特许公司 Method and apparatus for fast mode decision for interframes
CN101247525A (en) * 2008-03-24 2008-08-20 北京邮电大学 Method for improving image intraframe coding velocity
CN101361370A (en) * 2005-11-30 2009-02-04 株式会社东芝 Image encoding/image decoding method and image encoding/image decoding apparatus
CN101610417A (en) * 2009-07-09 2009-12-23 华为技术有限公司 A kind of image filling method, device and equipment
CN101640802A (en) * 2009-08-28 2010-02-03 北京工业大学 Video inter-frame compression coding method based on macroblock features and statistical properties

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1259829A (en) * 1998-11-27 2000-07-12 英业达集团(西安)电子技术有限公司 Bidirectional image compression method
CN1725863A (en) * 2004-07-21 2006-01-25 三星电子株式会社 The method of intra-prediction and the equipment that are used for video data
CN101023674A (en) * 2004-09-16 2007-08-22 汤姆森特许公司 Method and apparatus for fast mode decision for interframes
CN1921630A (en) * 2005-08-27 2007-02-28 三星电子株式会社 Apparatus and method for video encoding/decoding and recording medium
CN101361370A (en) * 2005-11-30 2009-02-04 株式会社东芝 Image encoding/image decoding method and image encoding/image decoding apparatus
CN101247525A (en) * 2008-03-24 2008-08-20 北京邮电大学 Method for improving image intraframe coding velocity
CN101610417A (en) * 2009-07-09 2009-12-23 华为技术有限公司 A kind of image filling method, device and equipment
CN101640802A (en) * 2009-08-28 2010-02-03 北京工业大学 Video inter-frame compression coding method based on macroblock features and statistical properties

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103517068A (en) * 2012-06-21 2014-01-15 富士通株式会社 Image compression method and device
CN103517068B (en) * 2012-06-21 2016-12-07 富士通株式会社 Method for compressing image and device
WO2021120067A1 (en) * 2019-12-18 2021-06-24 深圳市大疆创新科技有限公司 Data encoding method, data decoding method, data processing method, encoder, decoder, system, movable platform, and computer-readable medium
CN114640857A (en) * 2022-05-06 2022-06-17 江苏游隼微电子有限公司 Image compression method and 3D noise reduction method based on improved Huffman coding
CN114640857B (en) * 2022-05-06 2023-05-12 江苏游隼微电子有限公司 Image compression method and 3D noise reduction method based on improved Huffman coding

Also Published As

Publication number Publication date
CN102215384B (en) 2014-03-26

Similar Documents

Publication Publication Date Title
US9420279B2 (en) Rate control method for multi-layered video coding, and video encoding apparatus and video signal processing apparatus using the rate control method
KR102120571B1 (en) Entropy coding techniques for display stream compression (DSC) of non-4:4:4 chroma sub-sampling
TWI736557B (en) Data encoding apparatus and data encoding method
CN104038762A (en) Video Encoder, Method Of Detecting Scene Change And Method Of Controlling Video Encoder
CN104041035A (en) Lossless Coding and Associated Signaling Methods for Compound Video
WO2006112642A1 (en) Method and apparatus for adaptively selecting context model for entropy coding
JPWO2012042646A1 (en) Moving picture coding apparatus, moving picture coding method, moving picture coding computer program, moving picture decoding apparatus, moving picture decoding method, and moving picture decoding computer program
JP5133290B2 (en) Video encoding apparatus and decoding apparatus
US9635370B2 (en) Image processing apparatus and image processing method, image encoding apparatus and image encoding method, and image decoding apparatus and image decoding method
TW201517600A (en) Data encoding and decoding
KR102513756B1 (en) Image encoding method, decoding method, encoder, decoder and storage medium
WO2007081085A1 (en) Method of encoding flag, method of decoding flag, and apparatus thereof
RU2336661C2 (en) Method and device of adaptive choice of context model for entropy encoding
CN111684810A (en) Data encoding and decoding
WO2013001013A1 (en) Method for decoding a scalable video bit-stream, and corresponding decoding device
US20150063436A1 (en) Method for encoding and decoding an image, and corresponding devices
US10812832B2 (en) Efficient still image coding with video compression techniques
Lee et al. An energy-efficient low-memory image compression system for multimedia IoT products
US20130077886A1 (en) Image decoding apparatus, image coding apparatus, image decoding method, image coding method, and program
KR102175662B1 (en) Systems and methods for calculating distortion in display stream compression (DSC)
CN102215384B (en) Image compressing method and system
JP7533609B2 (en) Encoding and Decoding Video Data
JP2022539311A (en) Separate CABAC for subsections of pictures
US20180199032A1 (en) Method and apparatus for determining prediction of current block of enhancement layer
CN115567710A (en) Data encoding method and apparatus, and method and apparatus for decoding data stream

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20140326

Termination date: 20180402

CF01 Termination of patent right due to non-payment of annual fee