CN102497557A - 2*2 code unit-based image compression method and 2*2 code unit-based image decompression method, and image compression and decompression system - Google Patents

2*2 code unit-based image compression method and 2*2 code unit-based image decompression method, and image compression and decompression system Download PDF

Info

Publication number
CN102497557A
CN102497557A CN2011104551387A CN201110455138A CN102497557A CN 102497557 A CN102497557 A CN 102497557A CN 2011104551387 A CN2011104551387 A CN 2011104551387A CN 201110455138 A CN201110455138 A CN 201110455138A CN 102497557 A CN102497557 A CN 102497557A
Authority
CN
China
Prior art keywords
abs
pixel
value
colourity
lightness
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
CN2011104551387A
Other languages
Chinese (zh)
Other versions
CN102497557B (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.)
XUYAO SCIENCE AND TECHNOLOGY Co Ltd
FocalTech Systems Co Ltd
Original Assignee
XUYAO SCIENCE AND TECHNOLOGY Co 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 XUYAO SCIENCE AND TECHNOLOGY Co Ltd filed Critical XUYAO SCIENCE AND TECHNOLOGY Co Ltd
Priority to CN201110455138.7A priority Critical patent/CN102497557B/en
Publication of CN102497557A publication Critical patent/CN102497557A/en
Application granted granted Critical
Publication of CN102497557B publication Critical patent/CN102497557B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a 2*2 code unit-based image compression method having a fixed compression ratio, wherein the method is used for carrying out coding on a 2*2 code unit in an image. The image compression method comprises: it is determined whether a 2*2 code unit is one of man-made types of from a first man-made type to a seventh man-made type; if so, it is determined that the 2*2 code unit is one of a man-made type; if not, it is determined that the 2*2 code unit is one of a natural type; difference error coding, quantification, and table look-up coding are carried out on the 2*2 code unit of the man-made type, thereby generating first coding data; or color gamut conversion is carried out on the 2*2 code unit of the natural type so as to obtain a 2*2 color gamut conversion unit and then discrete cosine transform is carried out on the 2*2 color gamut conversion unit so as to generate a 2*2 frequency domain unit; and quantification and table look-up coding are carried out on the 2*2 frequency domain unit, so that second coding data are generated.

Description

