CN100574435C - Image compressing method - Google Patents

Image compressing method Download PDF

Info

Publication number
CN100574435C
CN100574435C CN 200610140264 CN200610140264A CN100574435C CN 100574435 C CN100574435 C CN 100574435C CN 200610140264 CN200610140264 CN 200610140264 CN 200610140264 A CN200610140264 A CN 200610140264A CN 100574435 C CN100574435 C CN 100574435C
Authority
CN
China
Prior art keywords
bit
value
advances
highest significant
significant position
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.)
Expired - Fee Related
Application number
CN 200610140264
Other languages
Chinese (zh)
Other versions
CN1976459A (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.)
Industrial Technology Research Institute ITRI
Original Assignee
Industrial Technology Research Institute ITRI
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 Industrial Technology Research Institute ITRI filed Critical Industrial Technology Research Institute ITRI
Priority to CN 200610140264 priority Critical patent/CN100574435C/en
Publication of CN1976459A publication Critical patent/CN1976459A/en
Application granted granted Critical
Publication of CN100574435C publication Critical patent/CN100574435C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The present invention relates to a kind of method that is used to handle the sub-image data of image.This method comprises: the object of this subimage is provided, forms the binary system bit figure of this object, decision has the one or two and whether advances the bit number of value greater than the bit number with second place value in this binary system bit figure.This method comprises in addition: whether decision needs to change this binary system bit figure, so that in the binary system bit figure of conversion, have the one or the two bit number that advances value less than having the two or the two bit number that advances value, and by decision this binary system bit figure or should be in the binary system bit figure of conversion the highest effective two bits of one section continuous determine reduced rule.

Description

Image compressing method
Technical field
The present invention relates to a kind of method of process image data, relate in particular to a kind of method and record format of execution length of the subimage information that is used for compressing image.
Background technology
Digital processing technology sustainable development, message and compression of video data efficient are also significantly promoted in recent years.For example, the compressed format standard of mpeg (MPEG, " Motion Picture Experts Group ") evolves to MPEG 4 by MPEG 1.But the compression efficiency of the sub-image data of playing an important role in the presenting of multimedia programming does not improve.Moreover the size of data of subimage image increases along with the increase in demand of the multimedia programming of high-resolution.The compression efficiency that is provided by compression method commonly used can't satisfy the demand of handling the high resolution multimedia program.An example of compression method commonly used is found in the United States Patent (USP) that the people proposed numberings 6,009,202 such as Kikuchi, and its name is called " image information coding/decoding system " (Image Information Encoding/DecodingSystem).Kikuchi discloses a kind of coding method of sub-image data, and it comprises the reduced rule 1 to 6 to Fig. 5 F about its Fig. 5 A, and about the reduced rule 11 to 15 of its Fig. 6 A to Fig. 6 E.The burden of the data record of these reduced rules is very big, and data format can not be adjusted for the content characteristic that adapts to different sub-image data.
Therefore, need a kind of energy high efficiency of compression sub-image data, and can handle the method for high-resolution video disc.Simultaneously, also need a kind of data compression method, it can adjust compression parameters so that better compression ratio to be provided according to the content characteristic elasticity of inferior image data.
Summary of the invention
Example of the present invention provides a kind of method of handling the sub-image data of image.This method can comprise: the object that this subimage is provided, form the binary system bit figure of this object, decision has the one or the two bit number that advances value whether greater than having the two or the two bit number that advances value in this binary system bit figure, whether decision has needs this binary system bit figure of conversion so that advance the bit number of value less than having the two or two having the one or the two bit number that advances value in the binary system bit figure of conversion, and judge this binary system bit figure or should binary system bit figure through changing in the highest effective two bits of one section continuous bit to determine reduced rule.
Example of the present invention also provides the another kind of method of handling the sub-image data of image.This method can comprise: the object that this subimage is provided, form the binary system bit figure of this object, the highest effective two bits of decision one section continuous bit in this binary system bit figure, have the one or two and advance after this highest significant position unit of value for having the two or two to advance second highest significant position of value and compress this paragraph with first form when first if be connected on, record has the two or two number (n1) that advances the continuous bit of value after this highest significant position unit in the N1 position, and wherein N1 is for satisfying n1≤2 N1-1 smallest positive integral, have the one or two and advance after this highest significant position unit of value for having the one or two to advance second highest significant position of value and compress this paragraph with second form when first if be connected on, and record has the one or two number (n2) that advances the continuous bit of value after this highest significant position unit in the N2 position, and wherein N2 is for satisfying n2≤2 N2-1 smallest positive integral.
Examples more of the present invention also can provide a kind of data compression of the subimage that carries out image and the method for decompression, it comprises the object that determines this subimage, form the binary system bit figure of this object, the decision reduced rule, its the highest effective two bits by the decision paragraph are compressed in one section continuous bit of this binary system bit figure, compress the continuous bit of this section according to this reduced rule and form the compression paragraph, and with the parameter of data format record corresponding to this reduced rule, wherein this parameter determines the length of this compression paragraph.
Example of the present invention can provide data format again, it can write down the compressed information of the object of subimage, wherein comprise first field, be used for writing down parameter corresponding to the reduced rule of the one section continuous bit of binary system bit figure that compresses this object, and second field, be used for record and compress this section formed compression section of bit continuously according to this reduced rule, wherein this parameter determines the length of this compression paragraph.
Will be appreciated that above summary description and detailed description hereinafter all only are made for illustration and explanation, the invention that it does not limit this paper is advocated.
Description of drawings
When and when reading with each accompanying drawing, the summary that discloses before can better understanding the present invention and above describing in detail.For reaching illustration purpose of the present invention, expression has each preferable specific embodiment of existing genus in each accompanying drawing.Should be appreciated that so the present invention is not limited to represented accurate row and puts mode and apparatus.
In each accompanying drawing:
Figure 1A is the schematic diagram that comprises the image of subimage;
Figure 1B and Fig. 1 C are the schematic diagram of object that meets the subimage of example of the present invention;
Fig. 2 A is the schematic diagram of structure that meets the image of example of the present invention;
Fig. 2 B is the schematic diagram at the image header shown in Fig. 2 A;
Fig. 2 C is the schematic diagram in the structure of the object shown in Fig. 2 A;
Fig. 3 A is the bit figure that meets the object of example of the present invention;
Fig. 3 B is the bit figure through conversion that meets the object shown in Fig. 3 A of example of the present invention;
Fig. 3 C is the bit figure through conversion at the object shown in Fig. 3 A that meets another example of the present invention;
Fig. 4 is the flow chart that meets the compression method of example of the present invention;
Fig. 5 A is the flow chart that meets the compression method of example of the present invention to Fig. 5 D;
Fig. 6 A is the schematic diagram that meets the record format of example of the present invention to Fig. 6 D;
Fig. 7 A is the schematic diagram that meets the compression method of another example of the present invention to Fig. 7 H;
Fig. 8 A is the schematic diagram of bit element flow after the compression;
Fig. 8 B is the flow chart that meets the decompression method of example of the present invention;
Fig. 9 A is the experimental result picture of English alphabet;
Fig. 9 B is the experimental result picture of one group of Chinese text; And
Figure 10 is the block diagram that meets the compression method of example of the present invention.
The main element description of symbols
10 images
12 subimages
The 12-1 object
The 12-2 subimage
31 bit figure
32 bit figure
33 bit figure
70 bit figure
80 bit element flows
121 word segments
122 background parts
Embodiment
Now will be in detail with reference to the specific embodiment of the invention, its example is illustrated among the accompanying drawing.Most its possibility will be according to the similar elements mark to represent identical or similar elements in institute's drawings attached.
Figure 1A is the schematic diagram that comprises the image 10 of subimage 12.Please refer to Figure 1A, the main image of image 10 expression films, its two dimension size multiply by Y (pixel) for X (pixel).Subimage 12 is illustrated in this film captions or lteral data shown on the image 10, and it can comprise the multilingual literal, comprises for example English words and middle literal.In this example, first row of subimage 12 comprises 8 middle literal and 3 English alphabets, and it is the Chinese version at " the Welcome to the FVD Team " of second row.In some example, subimage can be single line text or the multirow literal that comprises same-language or different language.
Figure 1B and Fig. 1 C meet the schematic diagram of object of the subimage of example of the present invention as example for first row that uses Figure 1A.Subimage comprises at least one object.Please refer to Figure 1B, the first style of writing word in the subimage shown in Figure 1A 12 can be considered object 12-1.Therefore, object 12-1 is big or small identical with subimage 12, i.e. X 1Multiply by Y 1Please refer to Fig. 1 C, each word promptly is considered as an object 12-2 in subimage 12.Each object 12-2 all has identical big or small X 2Multiply by Y 2, comprise word segment 121 and background parts 122.In different application, can use the object that varies in size.
Fig. 2 A is the schematic diagram of structure that meets the image of example of the present invention.Please refer to Fig. 2 A, the structure of image comprises the image header, is a plurality of object structure then.In this example, after the image header, provide n object structure altogether.Each object structure comprises the object header, and is right after the object data unit after the object header.Parameter of collecting during compression is handled and packed data system are stored in respectively in object header and the object data unit.
Fig. 2 B is the schematic diagram in the structure of the image header shown in Fig. 2 A.Please refer to Fig. 2 B, the structure of this image header has been specified cell size in the unit flag, for example is a pixel or four pixels, image size, object size, and the object number in image.
Fig. 2 C is the schematic diagram in the structure of the object shown in Fig. 2 A.Please refer to Fig. 2 C, the structure of object comprises the object header, and the object data unit after being connected on.The object header comprises XOR (exclusive or, XOR) flag, color field and object size information field.Whether the XOR flag is used to specify will carry out XOR, and this part please hold the back and further describe.Color field is used to specify the colouring information with respect to the word segment of the object of background parts.In according with example of the present invention, when color field is set at " 1 ", is to specify two to advance the pixel that value " 1 " is given word segment, and specifies two to advance the pixel that value " 0 " is given background parts.The object header comprises the compressed information among parameter N 1, N2, N3 and the N4 in addition, and it has write down each length value that is stored in the data in the object unit according to each reduced rule of correspondence respectively.These reduced rules and parameter N 1, N2, N3 and N4 will further go through again.
Fig. 3 A is the bitmap 31 that meets the object of example of the present invention.Please refer to Fig. 3 A, its scanning has the object of the word segment of " H " shape.If color field is set at 1, promptly specifies two to advance the pixel that value " 1 " is given this word segment, and specify two to advance the pixel that value " 0 " is given background.In order to compress, when this color field was set at " 1 ", two numbers that advance value " 1 " can be less than two numbers that enter value " 0 ", and vice versa.Moreover, in according with example of the present invention,,, promptly carry out XOR in order to reduce by two numbers that enter value " 1 " if when two numbers that advance value " 0 " are advanced the outnumbering of value " 1 " by two.The XOR computing can be listed as to next column one row ground by the top and carry out, and is referred to as downward XOR; Or be listed as to previous column one row ground by a bottom and carry out, be referred to as upwards XOR.The XOR computing can also be carried out to the right line by line by left is capable, is referred to as XOR to the right; Or, be referred to as XOR left by the execution line by line left of right-hand row.The XOR computing is the logical operation that two operators are carried out, and it only has and if only if one of operator, but not two operators have numerical value " very " time cause logical value " very ".
Fig. 3 B meets the bit Figure 32 through conversion of this object shown in Fig. 3 A of example of the present invention.Please refer to Fig. 3 A and Fig. 3 B, when carrying out downward XOR, first row of bit Figure 31 are promptly as these first row through bit Figure 32 of conversion.Carry out XOR between first row of bit Figure 31 and secondary series, wherein first of first of the bit Figure 31 row with the secondary series of bit Figure 31 first is XOR, second of first row of bit Figure 31 with the secondary series of bit Figure 31 second is XOR, and the rest may be inferred.The result of XOR computing can be written to the secondary series through bit Figure 32 of conversion.In XOR computing downwards, first row of the bit Figure 31 shown in Fig. 3 A are written to first row of bit Figure 32, and the n of bit Figure 31 is listed as (n+1) row that are written to bit Figure 32 of conversion with the result of (n+1) the XOR computing of row.After the XOR computing, can be at two numbers that advance value " 1 " in bit Figure 32 of conversion less than two numbers that enter value " 0 ".
Fig. 3 C is the bit Figure 33 through conversion at this object shown in Fig. 3 A that meets another example of the present invention.Please refer to Fig. 3 C, bit Figure 33 carries out the upwards result of XOR computing for the bit Figure 31 shown in Fig. 3 A.In the XOR computing that makes progress, last row of the bit Figure 31 shown in Fig. 3 A are written to first row of bit Figure 33, and (n+1) row of bit Figure 31 are listed as with the n that the result of the XOR computing of n row is written to bit Figure 32 of conversion.Note that about the XOR computing shown in Fig. 3 B and Fig. 3 C and only be exemplary in nature.Therefore also can use other method advances the bit figure of value " 1 " and is converted into and has the bit figure that plurality purpose two is advanced value " 0 " will have plurality purpose two.For example, in example, can carry out inverse operation (inverse operation) and change two and advance value " 1 " and become two and advance value " 0 ", and change two and advance value " 0 " and become two and advance value " 1 ", so that bitmap is after conversion, its two number that advances value " 1 " is less than two numbers that enter value " 0 ".
Fig. 4 is the flow chart that meets the compression method of the present invention's one example.Please refer to Fig. 4, step 41 provides the image that comprises subimage.This subimage comprises at least one object.Step 42 is judged the size of each object in this at least one object.Next, appointment the or two is advanced value and the two or two and is advanced to be worth the word segment of each object in this at least one object and the pixel of background parts in step 43, to form the bit figure of each object in this at least one object.Then, whether this bit of step 44 decision figure needs conversion.Suppose that color field is set at " 1 ",, then carry out the XOR computing to obtain bit figure through conversion in step 45 if when two numbers that advance value " 1 " advance the number of value " 0 " greater than two.Yet step 44 and 45 is nonessential step.That is to say that even it is more to have a number of pixels of numerical value " 1 ", compression is handled and still can be continued to carry out and do not need to carry out any conversion.
Then will determine whether can use first reduced rule, second reduced rule, the 3rd reduced rule or the 4th reduced rule front end paragraph to bitmap.In case determined wherein a kind of reduced rule, can determine whether can use the front end paragraph of this reduced rule to the remainder of this bit figure.This compression processing can continue to carry out to be compressed into bit element flow up to this bit figure.The front end paragraph can comprise the row of this bitmap or the continuous part of several continuation columns.Especially, step 51 will determine whether can use the front end paragraph of first reduced rule to bitmap, no matter be the bitmap or the bit figure of unconverted still through conversion.If confirm, promptly in step 61, implement first rule, it adds discussion again with reference to Fig. 5 A.If not, then in step 52, determine whether can use second reduced rule to this front end paragraph.If confirm, promptly in step 62, implement this second rule, it adds discussion again with reference to Fig. 5 B.If not, then in step 53, determine whether can use the 3rd reduced rule to this paragraph.If confirm, promptly in step 63, implement three sigma rule, it adds discussion again with reference to Fig. 5 C.If not, promptly implement the 4th reduced rule in step 54, it adds discussion again with reference to Fig. 5 D.In the step 64 step 61,62,63 and 54 output are collected in the bit element flow.This processing program will continue to determine whether that a rule in this first, second, third and the 4th reduced rule may be used on the subsequent paragraph of this bitmap, all be compressed up to whole all bit figure.
Fig. 5 A is the flow chart that meets the compression method of example of the present invention to Fig. 5 D.Please refer to Fig. 5 A and Fig. 4, suppose that this color flag is set at " 1 ", judge in the step 510 whether preceding two positions of the paragraph of this bit figure are respectively " 1 " and " 0 ".If confirm that step 611 is promptly calculated the number (n1) in " 0 " that first bit " 1 " is followed afterwards continuously.Then, record count n1 in the N1 bit of step 612 in first form shown in Fig. 6 A.N1 is for satisfying n1≤2 N1-1 smallest positive integral.Then, shown in Fig. 2 C, step 613 is record count N1 in first field of object header.
Please refer to Fig. 5 B and Fig. 4, whether two bits were respectively " 1 " and " 1 " before step 520 was judged the paragraph of this bit figure.If confirm that step 621 is promptly calculated the number (n2) in " 1 " that first bit " 1 " is followed afterwards continuously.Then, record count n2 in the N2 bit of step 622 in second form shown in Fig. 6 B.N2 is for satisfying n2≤2 N2-1 smallest positive integral.Then, shown in Fig. 2 C, step 623 is record count N2 in second field of object header.
Please refer to Fig. 5 C and Fig. 4, whether step 530 decision has in bitmap has the two continuous bits that advance value " 0 " and is listed as.If confirm, step 631 is promptly calculated two and is advanced the columns (n3) of value for the continuation column of " 0 ".Then, record count n3 in the N3 position of step 632 in the 3rd form shown in Fig. 6 C.N3 is for satisfying n3≤2 N3-1 smallest positive integral.Then, shown in Fig. 2 C, step 633 is record count N3 in the 3rd field of object header.
Please refer to Fig. 5 D and Fig. 4, step 541 is calculated the number (n4) of continuous " 0 " in one of bit figure row.Then, record count n4 in the N4 bit of step 542 in the 4th form shown in Fig. 6 D.N4 is for satisfying n4≤2 N4-1 smallest positive integral.Then, shown in Fig. 2 C, step 543 is record count N4 in the 4th field of object header.
Fig. 6 A is the schematic diagram that meets the record format of example of the present invention to Fig. 6 D.Please refer to Fig. 6 A, preceding two positions point out that first bit is " 1 ", and are thereafter continuously several " 0 ".Then point out to be connected on continuously the actual number of first bit " 1 " " 0 " afterwards in the ensuing N1 bit.Whole (N1+2) bit is stored in the object data unit, and is collected in the bit element flow.If there is more than one paragraph can satisfy first rule, and therefore existence surpasses one n1, then only writes down the numerical value corresponding to the N1 of maximum n1 in this object header.
Please refer to Fig. 6 B, similarly, preceding two positions point out that first bit is " 1 ", and are thereafter continuously several " 1 ".Then point out to be connected on continuously the actual number of first bit " 1 " " 1 " afterwards in the ensuing N2 bit.Whole (N2+2) position is stored in this object data unit, and is collected in this bit element flow.If there is more than one paragraph can satisfy second rule, and therefore existence surpasses one n2, then only writes down the numerical value corresponding to the N2 of maximum n2 in this object header.
Please refer to Fig. 6 C, preceding two bits are pointed out " 0 " of continuous several row.And the actual number of this continuation column is pointed out in ensuing N3 bit.Whole (N3+2) bit is stored in this object data unit, and is collected in this bit element flow.If there is more than one paragraph can satisfy three sigma rule, and therefore existence surpasses one n3, then only writes down the numerical value corresponding to the N3 of maximum n3 in this object header.
Please refer to Fig. 6 D, the representative of preceding two positions has some continuous " 0 " to appear in the row but and vacant permutation.The actual number of those continuous " 0 " is specified in following N4 position.Whole (N4+2) bit is stored in this object data unit, and is collected in this bit element flow.If there is more than one paragraph can satisfy the 4th rule, then in this object header, only write down numerical value corresponding to the N4 of maximum n4.
Fig. 7 A is the flow chart that meets the compression method of another example of the present invention to Fig. 7 H.Fig. 7 A is for wanting the bitmap 70 of compressed object.Please refer to Fig. 7 B, first reduced rule is judged as and may be used on first paragraph, and it is the front end paragraph of this bit Figure 70.Moreover the numerical value decision of n1 is 5, because in first paragraph, first bit " 1 " has 5 continuous " 0 " afterwards.Simultaneously, the decision of the numerical value of N1 is 3.The numerical value of n1 and N1 respectively with first format record in first field of object data unit and object header.
Please refer to Fig. 7 C, second reduced rule is judged as second paragraph that may be used on after first paragraph of bit Figure 70.Moreover the numerical value decision of n2 is 4, because first bit " 1 " has 4 continuous " 1 " afterwards in second paragraph.Simultaneously, the decision of the numerical value of N2 is 3.The numerical value of n2 and N2 is recorded in respectively in second field of second form and this object header.
Please refer to Fig. 7 D, the 3rd reduced rule is judged as the 3rd paragraph that may be used on after second paragraph of bit Figure 70.Moreover numerical value n3 decision is 8, because occurred 8 row " 0 " continuously.The numerical value of N3 also determines to be 4.The numerical value of n3 and N3 is recorded in respectively in the 3rd field of the 3rd form and this object header.
Please refer to Fig. 7 E, the 4th reduced rule is judged as the 4th paragraph that may be used on after the 3rd paragraph of bit Figure 70.Moreover the numerical value decision of n4 is 4, because occur 4 " 0 " continuously in the row in the 3rd paragraph.The numerical value of N4 also determines to be 3.The numerical value of n4 and N4 is recorded in respectively in the 4th field of the 4th form and this object header.
Please refer to Fig. 7 F, second reduced rule is judged as the 5th paragraph that may be used on after the 4th paragraph of bit Figure 70.Moreover the numerical value decision of n2 is 4, because first bit " 1 " has 4 " 1 " afterwards continuously in the 5th paragraph.But, because the n2 value among Fig. 7 F equals the n2 value among Fig. 7 C, the required n2 value of the 5th paragraph be with second format record in the N2 position.
Please refer to Fig. 7 G, the 4th reduced rule is judged as the 6th paragraph that may be used on after the 5th paragraph of bit Figure 70.Moreover the numerical value decision of n4 is 2, because occur 2 " 0 " in the row in the 6th paragraph continuously.Because the n4 value of Fig. 7 G (being 2) is less than the n4 value (being 4) of Fig. 7 E, the required n4 value of the 6th paragraph promptly with the 4th format record in the N4 position.
Please refer to Fig. 7 H, the 3rd reduced rule is judged as the 7th paragraph that may be used on being right after after the 6th paragraph of bit Figure 70.Moreover the numerical value decision of n3 is 2, because occur two row " 0 " continuously in the 7th paragraph.Because the n3 value (n3=2) among Fig. 7 H is less than the n3 value (n3=8) among Fig. 7 D, the required n3 value of the 7th paragraph promptly with the 3rd format record in the N3 position.
Abovely only be exemplary in nature to the compression algorithm of four reduced rules that Fig. 7 H discussed with reference to Fig. 7 A.According to another example of the present invention, compression algorithm comprises following reduced rule:
(1) judges in bit figure that continuously whether the highest effective two bits of the paragraph of position are that two to advance value " 1 " then be two to advance value " 0 " afterwards.If determine, calculate and in this paragraph, have two numbers that advance the continuous bit of value " 0 " after the Must Significant Bit unit.Be same as first reduced rule of being discussed to Fig. 7 H with reference to Fig. 7 A about this regular record format and packed data, and it does not discuss.
(2) judge in bit figure that continuously whether the highest effective two bits of the paragraph of position are that two to advance value " 1 " then be that another two advances value " 1 " afterwards.If determine, calculate and in this paragraph, have two numbers that advance the continuous bit of value " 1 " after the Must Significant Bit unit.Be same as second reduced rule of being discussed to Fig. 7 H with reference to Fig. 7 A about this regular record format and packed data, and it does not discuss.
(3) judge in bit figure that continuously whether the highest effective two bits of the paragraph of position are that two to advance value " 0 " then be two to advance value " 1 " afterwards.If determine, calculate and in this paragraph, have two numbers that advance the continuous bit of value " 1 " after the highest significant position unit.Be similar to first reduced rule that Fig. 7 A is discussed to Fig. 7 H about this regular record format and packed data, will not give unnecessary details herein.
(4) judge in bit figure that continuously whether the highest effective two bits of the paragraph of bit are that to advance value " 0 " two then be that another two advances value " 0 " afterwards.If determine, calculate and in this paragraph, have two numbers that advance the continuous bit of value " 0 " after the highest significant position unit.Be similar to first reduced rule of being discussed to Fig. 7 H with reference to Fig. 7 A about this regular record format and packed data, will not give unnecessary details herein.
Fig. 8 A is the schematic diagram of bit element flow 80 after the compression.Please refer to Fig. 8 A, for instance, bit element flow 80 is by being formed to the method shown in Fig. 7 H as Fig. 7 A.For the bit element flow 80 that decompresses, need to use Fig. 7 B numerical value n1 that each paragraph write down in the bitmap 70 shown in Fig. 7 H to n4, and N1 is to N4.When looking a bit and be a unit, bit element flow 80 promptly comprises 37 positions.Compression ratio, promptly the ratio of the bit number after bit number before compression and the compression is calculated as follows.
Compression ratio=(10x12)/(37)
When decompressing beginning, consider the front end paragraph of bit element flow 80 earlier.Because two bits are that " 1 " reaches " 0 " before the bit element flow 80, it is represented during compression is handled and has used first reduced rule, and it is the number (n1) of " 0 " afterwards continuously that following N1 bit is used for having specified at first bit " 1 " by decision.Moreover because the value of N1 is 3, the value of n1 is advanced value by two of preceding two bits " 10 " three bits " 101 " afterwards and is calculated, and promptly equals 5, and first paragraph that causes binary system bit figure is 100000.Therefore, the length of first paragraph of bit element flow 80 is determined by the value of (N1+2), and first paragraph itself comprises about this bitmap reduced rule information (can use preceding two bits to represent), and about the bit number (can represent by the numerical value of ensuing N1 bit) of this reduced rule.Therefore, can be pursuant to the numerical analysis bit element flow 80 of N1, the N2, N3 and the N4 that write down during compression is handled to each paragraph.
Fig. 8 B is the flow chart that meets the decompression method of example of the present invention.Please refer to Fig. 8 B, the bit element flow that decompress is provided in the step 81.Form before this bit element flow ties up to and decompresses, be stored in the object data unit by compression binary system bit figure, and can by access in this object data unit it.Next, provide in the step 82 about compressing the information of reduced rule collected during this bitmap.The information that comprises N1, N2, N3 and N4 has been recorded in the object header, and can by access wherein it.Step 83 holds one section one section ground of paragraph to analyze this bit element flow according to this information before by this bit element flow.Step 84 is by two bit decision bit pattern formulas before each bit element flow paragraph.Then, the bit number that is connected in this bit figure pattern is closed in decision in the step 85.When each paragraph in above-mentioned these bit element flow paragraphs that decompress, can form binary system bit figure then.And then to deciphering corresponding to the object of this bit figure.
The result of Fig. 9 A for English alphabet is experimentized.Please refer to Fig. 9 A, by English alphabet A is implemented method according to the invention to Z, can be found to letter " I " and have maximum compression ratio, approximately is 180, and it mainly is owing to have the quite high symmetry and the form of simplification.And similarly be " G ", " Q " reaches " S " and waits letter, and owing to their symmetry is lower and complicated in form, its compression ratio is less relatively.
The result of Fig. 9 B for one group of Chinese characters is experimentized.Please refer to Fig. 9 B, " worker " be quite high compression ratio owing to symmetry on its font and the property simplified have.On average, Chinese characters can comprise curve, bent angle and corner, and the complexity of its form is higher, and its compression ratio also so often low than English words.
Figure 10 is the block diagram that meets the compression method of example of the present invention.Please refer to Figure 10, the subimage that comprises at least one object is provided in the step 101.Then, form the bit figure of this object in the step 102.In the step 103, whether convertible this bit figure is to promote compression effectiveness with decision to analyze the content (include two advance to be worth bit " 1 " reach " 0 ") of this object.In an example according to the present invention, if in this bit figure, two numbers that advance to be worth bit " 1 " promptly are listed as or carry out line by line the XOR computing to this bit figure one greater than two numbers that enter to be worth bit " 0 ".In another example, then carry out inverse operation for ground, position of this bit figure.The conversion of this bit figure can be undertaken by XOR computing, inverse operation or other suitable computing, and the promptly feasible plurality purpose two that comprises in the bit figure of conversion advances to be worth bit " 0 ".For instance, if change, be about to two and advance in the conversion flag that value " 1 " is written to record format 108.On the contrary, if do not carry out conversion, then advance value " 0 " and be written to this conversion flag two.
Then, in step 104, select to be used for compressing the algorithm of this bitmap.Can select appropriate algorithm according to the content of bit figure.For example, advance value " 0 ", can use to comprise that being similar to Fig. 7 A compresses to the algorithm of the described reduced rule of Fig. 7 H if bit figure comprises two of ordered series of numbers.In another example, then use the algorithm comprise in one of aforesaid four kinds of reduced rules based on the highest effective two bits to compress.Then, to through changing or the bit figure of unconverted implements to carry out length (run-length) compression, promptly carry out according to selected compression algorithm in step 105.Resulting parameter and packed data promptly are recorded in this record format 108 between compression period.Then, can obtain the bit element flow of compression in the step 106 by the packed data that connects this record.
The person of ordinary skill in the field should promptly understand and can change above-mentioned every specific embodiment, and unlikely inventive concepts departing from its broad sense.Therefore, should be appreciated that the present invention is not limited to the certain specific embodiments that this specification discloses, and be the improvement of containing in ownership defined spirit of the present invention of claim and the scope.
In addition, when explanation representative specific embodiment of the present invention, this specification can be shown specific order of steps with method of the present invention and/or activity list; But, because the scope of this method or operation is not limited to the specific order of steps that this paper proposes, so this method or operation should not be subject to described particular step order.Also is feasible as the person of ordinary skill in the field when understanding other order of steps.So, the particular step order that this specification proposed should be considered as restriction to claim.In addition, also the claim of relevant method of the present invention and/or operation only should be limited in enforcement with written contained order of steps, the person of ordinary skill in the field is easy to understand, but the also change of above-mentioned these order, and still be covered by within spirit of the present invention and the category.

Claims (37)

1. method that is used to handle the sub-image data of image is characterized in that comprising:
The object of this subimage is provided;
Form the binary system bit figure of this object;
Determine to have among this binary system bit figure the two bit numbers that advance value 1 whether greater than having the two bit numbers that advance value 0;
If the bit number that value 1 is advanced in two of above-mentioned decision is greater than the two bit numbers that advance value 0, then carry out a switching motion and change this binary system bit figure and become binary system bit figure, so that should in binary system bit figure of conversion, have this two bit number that advances value 1 less than having this two bit number that advances value 0 through conversion; And
Judgement this binary system bit figure or should be in the binary system bit figure of conversion one section continuously the highest effective two bits in the paragraph of position with the decision reduced rule.
2. the method that is used to handle the sub-image data of image according to claim 1 is characterized in that:
Need this binary element of conversion figure to become after the binary element figure of conversion in decision, this switching motion is for the computing of carrying out an XOR between per two continuation columns of this binary element figure.
3. the method that is used to handle the sub-image data of image according to claim 1 is characterized in that comprising in addition:
Need this binary element of conversion figure to become after the binary element figure of conversion in decision, this switching motion is carried out an inverse for each position of this binary element figure.
4. the method that is used to handle the sub-image data of image according to claim 1 is characterized in that comprising in addition:
In the field of record form, specify whether this binary system bit figure is carried out conversion.
5. the method that is used to handle the sub-image data of image according to claim 1 is characterized in that comprising in addition:
After having judged the highest above-mentioned effective two positions, when these the highest effective two bits be two advance value 1 after then two when advancing value 0, use first reduced rule; And
Calculating has this two number that advances the continuous bit of value 0 after this highest significant position unit.
6. the method that is used to handle the sub-image data of image according to claim 5 is characterized in that comprising in addition:
Be recorded in the N1 position and have this two number n1 that advances the continuous bit of value 0 after this highest significant position unit, wherein N1 is for satisfying n1≤2 N1-1 smallest positive integral.
7. the method that is used to handle the sub-image data of image according to claim 6 is characterized in that comprising in addition:
In the N1+2 position, this paragraph with this binary system bit of first format record figure, wherein the highest significant position unit of this first form has this and two advances value 1, and the second high effectively bit of this first form has this and two advances value 0, and the numerical value of minimum effective N1 bit of this first form equals n1.
8. the method that is used to handle the sub-image data of image according to claim 1 is characterized in that comprising in addition:
After having judged the highest above-mentioned effective two positions, when these the highest effective two bits are that two then another uses second reduced rule two when advancing value 1 after advancing value 1; And
Calculating has this two number that advances the continuous bit of value 1 after this highest significant position unit.
9. the method that is used to handle the sub-image data of image according to claim 8 is characterized in that comprising in addition:
Be recorded in the N2 position and have this two number n2 that advances the continuous bit of value 1 after this highest significant position unit, wherein N2 is for satisfying n2≤2 N2-1 smallest positive integral.
10. the method that is used to handle the sub-image data of image according to claim 9 is characterized in that comprising in addition:
In the N2+2 position, this paragraph with this binary system bit of second format record figure, wherein the highest significant position unit of this second form has this and two advances value 1, and the second high effectively bit of this second form has this and two advances value 1, and the numerical value of minimum effective N2 bit of this second form equals n2.
11. the method that is used to handle the sub-image data of image according to claim 1 is characterized in that comprising in addition:
After having judged the highest above-mentioned effective two positions, when these the highest effective two bits be two advance value 0 after then two when advancing value 1, use the 3rd reduced rule; And
Calculating has this two number that advances the continuous bit of value 1 after this highest significant position unit.
12. the method that is used to handle the sub-image data of image according to claim 11 is characterized in that comprising in addition:
Be recorded in the N3 position and have this two number n3 that advances the continuous bit of value 1 after this highest significant position unit, wherein N3 is for satisfying n1≤2 N3-1 smallest positive integral.
13. the method that is used to handle the sub-image data of image according to claim 12 is characterized in that comprising in addition:
In the N3+2 position, this paragraph with this binary system bit of the 3rd format record figure, wherein the highest significant position unit of the 3rd form has this two second high effectively bit that advances value 0, the three form and has this and two advance value 1, and the numerical value of minimum effective N3 bit of the 3rd form equals n3.
14. the method that is used to handle the sub-image data of image according to claim 1 is characterized in that comprising in addition:
After having judged the highest above-mentioned effective two positions, when these the highest effective two bits are that two then another uses the 4th reduced rule two when advancing value 0 after advancing value 0; And
Calculating has this two number that advances the continuous bit of value 0 after this highest significant position unit.
15. the method that is used to handle the sub-image data of image according to claim 14 is characterized in that comprising in addition:
Be recorded in the N4 position and have this two number n4 that advances the continuous bit of value 0 after this highest significant position unit, wherein N4 is for satisfying n1≤2 N4-1 smallest positive integral.
16. the method that is used to handle the sub-image data of image according to claim 15 is characterized in that comprising in addition:
In the N4+2 position, paragraph with this binary system bit of the 4th format record figure, wherein the highest significant position unit of the 4th form has this two second high effectively bit that advances value 0, the four form and has this and two advance value 0, and the numerical value of minimum effective N4 bit of the 4th form equals n4.
17. the method that is used to handle the sub-image data of image according to claim 1 is characterized in that comprising in addition:
After having judged the highest above-mentioned effective two positions, when these the highest effective two bits are that two then another uses the 3rd reduced rule two when advancing value 0 after advancing value 0; And
Calculating has this two number that advances continuous bit row of value 0 after this highest significant position unit.
18. the method that is used to handle the sub-image data of image according to claim 17 is characterized in that comprising in addition:
Have the number n3 that this two continuous bit that advances value 0 is listed as be recorded in this highest significant position unit in the N3 bit after, wherein N3 is for satisfying n3≤2 N3-1 smallest positive integral.
19. the method that is used to handle the sub-image data of image according to claim 18 is characterized in that comprising in addition:
In the N3+2 position, this paragraph with this binary system bit of the 3rd format record figure, wherein the highest significant position unit of the 3rd form has this two second high effectively bit that advances value 0, the three form and has this and two advance value 1, and the numerical value of minimum effective N3 bit of the 3rd form equals n3.
20. the method that is used to handle the sub-image data of image according to claim 1 is characterized in that comprising in addition:
After having judged the highest above-mentioned effective two positions, when these the highest effective two bits are that two then another uses the 3rd reduced rule two when advancing value 0 after advancing value 0; And
Calculating is connected on this two number that advances the continuous bit of value 0 that has after this highest significant position unit in the row of this binary system bit figure.
21. the method that is used to handle the sub-image data of image according to claim 20 is characterized in that comprising in addition:
Be recorded in the N4 position in the row of this binary system bit figure, be connected on this two number n4 that advances the continuous bit of value 0 that has after this highest significant position unit, wherein N4 is for satisfying n4≤2 N4-1 smallest positive integral.
22. the method that is used to handle the sub-image data of image according to claim 21 is characterized in that comprising in addition:
In the N4+2 position, this paragraph with this binary system bit of the 4th format record figure, wherein the highest significant position unit of this first form has this and two advances value 0, and the second high effectively bit of this first form has this and two advances value 0, and the numerical value of minimum effective N4 bit of this first form equals n4.
23. a method that is used to handle the sub-image data of image is characterized in that comprising:
The object of this subimage is provided;
Form the binary system bit figure of this object;
Judgement in this binary system bit figure one section continuously the highest effective two bits in the paragraph of position with the decision reduced rule,
If wherein this highest significant position unit has two and advances value 1, and be connected on the second high effectively bit after this highest significant position unit and have two and advance value 0, promptly compress this paragraph with first form,
And be recorded in this two number n1 that advances the continuous bit of value 0 that has after this highest significant position unit in the N1 position, and N1 is for satisfying n1≤2 N1-1 smallest positive integral, and
Advance value 1 if this highest significant position unit has two, and be connected on the high effectively bit of second after this highest significant position unit and have this and two advance value 1, promptly compress this paragraph with second form,
And be recorded in this two number n2 that advances the continuous bit of value 1 that has after this highest significant position unit in the N2 bit, and N2 is for satisfying n2≤2 N2-1 smallest positive integral.
24. the method that is used to handle the sub-image data of image according to claim 23 is characterized in that comprising in addition:
Decision has the two bit numbers that advance value 1 whether greater than having the two bit numbers that advance value 0 in this binary system bit figure; And
Change this binary system bit figure, so that have this two bit number that advances value 1 less than having this two bit number that advances value 0.
25. the method that is used to handle the sub-image data of image according to claim 24 is characterized in that comprising in addition:
Carry out XOR between the m row of this binary system bit figure and m+1 row, wherein m is a natural number; And
The result of this XOR is write the m+1 row of another binary system bit figure.
26. the method that is used to handle the sub-image data of image according to claim 23 is characterized in that comprising in addition:
In the field of record form, specify whether this binary system bit figure is carried out conversion.
27. the method that is used to handle the sub-image data of image according to claim 23 is characterized in that comprising in addition:
Advance value 0 if this highest significant position unit has two, and be connected on the high effectively bit of second after this highest significant position unit and have two and advance value 1, promptly compress this paragraph with the 3rd form; And
Be recorded in this two number n3 that advances the continuous bit of value 1 that has after this highest significant position unit in the N3 position, wherein N3 is for satisfying n3≤2 N3-1 smallest positive integral.
28. the method that is used to handle the sub-image data of image according to claim 23 is characterized in that comprising in addition:
Advance value 0 if this highest significant position unit has two, and be connected on the high effectively bit of second after this highest significant position unit and have this and two advance value 0, promptly compress this paragraph with the 4th form; And
Be recorded in this two number n4 that advances the continuous bit of value 0 that has after this highest significant position unit in the N4 position, wherein N4 is for satisfying n4≤2 N4-1 smallest positive integral.
29. the method that is used to handle the sub-image data of image according to claim 23 is characterized in that comprising in addition:
Advance value 0 if this highest significant position unit has two, and be connected on continuous bit row after this highest significant position unit and have this and two advance value 0, promptly compress this paragraph with the 3rd form; And
Be recorded in the number n3 that this two continuous bit that advances value 0 is listed as that has after this highest significant position unit in the N3 position, wherein N3 is for satisfying n3≤2 N3-1 smallest positive integral.
30. the method that is used to handle the sub-image data of image according to claim 23 is characterized in that comprising in addition:
Advance value 0 if this highest significant position unit has two, and the continuous bit that is connected on this binary system bit figure row after this highest significant position unit has this and two advance value 0, promptly compress this paragraph with the 4th form; And
Be recorded in the N4 position and have this two number n4 that advances the continuous bit of value 0 in the row of the binary element figure after this highest significant position unit, wherein N4 is for satisfying n4≤2 N4-1 smallest positive integral.
31. the data compression of a method can carry out to(for) the subimage of image is characterized in that comprising:
The object of this subimage is provided;
Form the binary system bit figure of this object;
Determine the highest effective two bits of this paragraph, can compress the reduced rule of one section continuous bit among this binary system bit figure with decision;
Compress the continuous bit of this section to form compressed paragraph according to this reduced rule; And
With the parameter of data format record corresponding to this reduced rule, wherein this parameter determines the length of this compressed paragraph.
32. method of carrying out data compression for the subimage of image according to claim 31 is characterized in that comprising in addition:
With one first parameter N 1 of this data format record corresponding to first reduced rule, wherein 1 decision of this first parameter N is recorded in this paragraph, be connected on have two these highest significant position units of advancing value 1 afterwards have two needed bit numbers of number n1 that advance the continuous bit of value 0.
33. method of carrying out data compression for the subimage of image according to claim 31 is characterized in that comprising in addition:
With second parameter N 2 of this data format record corresponding to second reduced rule, wherein 2 decisions of this second parameter N are recorded in this paragraph, be connected on have two these highest significant position units of advancing value 1 afterwards have this two needed bit number of number n2 that advances the continuous bit of value 1.
34. method of carrying out data compression for the subimage of image according to claim 31 is characterized in that comprising in addition:
With three parameter N 3 of this data format record corresponding to the 3rd reduced rule, wherein the decision of the 3rd parameter N 3 is recorded in this paragraph, be connected on have two these highest significant position units of advancing value 0 afterwards have two needed bit numbers of number n3 that advance the continuous bit of value 1.
35. method of carrying out data compression for the subimage of image according to claim 31 is characterized in that comprising in addition:
With four parameter N 4 of this data format record corresponding to the 4th reduced rule, wherein the decision of the 4th parameter N 4 is recorded in this paragraph, have two these highest significant position units of advancing value 0 afterwards have this two needed bit number of number n4 that advances the continuous bit of value 0.
36. method of carrying out data compression for the subimage of image according to claim 31 is characterized in that comprising in addition:
With one three parameter N 3 of this data format record corresponding to the 3rd reduced rule, wherein the decision of the 3rd parameter N 3 is recorded in this paragraph, has the two needed bit numbers of number n3 that this two continuous bit that advances value 0 is listed as that have that advance after this highest significant position unit of value 0.
37. method of carrying out data compression for the subimage of image according to claim 31 is characterized in that comprising in addition:
With four parameter N 4 of this data format record corresponding to the 4th reduced rule, wherein the decision of the 4th parameter N 4 is recorded in the row of this paragraph, have two these highest significant position units of advancing value 0 afterwards have this two needed bit number of number n4 that advances the continuous bit of value 0.
CN 200610140264 2005-10-20 2006-10-20 Image compressing method Expired - Fee Related CN100574435C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200610140264 CN100574435C (en) 2005-10-20 2006-10-20 Image compressing method

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN200510114341.2 2005-10-20
CN200510114341 2005-10-20
CN 200610140264 CN100574435C (en) 2005-10-20 2006-10-20 Image compressing method

Publications (2)

Publication Number Publication Date
CN1976459A CN1976459A (en) 2007-06-06
CN100574435C true CN100574435C (en) 2009-12-23

Family

ID=38126200

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200610140264 Expired - Fee Related CN100574435C (en) 2005-10-20 2006-10-20 Image compressing method

Country Status (1)

Country Link
CN (1) CN100574435C (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106815875B (en) * 2016-12-06 2020-02-07 腾讯科技(深圳)有限公司 Method and device for encoding and decoding information bitmap

Also Published As

Publication number Publication date
CN1976459A (en) 2007-06-06

Similar Documents

Publication Publication Date Title
US8019166B2 (en) Image data compression method and apparatuses, image display method and apparatuses
US5748904A (en) Method and system for segment encoded graphic data compression
EP1361544B1 (en) System and method for editing electronic images
US7447997B2 (en) Reducing information transfer in screen capture series
US5694228A (en) Document image processor with defect detection
CN101192212B (en) System and method for implementing font with frame on terminal
JPH07502632A (en) Circuit for Huffman code decoding
JPH04298162A (en) Method for compressing neighboring-block estimating bit
US5528003A (en) Data compression for pen stroke input
CN102224727A (en) Image processing apparatus, image processing method and program
KR19980081853A (en) How to compress and restore graphic images
CN100574435C (en) Image compressing method
KR100823498B1 (en) Method and recording format for image compression
JPH07322074A (en) Equipment and method for data processing to process 2 level image file that a dither ring happened
CN112118449B (en) Method and device for compressing and decompressing image
US7259891B2 (en) Image compression method, decompression method thereof and program therefor
US8488894B2 (en) Method and system for dot-matrix font data compression and decompression
US20020081038A1 (en) Graphic image coding
CN101266775B (en) Compression storage method and decompression method for lattice word library
JPH07181945A (en) Compressing method for character dot data
CN112015932A (en) Image storage method, medium and device based on neural network
US20090213142A1 (en) Coding system and method for a bit-plane
CN101489018A (en) Static image compression method and computer readable storage apparatus
US7468733B2 (en) Method and system for improving color reduction
EP0834832B1 (en) Arithmetic image coding

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20091223

Termination date: 20151020

EXPY Termination of patent right or utility model