Image compression, decompression method and system based on the 2x2 coding unit
Technical field
The invention belongs to image compression, decompression technique field, refer in particular to a kind of compression of fixedly compression ratio image, decompression method and system based on the 2x2 coding unit.
Background technology
As everyone knows, harmless image compress technique can be divided into: running length (Run Length) coding, huffman coding (Huffman Coding), Lempel-Ziv-Weich coding, the coding that counts (Arithmetic Coding), differential coding (Differential Coding) and harmless JPEG coding (Lossless JPEG) etc.Wherein, Run Length coding is to change a succession of identical data into two bytes (Byte) to represent, previous byte (Byte) is the length (that is number of repetition) of this string data, and the byte in back (Byte) then is used for record data.For example data are " 555555AA ", and via becoming " 652A " behind the Run Length coding, wherein, expression has 6 " 5 ", 2 " A ", and this compress mode has just been saved the space of 4 bytes.Yet Run Length coding needs the repetition rate of statistics input data, and when the repetition rate of data was hanged down, compression ratio also reduced.
Huffman coding is that the input data are used binary tree mode (Binary Tree) coding according to probability occurring; The big symbol of probability occurring uses the short sign indicating number of length to represent; The little symbol of probability occurs and use the long representation of length, thereby its average data volume of using is less, yet; It is the same with Run Length coding, add up the probability that input data occurs.
Lempel-Ziv-Weich coding uses the character string that occurred as the index foundation of comparison of tabling look-up, and the mode of setting up index is as the data compression crossfire.Yet the Lempel-Ziv-Weich coding method need be used big memory headroom, with the temporary form of being set up.
The maximum characteristics of coding (Arithmetic Coding) that count are that it is not with one of a symbology, but represent the squeezing characters string with a real number.This method needs the original character string is read through earlier, adds up each different character code and probability occurs, and 0 to 1 real number interval is divided into the original coding interval table according to this probability; Then the character with the original character string reads in one by one; Whenever read in a character, just its shared interval is cut apart with the original coding interval table again, after so running through to a last character; Will produce between an area postrema, from then on the compressed file that a real number is represented the original character string is chosen in the interval again.The resulting coding of coding that counts only needs the space of a storage floating number to deposit in, and need not needs big quantity space to store as huffman coding, yet its shortcoming is that the probability and the algorithm that need statistics input data to occur are very complicated.
Differential coding then uses difference between discreet value and the actual value as the foundation of compression, and its separately during utilization compression ratio low.Harmless JPEG coding then uses discrete cosine transform and predictor error value as the foundation of compressing.
In the aforementioned compression method; Its compression ratio and on-fixed; When decompressing, usually need more computational resource, correctly to obtain data length, simultaneously in an embedded system or handheld apparatus; Because it only possesses limited computational power and limited memory size, above-mentioned image compress technique all is difficult in embedded system or handheld apparatus, use.Hence one can see that, and image compression and decompressing function still have the space of improvement on embedded system or handheld apparatus.
Summary of the invention
The object of the invention mainly is to provide a kind of fixedly compression ratio image compression based on the 2x2 coding unit, the method and system that decompress, and producing the fixedly image of compression ratio, and reduces hsrdware requirements simultaneously and keeps the quality of image.
According to a characteristic of the present invention; The present invention proposes a kind of fixedly compression ratio image compressing method based on the 2x2 coding unit; Its 2x2 coding unit with an image is encoded; This image has at least one 2x2 coding unit, and this image compressing method comprises the following steps: that (A) receives a 2x2 coding unit, and it comprises top left corner pixel, upper right corner pixel, lower left corner pixel and the lower right corner pixel that is arranged; (B) judge whether this 2x2 coding unit is in first artificial type to the seven artificial types; If; Then judge the 2x2 coding unit that this 2x2 coding unit is artificial type, otherwise, 2x 2 coding units that fixed these 2x 2 coding units are natural type; Wherein the first artificial type is these four pixels two horizontal stripes in horizontal direction; The second artificial type is two vertical stripes of vertical direction for these four pixels, and the third party makes type intersects for the two slanted bar lines that these four pixels are the miter angle direction, and the 4th to the 7th artificial type be the combination of the triangular in shape and single-point of these four pixels; (C) the 2x2 coding unit that is judged to be artificial type is carried out the differential errors coding, quantizes and the coding of tabling look-up, to produce first coding data; (D) the 2x2 coding unit that is judged to be natural type is carried out color gamut conversion, to obtain the 2x2 gamut conversion unit; (E) said 2x2 gamut conversion unit is carried out discrete cosine transform, to produce 2x2 frequency domain unit; And (F) said 2x2 frequency domain unit is quantized and the coding of tabling look-up, to produce second coded data.
According to another characteristic of the present invention; The present invention proposes a kind of fixedly compression ratio image decompression method based on the 2x2 coding unit; This method is that the coding package of fixed bit size is decoded, and to produce a 2x2 decoding unit of an image, this 2x2 decoding unit comprises four pixels that are arranged; This image has at least one 2x2 decoding unit, and this image decompression method comprises the following step: (A) receive a coding package; (B) judge according to the main packet header (1 bit, 1) of this coding package whether this coding package is artificial type, if, judge that then this coding package behaviour makes the coding package of type, otherwise, judge the coding package that this coding package is a natural type; (C) the coding package to this artificial type carries out inverse quantization, counter table look-up decoding and the decoding of contrast branch error, to produce first decoded data; (D) the coding package to this natural type carries out inverse quantization and the anti-decoding of tabling look-up, to produce second decoded data; (E) this second decoded data is carried out discrete cosine transform, to produce the 3rd decoded data; (F) the 3rd decoded data is carried out color gamut conversion, to obtain the 4th decoded data; And (G) receive said first decoded data or the 4th decoded data, and first decoded data or the 4th decoded data are rebuild, to produce the 2x2 decoding unit.
According to another characteristic of the present invention; The present invention proposes a kind of display system of the fixedly compression ratio based on the 2x2 coding unit; It is that a show image is compressed and decompresses; This display system comprises a display module, an image input equipment, a fixedly compression ratio image compression set based on the 2x2 coding unit, an apparatus for temporary storage, a fixedly compression ratio image decompressing device based on the 2x2 coding unit, reaches time schedule controller; Be connected to this fixedly compression ratio image decompressing device, receive this 2x2 decoding unit, to produce the sequential drive signal and the video data of this display module based on the 2x2 coding unit.This display module is used to show an image.This image input equipment is used to import a show image.Should be connected to this image input equipment based on the fixedly compression ratio image compression set of 2x2 coding unit; The 2x2 coding unit of this show image is encoded; To produce and this 2x2 coding unit corresponding codes package, wherein, said image has at least one 2x2 coding unit.Said apparatus for temporary storage is connected to the fixedly compression ratio image compression set based on the 2x2 coding unit, with temporary this coding package based on the fixedly compression ratio image compression set output of 2x2 coding unit.Said fixedly compression ratio image decompressing device based on the 2x2 coding unit is connected to apparatus for temporary storage, receives said coding package, and this coding package is decompressed, to produce the 2x2 decoding unit corresponding with this 2x2 coding unit.Said time schedule controller is connected to the fixedly compression ratio image decompressing device based on the 2x2 decoding unit, receives said 2x2 decoding unit, to produce the sequential drive signal and the video data of this display module.Wherein, Said fixedly compression ratio image compression set judges that earlier this 2x2 coding unit is artificial type or natural type; Carry out the differential errors coding, quantize and the coding of tabling look-up with 2x2 coding unit artificial type; And produce a first coding data, and to the 2x2 coding unit of the natural type coding that carries out color gamut conversion, discrete cosine transform, quantizes and table look-up, and then produce second coded data; Again this first coding data or this second coded data are encapsulated, to produce the fixedly coding package of compression ratio.
Description of drawings
Fig. 1 is the flow chart of a kind of fixedly compression ratio image compressing method based on the 2x2 coding unit of the present invention;
Fig. 2 is the sketch map of said image and 2x2 coding unit;
Fig. 3 is the sketch map of artificial type and natural type among the present invention;
Fig. 4 is the differential errors coding of 2x2 coding unit in the embodiments of the invention one, the sketch map that quantizes and table look-up and encode;
Fig. 5 is the coding sketch map when the 2x2 coding unit is first, second and third artificial type in the embodiments of the invention one;
Fig. 6 is the coding sketch map when the 2x2 coding unit is the the the 4th, the 5th, the 6th and the 7th artificial type in the embodiments of the invention one;
Fig. 7 is the sketch map of color gamut conversion and discrete cosine transform among the present invention;
The artificial type sketch map of expansion among Fig. 8 the present invention;
Fig. 9 is the differential errors coding of the artificial type of expansion among the embodiment one, the sketch map that quantizes and table look-up and encode;
Figure 10 is the coding sketch map of the 2x2 coding unit of the artificial type of expansion among the embodiment one when being first, second and third artificial type;
Figure 11 is the coding sketch map of 2x2 coding unit when being the 4th to the 7th artificial type of the artificial type of expansion among the embodiment one;
Figure 12 is the coding sketch map of 2x2 coding unit when being the 8th to the 13 artificial type of the artificial type of expansion among the embodiment one;
Figure 13 is the sketch map of the coding of natural type among the embodiment one;
Figure 14 is the table lookup operation sketch map of natural type among the embodiment one;
Figure 15 is the differential errors coding of the artificial type of expansion among the embodiment two, the sketch map that quantizes and table look-up and encode;
Figure 16 is the coding sketch map of the 2x2 coding unit of the artificial type of expansion among the embodiment two when being first, second and third artificial type;
Figure 17 is the coding sketch map of 2x2 coding unit when being the 4th to the 7th artificial type of the artificial type of expansion among the embodiment two;
Figure 18 is the coding sketch map of 2x2 coding unit when being the 8th to the 13 artificial type of the artificial type of expansion among the embodiment two;
Figure 19 is the sketch map of the coding of natural type among the embodiment two;
Figure 20 is the table lookup operation sketch map of natural type among the embodiment two;
Figure 21 is the flow chart of a kind of fixedly compression ratio image decompression method based on the 2x2 coding unit of the present invention;
Figure 22 is the structure chart of a kind of application of the present invention based on the display system of the fixedly compression ratio of 2x2 coding unit.
In the accompanying drawing, the parts of each label representative are following:
S110~S180, step,
210, image, 220, the 2x2 coding unit,
310, the first artificial type, 320, the second artificial type, 330, the third party makes type, 340, four-player makes type; 350, the 5th artificial type, 360, Sixth Man makes type, the 370, the 7th artificial type; 380, first natural type, 390, second natural type
700,2x2 gamut conversion unit, 710, lightness 2x2 gamut conversion unit, 720, the first colourity 2x2 gamut conversion unit; 730, the second colourity 2x2 gamut conversion unit; 750,2x2 frequency domain unit, 760, lightness 2x2 frequency domain unit, 770, the first colourity 2x2 frequency domain unit; 780, the second colourity 2x2 frequency domain unit
S805~S850, step,
900, display system, 910, display module, 920, image input equipment; 930, based on the fixedly compression ratio image compression set of 2x2 coding unit; 940, apparatus for temporary storage, 950, based on the fixedly compression ratio image decompressing device of 2x2 coding unit, 960, time schedule controller; 970, source electrode driver, 980, gate drivers
Embodiment
For making the object of the invention, technical scheme and advantage clearer, below with reference to the accompanying drawing embodiment that develops simultaneously, the present invention is done further explain.
Fig. 1 is the flow chart of a kind of fixedly compression ratio image compressing method based on the 2x2 coding unit of the present invention, and it is that a 2x2 coding unit in the image is encoded.
At first, in step S110, this image compressing method receives a 2x2 coding unit, and this 2x2 coding unit comprises top left corner pixel, upper right corner pixel, lower left corner pixel and the lower right corner pixel that is arranged.
Fig. 2 is the sketch map of this image and this 2x2 coding unit, and is as shown in Figure 2, and this image 210 has at least one 2x2 coding unit 220; Each 2x2 coding unit 220 has four pixel A, B, C, D; Wherein, A is a top left corner pixel, and B is a upper right corner pixel; C is a lower left corner pixel, and D is a lower right corner pixel.Each pixel has red (r), blue (g), green (b) three kinds of colors, wherein A r, A g, A bBe the red value of pixel A, green numerical value, blue values, B r, B g, B bBe the red value of pixel B, green numerical value, blue values, C r, C g, C bBe the red value of pixel C, green numerical value, blue values, D r, D g, D bBe the red value of pixel D, green numerical value, blue values.Can select every kind of color numerical value is 8, so this 2x2 coding unit 220 is positions, 96 (=4 * 3 * 8).Also can select every kind of color numerical value is 6, so this 2x2 coding unit 220 is positions, 72 (=6 * 3 * 4).
In step S120, judge whether this 2x2 coding unit 220 is artificial type, if; Then judge the 2x2 coding unit that this 2x2 coding unit is artificial type; Otherwise, judge the 2x2 coding unit that this 2x2 coding unit is a natural type, wherein; Artificial moulding has seven kinds, comprising: the first artificial type: four pixels, two horizontal stripes in horizontal direction; The second artificial type: four pixels are two vertical stripes of vertical direction; The third party makes type: four pixels are the two slanted bar lines intersection of miter angle direction; The the 4th to the 7th artificial type: four pixels combination with single-point triangular in shape.
Illustrating further, in step S120, is to judge that earlier whether this 2x2 coding unit 220 is the first artificial type and makes in the type to the third party, judges whether this 2x2 coding unit 220 is that four-player is made in type to the seven artificial types again.
Fig. 3 is the sketch map of artificial type of the present invention and natural type.The classification of the present invention's first artificial type to the seven artificial types helps to handle like certain patterns such as font edge, gray scale variation, sawtooth, gridiron patterns, cooperates package recording mode of the present invention, and it is undistorted that those coding units are reached.
As shown in Figure 3; The first artificial type 310 is said four pixels two horizontal stripes in horizontal direction; The color numerical value (X) that is pixel A is identical or approximate with the color numerical value (X) of pixel B, and the color numerical value (Y) of pixel C is identical or approximate with the color numerical value (Y) of pixel D.In like manner; The second artificial type 320 is two vertical stripes of vertical direction for said four pixels; The third party makes type 330 intersects for the two slanted bar lines that said four pixels are the miter angle direction, and four-player is made the artificial type of type the 340, the 5th 350, Sixth Man and made the combination with single-point triangular in shape for said four pixels of type 360 and the 7th artificial type 370.That is: the first artificial type 310 is said top left corner pixel and upper right corner pixel approximate (X) and lower left corner pixel and lower right corner pixel approximate (Y); The second artificial type 320 is said top left corner pixel and lower left corner pixel approximate (X) and upper right corner pixel and lower right corner pixel approximate (Y); The third party makes type 330 and is said top left corner pixel and lower right corner pixel approximate (X) and lower left corner pixel and upper right corner pixel approximate (Y); Four-player is made type 340 and is said lower left corner pixel, upper right corner pixel and lower right corner pixel approximate (Y); The 5th artificial type 350 is said top left corner pixel, upper right corner pixel and lower right corner pixel approximate (Y); Sixth Man is made type 360 and is said top left corner pixel, lower left corner pixel and upper right corner pixel approximate (Y); The 7th artificial type 370 is said top left corner pixel, lower left corner pixel and lower right corner pixel approximate (Y).
In step S120, when satisfying formula, judge that this 2x2 coding unit 220 is the first artificial type 310:
ABS(A r,B r)<THD1,ABS(C r,D r)<THD1,
ABS(A g,B g)<THD1,ABS(C g,D g)<THD1,
ABS(A b,B b)<THD1,ABS(C b,D b)<THD1,
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b)≤
ABS(A r,C r)+ABS(A g,C g)+ABS(A b,C b),
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b)≤
ABS(D r,B r)+ABS(D g,B g)+ABS(D b,B b),
ABS(C r,D r)+ABS(C g,D g)+ABS(C b,D b)≤
ABS(D r,B r)+ABS(D g,B g)+ABS(D b,B b),
ABS(C r,D r)+ABS(C g,D g)+ABS(C b,D b)≤
ABS(A r,C r)+ABS(A g,C g)+ABS(A b,C b),
Wherein, THD1 is first threshold value (its value is rule of thumb chosen by those skilled in the art), and A is said top left corner pixel, and B is a said upper right corner pixel, and C is a said lower left corner pixel, and D is a said lower right corner pixel, A r, A g, A bBe respectively the red value of pixel A, green numerical value and blue values, B r, B g, B bBe respectively the red value of pixel B, green numerical value and blue values, C r, C g, C bBe respectively the red value of pixel C, green numerical value and blue values, D r, D g, D bBe respectively the red value of pixel D, green numerical value and blue values.Wherein ABS is the ABS function of two element differences in the bracket, that is when a >=b, and ABS (a, b)=a-b, when a<b, ABS (b, a)=b-a.
In step S120, when satisfying formula, judge that this 2x2 coding unit 220 is the second artificial type 320:
ABS(A r,C r)<THD1,ABS(B r,D r)<THD1,
ABS(A g,C g)<THD1,ABS(B g,D g)<THD1,
ABS(A b,C b)<THD1,ABS(B b,D b)<THD1,
ABS(A r,C r)+ABS(A g,C g)+ABS(A b,C b)≤
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b),
ABS(A r,C r)+ABS(A g,C g)+ABS(A b,C b)≤
ABS(D r,C r)+ABS(D g,C g)+ABS(D b,C b),
ABS(B r,D r)+ABS(B g,D g)+ABS(B b,D b)≤
ABS(D r,C r)+ABS(D g,C g)+ABS(D b,C b),
ABS(B r,D r)+ABS(B g,D g)+ABS(B b,D b)≤
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b)。
In step S120, when satisfying formula, judge that this 2x2 coding unit 220 makes type 330 for the third party:
ABS(A r,D r)<THD1,ABS(C r,B r)<THD1,
ABS(A g,D g)<THD1,ABS(C g,B g)<THD1,
ABS(A b,D b)<THD1,ABS(C b,B b)<THD1,
ABS(A r,D r)+ABS(A g,D g)+ABS(A b,D b)≤
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b),
ABS(A r,D r)+ABS(A g,D g)+ABS(A b,D b)≤
ABS(D r,C r)+ABS(D g,C g)+ABS(D b,C b),
ABS(C r,B r)+ABS(C g,B g)+ABS(C b,B b)≤
ABS(D r,C r)+ABS(D g,C g)+ABS(D b,C b),
ABS(C r,B r)+ABS(C g,B g)+ABS(C b,B b)≤
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b)。
In step S120, when satisfying formula, judge that this 2x2 coding unit 220 is that four-player is made type 340:
ABS(B r,D r)<THD2,ABS(C r,D r)<THD2,
ABS(B g,D g)<THD2,ABS(C g,D g)<THD2,
ABS(B b,D b)<THD2,ABS(C b,D b)<THD2,
ABS(B r,D r)+ABS(B g,D g)+ABS(B b,D b)≤
ABS(A r,C r)+ABS(A g,C g)+ABS(A b,C b),
ABS(B r,D r)+ABS(B g,D g)+ABS(B b,D b)≤
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b),
ABS(C r,D r)+ABS(C g,D g)+ABS(C b,D b)≤
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b),
ABS(C r,D r)+ABS(C g,D g)+ABS(C b,D b)≤
ABS(A r,C r)+ABS(A g,C g)+ABS(A b,C b)。
Wherein, THD2 is second threshold value (its value is rule of thumb chosen by those skilled in the art),
In step S120, when satisfying formula, judge that this 2x2 coding unit 220 is the 5th artificial type 350:
ABS(B r,D r)<THD2,ABS(A r,B r)<THD2,
ABS(B g,D g)<THD2,ABS(A g,B g)<THD2,
ABS(B b,D b)<THD2,ABS(A b,B b)<THD2,
ABS(B r,D r)+ABS(B g,D g)+ABS(B b,D b)≤
ABS(A r,C r)+ABS(A g,C g)+ABS(A b,C b),
ABS(B r,D r)+ABS(B g,D g)+ABS(B b,D b)≤
ABS(C r,D r)+ABS(C g,D g)+ABS(C b,D b),
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b)≤
ABS(C r,D r)+ABS(C g,D g)+ABS(C b,D b),
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b)≤
ABS(A r,C r)+ABS(A g,C g)+ABS(A b,C b)。
In step S120, when satisfying formula, judge that this 2x2 coding unit 220 makes type 360 for Sixth Man:
ABS(A r,C r)<THD2,ABS(A r,B r)<THD2,
ABS(A g,C g)<THD2,ABS(A g,B g)<THD2,
ABS(A b,C b)<THD2,ABS(A b,B b)<THD2,
ABS(A r,C r)+ABS(A g,C g)+ABS(A b,C b)≤
ABS(B r,D r)+ABS(B g,D g)+ABS(B b,D b),
ABS(A r,C r)+ABS(A g,C g)+ABS(A b,C b)≤
ABS(C r,D r)+ABS(C g,D g)+ABS(C b,D b),
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b)≤
ABS(C r,D r)+ABS(C g,D g)+ABS(C b,D b),
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b)≤
ABS(B r,D r)+ABS(B g,D g)+ABS(B b,D b)。
In step S120, when satisfying formula, judge that this 2x2 coding unit 220 is the 7th artificial type 370:
ABS(A r,C r)<THD2,ABS(C r,D r)<THD2,
ABS(A g,C g)<THD2,ABS(C g,D g)<THD2,
ABS(A b,C b)<THD2,ABS(C b,D b)<THD2,
ABS(A r,C r)+ABS(A g,C g)+ABS(A b,C b)≤
ABS(B r,D r)+ABS(B g,D g)+ABS(B b,D b),
ABS(A r,C r)+ABS(A g,C g)+ABS(A b,C b)≤
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b),
ABS(C r,D r)+ABS(C g,D y)+ABS(C b,D b)≤
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b),
ABS(C r,D r)+ABS(C g,D y)+ABS(C b,D b)≤
ABS(B r,D r)+ABS(B g,D g)+ABS(B b,D b)。
In step S130, the 2x2 coding unit of this artificial type is carried out the differential errors coding, quantizes and the coding of tabling look-up, with the generation first coding data.
Below respectively with regard in the 2x2 coding unit, red (r) of each pixel, blue (g), green (b) three kinds of colors adopt 8 and 6 two specific embodiments that write down that image compressing method of the present invention is specifically introduced respectively.
Embodiment one: red (r) of each pixel, blue (g), green (b) three kinds of colors all adopt 8 to carry out record in the 2x2 coding unit, so this 2x2 coding unit 220 is positions, 96 (=4 * 3 * 8).
Fig. 4 is the differential errors coding of the 2x2 coding unit of embodiments of the invention one, the sketch map that quantizes and table look-up and encode; This embodiment one adopts the embodiment of 8 bit representations for each color numerical value in the 2x2 coding unit 220 among Fig. 2, and this 2x2 coding unit 220 is positions, 96 (=4 * 3 * 8).In Fig. 4, the numeral figure place, for example 8,7 represent 8 and 7 respectively.Oblique line is represented table lookup operation, and backslash is represented quantization operation.
In step S130; When this 2x2 coding unit 220 is that first artificial type 310, the second artificial type 320 and third party are when making in the type 330; Use the wherein mean value of two pixels of 8 records; Use 7 record one 7 bit table cases to put, the recorded content that this 7 bit table case is put is: in all recorded contents of these 7 bit table lattice, differ reckling with the difference of the mean value of the mean value of other two pixels in this 2x2 coding unit and 8 two pixels that write down of aforesaid use.This form is a variable form, can adjust at any time.One has four forms: 7 bit table lattice, 4 bit table lattice, 3 bit table lattice, 2 bit table lattice, basic spirit: the big numerical value of probability occurs and be based upon in the form, therefore easily selected come out.Give up otherwise the little numerical value of probability occurs, be not based upon in the form, because the resource-constrained (limited size of form) that stores.Embodiment provided by the present invention only is one of setting method of wherein certain form.In fact look after and guide the content of this form and product actual table, be follow-up optimized action.
First artificial type 310, the second artificial type 320 and third party make type 330 and are the lines form; So with the first artificial type 310 as explanation; It is can accomplish based on the present invention's technology for knowing these technological personnel that the second artificial type 320 is made type 330 with the third party, repeats no more.
Fig. 5 is that the 2x2 coding unit of embodiments of the invention one is the first artificial type, the second artificial type and the third party coding sketch map when making type; This embodiment one adopts the embodiment of 8 bit representations for each color numerical value in the 2x2 coding unit 220 among Fig. 2, and this 2x2 coding unit 220 is positions, 96 (=4 * 3 * 8).It can be red, blue or green, be earlier with color numerical value (126) addition of the color numerical value (127) of pixel A and pixel B again divided by 2 (126.5), rounding up obtains 127 again, uses 8 to write down numerical value 127.
With color numerical value (32) addition of the color numerical value (34) of pixel C and pixel D again divided by 2 (33); Round up again and obtain 33; Deduct the numerical value 127 of previous calculating gained, to obtain-94, though the result who subtracts each other is 9; But the present invention uses one 7 bit table lattice to table look-up, and can reduce the data volume that the coding back is produced.Table look-up according to-94 pairs 1 bit table lattice.The-94th, between-95 and-90, and,, use the position of 7 records-95 so obtain-95 position via after tabling look-up near-95.
Write down 128 values in this form of 7 altogether.If-95 near j value of form, then write down " j "." j " value can be calculated according to formula:
[a 1,a 2,a 3,...,a k-2,a k-1,a k],
sign[α-a j]×sign[a j+1-α]≥0, (1)
A wherein 1~a k Be 128 values that write down altogether in this form of 7, it is extremely arranged by little greatly in regular turn.Sign is the function of sign of this value of output, and α is the value of desiring to table look-up, in case when satisfying formula (1), promptly store the j value.
In step S130; When this 2x2 coding unit 220 be four-player make the artificial type of type the 340, the 5th 350, when Sixth Man is made in type 360 and the 7th artificial type 370; Use the wherein mean value of three pixels of 8 records, use the quantized value of 7 or 6 these 2x2 coding unit 220 another one pixels of record.
Four-player is made the artificial type of type the 340, the 5th 350, Sixth Man and is made the combination that type 360 and the 7th artificial type 370 are triangle and single-point; So making type 340 with four-player is that example describes; The 5th artificial type 350, Sixth Man makes type 360 and the 7th artificial type 370 is can accomplish based on the present invention's technology for knowing these technological personnel, repeats no more.
Fig. 6 is that the 2x2 coding unit of embodiments of the invention one is the coding sketch map of four-player when making the artificial type of type the 340, the 5th 350, Sixth Man and making type 360 and the 7th artificial type 370; This embodiment one adopts the embodiment of 8 bit representations for each color numerical value in the 2x2 coding unit 220 among Fig. 2, and this 2x2 coding unit 220 is positions, 96 (=4 * 3 * 8).It can be redness, blueness or green.It obtains 100 divided by 3 with the color numerical value (100) of pixel B, the color numerical value (100) of pixel C and color numerical value (100) addition of pixel D earlier again, rounds up to obtain 100 again, uses 8 record numerical value 100.
The color numerical value (34) of pixel A is carried out quantization operations, and the fractional part that rounds up again obtains numerical value 9, uses 6 record numerical value 9.When the color of pixel A is green, use 7 record numerical value 9.This quantization operations is calculated through formula:
x Q = Round ( x Q )
Wherein Q is a quantizing factor, and Round is the function that rounds up.When using 6 records, quantizing factor Q is 4, and when using 7 records, quantizing factor Q is 2.
When in step S120; Judge when this 2x2 coding unit 220 is not in first artificial type to the seven artificial types; Represent that this 2x2 coding unit 220 is natural type; So in step S140, the 2x2 coding unit 220 of this natural type is carried out color gamut conversion, to obtain a 2x2 gamut conversion unit.
In step S140, through carrying out RGB to YUV color gamut conversion, to obtain the 2x2 gamut conversion unit, this RGB to YUV color gamut conversion is carried out through formula:
Y U V = 0.25 0.5 0.25 - 0.5 1 . . - 0.5 - 1.0 0 1.0 r g b ,
Wherein, r representes the red value of a pixel, and g is the green value of this pixel, and b is the blue valve of this pixel, and Y is the lightness (Luminance, Luma) of this pixel, and U and V are the colourity (Chrominance) of this pixel.Fig. 7 is the sketch map of color gamut conversion of the present invention and discrete cosine transform; As shown in Figure 7, this 2x2 gamut conversion unit 700 is to be respectively lightness 2x2 gamut conversion unit 710, the first colourity 2x2 gamut conversion unit 720, and the second colourity 2x2 gamut conversion unit 730.
The scope of the value of the element in this lightness 2x2 gamut conversion unit 710 is 0~255; The scope of the value of the element of this first colourity 2x2 gamut conversion unit 720 and the second colourity 2x2 gamut conversion unit 730 is-255~255; So the element of this lightness 2x2 gamut conversion unit 710 is 8; The element of this first colourity 2x2 gamut conversion unit 720 and the second colourity 2x2 gamut conversion unit 730 is 9, and this is merely computational process, does not influence the position counting of last coding.Before carrying out next step S150, need earlier the value of the element of this lightness 2x2 gamut conversion unit 710 is displaced to-128~127 by 0~255.
In step S150, this 2x2 gamut conversion unit 700 is carried out discrete cosine transform, to produce a 2x2 frequency domain unit.
In step S150, this discrete cosine transform is carried out through formula:
E F G H = 0.25 × 1 1 1 1 1 - 1 1 - 1 1 1 - 1 - 1 1 - 1 - 1 1 A ‾ B ‾ C ‾ D ‾ , - - - ( 2 )
Wherein,
Figure BDA0000127270080000142
is the upper left corner value of this 2x2 gamut conversion unit 700;
Figure BDA0000127270080000143
is the upper right corner value of this 2x2 gamut conversion unit 700;
Figure BDA0000127270080000144
is the lower left corner value of this 2x2 gamut conversion unit 700;
Figure BDA0000127270080000145
is the lower right corner value of this 2x2 gamut conversion unit 700; The E element is the upper left corner value of this 2x2 frequency domain unit 750; The F element is the upper right corner value of this 2x2 frequency domain unit 750; The G element is the lower left corner value of this 2x2 frequency domain unit 750; The H element is the lower right corner value of this 2x2 frequency domain unit 750, and this 2x2 frequency domain unit 750 is divided into lightness 2x2 frequency domain unit 760, the first colourity 2x2 frequency domain unit 770 and the second colourity 2x2 frequency domain unit 780.
The scope of the value of each element in this lightness 2x2 frequency domain unit 760 is-128~127; The scope of the value of each element of this first colourity 2x2 frequency domain unit 770 and the second colourity 2x2 frequency domain unit 780 is-255~255; So each element of this lightness 2x2 frequency domain unit 760 is 8; Each element of this first colourity 2x2 frequency domain unit 770 and the second colourity 2x2 frequency domain unit 780 is 9, and this is merely computational process, does not influence the position counting of last coding.
Transition matrix in the formula (2) can be obtained by the 2-D discrete cosine conversion, and formula (3) is a 2-D discrete cosine conversion formula:
F ( u , v ) = 1 2 N c ( u ) c ( v ) Σ x = 0 N - 1 Σ y = 0 N - 1 f ( x , y ) cos ( ( 2 x + 1 ) uπ 2 N ) cos ( ( 2 y + 1 ) vπ 2 N ) , - - - ( 3 )
Wherein,
Wherein, u, v are discrete frequency variable (discrete frequency variables), and the value of u, v is 0,1,2; ..., N-1, (x y) is N * N image pixel, F (u to f; V) be the result of 2-D discrete cosine conversion, in this embodiment, N is 2, then can obtain the transition matrix in the formula (2).
In step S160, this 2x2 frequency domain unit 750 is categorized as first natural type 380 or second natural type 390, wherein, F element and G element when this first colourity 2x2 frequency domain unit 770 satisfy formula:
max(ABS(F,0),ABS(G,0))≤THD3,
And the F element and the G element of the second colourity 2x2 frequency domain unit 780 satisfy formula:
max(ABS(F,0),ABS(G,0))≤THD4,
Judge that then this 2x2 frequency domain unit 750 is first natural type 380; Otherwise; Judge that this 2x2 frequency domain unit 750 is second natural type 390, wherein, THD3 is the 3rd threshold value; THD4 is the 4th threshold value (value of the 3rd threshold value and the 4th threshold value is rule of thumb chosen by those skilled in the art), and the 4th threshold T HD4 is greater than the 3rd threshold T HD3.
In step S170, this 2x2 frequency domain unit 750 is quantized and the coding of tabling look-up, to produce second coded data.
In step S170, when this 2x2 frequency domain unit 750 is first natural type 380, use E element, F element, the G element of 7 this lightness of record 2x2 frequency domain unit 760; Use 4 record one 4 bit table cases to put, the recorded content that this 4 bit table case is put is: in all recorded contents of these 4 bit table lattice, with the difference reckling of the value of the H element of this lightness 2x2 frequency domain unit 760.
The value of the element of this lightness 2x2 frequency domain unit 760 is-128~127, so need carry out shift operation earlier, is displaced to 0~255 with the value with the element of this lightness 2x2 frequency domain unit 760 by-128~127.In step S170, be that the numerical value with E element, F element, G element carries out quantization operations, round up to fractional part, re-use 7 records.Because the numerical value of the E element of this lightness 2x2 frequency domain unit 760, F element, G element is 8, when using 7 records, so quantizing factor Q is 2.The H element of this lightness 2x2 frequency domain unit 760 then uses one 4 bit table lattice carrying out table lookup operation, and it is identical that the principle of this table lookup operation and aforementioned 7 bit table lattice are tabled look-up, and repeats no more.
In step S170, when this 2x2 frequency domain unit 750 is first natural type 380, use the E element of 7 this first colourity of record 2x2 frequency domain unit 770; Use 2 record one 2 bit table cases to put, the recorded content that this 2 bit table case is put is: in all recorded contents of these 2 bit table lattice, with the reckling in the difference of the mean value of the F element of this first colourity 2x2 frequency domain unit 770 and G element; Do not write down the H element of this first colourity 2x2 frequency domain unit 770.
The value of the element of this first colourity 2x2 frequency domain unit 770 is-255~255, so need carry out a shift operation earlier, is displaced to 0~510 with the value with the element of this first colourity 2x2 frequency domain unit 770 by-255~255.Therefore the element of this first colourity 2x2 frequency domain unit 770 is 9, when using the E element of 7 this first colourity of record 2x2 frequency domain unit 770, need carry out quantization operations earlier, and wherein, quantizing factor Q is 4.
It is that the F element and the G element of this first colourity 2x2 frequency domain unit 770 are averaged earlier, with this mean value one 2 bit table lattice is tabled look-up again, and it is identical that the principle of this table lookup operation and aforementioned 7 bit table lattice are tabled look-up, and repeats no more.
In step S170, when this 2x2 frequency domain unit 750 is first natural type 380, use the value of the E element of 7 this second colourity of record 2x2 frequency domain unit 780; Use 2 record one 2 bit table cases to put, the recorded content that this 2 bit table case is put is: in all recorded contents of these 2 bit table lattice, with the reckling in the difference of the mean value of F element in this second colourity 2x2 frequency domain unit 780 and G element; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of the value of the H element of this second colourity 2x2 frequency domain unit 780.
The value of the element of this second colourity 2x2 frequency domain unit 780 is-255~255, so need carry out a shift operation earlier, is displaced to 0~510 with the value with the element of this second colourity 2x2 frequency domain unit 780 by-255~255.Therefore the element of this second colourity 2x2 frequency domain unit 780 is 9, when using the E element of 7 this second colourity of record 2x2 frequency domain unit 780, need carry out quantization operations earlier, and wherein, quantizing factor Q is 4.
It is that the F element and the G element of this second colourity 2x2 frequency domain unit 780 are averaged earlier, with this mean value one 2 bit table lattice is tabled look-up again.It is identical that the principle that these 2 bit table lattice are tabled look-up and aforementioned 7 bit table lattice are tabled look-up, and repeats no more.
In step S170; When this 2x2 frequency domain unit 750 is second natural type 390; Use the quantized value of the E element of 6 record lightness 2x2 frequency domain unit 760; Use the quantized value of the F element of 5 this lightness of record 2x2 frequency domain unit 760, use the quantized value of the G element of 5 record lightness 2x2 frequency domain unit 760; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of the value of the H element of this lightness 2x2 frequency domain unit 760.These quantizing factors Q and table lookup operation for be familiar with this technical staff according to the present invention technological can learning, repeat no more.
In step S170, when this 2x2 frequency domain unit 750 is second natural type 390, use the quantized value of the E element of 5 this first colourity of record 2x2 frequency domain unit 770; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of the value of the F element of this first colourity 2x2 frequency domain unit 770; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of the value of the G element of this first colourity 2x2 frequency domain unit 770; Do not write down the H element of this first colourity 2x2 frequency domain unit 770.
In step S170, when this 2x2 frequency domain unit 750 is second natural type 390, use the quantized value of the E element of 5 this second colourity of record 2x2 frequency domain unit 780; Use 4 record one 4 bit table cases to put, the recorded content that this 4 bit table case is put is: in all recorded contents of these 4 bit table lattice, with the reckling in the difference of the value of the F element of this second colourity 2x2 frequency domain unit 780; Use 4 record one 4 bit table cases to put, the recorded content that this 4 bit table case is put is: in all recorded contents of these 4 bit table lattice, with the reckling in the difference of the value of the G element of this second colourity 2x2 frequency domain unit 780; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of the value of the H element of this second colourity 2x2 frequency domain unit 780.
In step S180, receive this first coding data or this second coded data, and this first coding data or this second coded data are encapsulated (packaging), and then generate coding package with fixed bit size.
By shown in Figure 4; Step S180 uses 1 (main packet header) to write down whether this 2x2 coding unit 220 is artificial type or natural type; Whether to write down this 2x2 coding unit 220 be first artificial type, second artificial type, third party make in type or four to seven artificial type one, use 2 (second son packet header) to write down whether this 2x2 coding unit 220 is in the 4th to the 7th artificial type at last if re-using 2 (the first sub-packet header).Therefore; When this 2x2 coding unit 220 be the first artificial type, the second artificial type, when the third party makes in the type; Position counting after its coding and the encapsulation be 48 (=1+2+8+7+8+7+8+7); When this 2x2 coding unit 220 is in the 4th to the 7th artificial type, the position counting after its coding and the encapsulation still be 48 (=1+2+2+8+7+8+6+8+6).When this 2x2 coding unit 220 is natural type; Re-use 1 (the second sub-packet header) to write down whether this 2x2 coding unit 220 is in first natural type or second natural type; When this 2x2 coding unit 220 is first natural type; Position counting after its coding and the encapsulation still is 48 (=1+1+3 * 7+4+7+2+7+2+3); When this 2x2 coding unit 220 is second natural type, the position counting after its coding and the encapsulation still be 48 (=1+1+6+5+5+3+5+3+3+5+4+4+3).
Shown in Figure 8 is the expansion of the artificial type among Fig. 3, and this expansion expands to 17 kinds on the basis of seven kinds of above-mentioned artificial types.Wherein, first artificial type to the seven artificial types are with above-mentioned consistent; Eight, the 9th artificial type is represented these four pixels horizontal stripe in horizontal direction and the combination of two single-points; Ten, the 11 artificial type representes that these four pixels are the combination of a vertical stripe and two single-points of vertical direction; The the 12, the 13 artificial type representes that these four pixels are a slanted bar line of miter angle direction and the combination of two single-points; The 14 to the 17 artificial type is the single channel type, sees follow-up formulae express for details.
Corresponding above-mentioned 17 kinds of artificial types; Judgement order adjustment to some extent in the step 120: judge whether said 2x2 coding unit is in the 14 to the 17 artificial type earlier; Judge whether that again to be the first artificial type make in the type to the third party; Judge whether to be that four-player is made in type to the seven artificial types again, judge whether to be in the 8th artificial type to the 13 artificial types again.
The said the 8th artificial type representes that said top left corner pixel and upper right corner pixel are similar to (L); The said the 9th artificial type representes that said lower left corner pixel and lower right corner pixel are similar to (L); The said the tenth artificial type representes that said top left corner pixel and lower left corner pixel are similar to (L); The said the 11 artificial type representes that said upper right corner pixel and lower right corner pixel are similar to (L); The said the 12 artificial type representes that said top left corner pixel and lower right corner pixel are similar to (L); The said the 13 artificial type representes that said lower left corner pixel and upper right corner pixel are similar to (L).
According to 17 kinds of artificial types of above-mentioned new expansion, in step 120, when satisfying formula, judge that this 2x2 coding unit is that the tenth four-player is made type:
A r=A g,A g=A b
B r=B g,B g=B b
C r=C g,C g=C b
D r=D g,D g=D b
Wherein, A is said top left corner pixel, and B is a said upper right corner pixel, and C is a said lower left corner pixel, and D is a said lower right corner pixel, A r, A g, A bBe respectively the red value of pixel A, green numerical value and blue values, B r, B g, B bBe respectively the red value of pixel B, green numerical value and blue values, C r, C g, C bBe respectively the red value of pixel C, green numerical value and blue values, D r, D g, D bBe respectively the red value of pixel D, green numerical value and blue values.
In step 120, when satisfying formula, judge that this 2x2 coding unit is the 15 artificial type:
A g=0,A b=0
B g=0,B b=0
C g=0,C b=0
D g=0,D b=0
In step 120, when satisfying formula, judge that this 2x2 coding unit is the 16 artificial type:
A r=0,A b=0
B r=0,B b=0
C r=0,C b=0
D r=0,D b=0
In step 120, when satisfying formula, judge that this 2x2 coding unit is the 17 artificial type:
A g=0,A r=0
B g=0,B r=0
C g=0,C r=0
D g=0,D r=0
In step 120, when satisfying formula, judge that this 2x2 coding unit is the first artificial type:
ABS(A y,B y)<THDY1,ABS(C y,D y)<THDY1
ABS(A u,B u)<THDU1,ABS(C u,D u)<THDU1
ABS(A v,B v)<THDV1,ABS(C v,D v)<THDV1
ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)≤ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)≤ABS(D y,B y)+ABS(D v,B v)+ABS(D uBu)
ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)≤ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)≤ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
Wherein, ABS is the ABS function of two element differences in the bracket, and THDY1 is a lightness threshold value 1; THDU1 is the first colourity threshold value 1, and THDV1 is the second colourity threshold value 1 (value of each threshold value is rule of thumb chosen by those skilled in the art), and A is said top left corner pixel; B is a said upper right corner pixel; C is a said lower left corner pixel, and D is a said lower right corner pixel, A y, A u, A vBe respectively lightness, first colourity and second chromatic value of pixel A, B y, B u, B vBe respectively lightness, first colourity and second chromatic value of pixel B, C y, C u, C vBe respectively lightness, first colourity and second chromatic value of pixel C, D y, D u, D vBe respectively lightness, first colourity and second chromatic value of pixel D;
Wherein, said lightness, first colourity and second chromatic value obtain through the color gamut conversion formula of the RGB to YUV among the above-mentioned steps S140:
Y U V = 0.25 0.5 0.25 - 0.5 1.0 - 0.5 - 1.0 0 1.0 r g b ,
Wherein, r is the red value of a pixel, and g is the green value of this pixel, and b is the blue valve of this pixel, and Y is the lightness of this pixel, and U and V are respectively first colourity and second colourity of this pixel.
In step 120, when satisfying formula, judge that this 2x2 coding unit is the second artificial type:
ABS(A y,C y)<THDY1,ABS(B y,D y)<THDY1
ABS(A u,C u)<THDU1,ABS(B u,D u)<THDU1
ABS(A v,C v)<THDV1,ABS(B v,D v)<THDV1
ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)≤ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)≤ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
ABS(B y,D y)+ABS(B v,D v)+ABS(B u,D u)≤ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
ABS(B y,D y)+ABS(B v,D v)+ABS(B u,D u)≤ABS(D y,C y)+ABS(D v,C v)+ABS(D u,C u)
In step 120, when satisfying formula, judge that this 2x2 coding unit makes type for the third party:
ABS(C y,B y)<THDY1,ABS(A y,D y)<THDY1
ABS(C u,B u)<THDU1,ABS(A u,D u)<THDU1
ABS(C v,B v)<THDV1,ABS(A v,D v)<THDV1
ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)≤ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)≤ABS(D y,C y)+ABS(D v,C v)+ABS(D u,C u)
ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)≤ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)≤ABS(D y,C y)+ABS(D v,C v)+ABS(D u,C u)
In step 120, when satisfying formula, judge that this 2x2 coding unit is that four-player is made type:
ABS(D y,B y)<THDY2,ABS(C y,D y)<THDY2
ABS(D u,B u)<THDU2,ABS(C u,D u)<THDU2
ABS(D v,B v)<THDV2,ABS(C v,D v)<THDV2
ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)≤ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)≤ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
ABS(D y,C y)+ABS(D v,C v)+ABS(D u,C u)≤ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
ABS(D y,C y)+ABS(D v,C v)+ABS(D u,C u)≤ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
Wherein, ABS is the ABS function of two element differences in the bracket, and THDY2 is a lightness threshold value 2, and THDU2 is the first colourity threshold value 2, and THDV2 is the second colourity threshold value 2 (value of each threshold value is rule of thumb chosen by those skilled in the art).
In step 120, when satisfying formula, judge that this 2x2 coding unit is the 5th artificial type:
ABS(D y,B y)<THDY2,ABS(A y,B y)<THDY2
ABS(D u,B u)<THDU2,ABS(A u,B u)<THDU2
ABS(D v,B v)<THDV2,ABS(A v,B v)<THDV2
ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)≤ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)≤ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)≤ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)≤ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
In step 120, when satisfying formula, judge that this 2x2 coding unit is that Sixth Man is made type:
ABS(A y,B y)<THDY2,ABS(C y,A y)<THDY2
ABS(A u,B u)<THDU2,ABS(C u,A u)<THDU2
ABS(A v,B v)<THDV2,ABS(C v,A v)<THDV2
ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)≤ABS(D y,C y)+ABS(D v,C v)+ABS(D u,C u)
ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)≤ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)≤ABS(D y,C y)+ABS(D v,C v)+ABS(D u,C u)
ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)≤ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
In step 120, when satisfying formula, judge that this 2x2 coding unit is the 7th artificial type:
ABS(A y,C y)<THDY2,ABS(C y,D y)<THDY2
ABS(A u,C u)<THDU2,ABS(C u,D u)<THDU2
ABS(A v,C v)<THDV2,ABS(C v,D v)<THDV2
ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)≤ABS(B y,D y)+ABS(B v,D v)+ABS(B u,D u)
ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)≤ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
ABS(D y,C y)+ABS(D v,C v)+ABS(D u,C u)≤ABS(B y,D y)+ABS(B v,D v)+ABS(B u,D u)
ABS(D y,C y)+ABS(D v,C v)+ABS(D u,C u)≤ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
In step 120, when satisfying formula, judge that this 2x2 coding unit is the 8th artificial type:
temp1=ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
temp2=ABS(A y,C y)+ABS(A v,C y)+ABS(A u,C u)
temp3=ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)
temp4=ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
temp5=ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)
temp6=ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
MIN(temp1,temp2,temp3,temp4,temp5,temp6)=temp1
ABS(A y,B y)<THDY4
ABS(A v,B v)<THDV4
ABS(A u,B u)<THDU4
Perhaps ABS (C y, D y)>THDY3
Perhaps ABS (C v, D v)>THDV3
Perhaps ABS (C u, D u)>THDU3
Wherein, ABS is the ABS function of two element differences in the bracket, and THDY3 is a lightness threshold value 3, and THDU3 is the first colourity threshold value 3; THDV3 is the second colourity threshold value 3; THDY4 is a lightness threshold value 4, and THDU4 is the first colourity threshold value 4, and THDV4 is the second colourity threshold value 4 (value of each threshold value is rule of thumb chosen by those skilled in the art).
In step 120, when satisfying formula, judge that this 2x2 coding unit is the 9th artificial type:
temp1=ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
temp2=ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
temp3=ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)
temp4=ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
temp5=ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)
temp6=ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
MIN(temp1,temp2,temp3,temp4,temp5,temp6)=temp6
ABS(C y,D y)<THDY4
ABS(C v,D v)<THDV4
ABS(C u,D u)<THDU4
Perhaps ABS (A y, B y)>THDY3
Perhaps ABS (A v, B v)>THDV3
Perhaps ABS (A u, B u)>THDU3
In step 120, when satisfying formula, judge that this 2x2 coding unit is the tenth artificial type:
temp1=ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
temp2=ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
temp3=ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)
temp4=ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
temp5=ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)
temp6=ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
MIN(temp1,temp2,temp3,temp4,temp5,temp6)=temp2
ABS(A y,C y)<THDY4
ABS(A v,C v)<THDV4
ABS(A u,C u)<THDU4
Perhaps ABS (B y, D y)>THDY3
Perhaps ABS (B v, D v)>THDV3
Perhaps ABS (B u, D u)>THDU3
In step 120, when satisfying formula, judge that this 2x2 coding unit is the 11 artificial type:
temp1=ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
temp2=ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
temp3=ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)
temp4=ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
temp5=ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)
temp6=ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
MIN(temp1,temp2,temp3,temp4,temp5,temp6)=temp4
ABS(B y,B y)<THDY4
ABS(D v,B v)<THDV4
ABS(D u,B u)<THDU4
Perhaps ABS (C y, A y)>THDY3
Perhaps ABS (C v, A v)>THDV3
Perhaps ABS (C u, A u)>THDU3
In step 120, when satisfying formula, judge that this 2x2 coding unit is the 12 artificial type:
temp1=ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
temp2=ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
temp3=ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)
temp4=ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
temp5=ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)
temp6=ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
MIN(temp1,temp2,temp3,temp4,temp5,temp6)=temp3
ABS(A y,D y)<THDY4
ABS(A v,D v)<THDV4
ABS(A u,D u)<THDU4
Perhaps ABS (C y, B y)>THDY3
Perhaps ABS (C v, B v)>THDV3
Perhaps ABS (C u, B u)>THDU3
In step 120, when satisfying formula, judge that this 2x2 coding unit is the 13 artificial type:
temp1=ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
temp2=ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
temp3=ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)
temp4=ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
temp5=ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)
temp6=ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
MIN(temp1,temp2,temp3,temp4,temp5,temp6)=temp5
ABS(C y,B y)<THDY4
ABS(C v,B v)<THDV4
ABS(C u,B u)<THDU4
Perhaps ABS (A y, D y)>THDY3
Perhaps ABS (A v, D v)>THDV3
Perhaps ABS (A u, D u)>THDU3
In step S160, go out outside the above-mentioned natural type sorting technique, can also divide as follows natural type: 2x2 frequency domain unit is divided into first natural type, second natural type or the 3rd natural type, wherein:
H element when the first colourity 2x2 frequency domain unit satisfies formula,
H>THD1
Judge that then said 2x2 coding unit is first natural type;
F element and G element in the first colourity 2x2 frequency domain unit satisfy formula,
MAX(ABS(F,0),ABS(G,0))≤THD2
And F element and G element in the second colourity 2x2 frequency domain unit satisfy formula,
MAX(ABS(F,0),ABS(G,0))≤THD3
Judge that then said 2x2 coding unit is second natural type;
Do not meet first natural type and the second natural type condition, judge then that said 2x2 coding unit is the 3rd natural type;
Wherein, THD1 is first threshold value, and THD2 is second threshold value, and THD3 is the 3rd threshold value (value of each threshold value is rule of thumb chosen by those skilled in the art).
Fig. 9 is the differential errors coding that adopts the 2x2 coding unit of the back 17 kinds of artificial types of above-mentioned expansion, the sketch map that quantizes and table look-up and encode.In Fig. 9, the numeral figure place, for example 8,7 represent 8 and 7 respectively, and oblique line is represented table lookup operation, and backslash is represented quantization operation.
In step S130; When this 2x2 coding unit 220 is that the first artificial type, the second artificial type and third party are when making in the type; Use the wherein mean value of two pixels of 8 records; Use one 6 of 6 or 7 records or 7 bit table cases to put; The recorded content that these 6 or 7 bit table cases are put is: in all recorded contents of these 6 or 7 bit table lattice, differ reckling with the difference of the mean value of the mean value of other two pixels in this 2x2 coding unit and 8 two pixels that write down of aforesaid use.For example, 2x2 coding unit shown in figure 10, only record: (128+128)/2=128 (using 8 records) and difference (127+127)/2-(128+128)/2=-1 (using one 7 bit table lattice record).
In step S130, when this 2x2 coding unit 220 is a four-player when making in type to the seven artificial types, use the wherein mean value of three pixels of 8 records, use the quantized values of another one pixel in 7 or 6 these 2x2 coding units of record.For example, earlier the color numerical value (127) of pixel B, the color numerical value (129) of pixel C and color numerical value (128) addition of pixel D are obtained 128 divided by 3 again with reference to Figure 11, rounding up obtains 128 again, uses 8 record numerical value 128.The color numerical value (28) of pixel A is carried out quantization operations, and the fractional part that rounds up again obtains numerical value 7, uses 6 record numerical value 7.When the color of pixel A is green, use 7 record numerical value 14.This quantization operations is calculated through aforesaid quantitative formula, repeats no more here.
In step S130, when this 2x2 coding unit 220 is in the 8th artificial type to the 13 artificial types, use the wherein quantized value of two pixel average of 5 records, use 4 quantized values that write down all the other two pixels respectively; Perhaps use the wherein quantized value of two pixel average of 7 records, use the quantized value of 5 all the other two pixels of record.Be about to two close pixel color numerical value and average, and carry out quantization operations, and use 7 (perhaps 5) to carry out record, all the other two pixel color numerical value directly carry out quantization operations respectively and use 5 (perhaps 4) to carry out record respectively.For example, earlier the color numerical value (21) of pixel B and color numerical value (23) addition of pixel D are obtained 22 divided by 2 again, carry out quantization operations to 22 and obtain round (22/2)=11, use 7 record numerical value 11 with reference to Figure 12; The color numerical value (7) of pixel A is carried out quantization operations, and the fractional part that rounds up again obtains numerical value 1, uses 5 record numerical value 1; The color numerical value (40) of pixel C is carried out quantization operations, and the fractional part that rounds up again obtains numerical value 5, uses 5 record numerical value 5.
In step S130; When this 2x2 coding unit 220 is that the tenth four-player is when making in type to the 17 artificial types; Can know from the above-mentioned formula of making type to the 17 artificial types about the tenth four-player; So-called single channel is that pixel only has red (R), green (G), blue (B) or gray scale (gray level) data, thus these data only have RGB 24 triple channel data 1/3, therefore can use 8 these data are carried out complete record.
For the dividing mode of above-mentioned 3 kinds of natural types, please with reference to Figure 13, wherein back slash is represented quantization operation, and slash is represented table lookup operation.
Wherein, quantization operation adopts formula:
x Q = Round ( x Q )
Wherein Q is known quantizing factor, and Round is the function that rounds up, the value x after record quantizes Q
For example, with 7 records 0~255, then Q=256/ (2 7)=2.
About table lookup operation,, have 2 in the 4 bit table lattice for example with reference to Figure 14 4=16 record values, if this element value near j in form value, then writes down " j ", " j " value can be calculated according to formula:
[a 1,a 2,a 3,...,a k-2,a k-1,a k],
sign[F-a j]·sign[a j+1-F]≥0, (2)
A wherein 1~a kBe 16 values that write down altogether in this form of 4, it is extremely arranged by little greatly in regular turn.Sign is the function of sign of this value of output, and F is the value of desiring to table look-up, in case when satisfying formula (2), promptly store the j value.
In step S170, this 2x2 frequency domain unit is quantized and the coding of tabling look-up, to produce second coded data.
In step S170, when this 2x2 frequency domain unit is first natural type, use E element, the F element of 5 record this lightness 2x2 frequency domain unit, the quantized value of G element; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the difference reckling of the value of the H element of this lightness 2x2 frequency domain unit.
The value of the element of this lightness 2x2 frequency domain unit is-128~127, so need carry out shift operation earlier, is displaced to 0~255 with the value with the element of this lightness 2x2 frequency domain unit by-128~127.In step S170, be that the numerical value with E element, F element, G element carries out quantization operations, round up to fractional part, re-use 5 records.Because the numerical value of the E element of this lightness 2x2 frequency domain unit, F element, G element is 8, when using 5 records, so quantizing factor Q is 8.The H element of this lightness 2x2 frequency domain unit then uses one 3 bit table lattice carrying out table lookup operation, and it is identical that the principle of this table lookup operation and aforementioned 5 bit table lattice are tabled look-up, and repeats no more.
In step S170, when this 2x2 frequency domain unit is first natural type, use the quantized value of the E element of 5 this first colourity of record 2x2 frequency domain unit; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the difference reckling of the value of the F element of this first colourity 2x2 frequency domain unit; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the difference reckling of the value of the G element of this first colourity 2x2 frequency domain unit; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the difference reckling of the value of the H element of this first colourity 2x2 frequency domain unit 770.
In step S170, when this 2x2 frequency domain unit is first natural type, use the quantized value of the E element of 5 this second colourity of record 2x2 frequency domain unit; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the difference reckling of the value of the F element of this second colourity 2x2 frequency domain unit; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the difference reckling of the value of the G element of this second colourity 2x2 frequency domain unit; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the difference reckling of the value of the H element of this second colourity 2x2 frequency domain unit.
In step S170, when this 2x2 frequency domain unit is second natural type, use E element, the F element of 7 record this lightness 2x2 frequency domain unit, the quantized value of G element; Use 4 record one 4 bit table cases to put, the recorded content that this 4 bit table case is put is: in all recorded contents of these 4 bit table lattice, with the difference reckling of the value of the H element of this lightness 2x2 frequency domain unit.
The value of the element of this lightness 2x2 frequency domain unit is-128~127, so need carry out shift operation earlier, is displaced to 0~255 with the value with the element of this lightness 2x2 frequency domain unit by-128~127.In step S170, be that the numerical value with E element, F element, G element carries out quantization operations, round up to fractional part, re-use 7 records.Because the numerical value of the E element of this lightness 2x2 frequency domain unit, F element, G element is 8, when using 7 records, so quantizing factor Q is 2.The H element of this lightness 2x2 frequency domain unit then uses one 4 bit table lattice carrying out table lookup operation, and it is identical that the principle of this table lookup operation and aforementioned 7 bit table lattice are tabled look-up, and repeats no more.
In step S170, when this 2x2 frequency domain unit is second natural type, use the quantized value of the E element of 6 this first colourity of record 2x2 frequency domain unit; Use 2 record one 2 bit table cases to put, the recorded content that this 2 bit table case is put is: in all recorded contents of these 2 bit table lattice, with the reckling in the difference of the mean value of the F element of this first colourity 2x2 frequency domain unit and G element; Do not write down the H element of this first colourity 2x2 frequency domain unit.
The value of the element of this first colourity 2x2 frequency domain unit is-255~255, so need carry out a shift operation earlier, is displaced to 0~510 with the value with the element of this first colourity 2x2 frequency domain unit by-255~255.Therefore the element of this first colourity 2x2 frequency domain unit 770 is 9, when using the E element of 6 this first colourity of record 2x2 frequency domain unit 770, need carry out quantization operations earlier, and wherein, quantizing factor Q is 8.
It is that the F element and the G element of this first colourity 2x2 frequency domain unit are averaged earlier, with this mean value one 2 bit table lattice is tabled look-up again, and it is identical that the principle of this table lookup operation and aforementioned 7 bit table lattice are tabled look-up, and repeats no more.
In step S170, when this 2x2 frequency domain unit is second natural type, use the quantized value of the E element of 7 this second colourity of record 2x2 frequency domain unit; Use 2 record one 2 bit table cases to put, the recorded content that this 2 bit table case is put is: in all recorded contents of these 2 bit table lattice, with the reckling in the difference of the mean value of F element in this second colourity 2x2 frequency domain unit and G element; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of the value of the H element of this second colourity 2x2 frequency domain unit.
The value of the element of this second colourity 2x2 frequency domain unit is-255~255, so need carry out a shift operation earlier, is displaced to 0~510 with the value with the element of this second colourity 2x2 frequency domain unit by-255~255.Therefore the element of this second colourity 2x2 frequency domain unit 780 is 9, when using the E element of 7 this second colourity of record 2x2 frequency domain unit, need carry out quantization operations earlier, and wherein, quantizing factor Q is 4.
It is that the F element and the G element of this second colourity 2x2 frequency domain unit are averaged earlier, with this mean value one 2 bit table lattice is tabled look-up again.It is identical that the principle that these 2 bit table lattice are tabled look-up and aforementioned 7 bit table lattice are tabled look-up, and repeats no more.
In step S170, when this 2x2 frequency domain unit is the 3rd natural type, use the quantized value of the E element of 5 this lightness of record 2x2 frequency domain unit; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of the value of the F element of this lightness 2x2 frequency domain unit; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of the value of the G element of this lightness 2x2 frequency domain unit; Use 2 record one 2 bit table cases to put, the recorded content that this 2 bit table case is put is: in all recorded contents of these 2 bit table lattice, with the reckling in the difference of the value of the H element of this lightness 2x2 frequency domain unit.
In step S170, when this 2x2 frequency domain unit is the 3rd natural type, use the quantized value of the E element of 4 this first colourity of record 2x2 frequency domain unit; Use 4 record one 4 bit table cases to put, the recorded content that this 4 bit table case is put is: in all recorded contents of these 4 bit table lattice, with the reckling in the difference of the value of the F element of this first colourity 2x2 frequency domain unit; Use 4 record one 4 bit table cases to put, the recorded content that this 4 bit table case is put is: in all recorded contents of these 4 bit table lattice, with the reckling in the difference of the value of the G element of this first colourity 2x2 frequency domain unit; Use 4 record one 4 bit table cases to put, the recorded content that this 4 bit table case is put is: in all recorded contents of these 4 bit table lattice, with the reckling in the difference of the value of the H element of this first colourity 2x2 frequency domain unit.
In step S170, when this 2x2 frequency domain unit is the 3rd natural type, use the quantized value of the E element of 4 this second colourity of record 2x2 frequency domain unit; Use 4 record one 4 bit table cases to put, the recorded content that this 4 bit table case is put is: in all recorded contents of these 4 bit table lattice, with the reckling in the difference of the value of the F element of this second colourity 2x2 frequency domain unit; Use 4 record one 4 bit table cases to put, the recorded content that this 4 bit table case is put is: in all recorded contents of these 4 bit table lattice, with the reckling in the difference of the value of the G element of this second colourity 2x2 frequency domain unit; Use 4 record one 4 bit table cases to put, the recorded content that this 4 bit table case is put is: in all recorded contents of these 4 bit table lattice, with the reckling in the difference of the value of the H element of this second colourity 2x2 frequency domain unit.
In hardware structure, can use OTP (One Time Programable, One Time Programmable chip), ROM (Read-Only Memory, read-only memory) or NVM (Nonvolatile memory, nonvolatile memory) record form content.
In step S180, receive this first coding data or this second coded data, and this first coding data or this second coded data are encapsulated (packaging), and then generate coding package with fixed bit size.
Like Fig. 9 and shown in Figure 13; Step S180 uses 1 (main packet header) to write down whether this 2x2 coding unit 220 is artificial type or natural type, re-uses 4 (the first sub-packet header) to write down whether this 2x2 coding unit 220 is in first artificial type to the 17 artificial types.Therefore; When this 2x2 coding unit 220 be the first artificial type, the second artificial type, when the third party makes in the type; Position counting after its coding and the encapsulation be 48 (=1+4+8+7+8+6+8+6); When this 2x2 coding unit 220 is in the 4th to the 7th artificial type; Position counting after its coding and the encapsulation still be 48 (=1+4+8+7+8+6+8+6), when this 2x2 coding unit 220 is in the 8th to the 13 artificial type, the position counting after its coding and the encapsulation be 48 (=1+4+5+4+4+7+5+5+5+4+4); When this 2x2 coding unit 220 is in the 14 to the 17 artificial type, the position counting after its coding and the encapsulation be 39 (=1+4+2+8+8+8+8).When this 2x2 coding unit 220 is natural type; Re-use 1 (the second sub-packet header) to write down whether this 2x2 coding unit 220 is first natural type or second, third natural type; When this 2x2 coding unit 220 is first natural type; Position counting after its coding and the encapsulation still be 48 (=1+1+5+5+5+3+5+3+3+3+5+3+3+3); When this 2x2 coding unit 220 is second natural type or the 3rd natural type; Re-use 1 (inferior packet header) to write down whether this 2x2 coding unit 220 is second natural type or the 3rd natural type, when this 2x2 coding unit 220 is second natural type, the position counting after its coding and the encapsulation still be 48 (=1+1+1+7+7+7+4+6+2+7+2+3); When this 2x2 coding unit 220 is the 3rd natural type, the position counting after its coding and the encapsulation still be 48 (=1+1+1+5+3+3+2+4+4+4+4+4+4+4+4).
Embodiment two: red (r) of each pixel, blue (g), green (b) three kinds of colors all adopt 6 to carry out record in the 2x2 coding unit, so this 2x2 coding unit 220 is positions, 72 (=6 * 3 * 4).
In embodiment two, artificial type is with reference to 17 kinds of figure 8.Wherein, first artificial type to the seven artificial types and the tenth four-player are made regular identical in type to the 17 artificial types and the previous embodiment one, and the 8th artificial type to the 13 artificial types adjustment as follows.
In step 120, when satisfying formula, judge that this 2x2 coding unit is the 8th artificial type:
temp1=ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
temp2=ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
temp3=ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)
temp4=ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
temp5=ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)
temp6=ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
MIN(temp1,temp2,temp3,temp4,temp5,temp6)=temp1
ABS(A y,B y)<THDY4
ABS(A v,B v)<THDV4
ABS(A u,B u)<THDU4
In step 120, when satisfying formula, judge that this 2x2 coding unit is the 9th artificial type:
temp1=ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
temp2=ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
temp3=ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)
temp4=ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
temp5=ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)
temp6=ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
MIN(temp1,temp2,temp3,temp4,temp5,temp6)=temp6
ABS(C y,D y)<THDY4
ABS(C v,D v)<THDV4
ABS(C u,D u)<THDU4
In step 120, when satisfying formula, judge that this 2x2 coding unit is the tenth artificial type:
temp1=ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
temp2=ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
temp3=ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)
temp4=ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
temp5=ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)
temp6=ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
MIN(temp1,temp2,temp3,temp4,temp5,temp6)=temp2
ABS(A y,C y)<THDY4
ABS(A v,C v)<THDV4
ABS(A u,C u)<THDU4
In step 120, when satisfying formula, judge that this 2x2 coding unit is the 11 artificial type:
temp1=ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
temp2=ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
temp3=ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)
temp4=ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
temp5=ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)
temp6=ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
MIN(temp1,temp2,temp3,temp4,temp5,temp6)=temp4
ABS(D y,B y)<THDY4
ABS(D v,B v)<THDV4
ABS(D u,B u)<THDU4
In step 120, when satisfying formula, judge that this 2x2 coding unit is the 12 artificial type:
temp1=ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
temp2=ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
temp3=ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)
temp4=ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
temp5=ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)
temp6=ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
MIN(temp1,temp2,temp3,temp4,temp5,temp6)=temp3
ABS(A y,D y)<THDY4
ABS(A v,D v)<THDV4
ABS(A u,D u)<THDU4
In step 120, when satisfying formula, judge that this 2x2 coding unit is the 13 artificial type:
temp1=ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
temp2=ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
temp3=ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)
temp4=ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
temp5=ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)
temp6=ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
MIN(temp1,temp2,temp3,temp4,temp5,temp6)=temp5
ABS(C y,B y)<THDY4
ABS(C v,B v)<THDV4
ABS(C u,B u)<THDU4
For the natural type of embodiment 2, can also divide as follows: 2x 2 frequency domain unit are divided into first natural type or second natural type.
F element and G element in the first colourity 2x2 frequency domain unit satisfy formula,
MAX(ABS(F,0),ABS(G,0))≤THD1
And F element and G element in the second colourity 2x2 frequency domain unit satisfy formula,
MAX(ABS(F,0),ABS(G,0))≤THD2
Judge that then said 2x2 coding unit is first natural type, otherwise judge that said 2x2 coding unit is second natural type.Wherein, as previously mentioned, EFGH is the value after the YUV process discrete cosine transform, and THD1 and THD2 are threshold value.
Figure 15 is the sketch map that embodiment 2 adopts the differential errors of the 2x2 coding unit of the back 17 kinds of artificial types of above-mentioned expansion to encode, quantize and table look-up and encode.
In step S130; When this 2x2 coding unit 220 is that the first artificial type, the second artificial type and third party are when making in the type; The pixel that blank square is represented and have double-head arrow symbolic representation two pixels to average only writes down mean value one time, and the pixel that slash is represented is (less than 6 pixel; As 4,5); The only record and the difference of rest of pixels use the look-up method in aforementioned, promptly use 5 to write down one 5 bit table cases and put; The recorded content that this 5 bit table case is put is: in all recorded contents of these 5 bit table lattice, differ reckling with the difference of the mean value of the mean value of other two pixels in this 2x2 coding unit and 6 two pixels that write down of aforesaid use.For example, 2x2 coding unit shown in figure 16, only record: (63+63)/2=63 (using 6 records) and difference (62+62)/2-(63+63)/2=-1 (using one 5 bit table lattice record).
In step S130; When this 2x2 coding unit 220 is that four-player is when making in type to the seven artificial types; Three akin pixel color numerical value are averaged; And use 6 to carry out record, dissimilar color of pixel numerical value is carried out quantization operations (back slash is represented quantization operations among the figure).For example, earlier the color numerical value (23) of pixel B, the color numerical value (25) of pixel C and color numerical value (24) addition of pixel D are obtained 24 divided by 3 again with reference to Figure 17, rounding up obtains 24 again, uses 6 record numerical value 24.The color numerical value (7) of pixel A is carried out quantization operations, and the fractional part that rounds up again obtains numerical value 2, uses 4 record numerical value 2.When the color of pixel A is green, use 5 record numerical value 4.This quantization operations is calculated through aforesaid quantitative formula, repeats no more here.
In step S130; When this 2x2 coding unit 220 is in the 8th artificial type to the 13 artificial types; Two close pixel color numerical value are averaged; And carry out quantization operations, and use 5 (perhaps 4) to carry out record, all the other two pixel color numerical value directly carry out quantization operations respectively and use 3 to carry out record respectively.For example, earlier the color numerical value (21) of pixel B and color numerical value (23) addition of pixel D are obtained 22 divided by 2 again, carry out quantization operations to 22 and obtain round (22/2)=11, use 5 (perhaps 4) record numerical value 11 with reference to Figure 18; The color numerical value (7) of pixel A is carried out quantization operations, and the fractional part that rounds up again obtains numerical value 1, uses 3 record numerical value 1; The color numerical value (40) of pixel C is carried out quantization operations, and the fractional part that rounds up again obtains numerical value 5, uses 3 record numerical value 5.
In step S130; When this 2x2 coding unit 220 is that the tenth four-player is when making in type to the 17 artificial types; Can know from the above-mentioned formula of making type to the 17 artificial types about the tenth four-player; So-called single channel is that pixel only has red (R), green (G), blue (B) or gray scale (grayl evel) data, thus these data only have RGB 24 triple channel data 1/3, therefore can use 6 these data are carried out complete record.
For the dividing mode of above-mentioned 2 kinds of natural types, please with reference to Figure 19, wherein back slash is represented quantization operation, and slash is represented table lookup operation.
Wherein, quantization operation adopts formula:
x Q = Round ( x Q )
Wherein Q is known quantizing factor, and Round is the function that rounds up, the value x after record quantizes Q
For example, with 5 records 0~63, then Q=64/ (2 5)=2.
About table lookup operation,, have 2 in the 3 bit table lattice for example with reference to Figure 20 3=8 record values, if this element value near j in form value, then writes down " j ", " j " value can be calculated according to formula:
[a 1,a 2,a 3,...,a k-2,a k-1,a k],
sign[F-a j]·sign[a j+1-F]≥0, (2)
A wherein 1~a k Be 8 values that write down altogether in this form of 3, it is extremely arranged by little greatly in regular turn.Sign is the function of sign of this value of output, and F is the value of desiring to table look-up, in case when satisfying formula (2), promptly store the j value.
When in step S120; Judge when this 2x2 coding unit 220 is not in first artificial type to the 17 artificial types; Represent that this 2x2 coding unit 220 is natural type; So in step S140, the 2x2 coding unit 220 of this natural type is carried out color gamut conversion, to obtain a 2x2 gamut conversion unit.
In step S140; The scope of the value of the element in this lightness 2x2 gamut conversion unit 710 is 0~63; The scope of the value of the element of this first colourity 2x2 gamut conversion unit 720 and the second colourity 2x2 gamut conversion unit 730 is-63~63, so the element of this lightness 2x2 gamut conversion unit 710 is 6, the element of this first colourity 2x2 gamut conversion unit 720 and the second colourity 2x2 gamut conversion unit 730 is 7; And this is merely computational process, does not influence the position counting of last coding.Before carrying out next step S150, need earlier the value of the element of this lightness 2x2 gamut conversion unit 710 is displaced to-32~31 by 0~63.
In step S150; The scope of the value of each element in this lightness 2x2 frequency domain unit 760 is-32~31; The scope of the value of each element of this first colourity 2x2 frequency domain unit 770 and the second colourity 2x2 frequency domain unit 780 is-63~63, so each element of this lightness 2x2 frequency domain unit 760 is 6, each element of this first colourity 2x2 frequency domain unit 770 and the second colourity 2x2 frequency domain unit 780 is 7; And this is merely computational process, does not influence the position counting of last coding.
In step S170, when this 2x2 frequency domain unit 750 is first natural type 380, use E element, F element, the G element of 5 this lightness of record 2x2 frequency domain unit 760; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the difference reckling of the value of the H element of this lightness 2x2 frequency domain unit 760.
The value of the element of this lightness 2x2 frequency domain unit 760 is-32~31, so need carry out shift operation earlier, is displaced to 0~63 with the value with the element of this lightness 2x2 frequency domain unit 760 by-32~31.In step S170, be that the numerical value with E element, F element, G element carries out quantization operations, round up to fractional part, re-use 5 records.Because the numerical value of the E element of this lightness 2x2 frequency domain unit 760, F element, G element is 6, when using 5 records, so quantizing factor Q is 2.The H element of this lightness 2x2 frequency domain unit 760 then uses one 3 bit table lattice carrying out table lookup operation, and it is identical that the principle of this table lookup operation and aforementioned 5 bit table lattice are tabled look-up, and repeats no more.
In step S170, when this 2x2 frequency domain unit 750 is first natural type 380, use the E element of 5 this first colourity of record 2x2 frequency domain unit 770; Use 2 record one 2 bit table cases to put, the recorded content that this 2 bit table case is put is: in all recorded contents of these 2 bit table lattice, with the reckling in the difference of the mean value of the F element of this first colourity 2x2 frequency domain unit 770 and G element; Do not write down the H element of this first colourity 2x2 frequency domain unit 770.
The value of the element of this first colourity 2x2 frequency domain unit 770 is-63~63, so need carry out a shift operation earlier, is displaced to 0~126 with the value with the element of this first colourity 2x2 frequency domain unit 770 by-63~63.Therefore the element of this first colourity 2x2 frequency domain unit 770 is 7, when using the E element of 5 this first colourity of record 2x2 frequency domain unit 770, need carry out quantization operations earlier, and wherein, quantizing factor Q is 4.
It is that the F element and the G element of this first colourity 2x2 frequency domain unit 770 are averaged earlier, with this mean value one 2 bit table lattice is tabled look-up again, and it is identical that the principle of this table lookup operation and aforementioned 5 bit table lattice are tabled look-up, and repeats no more.
In step S170, when this 2x2 frequency domain unit 750 is first natural type 380, use the quantized value of the E element of 5 this second colourity of record 2x2 frequency domain unit 780; Use 2 record one 2 bit table cases to put, the recorded content that this 2 bit table case is put is: in all recorded contents of these 2 bit table lattice, with the reckling in the difference of the mean value of F element in this second colourity 2x2 frequency domain unit 780 and G element; Use 2 record one 2 bit table cases to put, the recorded content that this 2 bit table case is put is: in all recorded contents of these 2 bit table lattice, with the reckling in the difference of the value of the H element of this second colourity 2x2 frequency domain unit 780.
The value of the element of this second colourity 2x2 frequency domain unit 780 is-63~63, so need carry out a shift operation earlier, is displaced to 0~126 with the value with the element of this second colourity 2x2 frequency domain unit 780 by-63~63.Therefore the element of this second colourity 2x2 frequency domain unit 780 is 7, when using the E element of 5 this second colourity of record 2x2 frequency domain unit 780, need carry out quantization operations earlier, and wherein, quantizing factor Q is 4.
It is that the F element and the G element of this second colourity 2x2 frequency domain unit 780 are averaged earlier, with this mean value one 2 bit table lattice is tabled look-up again.It is identical that the principle that these 2 bit table lattice are tabled look-up and aforementioned 5 bit table lattice are tabled look-up, and repeats no more.
In step S170, when this 2x2 frequency domain unit 750 is second natural type 390, use the quantized value of the E element of 4 record lightness 2x2 frequency domain unit 760; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of the value of the F element of this lightness 2x2 frequency domain unit 760; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of the value of the G element of this lightness 2x2 frequency domain unit 760; Use 2 record one 2 bit table cases to put, the recorded content that this 2 bit table case is put is: in all recorded contents of these 2 bit table lattice, with the reckling in the difference of the value of the H element of this lightness 2x2 frequency domain unit 760.These quantizing factors Q and table lookup operation for be familiar with this technical staff according to the present invention technological can learning, repeat no more.
In step S170, when this 2x2 frequency domain unit 750 is second natural type 390, use the quantized value of the E element of 3 this first colourity of record 2x2 frequency domain unit 770; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of the value of the F element of this first colourity 2x2 frequency domain unit 770; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of the value of the G element of this first colourity 2x2 frequency domain unit 770; Use 2 record one 2 bit table cases to put, the recorded content that this 2 bit table case is put is: in all recorded contents of these 2 bit table lattice, with the reckling in the difference of the value of the H element of this first colourity 2x2 frequency domain unit 760.
In step S170, when this 2x2 frequency domain unit 750 is second natural type 390, use the quantized value of the E element of 3 this second colourity of record 2x2 frequency domain unit 780; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of the value of the F element of this second colourity 2x2 frequency domain unit 780; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of the value of the G element of this second colourity 2x2 frequency domain unit 780; Use 2 records, one 2 bit table cases to put, the recorded content that this 2 bit table case is put is: in all recorded contents of these 2 bit table lattice, with the reckling in the difference of the value of the H element of this second colourity 2x2 frequency domain unit 780.
In hardware structure, can use OTP (One Time Programable, One Time Programmable chip), ROM (Read-Only Memory, read-only memory) or NVM (Nonvolatile memory, nonvolatile memory) record form content.
Like Figure 15 and shown in Figure 19; Step S180 uses 1 (main packet header) to write down whether this 2x2 coding unit 220 is artificial type or natural type, re-uses 4 (the first sub-packet header) to write down whether this 2x2 coding unit 220 is in first artificial type to the 17 artificial types.Therefore; When this 2x2 coding unit 220 be the first artificial type, the second artificial type, when the third party makes in the type; Position counting after its coding and the encapsulation be 36 (=1+4+6+4+6+5+6+4); When this 2x2 coding unit 220 is in the 4th to the 7th artificial type; Position counting after its coding and the encapsulation still be 36 (=1+4+6+4+6+5+6+4), when this 2x2 coding unit 220 is in the 8th to the 13 artificial type, the position counting after its coding and the encapsulation be 36 (=1+4+4+3+3+5+3+3+4+3+3); When this 2x2 coding unit 220 is in the 14 to the 17 artificial type, the position counting after its coding and the encapsulation be 31 (=1+4+2+6+6+6+6).When this 2x2 coding unit 220 is natural type; Re-use 1 (the second sub-packet header) to write down whether this 2x2 coding unit 220 is first natural type or second natural type; When this 2x2 coding unit 220 is first natural type; Position counting after its coding and the encapsulation still be 36 (=1+1+5+5+5+3+5+2+2+5+2); When this 2x2 coding unit 220 is second natural type, the position counting after its coding and the encapsulation still be 36 (=1+1+4+3+3+2+3+3+3+2+3+3+3+2).
Figure 21 is the flow chart of a kind of fixedly compression ratio image decompression method based on the 2x2 coding unit of the present invention; It is that the coding package of fixed bit size is decoded; To produce a 2x2 decoding unit in the image; This 2x2 decoding unit comprises four pixels that are arranged, and this image has at least one 2x2 decoding unit.
At first, in step S805, receive a coding package.
In step S810, judge according to the main packet header (1 bit) of this coding package whether this coding package is artificial type, if, judge that then this coding package behaviour makes the coding package of type, otherwise, judge the coding package that this coding package is a natural type.
In step S815; To being judged to be the coding package of artificial type; Judge according to the first sub-packet header (2 bit) of this coding package whether it is that the first artificial type is made in the type to the third party, and wherein, the first artificial type is four pixels, two horizontal stripes in horizontal direction again; The second artificial type is two vertical stripes that four pixels are vertical direction, and it is the two slanted bar lines intersection that four pixels are the miter angle direction that the third party makes type.
In step S820; To be judged to be artificial type and also be not be the first artificial type to the coding package that the third party makes type, judge according to the sub-packet header (2 bit) and the second son packet header (2bit) of this coding package whether it is that four-player is made in type to the seven artificial types again.Wherein, to make type to the seven artificial types be the combination with single-point triangular in shape of four pixels to four-player; It is that lower left corner pixel, upper right corner pixel and lower right corner pixel are approximate that four-player is made type; The 5th artificial type is that top left corner pixel, upper right corner pixel and lower right corner pixel are approximate; It is that top left corner pixel, lower left corner pixel and upper right corner pixel are approximate that Sixth Man is made type; The 7th artificial type is that top left corner pixel, lower left corner pixel and lower right corner pixel are approximate.
In step S825, the coding package of this artificial type is carried out inverse quantization, counter table look-up decoding and the decoding of contrast branch error, to produce one first decoded data.
In step S830,,, judge that it is first natural type or second natural type again according to the second sub-packet header (1 bit) of this coding package to the coding package of natural type.
In step S835, the coding package of this natural type is carried out inverse quantization and the anti-decoding of tabling look-up, to produce one second decoded data;
In step S840, this second decoded data is carried out discrete cosine transform, to produce one the 3rd decoded data.In step S840, the transition matrix coefficient of this discrete cosine transform is:
A ‾ B ‾ C ‾ D ‾ 1 1 1 1 1 - 1 1 - 1 1 1 - 1 - 1 1 - 1 - 1 1 E F G H .
Wherein, E, F, G, H are this second decoded data, and
Figure BDA0000127270080000432
is the 3rd decoded data.
In step S845, the 3rd decoded data is carried out color gamut conversion, to obtain one the 4th decoded data.In step S845, carry out YUV to RGB color gamut conversion, the transition matrix coefficient of this YUV to RGB color gamut conversion is:
r g b = 1.0 - 0.5 - 0.5 1.0 0.5 0 1.0 - 0.5 0.5 Y U V ,
Wherein, Y is the lightness of the pixel in the 3rd decoded data, and U and V are the colourity of this pixel, and r is the red value of the pixel in the 4th decoded data, and g is the green value of this pixel, and b is the blue valve of this pixel.
In step S850, receive this first decoded data or the 4th decoded data, and this first decoded data or the 4th decoded data are rebuild, to produce a 2x2 decoding unit.
Figure 22 is the structure chart of a kind of application of the present invention based on the display system of the fixedly compression ratio of 2x2 coding unit; It is used for show image is compressed and decompresses, and this display system 900 comprises a display module 910, an image input equipment 920, one based on the fixedly compression ratio image compression set of 2x2 coding unit 930, an apparatus for temporary storage 940, fixedly compression ratio image decompressing device 950, time schedule controller 960, multiple source driver 970 and an a plurality of gate drivers 980 based on the 2x2 coding unit.
Display module 910 is used for show image.Image input equipment 920 is used to import show image.Fixedly compression ratio image compression set 930 based on the 2x2 coding unit is connected to image input equipment 920; Be used for a 2x2 coding unit of show image is encoded; To produce and this 2x2 coding unit corresponding codes package, wherein, this image has at least one 2x2 coding unit.
Apparatus for temporary storage 940 is connected to the fixedly compression ratio image compression set 930 based on the 2x2 coding unit, with the temporary coding package of exporting based on the fixedly compression ratio image compression set 930 of 2x2 coding unit.
Fixedly compression ratio image decompressing device 950 based on the 2x2 coding unit is connected to apparatus for temporary storage 940, with the received code package, and to this coding package decompression, to produce the 2x2 decoding unit corresponding with the 2x2 coding unit.
Time schedule controller 960 is connected to the fixedly compression ratio image decompressing device 950 based on the 2x2 coding unit, is used to receive the 2x2 decoding unit, to produce the sequential drive signal and the video data of display module 910.
Multiple source driver 970 and a plurality of gate drivers 980 are connected to time schedule controller 960, are used to receive the sequential drive signal and the video data of these time schedule controller 960 outputs, and then drive display module 910.
Fixedly compression ratio image compression set 930 is to judge that earlier the 2x2 coding unit is artificial type or natural type; Carry out the differential errors coding, quantize and the coding of tabling look-up with 2x2 coding unit artificial type; And then generation first coding data; And to the 2x2 coding unit of the natural type coding that carries out color gamut conversion, discrete cosine transform, quantizes and table look-up; And then produce second coded data, again this first coding data or this second coded data are encapsulated, to produce the fixedly coding package of compression ratio.Wherein, this 2x2 coding unit is 96 (24bit version) position or 72 (18bit version) position, and this coding package corresponding with this 2x2 coding unit is 48 (24bit version) position or 36 (18bit version).
Can know that by above stated specification the present invention as coding unit, is borrowing suitable classification and bit quantity suitable dispensing with the Pixel Dimensions of 2x2, is prerequisite with the human eye vision response, suitably gives up more insensitive composition, reach the image compression and keep the quality of image.
Above-mentioned coding unit divides time-like, and the classification of artificial type helps to handle like certain patterns such as font edge, gray scale variation, sawtooth, gridiron patterns, cooperates package recording method of the present invention, can make the coding unit of specific artificial type reach lossless compress.
In natural type, the YUV after step S140 color gamut conversion, lower with the UV composition for the response sensitivity of human eye, so when package writes down, give up perhaps with the less corresponding frequency domain element of position counting record.Simultaneously, the element after the discrete cosine transform is a frequency domain, and the high frequency element is lower for the response sensitivity of human eye, with less position counting record high frequency element, to keep for the more sensitive information of the response of human eye.
Simultaneously; Color gamut conversion among step S140, step S150, step S840, the step S850 or discrete cosine transform; The coefficient of its transition matrix is ± 1,0.25, ± 0.5 when hardware is realized, can use shift unit (shifter) simply to replace multiplier, to save hardware cost.
In addition, technology of the present invention is to mobile phone application the time, and test patterns such as the general artificial GTG of mobile phone and gridiron pattern can reach lossless compress and conciliate compression effectiveness, can save the memory demand that stores image on the mobile phone simultaneously.And each 2x2 coding unit is equal independent operation when compression or decompression; Need not with reference to other 2x2 coding units; And the compression ratio of each coding unit all is fixed as 0.5 (=36/72) or 0.5 (=48/96), need not with reference to any previous package, pixel, picture frame data such as (frame), but Real Time Compression and decompression; Be that the single coding unit gets into, can accomplish single coding package.In like manner, single coding package gets into, and can decompress is reduced into the single decoding unit, is particularly suitable for the special applications of arbitrary access (random access), like handset displays with internal memory frame updating (partially update) partly.
From the above, no matter the present invention is with regard to purpose, means and effect, all different with prior art characteristic institute, has practical value.It should be noted that above-mentioned each embodiment gives an example for the ease of explanation, the present invention's interest field required for protection should be as the criterion with claims scope, but not only limits to the foregoing description.
The above is merely preferred embodiment of the present invention, and is in order to restriction the present invention, not all within spirit of the present invention and principle, any modification of being made, is equal to replacement, improvement etc., all should be included within the scope that the present invention protects.

Claims (83)

1. fixedly image compressing method of compression ratio that has based on the 2x2 coding unit, it is characterized in that: the 2x2 coding unit in the image is encoded, and said image is made up of at least one 2x2 coding unit, and said image compressing method may further comprise the steps:
(A) receive the 2x2 coding unit, said 2x2 coding unit comprises top left corner pixel, upper right corner pixel, lower left corner pixel and the lower right corner pixel that is arranged;
(B) judge whether said 2x2 coding unit is artificial type, if judge that then this 2x2 coding unit is this artificial type; Otherwise, judge that this 2x2 coding unit is a natural type, wherein; Said artificial type comprises: the first artificial type, represent these four pixels two horizontal stripes in horizontal direction; The second artificial type representes that these four pixels are two vertical stripes of vertical direction; The third party makes type, representes that these four pixels are the two slanted bar lines intersection of miter angle direction; Four-player is made type to the seven artificial types, representes the combination with single-point triangular in shape of these four pixels;
(C) the 2x2 coding unit that is judged to be artificial type is carried out the differential errors coding, quantizes and the coding of tabling look-up, to produce first coding data;
(D) the 2x2 coding unit that is judged to be natural type is carried out color gamut conversion, to obtain the 2x2 gamut conversion unit;
(E) said 2x2 gamut conversion unit is carried out discrete cosine transform, to produce 2x2 frequency domain unit; And
(F) said 2x2 frequency domain unit is quantized and the coding of tabling look-up, to produce second coded data.
2. image compressing method as claimed in claim 1 is characterized in that: the said first artificial type represent that said top left corner pixel and upper right corner pixel are approximate, and said lower left corner pixel is similar to lower right corner pixel; The said second artificial type representes that said top left corner pixel and lower left corner pixel are approximate, and said upper right corner pixel is similar to lower right corner pixel; Said third party makes type, representes that said top left corner pixel and lower right corner pixel are approximate, and said lower left corner pixel is similar to upper right corner pixel; Said four-player is made type, representes that said lower left corner pixel, upper right corner pixel and lower right corner pixel are approximate; The said the 5th artificial type representes that said top left corner pixel, upper right corner pixel and lower right corner pixel are approximate; Said Sixth Man is made type, representes that said top left corner pixel, lower left corner pixel and upper right corner pixel are approximate; The said the 7th artificial type representes that said top left corner pixel, lower left corner pixel and lower right corner pixel are approximate.
3. image compressing method as claimed in claim 2; It is characterized in that; Said artificial type also comprises the 8th artificial type~the 17 artificial type, wherein: eight, the 9th artificial type, represent these four pixels horizontal stripe in horizontal direction and the combination of two single-points; Ten, the 11 artificial type representes that these four pixels are the combination of a vertical stripe and two single-points of vertical direction; The the 12, the 13 artificial type representes that these four pixels are a slanted bar line of miter angle direction and the combination of two single-points.
4. image compressing method as claimed in claim 3 is characterized in that, the said the 8th artificial type representes that said top left corner pixel and upper right corner pixel are approximate; The said the 9th artificial type representes that said lower left corner pixel and lower right corner pixel are approximate; The said the tenth artificial type representes that said top left corner pixel and lower left corner pixel are approximate; The said the 11 artificial type representes that said upper right corner pixel and lower right corner pixel are approximate; The said the 12 artificial type representes that said top left corner pixel and lower right corner pixel are approximate; The said the 13 artificial type representes that said lower left corner pixel and upper right corner pixel are approximate.
5. image compressing method as claimed in claim 2; It is characterized in that: in the said step (B); Judge that earlier whether said 2x2 coding unit is the first artificial type and makes in the type to the third party, judge again whether said 2x2 coding unit is that four-player is made in type to the seven artificial types.
6. image compressing method as claimed in claim 3; It is characterized in that; In the said step (B), earlier judge whether said 2x2 coding unit is in the 14 to the 17 artificial type, judge whether that again to be the first artificial type make in the type to the third party; Judge whether to be that four-player is made in type to the seven artificial types again, judge whether to be in the 8th artificial type to the 13 artificial types again.
7. image compressing method as claimed in claim 1 is characterized in that, also comprises the steps:
(G) receive the said first coding data or second coded data, and this first coding data or this second coded data are encapsulated, have the fixedly coding package of compression ratio with generation.
8. image compressing method as claimed in claim 5 is characterized in that: every kind of color numerical value adopts 8 bit representations in the said 2x2 coding unit.
9. image compressing method as claimed in claim 8 is characterized in that: in the said step (B), when satisfying formula, judge that said 2x2 coding unit is the first artificial type:
ABS(A r,B r)<THD1,ABS(C r,D r)<THD1,
ABS(A g,B g)<THD1,ABS(C g,D g)<THD1,
ABS(A b,B b)<THD1,ABS(C b,D b)<THD1,
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b)≤
ABS(A r,C r)+ABS(A g,C g)+ABS(A b,C b),
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b)≤
ABS(D r,B r)+ABS(D g,B g)+ABS(D b,B b),
ABS(C r,D r)+ABS(C g,D g)+ABS(C b,D b)≤
ABS(D r,B r)+ABS(D g,B g)+ABS(D b,B b),
ABS(C r,D r)+ABS(C g,D g)+ABS(C b,D b)≤
ABS(A r,C r)+ABS(A g,C g)+ABS(A b,C b),
Wherein, THD1 is first threshold value, and A is said top left corner pixel, and B is a said upper right corner pixel, and C is a said lower left corner pixel, and D is a said lower right corner pixel, A r, A g, A bBe respectively the red value of pixel A, green numerical value and blue values, B r, B g, B bBe respectively the red value of pixel B, green numerical value and blue values, C r, C g, C bBe respectively the red value of pixel C, green numerical value and blue values, D r, Dg, Db be respectively the red value of pixel D, green numerical value and blue values.
10. image compressing method as claimed in claim 8 is characterized in that: in the said step (B), when satisfying formula, judge that said 2x2 coding unit is the second artificial type:
ABS(A r,C r)<THD1,ABS(B r,D r)<THD1,
ABS(A g,C g)<THD1,ABS(B g,D g)<THD1,
ABS(A b,C b)<THD1,ABS(B b,D b)<THD1,
ABS(A r,C r)+ABS(A g,C g)+ABS(A b,C b)≤
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b),
ABS(A r,C r)+ABS(A g,C g)+ABS(A b,C b)≤
ABS(D r,C r)+ABS(D g,C g)+ABS(D b,C b),
ABS(B r,D r)+ABS(B g,D g)+ABS(B b,D b)≤
ABS(D r,C r)+ABS(D g,C g)+ABS(D b,C b),
ABS(B r,D r)+ABS(B g,D g)+ABS(B b,D b)≤
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b),
Wherein, THD1 is first threshold value, and A is said top left corner pixel, and B is a said upper right corner pixel, and C is a said lower left corner pixel, and D is a said lower right corner pixel, A r, A g, A bBe respectively the red value of pixel A, green numerical value and blue values, B r, B g, B bBe respectively the red value of pixel B, green numerical value and blue values, C r, C g, C bBe respectively the red value of pixel C, green numerical value and blue values, D r, D g, D bBe respectively the red value of pixel D, green numerical value and blue values.
11. image compressing method as claimed in claim 8 is characterized in that: in the said step (B), when satisfying formula, judge that said 2x2 coding unit makes type for the third party:
ABS(A r,D r)<THD1,ABS(C r,B r)<THD1,
ABS(A g,D g)<THD1,ABS(C g,B g)<THD1,
ABS(A b,D b)<THD1,ABS(C b,B b)<THD1,
ABS(A r,D r)+ABS(A g,D g)+ABS(A b,D b)≤
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b),
ABS(A r,D r)+ABS(A g,D g)+ABS(A b,D b)≤
ABS(D r,C r)+ABS(D g,C g)+ABS(D b,C b),
ABS(C r,B r)+ABS(C g,B g)+ABS(C b,B b)≤
ABS(D r,C r)+ABS(D g,C g)+ABS(D b,C b),
ABS(C r,B r)+ABS(C g,B g)+ABS(C b,B b)≤
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b),
Wherein, THD1 is first threshold value, and A is said top left corner pixel, and B is a said upper right corner pixel, and C is a said lower left corner pixel, and D is a said lower right corner pixel, A r, A g, A bBe respectively the red value of pixel A, green numerical value and blue values, B r, B g, B bBe respectively the red value of pixel B, green numerical value and blue values, C r, C g, C bBe respectively the red value of pixel C, green numerical value and blue values, D r, D g, D bBe respectively the red value of pixel D, green numerical value and blue values.
12. image compressing method as claimed in claim 8 is characterized in that: in the said step (B), when satisfying formula, judge that said 2x2 coding unit is that four-player is made type:
ABS(B r,D r)<THD2,ABS(C r,D r)<THD2,
ABS(B g,D g)<THD2,ABS(C g,D g)<THD2,
ABS(B b,D b)<THD2,ABS(C b,D b)<THD2,
ABS(B r,D r)+ABS(B g,D g)+ABS(B b,D b)≤
ABS(A r,C r)+ABS(A g,C g)+ABS(A b,C b),
ABS(B r,D r)+ABS(B g,D g)+ABS(B b,D b)≤
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b),
ABS(C r,D r)+ABS(C g,D g)+ABS(C b,D b)≤
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b),
ABS(C r,D r)+ABS(C g,D g)+ABS(C b,D b)≤
ABS(A r,C r)+ABS(A g,C g)+ABS(A b,C b),
Wherein, THD2 is second threshold value, and A is said top left corner pixel, and B is a said upper right corner pixel, and C is a said lower left corner pixel, and D is a said lower right corner pixel, A r, A g, A bBe respectively the red value of pixel A, green numerical value and blue values, B r, B g, B bBe respectively the red value of pixel B, green numerical value and blue values, C r, C g, C bBe respectively the red value of pixel C, green numerical value and blue values, D r, D g, D bBe respectively the red value of pixel D, green numerical value and blue values.
13. image compressing method as claimed in claim 8 is characterized in that: in the said step (B), when satisfying formula, judge that said 2x2 coding unit is the 5th artificial type:
ABS(B r,D r)<THD2,ABS(A r,B r)<THD2,
ABS(B g,D g)<THD2,ABS(A g,B g)<THD2,
ABS(B b,D b)<THD2,ABS(A b,B b)<THD2,
ABS(B r,D r)+ABS(B g,D g)+ABS(B b,D b)≤
ABS(A r,C r)+ABS(A g,C g)+ABS(A b,C b),
ABS(B r,D r)+ABS(B g,D g)+ABS(B b,D b)≤
ABS(C r,D r)+ABS(C g,D g)+ABS(C b,D b),
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b)≤
ABS(C r,D r)+ABS(C g,D g)+ABS(C b,D b),
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b)≤
ABS(A r,C r)+ABS(A g,C g)+ABS(A b,C b),
Wherein, THD2 is second threshold value, and A is said top left corner pixel, and B is a said upper right corner pixel, and C is a said lower left corner pixel, and D is a said lower right corner pixel, A r, A g, A bBe respectively the red value of pixel A, green numerical value and blue values, B r, B g, B bBe respectively the red value of pixel B, green numerical value and blue values, C r, C g, C bBe respectively the red value of pixel C, green numerical value and blue values, D r, D g, D bBe respectively the red value of pixel D, green numerical value and blue values.
14. image compressing method as claimed in claim 8 is characterized in that: in the said step (B), when satisfying formula, judge that said 2x2 coding unit is that Sixth Man is made type:
ABS(A r,C r)<THD2,ABS(A r,B r)<THD2,
ABS(A g,C g)<THD2,ABS(A g,B g)<THD2,
ABS(A b,C b)<THD2,ABS(A b,B b)<THD2,
ABS(A r,C r)+ABS(A g,C g)+ABS(A b,C b)≤
ABS(B r,D r)+ABS(B g,D g)+ABS(B b,D b),
ABS(A r,C r)+ABS(A g,C g)+ABS(A b,C b)≤
ABS(C r,D r)+ABS(C g,D g)+ABS(C b,D b),
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b)≤
ABS(C r,D r)+ABS(C g,D g)+ABS(C b,D b),
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b)≤
ABS(B r,D r)+ABS(B g,D g)+ABS(B b,D b),
Wherein, THD2 is second threshold value, and A is said top left corner pixel, and B is a said upper right corner pixel, and C is a said lower left corner pixel, and D is a said lower right corner pixel, A r, A g, A bBe respectively the red value of pixel A, green numerical value and blue values, B r, B g, B bBe respectively the red value of pixel B, green numerical value and blue values, C r, C g, C bBe respectively the red value of pixel C, green numerical value and blue values, D r, D g, D bBe respectively the red value of pixel D, green numerical value and blue values.
15. image compressing method as claimed in claim 8 is characterized in that: in the said step (B), when satisfying formula, judge that said 2x2 coding unit is the 7th artificial type:
ABS(A r,C r)<THD2,ABS(C r,D r)<THD2,
ABS(A g,C g)<THD2,ABS(C g,D g)<THD2,
ABS(A b,C b)<THD2,ABS(C b,D b)<THD2,
ABS(A r,C r)+ABS(A g,C g)+ABS(A b,C b)≤
ABS(B r,D r)+ABS(B g,D g)+ABS(B b,D b),
ABS(A r,C r)+ABS(A g,C g)+ABS(A b,C b)≤
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b),
ABS(C r,D r)+ABS(C g,D g)+ABS(C b,D b)≤
ABS(A r,B r)+ABS(A g,B g)+ABS(A b,B b),
ABS(C r,D r)+ABS(C g,D g)+ABS(C b,D b)≤
ABS(B r,D r)+ABS(B g,D g)+ABS(B b,D b),
Wherein, THD2 is second threshold value, and A is said top left corner pixel, and B is a said upper right corner pixel, and C is a said lower left corner pixel, and D is a said lower right corner pixel, A r, A g, A bBe respectively the red value of pixel A, green numerical value and blue values, B r, B g, B bBe respectively the red value of pixel B, green numerical value and blue values, C r, C g, C bBe respectively the red value of pixel C, green numerical value and blue values, D r, D g, D bBe respectively the red value of pixel D, green numerical value and blue values.
16. image compressing method as claimed in claim 6 is characterized in that: every kind of color numerical value adopts 8 bit representations in the said 2x2 coding unit.
17. image compressing method as claimed in claim 6 is characterized in that: every kind of color numerical value adopts 6 bit representations in the said 2x2 coding unit.
18. like claim 16 or 17 described image compressing methods, it is characterized in that, in the said step (B), when satisfying formula, judge that said 2x2 coding unit is that the tenth four-player is made type:
A r=A g,A g=A b
B r=B g,B g=B b
C r=C g,C g=C b
D r=D g,D g=D b
Wherein, A is said top left corner pixel, and B is a said upper right corner pixel, and C is a said lower left corner pixel, and D is a said lower right corner pixel, A r, A g, A bBe respectively the red value of pixel A, green numerical value and blue values, B r, B g, B bBe respectively the red value of pixel B, green numerical value and blue values, C r, C g, C bBe respectively the red value of pixel C, green numerical value and blue values, D r, D g, D bBe respectively the red value of pixel D, green numerical value and blue values.
19. like claim 16 or 17 described image compressing methods, it is characterized in that, in the said step (B), when satisfying formula, judge that said 2x2 coding unit is the 15 artificial type:
A g=0,A b=0
B g=0,B b=0
C g=0,C b=0
D g=0,D b=0
Wherein, A is said top left corner pixel, and B is a said upper right corner pixel, and C is a said lower left corner pixel, and D is a said lower right corner pixel, A g, A bBe respectively the red value of pixel A, green numerical value and blue values, B g, B bBe respectively the red value of pixel B, green numerical value and blue values, C g, C bBe respectively the red value of pixel C, green numerical value and blue values, D g, D bBe respectively the red value of pixel D, green numerical value and blue values.
20. like claim 16 or 17 described image compressing methods, it is characterized in that, in the said step (B), when satisfying formula, judge that said 2x2 coding unit is the 16 artificial type:
A r=0,A b=0
B r=0,B b=0
C r=0,C b=0
D r=0,D b=0
Wherein, A is said top left corner pixel, and B is a said upper right corner pixel, and C is a said lower left corner pixel, and D is a said lower right corner pixel, A r, A bBe respectively the red value of pixel A, green numerical value and blue values, B r, B bBe respectively the red value of pixel B, green numerical value and blue values, C r, C bBe respectively the red value of pixel C, green numerical value and blue values, D r, D bBe respectively the red value of pixel D, green numerical value and blue values.
21. like claim 16 or 17 described image compressing methods, it is characterized in that, in the said step (B), when satisfying formula, judge that said 2x2 coding unit is the 17 artificial type:
A g=0,A r=0
B g=0,B r=0
C g=0,C r=0
D g=0,D r=0
Wherein, A is said top left corner pixel, and B is a said upper right corner pixel, and C is a said lower left corner pixel, and D is a said lower right corner pixel, A r, A gBe respectively the red value of pixel A, green numerical value and blue values, B r, B gBe respectively the red value of pixel B, green numerical value and blue values, C r, C gBe respectively the red value of pixel C, green numerical value and blue values, D r, D gBe respectively the red value of pixel D, green numerical value and blue values.
22., it is characterized in that: in the said step (B), when satisfying formula, judge that said 2x2 coding unit is the first artificial type like claim 16 or 17 described image compressing methods:
ABS(A y,B y)<THDY1,ABS(C y,D y)<THDY1
ABS(A u,B u)<THDU1,ABS(C u,D u)<THDU1
ABS(A v,B v)<THDV1,ABS(C v,D v)<THDV1
ABS(A y,B y)+ABS(A v,B y)+ABS(A u,B u)≤ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)≤ABS(D y,B y)+ABS(D v,B v)+ABS(D uBu)
ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)≤ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)≤ABS(S y,C y)+ABS(A v,C v)+ABS(A u,V u)
Wherein, ABS is the ABS function of two element differences in the bracket, and THDY1 is a lightness threshold value 1, and THDU1 is the first colourity threshold value 1; THDV1 is the second colourity threshold value 1, and A is said top left corner pixel, and B is a said upper right corner pixel; C is a said lower left corner pixel, and D is a said lower right corner pixel, A y, A u, A vBe respectively lightness, first colourity and second chromatic value of pixel A, B y, B u, B vBe respectively lightness, first colourity and second chromatic value of pixel B, C y, C u, C vBe respectively lightness, first colourity and second chromatic value of pixel C, D y, D u, D vBe respectively lightness, first colourity and second chromatic value of pixel D;
Wherein, said lightness, first colourity and second chromatic value carry out RGB to YUV color gamut conversion through formula and obtain:
Y U V = 0.25 0.5 0.25 - 0.5 1.0 - 0.5 - 1.0 0 1.0 r g b ,
Wherein, r is the red value of a pixel, and g is the green value of this pixel, and b is the blue valve of this pixel, and Y is the lightness of this pixel, and U and V are the colourity of this pixel.
23., it is characterized in that: in the said step (B), when satisfying formula, judge that said 2x2 coding unit is the second artificial type like claim 16 or 17 described image compressing methods:
ABS(A y,C y)<THDY1,ABS(B y,D y)<THDY1
ABS(A u,C u)<THDU1,ABS(B u,D u)<THDU1
ABS(A v,C v)<THDV1,ABS(B v,D v)<THDV1
ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)≤ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)≤ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
ABS(B y,D y)+ABS(B v,D v)+ABS(B u,D u)≤ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
ABS(B y,D y)+ABS(B v,D v)+ABS(B u,D u)≤ABS(D y,C y)+ABS(D v,C v)+ABS(D u,C u)
Wherein, ABS is the ABS function of two element differences in the bracket, and THDY1 is a lightness threshold value 1, and THDU1 is the first colourity threshold value 1; THDV1 is the second colourity threshold value 1, and A is said top left corner pixel, and B is a said upper right corner pixel; C is a said lower left corner pixel, and D is a said lower right corner pixel, A y, A u, A vBe respectively lightness, first colourity and second chromatic value of pixel A, B y, B u, B vBe respectively lightness, first colourity and second chromatic value of pixel B, C y, C u, C vBe respectively lightness, first colourity and second chromatic value of pixel C, D y, D u, D vBe respectively lightness, first colourity and second chromatic value of pixel D;
Wherein, said lightness, first colourity and second chromatic value carry out RGB to YUV color gamut conversion through formula and obtain:
Y U V = 0.25 0.5 0.25 - 0.5 1.0 - 0.5 - 1.0 0 1.0 r g b ,
Wherein, r is the red value of a pixel, and g is the green value of this pixel, and b is the blue valve of this pixel, and Y is the lightness of this pixel, and U and V are the colourity of this pixel.
24., it is characterized in that: in the said step (B), when satisfying formula, judge that said 2x2 coding unit makes type for the third party like claim 16 or 17 described image compressing methods:
ABS(C y,B y)<THDY1,ABS(A y,D y)<THDY1
ABS(C u,B u)<THDU1,ABS(A u,D u)<THDU1
ABS(C v,B v)<THDV1,ABS(A v,D v)<THDV1
ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)≤ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)≤ABS(D y,C y)+ABS(D v,C v)+ABS(D u,C u)
ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)≤ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)≤ABS(D y,C y)+ABS(D v,C v)+ABS(D u,C u)
Wherein, ABS is the ABS function of two element differences in the bracket, and THDY1 is a lightness threshold value 1, and THDU1 is the first colourity threshold value 1; THDV1 is the second colourity threshold value 1, and A is said top left corner pixel, and B is a said upper right corner pixel; C is a said lower left corner pixel, and D is a said lower right corner pixel, A y, A u, A vBe respectively lightness, first colourity and second chromatic value of pixel A, B y, B u, B vBe respectively lightness, first colourity and second chromatic value of pixel B, C y, C u, C vBe respectively lightness, first colourity and second chromatic value of pixel C, D y, D u, D vBe respectively lightness, first colourity and second chromatic value of pixel D;
Wherein, said lightness, first colourity and second chromatic value carry out RGB to YUV color gamut conversion through formula and obtain:
Y U V = 0.25 0.5 0.25 - 0.5 1.0 - 0.5 - 1.0 0 1.0 r g b ,
Wherein, r is the red value of a pixel, and g is the green value of this pixel, and b is the blue valve of this pixel, and Y is the lightness of this pixel, and U and V are the colourity of this pixel.
25., it is characterized in that: in the said step (B), when satisfying formula, judge that said 2x2 coding unit is that four-player is made type like claim 16 or 17 described image compressing methods:
ABS(D y,B y)<THDY2,ABS(C y,D y)<THDY2
ABS(D u,B u)<THDU2,ABS(C u,D u)<THDU2
ABS(B v,B v)<THDV2,ABS(C v,D v)<THDV2
ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)≤ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)≤ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
ABS(D y,C y)+ABS(D v,C v)+ABS(D u,C u)≤ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
ABS(D y,C y)+ABS(D v,C v)+ABS(D u,C u)≤ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
Wherein, ABS is the ABS function of two element differences in the bracket, and THDY2 is a lightness threshold value 2, and THDU2 is the first colourity threshold value 2; THDV2 is the second colourity threshold value 2, and A is said top left corner pixel, and B is a said upper right corner pixel; C is a said lower left corner pixel, and D is a said lower right corner pixel, A y, A u, A vBe respectively lightness, first colourity and second chromatic value of pixel A, B y, B u, B vBe respectively lightness, first colourity and second chromatic value of pixel B, C y, C u, C vBe respectively lightness, first colourity and second chromatic value of pixel C, D y, D u, D vBe respectively lightness, first colourity and second chromatic value of pixel D;
Wherein, said lightness, first colourity and second chromatic value carry out RGB to YUV color gamut conversion through formula and obtain:
Y U V = 0.25 0.5 0.25 - 0.5 1.0 - 0.5 - 1.0 0 1.0 r g b ,
Wherein, r is the red value of a pixel, and g is the green value of this pixel, and b is the blue valve of this pixel, and Y is the lightness of this pixel, and U and V are the colourity of this pixel.
26., it is characterized in that: in the said step (B), when satisfying formula, judge that said 2x2 coding unit is the 5th artificial type like claim 16 or 17 described image compressing methods:
ABS(D y,B y)<THDY2,ABS(A y,B y)<THDY2
ABS(D u,B u)<THDU2,ABS(A u,B u)<THDU2
ABS(D v,B v)<THDV2,ABS(A v,B v)<THDV2
ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)≤ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)≤ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
ABS(A y,B y)+ABS(A c,B v)+ABS(A u,B u)≤ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)≤ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
Wherein, ABS is the ABS function of two element differences in the bracket, and THDY2 is a lightness threshold value 2, and THDU2 is the first colourity threshold value 2; THDV2 is the second colourity threshold value 2, and A is said top left corner pixel, and B is a said upper right corner pixel; C is a said lower left corner pixel, and D is a said lower right corner pixel, A y, A u, A vBe respectively lightness, first colourity and second chromatic value of pixel A, B y, B u, B vBe respectively lightness, first colourity and second chromatic value of pixel B, C y, C u, C vBe respectively lightness, first colourity and second chromatic value of pixel C, D y, D u, D vBe respectively lightness, first colourity and second chromatic value of pixel D;
Wherein, said lightness, first colourity and second chromatic value carry out RGB to YUV color gamut conversion through formula and obtain:
Y U V = 0.25 0.5 0.25 - 0.5 1.0 - 0.5 - 1.0 0 1.0 r g b ,
Wherein, r is the red value of a pixel, and g is the green value of this pixel, and b is the blue valve of this pixel, and Y is the lightness of this pixel, and U and V are the colourity of this pixel.
27., it is characterized in that: in the said step (B), when satisfying formula, judge that said 2x2 coding unit is that Sixth Man is made type like claim 16 or 17 described image compressing methods:
ABS(A y,B y)<THDY2,ABS(C y,A y)<THDY2
ABS(A u,B u)<THDU2,ABS(C u,A u)<THDU2
ABS(A v,B v)<THDV2,ABS(C v,A v)<THDV2
ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)≤ABS(D y,C y)+ABS(D v,C v)+ABS(D u,C u)
ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)≤ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)≤ABS(D y,C y)+ABS(D v,C v)+ABS(D u,C u)
ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)≤ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
Wherein, ABS is the ABS function of two element differences in the bracket, and THDY2 is a lightness threshold value 2, and THDU2 is the first colourity threshold value 2; THDV2 is the second colourity threshold value 2, and A is said top left corner pixel, and B is a said upper right corner pixel; C is a said lower left corner pixel, and D is a said lower right corner pixel, A y, A u, A vBe respectively lightness, first colourity and second chromatic value of pixel A, B y, B u, B vBe respectively lightness, first colourity and second chromatic value of pixel B, C y, C u, C vBe respectively lightness, first colourity and second chromatic value of pixel C, D y, D u, D vBe respectively lightness, first colourity and second chromatic value of pixel D;
Wherein, said lightness, first colourity and second chromatic value carry out RGB to YUV color gamut conversion through formula and obtain:
Y U V = 0.25 0.5 0.25 - 0.5 1.0 - 0.5 - 1.0 0 1.0 r g b ,
Wherein, r is the red value of a pixel, and g is the green value of this pixel, and b is the blue valve of this pixel, and Y is the lightness of this pixel, and U and V are the colourity of this pixel.
28., it is characterized in that: in the said step (B), when satisfying formula, judge that said 2x2 coding unit is the 7th artificial type like claim 16 or 17 described image compressing methods:
ABS(A y,C y)<THDY2,ABS(C y,D y)<THDY2
ABS(A u,C u)<THDU2,ABS(C u,D u)<THDU2
ABS(A v,C c)<THDV2,ABS(C v,D v)<THDV2
ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)≤ABS(B y,D y)+ABS(B v,D v)+ABS(B u,D u)
ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)≤ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
ABS(D y,C y)+ABS(D v,C v)+ABS(D u,C u)≤ABS(B y,D y)+ABS(B v,D v)+ABS(B u,D u)
ABS(D y,C y)+ABS(D v,C v)+ABS(D u,C u)≤ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
Wherein, ABS is the ABS function of two element differences in the bracket, and THDY2 is a lightness threshold value 2, and THDU2 is the first colourity threshold value 2; THDV2 is the second colourity threshold value 2, and A is said top left corner pixel, and B is a said upper right corner pixel; C is a said lower left corner pixel, and D is a said lower right corner pixel, A y, A u, A vBe respectively lightness, first colourity and second chromatic value of pixel A, B y, B u, B vBe respectively lightness, first colourity and second chromatic value of pixel B, C y, C u, C vBe respectively lightness, first colourity and second chromatic value of pixel C, D y, D u, D vBe respectively lightness, first colourity and second chromatic value of pixel D;
Wherein, said lightness, first colourity and second chromatic value carry out RGB to YUV color gamut conversion through formula and obtain:
Y U V = 0.25 0.5 0.25 - 0.5 1.0 - 0.5 - 1.0 0 1.0 r g b ,
Wherein, r is the red value of a pixel, and g is the green value of this pixel, and b is the blue valve of this pixel, and Y is the lightness of this pixel, and U and V are the colourity of this pixel.
29. image compressing method as claimed in claim 16 is characterized in that: in the said step (B), when satisfying formula, judge that said 2x 2 coding units are the 8th artificial type:
temp1=ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
temp2=ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
temp3=ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)
temp4=ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
temp5=ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)
temp6=ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
MIN(temp1,temp2,temp3,temp4,temp5,temp6)=temp1
ABS(A y,B y)<THDY4
ABS(A c,B v)<THDV4
ABS(A u,B u)<THDU4
Perhaps ABS (C y, D y)>THDY3
Perhaps ABS (C v, D v)>THDV3
Perhaps ABS (C u, D u)>THDU3
Wherein, ABS is the ABS function of two element differences in the bracket, and THDY3 is a lightness threshold value 3, and THDU3 is the first colourity threshold value 3; THDV3 is the second colourity threshold value 3, and THDY4 is a lightness threshold value 4, and THDU4 is the first colourity threshold value 4; THDV4 is the second colourity threshold value 4, and A is said top left corner pixel, and B is a said upper right corner pixel; C is a said lower left corner pixel, and D is a said lower right corner pixel, A y, A u, A vBe respectively lightness, first colourity and second chromatic value of pixel A, B y, B u, B vBe respectively lightness, first colourity and second chromatic value of pixel B, C y, C u, C vBe respectively lightness, first colourity and second chromatic value of pixel C, D y, D u, D vBe respectively lightness, first colourity and second chromatic value of pixel D;
Wherein, said lightness, first colourity and second chromatic value carry out RGB to YUV color gamut conversion through formula and obtain:
Y U V = 0.25 0.5 0.25 - 0.5 1.0 - 0.5 - 1.0 0 1.0 r g b ,
Wherein, r is the red value of a pixel, and g is the green value of this pixel, and b is the blue valve of this pixel, and Y is the lightness of this pixel, and U and V are the colourity of this pixel.
30. image compressing method as claimed in claim 16 is characterized in that: in the said step (B), when satisfying formula, judge that said 2x2 coding unit is the 9th artificial type:
temp1=ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
temp2=ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
temp3=ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)
temp4=ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
temp5=ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)
temp6=ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
MIN(temp1,temp2,temp3,temp4,temp5,temp6)=temp6
ABS(C y,D y)<THDY4
ABS(C v,D v)<THDV4
ABS(C u,D u)<THDU4
Perhaps ABS (A y, B y)>THDY3
Perhaps ABS (A v, B v)>THDV3
Perhaps ABS (A u, B u)>THDU3
Wherein, ABS is the ABS function of two element differences in the bracket, and THDY3 is a lightness threshold value 3, and THDU3 is the first colourity threshold value 3; THDV3 is the second colourity threshold value 3, and THDY4 is a lightness threshold value 4, and THDU4 is the first colourity threshold value 4; THDV4 is the second colourity threshold value 4, and A is said top left corner pixel, and B is a said upper right corner pixel; C is a said lower left corner pixel, and D is a said lower right corner pixel, A y, A u, A vBe respectively lightness, first colourity and second chromatic value of pixel A, B y, B u, B vBe respectively lightness, first colourity and second chromatic value of pixel B, C y, C u, C vBe respectively lightness, first colourity and second chromatic value of pixel C, D y, D u, D vBe respectively lightness, first colourity and second chromatic value of pixel D;
Wherein, said lightness, first colourity and second chromatic value carry out RGB to YUV color gamut conversion through formula and obtain:
Y U V = 0.25 0.5 0.25 - 0.5 1.0 - 0.5 - 1.0 0 1.0 r g b ,
Wherein, r is the red value of a pixel, and g is the green value of this pixel, and b is the blue valve of this pixel, and Y is the lightness of this pixel, and U and V are the colourity of this pixel.
31. image compressing method as claimed in claim 16 is characterized in that: in the said step (B), when satisfying formula, judge that said 2x2 coding unit is the tenth artificial type:
temp1=ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
temp2=ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
temp3=ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)
temp4=ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
temp5=ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)
temp6=ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
MIN(temp1,temp2,temp3,temp4,temp5,temp6)=temp2
ABS(A y,C y)<THDY4
ABS(A v,C v)<THDV4
ABS(A u,C u)<THDU4
Perhaps ABS (B y, D y)>THDY3
Perhaps ABS (B v, D v)>THDV3
Perhaps ABS (B u, D u)>THDU3
Wherein, ABS is the ABS function of two element differences in the bracket, and THDY3 is a lightness threshold value 3, and THDU3 is the first colourity threshold value 3; THDV3 is the second colourity threshold value 3, and THDY4 is a lightness threshold value 4, and THDU4 is the first colourity threshold value 4; THDV4 is the second colourity threshold value 4, and A is said top left corner pixel, and B is a said upper right corner pixel; C is a said lower left corner pixel, and D is a said lower right corner pixel, A y, A u, A vBe respectively lightness, first colourity and second chromatic value of pixel A, B y, B u, B vBe respectively lightness, first colourity and second chromatic value of pixel B, C y, C u, C vBe respectively lightness, first colourity and second chromatic value of pixel C, D y, D u, D vBe respectively lightness, first colourity and second chromatic value of pixel D;
Wherein, said lightness, first colourity and second chromatic value carry out RGB to YUV color gamut conversion through formula and obtain:
Y U V = 0.25 0.5 0.25 - 0.5 1.0 - 0.5 - 1.0 0 1.0 r g b ,
Wherein, r is the red value of a pixel, and g is the green value of this pixel, and b is the blue valve of this pixel, and Y is the lightness of this pixel, and U and V are the colourity of this pixel.
32. image compressing method as claimed in claim 16 is characterized in that: in the said step (B), when satisfying formula, judge that said 2x2 coding unit is the 11 artificial type:
temp1=ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
temp2=ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
temp3=ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)
temp4=ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
temp5=ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)
temp6=ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
MIN(temp1,temp2,temp3,temp4,temp5,temp6)=temp4
ABS(D y,B y)<THDY4
ABS(D v,B v)<THDV4
ABS(D u,B u)<THDU4
Perhaps ABS (C y, A y)>THDY3
Perhaps ABS (C v, A v)>THDV3
Perhaps ABS (C u, A u)>THDU3
Wherein, ABS is the ABS function of two element differences in the bracket, and THDY3 is a lightness threshold value 3, and THDU3 is the first colourity threshold value 3; THDV3 is the second colourity threshold value 3, and THDY4 is a lightness threshold value 4, and THDU4 is the first colourity threshold value 4; THDV4 is the second colourity threshold value 4, and A is said top left corner pixel, and B is a said upper right corner pixel; C is a said lower left corner pixel, and D is a said lower right corner pixel, A y, A u, A vBe respectively lightness, first colourity and second chromatic value of pixel A, B y, B u, B vBe respectively lightness, first colourity and second chromatic value of pixel B, C y, C u, C vBe respectively lightness, first colourity and second chromatic value of pixel C, D y, D u, D vBe respectively lightness, first colourity and second chromatic value of pixel D;
Wherein, said lightness, first colourity and second chromatic value carry out RGB to YUV color gamut conversion through formula and obtain:
Y U V = 0.25 0.5 0.25 - 0.5 1.0 - 0.5 - 1.0 0 1.0 r g b ,
Wherein, r is the red value of a pixel, and g is the green value of this pixel, and b is the blue valve of this pixel, and Y is the lightness of this pixel, and U and V are the colourity of this pixel.
33. image compressing method as claimed in claim 16 is characterized in that: in the said step (B), when satisfying formula, judge that said 2x2 coding unit is the 12 artificial type:
temp1=ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
temp2=ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
temp3=ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)
temp4=ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
temp5=ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)
temp6=ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
MIN(temp1,temp2,temp3,temp4,temp5,temp6)=temp3
ABS(A y,D y)<THDY4
ABS(A v,D v)<THDV4
ABS(A u,D u)<THDU4
Perhaps ABS (C y, B y)>THDY3
Perhaps ABS (C v, B v)>THDV3
Perhaps ABS (C u, B u)>THDU3
Wherein, ABS is the ABS function of two element differences in the bracket, and THDY3 is a lightness threshold value 3, and THDU3 is the first colourity threshold value 3; THDV3 is the second colourity threshold value 3, and THDY4 is a lightness threshold value 4, and THDU4 is the first colourity threshold value 4; THDV4 is the second colourity threshold value 4, and A is said top left corner pixel, and B is a said upper right corner pixel; C is a said lower left corner pixel, and D is a said lower right corner pixel, A y, A u, A vBe respectively lightness, first colourity and second chromatic value of pixel A, B y, B u, B vBe respectively lightness, first colourity and second chromatic value of pixel B, C y, C u, C vBe respectively lightness, first colourity and second chromatic value of pixel C, D y, D u, D vBe respectively lightness, first colourity and second chromatic value of pixel D;
Wherein, said lightness, first colourity and second chromatic value carry out RGB to YUV color gamut conversion through formula and obtain:
Y U V = 0.25 0.5 0.25 - 0.5 1.0 - 0.5 - 1.0 0 1.0 r g b ,
Wherein, r is the red value of a pixel, and g is the green value of this pixel, and b is the blue valve of this pixel, and Y is the lightness of this pixel, and U and V are the colourity of this pixel.
34. image compressing method as claimed in claim 16 is characterized in that: in the said step (B), when satisfying formula, judge that said 2x 2 coding units are the 13 artificial type:
temp1=ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
temp2=ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
temp3=ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)
temp4=ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
temp5=ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)
temp6=ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
MIN(temp1,temp2,temp3,temp4,temp5,temp6)=temp5
ABS(C y,B y)<THDY4
ABS(C v,B v)<THDV4
ABS(C u,B u)<THDU4
Perhaps ABS (A y, D y)>THDY3
Perhaps ABS (A v, D v)>THDV3
Perhaps ABS (A u, D u)>THDU3
Wherein, ABS is the ABS function of two element differences in the bracket, and THDY3 is a lightness threshold value 3, and THDU3 is the first colourity threshold value 3; THDV3 is the second colourity threshold value 3, and THDY4 is a lightness threshold value 4, and THDU4 is the first colourity threshold value 4; THDV4 is the second colourity threshold value 4, and A is said top left corner pixel, and B is a said upper right corner pixel; C is a said lower left corner pixel, and D is a said lower right corner pixel, A y, A u, A vBe respectively lightness, first colourity and second chromatic value of pixel A, B y, B u, B vBe respectively lightness, first colourity and second chromatic value of pixel B, C y, C u, C vBe respectively lightness, first colourity and second chromatic value of pixel C, D y, D u, D vBe respectively lightness, first colourity and second chromatic value of pixel D;
Wherein, said lightness, first colourity and second chromatic value carry out RGB to YUV color gamut conversion through formula and obtain:
Y U V = 0.25 0.5 0.25 - 0.5 1.0 - 0.5 - 1.0 0 1.0 r g b ,
Wherein, r is the red value of a pixel, and g is the green value of this pixel, and b is the blue valve of this pixel, and Y is the lightness of this pixel, and U and V are the colourity of this pixel.
35. image compressing method as claimed in claim 17 is characterized in that: in the said step (B), when satisfying formula, judge that said 2x2 coding unit is the 8th artificial type:
temp1=ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
temp2=ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
temp3=ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)
temp4=ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
temp5=ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)
temp6=ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
MIN(temp1,temp2,temp3,temp4,temp5,temp6)=temp1
ABS(A y,B y)<THDY4
ABS(A v,B v)<THDV4
ABS(A u,B u)<THDU4
Wherein, ABS is the ABS function of two element differences in the bracket, and THDY4 is a lightness threshold value 4, and THDU4 is the first colourity threshold value 4; THDV4 is the second colourity threshold value 4, and A is said top left corner pixel, and B is a said upper right corner pixel; C is a said lower left corner pixel, and D is a said lower right corner pixel, A y, A u, A vBe respectively lightness, first colourity and second chromatic value of pixel A, B y, B u, B vBe respectively lightness, first colourity and second chromatic value of pixel B, C y, C u, C vBe respectively lightness, first colourity and second chromatic value of pixel C, D y, D u, D vBe respectively lightness, first colourity and second chromatic value of pixel D;
Wherein, said lightness, first colourity and second chromatic value carry out RGB to YUV color gamut conversion through formula and obtain:
Y U V = 0.25 0.5 0.25 - 0.5 1.0 - 0.5 - 1.0 0 1.0 r g b ,
Wherein, r is the red value of a pixel, and g is the green value of this pixel, and b is the blue valve of this pixel, and Y is the lightness of this pixel, and U and V are the colourity of this pixel.
36. image compressing method as claimed in claim 17 is characterized in that: in the said step (B), when satisfying formula, judge that said 2x2 coding unit is the 9th artificial type:
temp1=ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
temp2=ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
temp3=ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)
temp4=ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
temp5=ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)
temp6=ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
MIN(temp1,temp2,temp3,temp4,temp5,temp6)=temp6
ABS(C y,D y)<THDY4
ABS(C v,D v)<THDV4
ABS(C u,D u)<THDU4
Wherein, ABS is the ABS function of two element differences in the bracket, and THDY4 is a lightness threshold value 4, and THDU4 is the first colourity threshold value 4; THDV4 is the second colourity threshold value 4, and A is said top left corner pixel, and B is a said upper right corner pixel; C is a said lower left corner pixel, and D is a said lower right corner pixel, A y, A u, A vBe respectively lightness, first colourity and second chromatic value of pixel A, B y, B u, B vBe respectively lightness, first colourity and second chromatic value of pixel B, C y, C u, C vBe respectively lightness, first colourity and second chromatic value of pixel C, D y, D u, D vBe respectively lightness, first colourity and second chromatic value of pixel D;
Wherein, said lightness, first colourity and second chromatic value carry out RGB to YUV color gamut conversion through formula and obtain:
Y U V = 0.25 0.5 0.25 - 0.5 1.0 - 0.5 - 1.0 0 1.0 r g b ,
Wherein, r is the red value of a pixel, and g is the green value of this pixel, and b is the blue valve of this pixel, and Y is the lightness of this pixel, and U and V are the colourity of this pixel.
37. image compressing method as claimed in claim 17 is characterized in that: in the said step (B), when satisfying formula, judge that said 2x 2 coding units are the tenth artificial type:
temp1=ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
temp2=ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
temp3=ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)
temp4=ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
temp5=ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)
temp6=ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
MIN(temp1,temp2,temp3,temp4,temp5,temp6)=temp2
ABS(A y,C y)<THDY4
ABS(A v,C v)<THDV4
ABS(A u,C u)<THDU4
Wherein, ABS is the ABS function of two element differences in the bracket, and THDY4 is a lightness threshold value 4, and THDU4 is the first colourity threshold value 4; THDV4 is the second colourity threshold value 4, and A is said top left corner pixel, and B is a said upper right corner pixel; C is a said lower left corner pixel, and D is a said lower right corner pixel, A y, A u, A vBe respectively lightness, first colourity and second chromatic value of pixel A, B y, B u, B vBe respectively lightness, first colourity and second chromatic value of pixel B, C y, C u, C vBe respectively lightness, first colourity and second chromatic value of pixel C, D y, D u, D vBe respectively lightness, first colourity and second chromatic value of pixel D;
Wherein, said lightness, first colourity and second chromatic value carry out RGB to YUV color gamut conversion through formula and obtain:
Y U V = 0.25 0.5 0.25 - 0.5 1.0 - 0.5 - 1.0 0 1.0 r g b ,
Wherein, r is the red value of a pixel, and g is the green value of this pixel, and b is the blue valve of this pixel, and Y is the lightness of this pixel, and U and V are the colourity of this pixel.
38. image compressing method as claimed in claim 17 is characterized in that: in the said step (B), when satisfying formula, judge that said 2x2 coding unit is the 11 artificial type:
temp1=ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
temp2=ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
temp3=ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)
temp4=ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
temp5=ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)
temp6=ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
MIN(temp1,temp2,temp3,temp4,temp5,temp6)=temp4
ABS(D y,B y)<THDY4
ABS(D v,B v)<THDV4
ABS(D u,B u)<THDU4
Wherein, ABS is the ABS function of two element differences in the bracket, and THDY4 is a lightness threshold value 4, and THDU4 is the first colourity threshold value 4; THDV4 is the second colourity threshold value 4, and A is said top left corner pixel, and B is a said upper right corner pixel; C is a said lower left corner pixel, and D is a said lower right corner pixel, A y, A u, A vBe respectively lightness, first colourity and second chromatic value of pixel A, B y, B u, B vBe respectively lightness, first colourity and second chromatic value of pixel B, C y, C u, C vBe respectively lightness, first colourity and second chromatic value of pixel C, D y, D u, D vBe respectively lightness, first colourity and second chromatic value of pixel D;
Wherein, said lightness, first colourity and second chromatic value carry out RGB to YUV color gamut conversion through formula and obtain:
Y U V = 0.25 0.5 0.25 - 0.5 1.0 - 0.5 - 1.0 0 1.0 r g b ,
Wherein, r is the red value of a pixel, and g is the green value of this pixel, and b is the blue valve of this pixel, and Y is the lightness of this pixel, and U and V are the colourity of this pixel.
39. image compressing method as claimed in claim 17 is characterized in that: in the said step (B), when satisfying formula, judge that said 2x2 coding unit is the 12 artificial type:
temp1=ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
temp2=ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
temp3=ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)
temp4=ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
temp5=ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)
temp6=ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
MIN(temp1,temp2,temp3,temp4,temp5,temp6)=temp3
ABS(A y,D y)<THDY4
ABS(A v,D v)<THDV4
ABS(A u,D u)<THDU4
Wherein, ABS is the ABS function of two element differences in the bracket, and THDY4 is a lightness threshold value 4, and THDU4 is the first colourity threshold value 4; THDV4 is the second colourity threshold value 4, and A is said top left corner pixel, and B is a said upper right corner pixel; C is a said lower left corner pixel, and D is a said lower right corner pixel, A y, A u, A vBe respectively lightness, first colourity and second chromatic value of pixel A, B y, B u, B vBe respectively lightness, first colourity and second chromatic value of pixel B, C y, C u, C vBe respectively lightness, first colourity and second chromatic value of pixel C, D y, D u, D vBe respectively lightness, first colourity and second chromatic value of pixel D;
Wherein, said lightness, first colourity and second chromatic value carry out RGB to YUV color gamut conversion through formula and obtain:
Y U V = 0.25 0.5 0.25 - 0.5 1.0 - 0.5 - 1.0 0 1.0 r g b ,
Wherein, r is the red value of a pixel, and g is the green value of this pixel, and b is the blue valve of this pixel, and Y is the lightness of this pixel, and U and V are the colourity of this pixel.
40. image compressing method as claimed in claim 17 is characterized in that: in the said step (B), when satisfying formula, judge that said 2x 2 coding units are the 13 artificial type:
temp1=ABS(A y,B y)+ABS(A v,B v)+ABS(A u,B u)
temp2=ABS(A y,C y)+ABS(A v,C v)+ABS(A u,C u)
temp3=ABS(A y,D y)+ABS(A v,D v)+ABS(A u,D u)
temp4=ABS(D y,B y)+ABS(D v,B v)+ABS(D u,B u)
temp5=ABS(C y,B y)+ABS(C v,B v)+ABS(C u,B u)
temp6=ABS(C y,D y)+ABS(C v,D v)+ABS(C u,D u)
MIN(temp1,temp2,temp3,temp4,temp5,temp6)=temp5
ABS(C y,B y)<THDY4
ABS(C v,B v)<THDV4
ABS(C u,B u)<THDU4
Wherein, ABS is the ABS function of two element differences in the bracket, and THDY4 is a lightness threshold value 4, and THDU4 is the first colourity threshold value 4; THDV4 is the second colourity threshold value 4, and A is said top left corner pixel, and B is a said upper right corner pixel; C is a said lower left corner pixel, and D is a said lower right corner pixel, A y, A u, A vBe respectively lightness, first colourity and second chromatic value of pixel A, B y, B u, B vBe respectively lightness, first colourity and second chromatic value of pixel B, C y, C u, C vBe respectively lightness, first colourity and second chromatic value of pixel C, D y, D u, D vBe respectively lightness, first colourity and second chromatic value of pixel D;
Wherein, said lightness, first colourity and second chromatic value carry out RGB to YUV color gamut conversion through formula and obtain:
Y U V = 0.25 0.5 0.25 - 0.5 1.0 - 0.5 - 1.0 0 1.0 r g b ,
Wherein, r is the red value of a pixel, and g is the green value of this pixel, and b is the blue valve of this pixel, and Y is the lightness of this pixel, and U and V are the colourity of this pixel.
41. like claim 8,16 or 17 described image compressing methods, it is characterized in that: in the step (D), through carrying out RGB to YUV color gamut conversion, obtaining said 2x2 gamut conversion unit, said RGB to YUV color gamut conversion is with following formulate:
Y U V = 0.25 0.5 0.25 - 0.5 1.0 - 0.5 - 1.0 0 1.0 r g b ,
Wherein, R is the red value of a pixel; G is the green value of this pixel, and b is the blue valve of this pixel, and Y is the lightness of this pixel; U and V are the colourity of this pixel, and said 2x2 gamut conversion unit is divided into lightness 2x2 gamut conversion unit (Y), the first colourity 2x2 gamut conversion unit (U) and the second colourity 2x2 gamut conversion unit (V).
42. image compressing method as claimed in claim 41 is characterized in that: in the step (E), said discrete cosine transform is with following formulate:
E F G H = 0.25 × 1 1 1 1 1 - 1 1 - 1 1 1 - 1 - 1 1 - 1 - 1 1 A ‾ B ‾ C ‾ D ‾
Wherein, is the upper left corner value of said 2x2 gamut conversion unit;
Figure FDA0000127270070000285
is the upper right corner value of said 2x2 gamut conversion unit;
Figure FDA0000127270070000286
is the lower left corner value of said 2x2 gamut conversion unit;
Figure FDA0000127270070000287
is the lower right corner value of said 2x2 gamut conversion unit; The E element is the upper left corner value of said 2x2 frequency domain unit; The F element is the upper right corner value of said 2x2 frequency domain unit; The G element is the lower left corner value of said 2x2 frequency domain unit; The H element is the lower right corner value of said 2x2 frequency domain unit, and said 2x2 frequency domain unit is divided into lightness 2x2 frequency domain unit, the first colourity 2x2 frequency domain unit and the second colourity 2x2 frequency domain unit.
43., it is characterized in that: between said step (E) and the step (F), also comprise step like claim 8 or 17 described image compressing methods:
(H) said 2x2 frequency domain unit is divided into first natural type or second natural type, wherein, F element and G element in the said first colourity 2x2 frequency domain unit (U) satisfy formula:
max(ABS(F,0),ABS(G,0))≤THD3,
And F element and G element in the said second colourity 2x2 frequency domain unit (V) satisfy formula:
max(ABS(F,0),ABS(G,0))≤THD4,
Judge that then this 2x2 frequency domain unit is said first natural type, otherwise, judge that these 2x 2 frequency domain unit are said second natural type, wherein, THD3 is the 3rd threshold value, THD4 is the 4th threshold value.
44. image compressing method as claimed in claim 16 is characterized in that: between said step (E) and the step (F), also comprise step:
(H ') is divided into first natural type, second natural type or the 3rd natural type with said 2x2 frequency domain unit, wherein,
H element when the first colourity 2x2 frequency domain unit (U) satisfies formula,
H>THD1
Judge that then said 2x2 coding unit is first natural type;
F element and G element in the first colourity 2x2 frequency domain unit (U) satisfy formula,
MAX(ABS(F,0),ABS(G,0))≤THD2
And F element and G element in the second colourity 2x2 frequency domain unit (V) satisfy formula,
MAX(ABS(F,0),ABS(G,0))≤THD3
Judge that then said 2x2 coding unit is second natural type;
Do not meet first natural type and the second natural type condition, judge then that said 2x2 coding unit is the 3rd natural type;
Wherein, THD1 is first threshold value, and THD2 is second threshold value, and THD3 is the 3rd threshold value.
45. image compressing method as claimed in claim 8 is characterized in that: in the step (C),, use the wherein mean value of two pixels of 8 records when said 2x2 coding unit is the first artificial type, the second artificial type or third party when making type; Use 7 record one 7 bit table cases to put, the recorded content that said 7 bit table cases are put is: in all recorded contents in these 7 bit table lattice, differ reckling with the difference of the mean value of the mean value of other two pixels in this 2x2 coding unit and aforesaid two pixels.
46. image compressing method as claimed in claim 8; It is characterized in that: in the step (C); When the 2x2 coding unit is that four-player is when making type, the 5th artificial type, Sixth Man and making type or the 7th artificial type; Use the wherein mean value of three pixels of 8 records, use 7 or 6 quantized values that write down another one pixel in this 2x2 coding unit.
47. image compressing method as claimed in claim 8 is characterized in that: in the step (F), when said 2x2 frequency domain unit is first natural type, use 7 E element, F element and G elements in the said lightness 2x2 frequency domain of the record unit; Use 4 record one 4 bit table cases to put, the recorded content that said 4 bit table cases are put is: in all recorded contents of these 4 bit table lattice, with the reckling in the difference of the value of H element in this lightness 2x2 frequency domain unit.
48. image compressing method as claimed in claim 8 is characterized in that: in the step (F), when said 2x2 frequency domain unit is first natural type, use 7 E elements in the said first colourity 2x2 frequency domain unit of record; Use 2 record one 2 bit table cases to put, the recorded content that this 2 bit table case is put is: in all recorded contents of these 2 bit table lattice, with the reckling in the difference of the mean value of F element in this first colourity 2x2 frequency domain unit and G element; Do not write down the H element in this first colourity 2x2 frequency domain unit.
49. image compressing method as claimed in claim 8 is characterized in that: in the step (F), when said 2x2 frequency domain unit is first natural type, use 7 E elements in the said second colourity 2x2 frequency domain unit of record; Use 2 record one 2 bit table cases to put, the recorded content that this 2 bit table case is put is: in all recorded contents of these 2 bit table lattice, with the reckling in the difference of the mean value of F element in this second colourity 2x2 frequency domain unit and G element; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of the H element of this second colourity 2x2 frequency domain unit.
50. image compressing method as claimed in claim 8 is characterized in that: in the step (F), when said 2x2 frequency domain unit is second natural type, use the quantized value of 6 E elements in the said lightness 2x2 frequency domain of the record unit; Use the quantized value of the F element of 5 the said lightness 2x2 frequency domain of record unit; Use the quantized value of the G element of 5 the said lightness 2x2 frequency domain of record unit; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of the H element of this lightness 2x2 frequency domain unit.
51. image compressing method as claimed in claim 8 is characterized in that: in the step (F), when said 2x2 frequency domain unit is second natural type, use the quantized value of 5 E elements in the said first colourity 2x2 frequency domain unit of record; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of F element in this first colourity 2x2 frequency domain unit; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of G element in this first colourity 2x2 frequency domain unit; Do not write down the H element of this first colourity 2x2 frequency domain unit.
52. image compressing method as claimed in claim 8 is characterized in that: in the step (F), when said 2x2 frequency domain unit is second natural type, use the quantized value of 5 E elements in the said second colourity 2x2 frequency domain unit of record; Use 4 record one 4 bit table cases to put, the recorded content that this 4 bit table case is put is: in all recorded contents of these 4 bit table lattice, with the reckling in the difference of F element in this second colourity 2x2 frequency domain unit; Use 4 record one 4 bit table cases to put, the recorded content that this 4 bit table case is put is: in all recorded contents of these 4 bit table lattice, with the reckling in the difference of G element in this second colourity 2x2 frequency domain unit; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of H element in this second colourity 2x2 frequency domain unit.
53. image compressing method as claimed in claim 16; It is characterized in that: in the step (C); When said 2x2 coding unit is that the first artificial type, the second artificial type and third party are when making type; Use the wherein mean value of two pixels of 8 records; Use one 6 of 6 or 7 records or 7 bit table cases to put, the recorded content that these 6 or 7 bit table cases are put is: in all recorded contents of these 6 or 7 bit table lattice, differ reckling with the difference of the mean value of the mean value of other two pixels in this 2x2 coding unit and 8 two pixels that write down of aforesaid use.
54. image compressing method as claimed in claim 16; It is characterized in that: in the step (C); When said 2x2 coding unit is that four-player is when making type to the seven artificial types; Use the wherein mean value of three pixels of 8 records, use 7 or 6 quantized values that write down another one pixel in the said 2x2 coding unit.
55. image compressing method as claimed in claim 16; It is characterized in that: in the step (C); When said 2x2 coding unit is the 8th artificial type to the 13 artificial types, use the wherein quantized value of two pixel average of 5 records, use 4 quantized values that write down all the other two pixels respectively; Perhaps use the wherein quantized value of two pixel average of 7 records, use the quantized value of 5 all the other two pixels of record.
56. image compressing method as claimed in claim 16 is characterized in that: in the step (C), when said 2x2 coding unit is the tenth four-player when making type to the 17 artificial types, use 8 pixel data carried out complete record.
57. image compressing method as claimed in claim 44 is characterized in that: in the step (F), when said 2x2 frequency domain unit is first natural type, use E element, the F element of 5 record lightness 2x2 frequency domain unit, the quantized value of G element; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the difference reckling of the value of the H element of said lightness 2x2 frequency domain unit.
58. image compressing method as claimed in claim 44 is characterized in that: in the step (F), when said 2x2 frequency domain unit is first natural type, use the quantized value of the E element of 5 record first colourity 2x2 frequency domain unit; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the difference reckling of the value of the F element of the said first colourity 2x2 frequency domain unit; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the difference reckling of the value of the G element of the said first colourity 2x2 frequency domain unit; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the difference reckling of the value of the H element of the said first colourity 2x2 frequency domain unit 770.
59. image compressing method as claimed in claim 44 is characterized in that: in the step (F), when said 2x2 frequency domain unit is first natural type, use the quantized value of the E element of 5 record second colourity 2x2 frequency domain unit; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the difference reckling of the value of the F element of the said second colourity 2x2 frequency domain unit; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the difference reckling of the value of the G element of the said second colourity 2x2 frequency domain unit; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the difference reckling of the value of the H element of the said second colourity 2x2 frequency domain unit.
60. image compressing method as claimed in claim 44 is characterized in that: in the step (F), when said 2x2 frequency domain unit is second natural type, use E element, the F element of 7 record lightness 2x2 frequency domain unit, the quantized value of G element; Use 4 record one 4 bit table cases to put, the recorded content that this 4 bit table case is put is: in all recorded contents of these 4 bit table lattice, with the difference reckling of the value of the H element of said lightness 2x2 frequency domain unit.
61. image compressing method as claimed in claim 44 is characterized in that: in the step (F), when said 2x2 frequency domain unit is second natural type, use the quantized value of the E element of 6 record first colourity 2x2 frequency domain unit; Use 2 record one 2 bit table cases to put, the recorded content that this 2 bit table case is put is: in all recorded contents of these 2 bit table lattice, with the reckling in the difference of the mean value of the F element of the said first colourity 2x2 frequency domain unit and G element; Do not write down the H element of the said first colourity 2x2 frequency domain unit.
62. image compressing method as claimed in claim 44 is characterized in that: in the step (F), when said 2x2 frequency domain unit is second natural type, use the quantized value of the E element of 7 record second colourity 2x2 frequency domain unit; Use 2 record one 2 bit table cases to put, the recorded content that this 2 bit table case is put is: in all recorded contents of these 2 bit table lattice, with the reckling in the difference of the mean value of F element in the said second colourity 2x2 frequency domain unit and G element; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of the value of the H element of the said second colourity 2x2 frequency domain unit.
63. image compressing method as claimed in claim 44 is characterized in that: in the step (F), when said 2x2 frequency domain unit is the 3rd natural type, use the quantized value of the E element of 5 record lightness 2x2 frequency domain unit; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of the value of the F element of said lightness 2x2 frequency domain unit; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of the value of the G element of said lightness 2x2 frequency domain unit; Use 2 record one 2 bit table cases to put, the recorded content that this 2 bit table case is put is: in all recorded contents of these 2 bit table lattice, with the reckling in the difference of the value of the H element of said lightness 2x2 frequency domain unit.
64. image compressing method as claimed in claim 44 is characterized in that: in the step (F), when said 2x2 frequency domain unit is the 3rd natural type, use the quantized value of the E element of 4 record first colourity 2x2 frequency domain unit; Use 4 record one 4 bit table cases to put, the recorded content that this 4 bit table case is put is: in all recorded contents of these 4 bit table lattice, with the reckling in the difference of the value of the F element of the said first colourity 2x2 frequency domain unit; Use 4 record one 4 bit table cases to put, the recorded content that this 4 bit table case is put is: in all recorded contents of these 4 bit table lattice, with the reckling in the difference of the value of the G element of the said first colourity 2x2 frequency domain unit; Use 4 record one 4 bit table cases to put, the recorded content that this 4 bit table case is put is: in all recorded contents of these 4 bit table lattice, with the reckling in the difference of the value of the H element of the said first colourity 2x2 frequency domain unit.
65. image compressing method as claimed in claim 44 is characterized in that: in the step (F), when said 2x2 frequency domain unit is the 3rd natural type, use the quantized value of the E element of 4 record second colourity 2x2 frequency domain unit; Use 4 record one 4 bit table cases to put, the recorded content that this 4 bit table case is put is: in all recorded contents of these 4 bit table lattice, with the reckling in the difference of the value of the F element of the said second colourity 2x2 frequency domain unit; Use 4 record one 4 bit table cases to put, the recorded content that this 4 bit table case is put is: in all recorded contents of these 4 bit table lattice, with the reckling in the difference of the value of the G element of the said second colourity 2x2 frequency domain unit; Use 4 record one 4 bit table cases to put, the recorded content that this 4 bit table case is put is: in all recorded contents of these 4 bit table lattice, with the reckling in the difference of the value of the H element of the said second colourity 2x2 frequency domain unit.
66. image compressing method as claimed in claim 8 is characterized in that: said 2x2 coding unit is 96, and the coding package of said 2x2 coding unit is 48.
67. image compressing method as claimed in claim 17 is characterized in that: in the step (C),, use the wherein mean value of two pixels of 6 records when said 2x2 coding unit is the first artificial type, the second artificial type or third party when making type; Use one 5 of 5 or 4 records or 4 bit table cases to put; The recorded content that said 5 or 4 bit table cases are put is: in all recorded contents in these 5 or the 4 bit table lattice, differ reckling with the difference of the mean value of the mean value of other two pixels in this 2x2 coding unit and aforesaid two pixels.
68. image compressing method as claimed in claim 17; It is characterized in that: in the step (C); When the 2x2 coding unit is that four-player is when making type, the 5th artificial type, Sixth Man and making type or the 7th artificial type; Use the wherein mean value of three pixels of 6 records, use 5 or 4 quantized values that write down another one pixel in this 2x2 coding unit.
69. image compressing method as claimed in claim 17; It is characterized in that: in the step (C); When the 2x2 coding unit is the 8th artificial type to the 13 artificial types; Use the wherein quantized value of two close pixel average of 5 or 4 records, use 3 records quantized values of two pixels in addition respectively.
70. image compressing method as claimed in claim 17 is characterized in that: in the step (C), when the 2x2 coding unit is the tenth four-player when making type to the 17 artificial types, use 6 pixel data carried out complete record.
71. image compressing method as claimed in claim 17 is characterized in that: in the step (F), when said 2x2 frequency domain unit is first natural type, use the quantized value of 5 E element, F element and G elements in the said lightness 2x2 frequency domain of the record unit; Use 3 record one 3 bit table cases to put, the recorded content that said 3 bit table cases are put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of the value of H element in this lightness 2x2 frequency domain unit.
72. image compressing method as claimed in claim 17 is characterized in that: in the step (F), when said 2x2 frequency domain unit is first natural type, use the quantized value of 5 E elements in the said first colourity 2x of the record 2 frequency domain unit; Use 2 record one 2 bit table cases to put, the recorded content that this 2 bit table case is put is: in all recorded contents of these 2 bit table lattice, with the reckling in the difference of the mean value of F element in this first colourity 2x2 frequency domain unit and G element; Do not write down the H element in this first colourity 2x2 frequency domain unit.
73. image compressing method as claimed in claim 17 is characterized in that: in the step (F), when said 2x2 frequency domain unit is first natural type, use the quantized value of 5 E elements in the said second colourity 2x2 frequency domain unit of record; Use 2 record one 2 bit table cases to put, the recorded content that this 2 bit table case is put is: in all recorded contents of these 2 bit table lattice, with the reckling in the difference of the mean value of F element in this second colourity 2x2 frequency domain unit and G element; Use 2 record one 2 bit table cases to put, the recorded content that this 2 bit table case is put is: in all recorded contents of these 2 bit table lattice, with the reckling in the difference of the H element of this second colourity 2x2 frequency domain unit.
74. image compressing method as claimed in claim 17 is characterized in that: in the step (F), when said 2x2 frequency domain unit is second natural type, use the quantized value of 4 E elements in the said lightness 2x2 frequency domain of the record unit; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of the F element of this lightness 2x2 frequency domain unit; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of the G element of this lightness 2x2 frequency domain unit; Use 2 record one 2 bit table cases to put, the recorded content that this 2 bit table case is put is: in all recorded contents of these 2 bit table lattice, with the reckling in the difference of the H element of this lightness 2x2 frequency domain unit.
75. image compressing method as claimed in claim 17 is characterized in that: in the step (F), when said 2x2 frequency domain unit is second natural type, use the quantized value of 3 E elements in the said first colourity 2x2 frequency domain unit of record; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of F element in this first colourity 2x2 frequency domain unit; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of G element in this first colourity 2x2 frequency domain unit; Use 2 record one 2 bit table cases to put, the recorded content that this 2 bit table case is put is: in all recorded contents of these 2 bit table lattice, with the reckling in the difference of the H element of this lightness 2x2 frequency domain unit.
76. image compressing method as claimed in claim 17 is characterized in that: in the step (F), when said 2x2 frequency domain unit is second natural type, use the quantized value of 3 E elements in the said first colourity 2x2 frequency domain unit of record; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of F element in this first colourity 2x2 frequency domain unit; Use 3 record one 3 bit table cases to put, the recorded content that this 3 bit table case is put is: in all recorded contents of these 3 bit table lattice, with the reckling in the difference of G element in this first colourity 2x2 frequency domain unit; Use 2 record one 2 bit table cases to put, the recorded content that this 2 bit table case is put is: in all recorded contents of these 2 bit table lattice, with the reckling in the difference of the H element of this lightness 2x2 frequency domain unit.
77. image compressing method as claimed in claim 17 is characterized in that: said 2x2 coding unit is 72, and the coding package of said 2x2 coding unit is 36.
78. fixedly image compression, the decompression systems of compression ratio of having based on the 2x2 coding unit is characterized in that said system comprises:
One display module is used to show said image;
One image input equipment is used to import said image;
The one fixedly compression ratio image compression set based on the 2x2 coding unit is connected to said image input equipment, is used for this image is encoded, to generate the coding package;
One apparatus for temporary storage is connected to said fixedly compression ratio image compression set based on the 2x2 coding unit, is used for said coding package;
The one fixedly compression ratio image decompressing device based on the 2x2 coding unit is connected to said apparatus for temporary storage, is used to receive said coding package, and this coding package is decompressed, to produce the 2x2 decoding unit corresponding with said 2x2 coding unit; And
Time schedule controller is connected to said fixedly compression ratio image decompressing device based on the 2x2 coding unit, is used to receive said 2x2 decoding unit, produces the sequential drive signal and the video data of said display module,
Wherein, Said fixedly compression ratio image compression set judges that earlier said 2x2 coding unit is artificial type or natural type; Carry out the differential errors coding, quantize and the coding of tabling look-up with 2x2 coding unit this artificial type; And then the generation first coding data, and to the 2x2 coding unit of this natural type coding that carries out color gamut conversion, discrete cosine transform, quantizes and table look-up, and then produce second coded data; Again this first coding data or this second coded data are encapsulated, have the fixedly coding package of compression ratio with generation.
79. fixedly image decompression method of compression ratio that has based on the 2x2 coding unit; It is characterized in that: a coding package is decoded; With the 2x2 decoding unit in the reconstructed image; Said 2x2 decoding unit comprises four pixels that are arranged, and at least one 2x2 decoding unit is formed said image, and said image decompression method may further comprise the steps:
(A) receive said coding package;
(B) judge according to the main packet header of this coding package whether this coding package is artificial type, if, judge that then this coding package behaviour makes the coding package of type, otherwise, judge the coding package that this coding package is a natural type;
(C) the coding package to this artificial type carries out inverse quantization, counter table look-up decoding and the decoding of contrast branch error, to produce first decoded data;
(D) the coding package to this natural type carries out inverse quantization and the anti-decoding of tabling look-up, to produce second decoded data;
(E) this second decoded data is carried out discrete cosine transform, to produce the 3rd decoded data;
(F) the 3rd decoded data is carried out color gamut conversion, to obtain the 4th decoded data; And
(G) receive said first decoded data or the 4th decoded data, and first decoded data or the 4th decoded data are rebuild, to produce the 2x2 decoding unit.
80. like the described image decompression method of claim 79, it is characterized in that, further comprising the steps of in the step (B):
(H) when being judged to be the coding package of artificial type; Judge that according to the sub-packet header in the said coding package whether it be the first artificial type and make in the type to the third party; Wherein, The said first artificial type is two vertical stripes that said four pixels are vertical direction, and the second artificial type is two vertical stripes that said four pixels are vertical direction, and it is the two slanted bar lines intersection that said four pixels are the miter angle direction that the third party makes type; And
(I) otherwise; Judge according to this sub-packet header and the second son packet header of this coding package whether it is that four-player is made in type to the seven artificial types again; Wherein, to make type to the seven artificial types be the combinations with single-point triangular in shape of said four pixels to said four-player.
81., it is characterized in that: between step (C) and the step (D), further comprising the steps of like the described image decompression method of claim 79:
(J) to the coding package of said natural type, judge that according to the sub-packet header of this coding package it is first natural type or second natural type.
82. like the described image decompression method of claim 81, it is characterized in that: in the step (E), the transition matrix coefficient of said discrete cosine transform is:
A ‾ B ‾ C ‾ D ‾ 1 1 1 1 1 - 1 1 - 1 1 1 - 1 - 1 1 - 1 - 1 1 E F G H ,
Wherein, E, F, G, H are said second decoded data, and
Figure FDA0000127270070000392
is said the 3rd decoded data.
83. like the described image decompression method of claim 82, it is characterized in that: in the step (F), carry out YUV to RGB color gamut conversion, the transition matrix coefficient of said YUV to RGB color gamut conversion is:
r g b = 1.0 - 0.5 - 0.5 1.0 0.5 0 1.0 - 0.5 0.5 Y U V ,
Wherein, Y is the lightness of the pixel in said the 3rd decoded data, and U and V are the colourity of this pixel; R is the red value of the pixel in the 4th decoded data, and g is the green value of this pixel, and b is the blue valve of this pixel.
CN201110455138.7A 2011-12-30 2011-12-30 2*2 code unit-based image compression method and 2*2 code unit-based image decompression method, and image compression and decompression system Active CN102497557B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110455138.7A CN102497557B (en) 2011-12-30 2011-12-30 2*2 code unit-based image compression method and 2*2 code unit-based image decompression method, and image compression and decompression system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110455138.7A CN102497557B (en) 2011-12-30 2011-12-30 2*2 code unit-based image compression method and 2*2 code unit-based image decompression method, and image compression and decompression system

Publications (2)

Publication Number Publication Date
CN102497557A true CN102497557A (en) 2012-06-13
CN102497557B CN102497557B (en) 2014-10-22

Family

ID=46189339

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110455138.7A Active CN102497557B (en) 2011-12-30 2011-12-30 2*2 code unit-based image compression method and 2*2 code unit-based image decompression method, and image compression and decompression system

Country Status (1)

Country Link
CN (1) CN102497557B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5185655A (en) * 1991-10-02 1993-02-09 Tandy Corporation Method and apparatus for encoding full color video data signals and protocol for encoding same
JPH11136519A (en) * 1997-10-28 1999-05-21 Ricoh Co Ltd Picture processor
US6575330B2 (en) * 2000-06-09 2003-06-10 L'oreal Container cap
CN101378506A (en) * 2007-08-30 2009-03-04 崴强科技股份有限公司 Method for compressing image

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5185655A (en) * 1991-10-02 1993-02-09 Tandy Corporation Method and apparatus for encoding full color video data signals and protocol for encoding same
JPH11136519A (en) * 1997-10-28 1999-05-21 Ricoh Co Ltd Picture processor
US6575330B2 (en) * 2000-06-09 2003-06-10 L'oreal Container cap
CN101378506A (en) * 2007-08-30 2009-03-04 崴强科技股份有限公司 Method for compressing image

Also Published As

Publication number Publication date
CN102497557B (en) 2014-10-22

Similar Documents

Publication Publication Date Title
US7751630B2 (en) Multi-mode image processing
CN1316812C (en) Compression of palettized color images with variable length color codes
US7636471B2 (en) Image processing
CN101142821B (en) New compression format and apparatus using the new compression format for temporarily storing image data in a frame memory
CN111837384A (en) Frequency component selection for image compression
US7657105B2 (en) Alpha image processing
CN101039374B (en) Image lossless compression method
JP2005516554A6 (en) Compression of paletted color images using variable-length color codes
CN105933708B (en) A kind of method and apparatus of data compression and decompression
CN102821279A (en) Picture compression method keeping with alpha channel
CN104142924A (en) Method and device for compressing flash picture format
CN101540903B (en) Method of rate control, video frame encoder and frame compression system thereof
CN101653004A (en) Decoder for selectively decoding predetermined data units from a coded bit stream
CN101588497B (en) Frame buffering data compression and decompression method and circuit for LCD overdrive
US20030081852A1 (en) Encoding method and arrangement
CN101765009B (en) Method for compressing and uncompressing video image and circuit for LCD overdriving
JP3462867B2 (en) Image compression method and apparatus, image compression program, and image processing apparatus
CN102497557B (en) 2*2 code unit-based image compression method and 2*2 code unit-based image decompression method, and image compression and decompression system
CN110572664A (en) Novel BMP image compression method and system
EP0711069A1 (en) Image processing method and apparatus
US8774505B2 (en) Method and apparatus of fixed bit-rate image compression/decompression based on 2×2 image unit
Kim et al. Image compression using chain coding for electronic shelf labels (ESL) systems
KR20030029611A (en) Method for reducing code artifacts in block coded video signals
US7164803B2 (en) Method for encoding digitized images
WO2005074146A1 (en) Data encoding using multi-dimensional redundancies

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant