CN106713921B - The compression method and device and method for compressing image and device of character block - Google Patents

The compression method and device and method for compressing image and device of character block Download PDF

Info

Publication number
CN106713921B
CN106713921B CN201611075651.2A CN201611075651A CN106713921B CN 106713921 B CN106713921 B CN 106713921B CN 201611075651 A CN201611075651 A CN 201611075651A CN 106713921 B CN106713921 B CN 106713921B
Authority
CN
China
Prior art keywords
component
character block
fundametal
value
global
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.)
Active
Application number
CN201611075651.2A
Other languages
Chinese (zh)
Other versions
CN106713921A (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.)
Xian Wanxiang Electronics Technology Co Ltd
Original Assignee
Xian Wanxiang Electronics 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 Xian Wanxiang Electronics Technology Co Ltd filed Critical Xian Wanxiang Electronics Technology Co Ltd
Priority to CN201611075651.2A priority Critical patent/CN106713921B/en
Publication of CN106713921A publication Critical patent/CN106713921A/en
Application granted granted Critical
Publication of CN106713921B publication Critical patent/CN106713921B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock

Abstract

The invention discloses a kind of compression methods of character block and device and method for compressing image and device.Wherein, this method comprises: obtaining the character block in image;The first component is extracted from the first component, second component and third component of each character block and second component merges, and obtains the 4th component;Third component and the 4th component are encoded respectively, the compressed bit stream of output character block.The present invention solves and carries out independent process using three components when encoding in the prior art to character block, leads to the technical issues of more auxiliary information occur.

Description

The compression method and device and method for compressing image and device of character block
Technical field
The present invention relates to field of image processings, compression method and device and figure in particular to a kind of character block As compression method and device.
Background technique
Screen video image is the video image of a kind of relatively Special complex, its each frame image is all combination picture, Both comprising common pictorial information or include text information, therefore block-based compression method is also the compression side of better performances Method.Human eye is different the resolution capability of common pictorial information and text information, and the loss of pictorial information often can be with Receive, but the loss of text information but can not usually receive, so character block usually uses lossless compression or close lossless Compress technique, thus efficient character block it is lossless/near lossless compression technology is key technology in screen video image compression.Phase Compared in text compress technique before, it has been found that establish principal component using the principal component frequency of character block, this will lead to The frequency of domain color is significantly less than the frequency of each component principal component in same piece, thus greatly reduces at domain color algorithm The performance for managing character block, if independently handled three components, although the frequency of the principal component of each component is higher, Three components require to encode respective information table, more auxiliary information occur.
It uses three components to carry out independent process for when encoding in the prior art to character block, causes to occur more The problem of auxiliary information, currently no effective solution has been proposed.
Summary of the invention
The embodiment of the invention provides a kind of compression method of character block and device and method for compressing image and device, with Independent process is carried out using three components when at least solving in the prior art to encode character block, leads to more auxiliary occur The technical issues of information.
According to an aspect of an embodiment of the present invention, a kind of compression method of character block is provided, comprising: obtain in image Character block;Extracted from the first component, second component and third component of each character block the first component and second component into Row merges, and obtains the 4th component;Third component and the 4th component are encoded respectively, the compressed bit stream of output character block.
According to an aspect of an embodiment of the present invention, a kind of method for compressing image, including any one of the above text are provided The compression method of block, wherein after encoding respectively to third component and the 4th component, method for compressing image includes: The picture block in image is obtained, and by being encoded to obtain the compressed bit stream of picture block to picture block;By the compression of character block Code stream and the compressed bit stream of picture block are transmitted to decoding end, wherein the compressed bit stream of character block includes compiling to third component The compressed bit stream of code and the compressed bit stream that the 4th component is encoded.
According to another aspect of an embodiment of the present invention, a kind of compression set of character block is additionally provided, comprising: first obtains Module, for obtaining the character block in image;Merging module, for from the first component of each character block, second component and The first component is extracted in three-component and second component merges, and obtains the 4th component;Coding module, for respectively to third point Amount and the 4th component are encoded, the compressed bit stream of output character block.
According to another aspect of an embodiment of the present invention, a kind of image compressing device, including any one of the above are additionally provided The compression set of character block, wherein image compressing device further include: second obtains module, for obtaining the picture block in image, And by being encoded to obtain the compressed bit stream of picture block to picture block;Transmission module, for by the compressed bit stream of character block and The compressed bit stream of picture block is transmitted to decoding end, wherein the compressed bit stream of character block includes the pressure encoded to third component Contracting code stream and the compressed bit stream that the 4th component is encoded.
In embodiments of the present invention, obtain image in character block, from the first component of each character block, second component and The first component is extracted in third component and second component merges, obtains the 4th component, respectively to third component and the 4th point Amount is encoded.Above scheme be directed to before character block compress technique in, auxiliary information is more and principal component acquisition frequency compared with Two of them component in YUV three-component is merged into a new component, using new component and not by few disadvantage and limitation Combined component carries out the compression of character block, suitable for the occasion of all screen video images compression, supports without special installation, It solves and carries out independent process using three components when encoding in the prior art to character block, lead to more auxiliary letter occur The technical issues of breath, has reached the quantity for reducing auxiliary information in compression process on the basis of guaranteeing principal component acquisition frequency Effect.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes part of this application, this hair Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is a kind of flow chart of the compression method of character block according to an embodiment of the present invention;
Fig. 2 is a kind of flow chart of method for compressing image according to an embodiment of the present invention;
Fig. 3 is a kind of flow chart of optional method for compressing image according to an embodiment of the present invention;
Fig. 4 is a kind of schematic diagram of the compression set of character block according to an embodiment of the present invention;
Fig. 5 is a kind of schematic diagram of image compressing device according to an embodiment of the present invention;And
Fig. 6 is a kind of schematic diagram of optional image Compression equipment according to an embodiment of the present invention.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people The model that the present invention protects all should belong in member's every other embodiment obtained without making creative work It encloses.
It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, " Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way Data be interchangeable under appropriate circumstances, so as to the embodiment of the present invention described herein can in addition to illustrating herein or Sequence other than those of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that cover Cover it is non-exclusive include, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited to Step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, product Or other step or units that equipment is intrinsic.
Embodiment 1
According to embodiments of the present invention, a kind of embodiment of the method for the compression of character block is provided, it should be noted that attached The step of process of figure illustrates can execute in a computer system such as a set of computer executable instructions, though also, So logical order is shown in flow charts, but in some cases, it can be to be different from shown by sequence execution herein Or the step of description.
Fig. 1 is a kind of flow chart of the compression method of character block according to an embodiment of the present invention, as shown in Figure 1, this method Include the following steps:
Step S102 obtains the character block in image.
It is being obtained so that the size of image is W × H as an example specifically, above-mentioned image can be the frame image in screen video After taking the image in screen video, it can be classified as m × n block, each piece of size is respectively (W/m) × (H/n), to from screen After the image block obtained in curtain video, character block therein is extracted.
Step S104 extracts the first component and from the first component, second component and third component of each character block Two components merge, and obtain the 4th component.
Specifically, three components: U component, V component and Y-component are generally included in image procossing, it can be by three components In any two component merge to obtain the 4th component.
Step S106 respectively encodes third component and the 4th component, the compressed bit stream of output character block.
Herein it should be noted that if three components are merged into a color value, using the color value after merging come Image is handled, then since the characteristic of each component is different, the frequency that will lead to the domain color of synthesis is lower, greatly reduces text The compression performance of block.Therefore, compared to for three components are respectively processed, processing information that above scheme generates compared with It is few, it is merged into for a color value handled compared to by three components, can be improved the compression performance of character block.
From the foregoing, it will be observed that the above embodiments of the present application obtain the character block in image, from the first component of each character block, the The first component is extracted in two components and third component and second component merges, obtains the 4th component, respectively to third component It is encoded with the 4th component.Above scheme be directed to before character block compress technique in, auxiliary information is more and principal component accounts for With frequency less disadvantage and limitation, the two of them component in YUV three-component is merged into a new component, using new Component and the component not merged carry out the compression of character block, suitable for the occasion of all screen video images compression, without special Equipment supports solve and carry out independent process using three components when encoding in the prior art to character block, cause to occur The technical issues of more auxiliary information, reaches to reduce in compression process on the basis of guaranteeing principal component acquisition frequency and assisted The effect of the quantity of information.
Optionally, according to the above embodiments of the present application, step S106 encodes third component, comprising:
Step S1061 obtains in three-component global fundametal component table and each character block the three-component basic point Scale.
In above-mentioned steps, it is three-component that the three-component global fundametal component table can be used for recording in whole image the The three-component fundametal component table of principal component and its index value, each character block can be used for recording the third of each character block The principal component and its index value of component.Since each character block is obtained by image block, it is therefore contemplated that is three-component Three-component principal component in each character block in global fundametal component table comprising the image.
Step S1063, according to the three-component basic point in three-component global fundametal component table and each character block Scale obtains three-component marked index table and relative index table, wherein marked index table passes through third in each character block Index value in the fundametal component table of component indicates that character block, relative index table pass through neighborhood index value in marked index table Relationship obtains.
It, can in obtaining three-component global fundametal component table and each character block after three-component basic colors table With according to searching the principal component of each character block in global fundametal component table, so that it is three-component to obtain in each character block the Marked index table, and third component correlation rope is obtained according to the relationship in three-component marked index table between neighborhood index value Draw table.
Step S1065, according to three-component marked index table and relative index table to the third in each character block point Amount is encoded.
Since three-component marked index table passes through the index in three-component fundametal component table in each character block Value indicates third component in character block, and three-component relative index table passes through neighborhood rope in three-component marked index table The relationship for drawing value obtains, therefore according to three-component marked index table and three-component relative index table to the of character block Three-component is encoded relative to directly for third component encodes, and has higher code efficiency.
Optionally, according to the above embodiments of the present application, step S1061, obtain three-component global fundametal component table and Three-component fundametal component table in each character block, comprising:
Step A1: the number occurred by the three-component component value in statistics current character block determines that the three-component Principal component, wherein principal component is greater than preset value in the ratio of all component values.
It should be noted that above-mentioned steps are not specifically limited the number of principal component, master can be determined with preset value The number of component.
It in an alternative embodiment, is 95% with preset value as an example, if in current character block, occurrence out The most component value of number accounts for the 95% of all component values, then the component value can be selected as principal component, at this point, current character block Include a principal component.
It is still 95% with preset value as an example, if in current character block, out in an alternative embodiment Now most component values accounts for the 70% of all component values, fails to reach preset value, then selection frequency of occurrence in addition to the component value Most component values, it is above-mentioned if the most component value of frequency of occurrence accounts for the 26% of all component values in addition to the component value The ratio that two component values account for all component values is greater than preset value, can be using above-mentioned two component value as the master of current character block Component, at this point, current character block includes two principal components.
Step B1: three-component initial global fundametal component table is obtained.
Specifically, above-mentioned initial global fundametal component table can be sky.
Step C1: the principal component in the first character block is added to three-component initial global fundametal component table, is constituted Global fundametal component table among three-component firstth, wherein three-component initial global fundametal component table is sky.
Step D1: will be global basic among three-component principal component in the second character block and the described three-component firstth Subscale compares, if the three-component principal component of second character block is present among the described three-component firstth entirely In office's fundametal component table, then retains the principal component, otherwise, the principal component of three-component second character block is added to Among described three-component firstth in global fundametal component table, global fundametal component table among the three-component secondth is constituted, And index value is arranged to the principal component being added among the described three-component firstth in global fundametal component table.
Step E1: recycling the step D1, completes until the third component of all texts compares, and finally obtains described Intermediate overall situation fundametal component table is as the three-component global fundametal component table.
In an alternative embodiment, to include the simple frame image of 3 character blocks as an example, three character blocks In three-component principal component be respectively (A1, B1, C1), (A1, B2, C1, D2, E2), (A3, B2, C1, E2), the three-component Global fundametal component table is sky, is compared first using first character block and empty three-component global fundametal component table Right, three-component global fundametal component table does not include the principal component of first character block certainly, therefore will be in first character block Principal component be added to the three-component global fundametal component table, and its index value is set, at this point, the three-component global basic It include (A1, B1, C1) and its index value in subscale;Then second character block and the current three-component overall situation is basic Subscale is compared, due to the A1 in second character block, C1 occur in first character block, therefore by second text When block is compared with three-component global fundametal component table, only B2, D2 and E2 do not occur, therefore in third point B2, D2 and E2 is added in the global fundametal component table of amount, and B2 is set, the index value of D2 and E2, at this point, is three-component It include principal component (A1, B1, C1, B2, D2, E2) and its index value in global fundametal component table;Then by third character block with Current three-component global fundametal component table is compared, compared with current global fundametal component table, third text The difference of block be include principal component A3, therefore finally obtained three-component global fundametal component table include (A1, B1, C1, B2, D2, E2, A3) and its index value.
Step F1: institute is indicated using the corresponding index value of principal component described in the three-component global fundametal component table The principal component in each character block in three-component fundametal component table is stated, third component in each character block is obtained Fundametal component table.
In an alternative embodiment, the still above embodiment is described for scene, the step for process it is practical On be that each text is indicated using the corresponding index value of principal component in global fundametal component table after obtaining global fundametal component table The principal component of block.
It should be noted that the quantity for the character block that every frame image includes is indefinite, but usually all more, above-mentioned includes three The image of character block is given for example only.
From the foregoing, it will be observed that step A1 to step F1 is obtained entirely by the way that the principal component of character block each in image to be overlapped Office's fundametal component table, that is to say, that include owning in the frame image in the three-component global fundametal component table of a frame image Three-component principal component and its index value of character block.
Optionally, according to the above embodiments of the present application, step S1063, according to three-component global fundametal component table and Three-component fundametal component table obtains three-component marked index table and relative index table in each character block, comprising:
Step S10631 determines three-component component value pair in each character block according to three-component fundametal component table The mark answered.
Step S10633 is identified so that each three-component component value is corresponding as each three-component component value Index value constitutes marked index table.
Due to before the step of obtained three-component fundametal component table in each character block, can be in above-mentioned step The third component of each character block is indicated in rapid using three-component basic colors table in each character block.
It in an alternative embodiment, can be respectively above-mentioned master by taking the principal component of the character block is a, b, c, d as an example The corresponding mark 0 of component distribution, 1,2,3, therefore in the character block, if the component value of pixel is a, label be, if The component value of pixel is b, then is labeled as 1, if the component value of pixel is c, is labeled as 2, if the component value of pixel is d, Then be labeled as 3, if it is desired to the non-principal component of color, then be labeled as 4, to obtain the corresponding three-component label rope of character block Draw table.
It should be noted that being the ident value and different of each principal component and the setting of non-principal component in above-mentioned marked index table It is fixed identical as example, it is any different value that can be distinguished.
Step S10635 determines in each character block the corresponding index value of the three-component component value and neighborhood index value Incidence relation.
Specifically, above-mentioned incidence relation is for indicating in each character block the corresponding index of the three-component each component value It is worth whether identical as neighborhood index value.
In an alternative embodiment, each picture for from top to bottom encode to character block, in character block Element only needs to be compared with the pixel of the pixel in left side and upside, therefore can only determine pixel and left side, upside pixel Incidence relation, if coding sequence be have that pixel is needed to be compared with the pixel on right side from right to left, if coding Sequence is that have from the bottom to top, then pixel is needed to be compared with the pixel of downside.
Whether step S10637 indexes with neighborhood according to the corresponding index value of the in each character block the three-component component value It is worth identical, determines the corresponding relation identity of each the three-component component value, and corresponding according to each three-component component value Relation identity constitute relative index table.
In an alternative embodiment, the three-component index value of each character block can be scanned, if pixel with The index value of the pixel on the left side is identical, then is calculated as L, similar to the index value of top, is calculated as U, is otherwise calculated as O, so as to The three-component relative index table into character block.
Optionally, according to the above embodiments of the present application, step S1065, according to three-component marked index table and correlation Concordance list encodes the third component in each character block, comprising:
Step S10651, the of the pixel of the three-component non-principal component of component value is three-component in recording mark concordance list Original value, and based on marked index table to each component value using the coding mode based on bit plane from highest bit plane to minimum Bit plane successively transmits, and generates three-component first compressed bit stream in the compressed bit stream of character block.
It is encoded from the foregoing, it will be observed that the application above-mentioned steps use record original component value for the pixel of non-principal component Mode, prevent due to only with principal component coding cause coding result to damage, after the decoding due to principal component non-in image The loss of component value leads to visual effect and original image different problems.
Step S10653 carries out monodrome huffman coding according to relative index table, and to each pixel in horizontal direction, Or the pixel in level is grouped with predetermined number, and multivalue huffman coding is carried out to every group of pixel after grouping, it obtains Into the compressed bit stream of three-component second character block.
It should be noted that since above-mentioned steps can carry out multivalue Hough to the third component of every group of pixel after grouping Graceful (Huffman) coding, therefore can use the relationship of the component value for the neighborhood territory pixel that relative index table is recorded, for example, with Six pixels are as one group in horizontal direction, if the color value phase of the mark recorded in relative index table and the pixel in left side Together, then code efficiency is greatly improved with regard to not having to successively encode the third component of each pixel.
Optionally, while being encoded to the 4th component or later, it is also necessary to be closed to the first component and second component And the 4th obtained component is encoded, according to the above embodiments of the present application, step S106 encodes the 4th component, packet It includes:
Step S1067 obtains basic point of the 4th component in the global fundametal component table and each character block of the 4th component Scale.
In above-mentioned steps, the global fundametal component table of the 4th component can be used for recording the 4th component in whole image The fundametal component table of principal component and its index value, the 4th component of each character block can be used for recording the 4th of each character block The principal component and its index value of component.Since each character block is obtained by image block, it is therefore contemplated that the 4th component The principal component of 4th component in each character block in global fundametal component table comprising the image.
Step S1069, according to basic point of the 4th component in the global fundametal component table of the 4th component and each character block Scale obtains the marked index table and relative index table of the 4th component, wherein marked index table passes through the in each character block the 4th Index value in the fundametal component table of component indicates that character block, relative index table pass through neighborhood index value in marked index table Relationship obtains.
It, can in the global fundametal component table and each character block for obtaining the 4th component after the basic colors table of the 4th component The principal component of each character block is searched in global fundametal component table with basis, to obtain the 4th component in each character block Marked index table, and the 4th component correlation rope is obtained according to the relationship in the marked index table of the 4th component between neighborhood index value Draw table.
Step S10611a, according to the marked index table of the 4th component and relative index table to the 4th in each character block Component is encoded.
The index in fundametal component table for passing through the 4th component in each character block due to the marked index table of the 4th component Value indicates the 4th component in character block, neighborhood rope in the marked index table that the relative index table of the 4th component passes through the 4th component The relationship for drawing value obtains, therefore according to the relative index table of the marked index table of the 4th component and the 4th component to the of character block Four components are encoded relative to directly for the 4th component encodes, and have higher code efficiency.
Optionally, according to the above embodiments of the present application, step S1067, obtain the 4th component global fundametal component table and The fundametal component table of 4th component in each character block, comprising:
Step A2: the number occurred by the component value of the 4th component in statistics current character block determines the 4th component Principal component, wherein principal component is greater than preset value in the ratio of all component values.
It should be noted that above-mentioned steps are not specifically limited the number of principal component, master can be determined with preset value The number of component.
It in an alternative embodiment, is 95% with preset value as an example, if in current character block, occurrence out The most component value of number accounts for the 95% of all component values, then the component value can be selected as principal component, at this point, current character block Include a principal component.
It is still 95% with preset value as an example, if in current character block, out in an alternative embodiment Now most component values accounts for the 70% of all component values, fails to reach preset value, then selection frequency of occurrence in addition to the component value Most component values, it is above-mentioned if the most component value of frequency of occurrence accounts for the 26% of all component values in addition to the component value The ratio that two component values account for all component values is greater than preset value, can be using above-mentioned two component value as the master of current character block Component, at this point, current character block includes two principal components.
Step B2: the initial global fundametal component table of the 4th component is obtained.
Specifically, above-mentioned initial global fundametal component table can be sky.
Step C2: the principal component in the first character block is added to the initial global fundametal component table of the 4th component, is constituted Global fundametal component table among the first of 4th component, wherein the initial global fundametal component table of the 4th component is sky.
Step D2: by the global fundametal component in the first centre of the principal component of the 4th component in the second character block and the 4th component Table compares, if the principal component of the 4th component of the second character block is present in global fundametal component table among the first of the 4th component In, then retain principal component, otherwise, the principal component of the second character block of the 4th component is added to complete among the first of the 4th component In office's fundametal component table, global fundametal component table among the second of the 4th component is constituted, and to being added to the first of the 4th component Index value is arranged in principal component in intermediate overall situation fundametal component table.
Step E2: circulation step D2, it is completed until the 4th component of all texts compares, it is intermediate global by what is finally obtained Global fundametal component table of the fundametal component table as the 4th component.
In an alternative embodiment, to include the simple frame image of 3 character blocks as an example, three character blocks In the 4th component principal component be respectively (A1, B1, C1), (A1, B2, C1, D2, E2), (A3, B2, C1, E2), the 4th component Global fundametal component table is sky, is compared first using the global fundametal component table of first character block and the 4th empty component Right, the global fundametal component table of the 4th component does not include the principal component of first character block certainly, therefore will be in first character block Principal component be added to the global fundametal component table of the 4th component, and its index value is set, at this point, the overall situation of the 4th component is basic It include (A1, B1, C1) and its index value in subscale;Then the overall situation of second character block and the 4th current component is basic Subscale is compared, due to the A1 in second character block, C1 occur in first character block, therefore by second text When block is compared with the global fundametal component table of the 4th component, only B2, D2 and E2 do not occur, therefore at the 4th point B2 and C2 is added in the global fundametal component table of amount, and the index value of B2 and C2 are set, at this point, the global base of the 4th component It include principal component (A1, B1, C1, B2, D2, E2) and its index value in this subscale;Then by third character block and currently The global fundametal component table of 4th component is compared, compared with current global fundametal component table, the area of third character block Not being includes principal component A3, thus the global fundametal component table of finally obtained 4th component include (A1, B1, C1, B2, D2, E2, B3) and its index value.
Step F2: each character block is indicated using the corresponding index value of principal component in the global fundametal component table of the 4th component In the 4th component fundametal component table in principal component, obtain the fundametal component table of the 4th component in each character block.
In an alternative embodiment, the still above embodiment is described for scene, the step for process it is practical On be that each text is indicated using the corresponding index value of principal component in global fundametal component table after obtaining global fundametal component table The principal component of block.
It should be noted that the quantity for the character block that every frame image includes is indefinite, but usually all more, above-mentioned includes three The image of character block is given for example only.
From the foregoing, it will be observed that above-mentioned steps obtain the overall situation by the way that the principal component of character block each in image to be overlapped substantially Subscale, that is to say, that include all character blocks in the frame image in the global fundametal component table of the 4th component of a frame image The 4th component principal component and its index value.
Optionally, according to the above embodiments of the present application, step S1069, according to the global fundametal component table of the 4th component and The fundametal component table of the 4th component obtains the marked index table and relative index table of the 4th component in each character block, comprising:
Step S10691 determines that the component value of the 4th component in each character block is corresponding according to the fundametal component of the 4th component Mark.
Step S10693, using the corresponding mark of the component value of each 4th component as the component value of each 4th component Index value constitutes marked index table.
Due to before the step of obtained the fundametal component table of the 4th component in each character block, can be in above-mentioned step The 4th component of each character block is indicated in rapid using the basic colors table of the 4th component in each character block.
It in an alternative embodiment, can be respectively above-mentioned master by taking the principal component of the character block is a, b, c, d as an example The corresponding mark 0 of component distribution, 1,2,3, therefore in the character block, if the component value of pixel is a, label be, if The component value of pixel is b, then is labeled as 1, if the component value of pixel is c, is labeled as 2, if the component value of pixel is d, Then be labeled as 3, if it is desired to the non-principal component of color, then be labeled as 4, to obtain the label rope of corresponding 4th component of character block Draw table.
It should be noted that being the ident value and different of each principal component and the setting of non-principal component in above-mentioned marked index table It is fixed identical as example, it is any different value that can be distinguished.
Step S10695 determines the corresponding index value of component value and neighborhood index value of the 4th component in each character block Incidence relation.
Step S10697, according to the corresponding index value of component value of the 4th component in each character block whether with neighborhood index It is worth identical, determines the corresponding relation identity of component value of each 4th component, and corresponding according to the component value of each 4th component Relation identity constitute relative index table.
Specifically, above-mentioned incidence relation is used to indicate the corresponding index of each component value of the 4th component in each character block It is worth whether identical as neighborhood index value.
In an alternative embodiment, each picture for from top to bottom encode to character block, in character block Element only needs to be compared with the pixel of the pixel in left side and upside, therefore can only determine pixel and left side, upside pixel Incidence relation, if coding sequence be have that pixel is needed to be compared with the pixel on right side from right to left, if coding Sequence is that have from the bottom to top, then pixel is needed to be compared with the pixel of downside.
Optionally, according to the above embodiments of the present application, step S10611a, according to the marked index table and phase of the 4th component Concordance list is closed to encode the 4th component in each character block, comprising:
Step S10611b, the 4th component of the pixel of the non-principal component of component value of the 4th component in recording mark concordance list Original value, and based on marked index table to each component value using the coding mode based on bit plane from highest bit plane to most Low level plane is successively transmitted, and the first compressed bit stream of the 4th component in the compressed bit stream of character block is generated.
It is encoded from the foregoing, it will be observed that the application above-mentioned steps use record original component value for the pixel of non-principal component Mode, prevent due to only with principal component coding cause coding result to damage, after the decoding due to principal component non-in image The loss of component value leads to visual effect and original image different problems.
Step S10611c carries out monodrome Huffman volume according to relative index table, and to each pixel in horizontal direction Code, or the pixel in level is grouped with predetermined number, and multivalue huffman coding is carried out to every group of pixel after grouping, Obtain the second compressed bit stream of the 4th component in the compressed bit stream of character block.
It should be noted that since above-mentioned steps can carry out multivalue Hough to the 4th component of every group of pixel after grouping Graceful (Huffman) coding, therefore can use the relationship of the component value for the neighborhood territory pixel that relative index table is recorded, for example, with Six pixels are as one group in horizontal direction, if the color value phase of the mark recorded in relative index table and the pixel in left side Together, then code efficiency is greatly improved with regard to not having to successively encode the 4th component of each pixel.
In an alternative embodiment, the first component is U component, and second component is V component, that is to say, that using U points Amount and V component are as combined component.
It should be noted that U component and V component are more similar components in three components, this is similar for indicating U points It measures similar with the amplitude information that V component is generated in cataloged procedure.By merging similar component, to solve in the prior art to text Independent process is carried out using three components when block is encoded, leads to the technical issues of more auxiliary information occur, to reach The purpose for the auxiliary information that coding generates is reduced, to reach the technical effect for improving code efficiency.
Embodiment 2
According to embodiments of the present invention, a kind of embodiment of the method for compression of images is provided, it should be noted that in attached drawing The step of process illustrates can execute in a computer system such as a set of computer executable instructions, although also, Logical order is shown in flow chart, but in some cases, it can be to be different from shown by sequence execution herein or retouch The step of stating.
Fig. 2 is a kind of flow chart of method for compressing image according to an embodiment of the present invention, as shown in Fig. 2, respectively to institute It states third component and after the 4th component encoded, this method comprises the following steps:
Step S108 obtains the picture block in image, and by being encoded to obtain the compressed code of picture block to picture block Stream.
The compressed bit stream of the compressed bit stream of character block and picture block is transmitted to decoding end by step S1010.
From the foregoing, it will be observed that the application above-mentioned steps take the picture block in image, and by being encoded to obtain figure to picture block The compressed bit stream of the compressed bit stream of character block and picture block is transmitted to decoding end by the compressed bit stream of tile, then is completed entire The compression process of image, especially screen video image.
Fig. 3 is a kind of flow chart of optional method for compressing image according to an embodiment of the present invention, below with reference to shown in Fig. 3 Example, a kind of optional method for compressing image is described:
S31 obtains current frame image, divides the image into m × n block.
Obtain screen video (in a frame W × H, and be divided into the block of m × n, block be divided into text using the characteristic of text Block and non-legible piece, having a size of (W/m) × (H/n).
S32 determines the type of block.If current block is character block, S33 is entered step, is otherwise entered step S314。
UV component is synthesized CH component by S33.
S34 counts the number that CH component occurs in current character block, and sorts by number.
S35, whether the ratio that preceding Si component value accounts for all component values is more than preset threshold T.
S36 adds 1 on the basis of Si.
In this example, the global basic CH subscale CHG of initialization is sky.For the i-th character block, count every in character block The number that a component value occurs finds out Si component recording and is the basic CH subscale CHMi of current block, and makes Si master point It is more than threshold value T (for example, T=90%) that amount, which occupies the important ratio of entire block,.Above-mentioned steps S34 to S36 realizes determination The purpose of the principal component of CH component.
S37 records principal component number Si, and generates the basic CH component of global basic CH subscale CHG and each character block Table CHMi.
The basic CH subscale CHMi of current block and global basic CH subscale CHG are compared, if the master in CHMi Component value indicates Si principle component values of current block using the index value in global basic CH subscale CHG in CHG;If Some principle component values in CHMi are added global basic CH points not in CHG, by this emerging principal component in current block In scale CHG, and corresponding index value is set for this new principal component, using this new principal component at global basic CH points Index value in scale indicates the principal component of current block.Global basic CH component can be obtained after all character block processing The table CHG and basic CH component index table CHMi each of indicated using global fundametal component table piece, global basic CH component The color number of table CHG is J, J≤S1+S2+…+SN, N is character block number summation.
S38, character block CH component coding.
In this example, according to the basic CH subscale CHMi of current i-th of character block, in character block CH component with It is compared, if the CH component value of character block is identical as basic CH subscale CHMi intermediate value, then it is assumed that pixel herein It for main component positions, is indicated using index value 0~(Si-1), if not identical, then it represents that pixel is non-principal component position herein Set, be indicated using Si, thus each character block can according to multiple principal components and the corresponding index value of non-master component recording, from And concordance list Ci is generated to mark character block.
It is whether identical as the index value of neighborhood territory pixel to determine it by the index value Ci for scanning each character block, if with left side picture The index value of element is identical, is calculated as L, is calculated as U if identical as surface pixel, is different from and is calculated as O, to be indexed Table Bi.
For concordance list Bi, the pixel of several in horizontal direction can be divided into one group, be encoded using Huffman.
For the true value of each component value of pixel record of the non-master component positions in concordance list Ci, component value is all used It is successively transmitted based on the coding mode of bit plane from highest bit plane to minimum bit plane, to obtain the pressure of character block CH component Contracting code stream.
S39 counts the number of Y-component in current character block, and sorts by number.
S310, whether the ratio that preceding Si principal component accounts for all component values is more than preset threshold T.
S311 adds 1 on the basis of Si.
In this example, the global basic Y-component table YG of initialization is sky.For the i-th character block, count each in character block The number that component value occurs finds out Si component recording and is the basic Y-component table YMi of current block, and Si principal component is accounted for It is more than threshold value T (for example, T=90%) according to the important ratio of entire block.Above-mentioned steps S39 to S311 realizes determining Y points The purpose of the principal component of amount.
S312 records principal component number Si and generates the basic Y-component table of global basic Y-component table YG and each character block YMi。
The basic Y-component table YMi of current block and global basic Y-component table YG are compared, if the fundametal component in YMi Value indicates Si fundametal component value of current block using the index value in global basic Y-component table YG in YG;If in YMi Global basic Y-component table is added not in YG, by this emerging fundametal component value in current block in some fundametal component value In YG, and indicate using index value of this new component value in global basic Y-component table the fundametal component of current block. Each of global basic Y-component table YG can be obtained after the processing of all character blocks and is indicated using overall situation fundametal component table piece Basic Y-component concordance list YMi, the color number of global basic Y-component table YG is J, J≤S1+S2+…+SN, N is character block Number summation.
S313, character block Y-component coding.
In this example, according to the basic Y-component table YMi of current i-th of character block, in character block Y-component and its It is compared, if the Y-component value of character block is identical as basic Y-component table YMi intermediate value, then it is assumed that divide based on pixel herein Position is measured, is indicated using index value 0~(Si-1), if not identical, then it represents that pixel is non-master component positions herein, is used Si is indicated, therefore each character block can be according to multiple principal components and the corresponding index value of non-master component recording, to generate Concordance list Ci marks character block.
It is whether identical as the index value of neighborhood territory pixel to determine it by the index value Ci for scanning each character block, if with left side picture The index value of element is identical, is calculated as L, is calculated as U if identical as surface pixel, is different from and is calculated as O, to be indexed Table Bi.
For concordance list Bi, the pixel of several in horizontal direction can be divided into one group, be encoded using Huffman.
For the true value of each component value of pixel record of the non-master component positions in concordance list Ci, component value is all used It is successively transmitted based on the coding mode of bit plane from highest bit plane to minimum bit plane, to obtain the pressure of character block Y-component Contracting code stream.
S314, non-legible block coding.
S315, code stream organization.
Decoding end is streamed to according to character block code stream, non-legible block code.
S316, compressed bit stream.
Embodiment 3
According to embodiments of the present invention, a kind of embodiment of the compression set of character block is provided, Fig. 4 is real according to the present invention A kind of schematic diagram of the compression set of character block of example is applied, as shown in connection with fig. 4, which includes:
First obtains module 40, for obtaining the character block in image.
Merging module 42, for extracting first point from the first component, second component and third component of each character block Amount and second component merge, and obtain the 4th component.
Coding module 44, for being encoded respectively to third component and the 4th component.
Optionally, according to the above embodiments of the present application, coding module includes:
First acquisition submodule, for obtaining third component in three-component global fundametal component table and each character block Fundametal component table, the compressed bit stream of output character block.
First determines submodule, for according to third component in three-component global fundametal component table and each character block Fundametal component table obtain three-component marked index table and relative index table, wherein marked index table pass through each text Index value in block in three-component fundametal component table indicates that character block, relative index table pass through neighborhood in marked index table The relationship of index value obtains.
First text block coding module is used for according to three-component marked index table and relative index table to each text Third component in block is encoded.
Optionally, according to the above embodiments of the present application, the first acquisition submodule includes:
First determination unit, the number for occurring by three-component component value in statistics current character block, determines Three-component principal component, wherein principal component is greater than preset value in the ratio of all component values.
First acquisition unit, for obtaining three-component initial global fundametal component table.
First Component units, for the principal component in the first character block to be added to the three-component initial global basic point Scale constitutes global fundametal component table among the three-component firstth, wherein three-component initial global fundametal component table is It is empty.
Second Component units, for will be among three-component principal component in the second character block and the three-component firstth entirely Office's fundametal component table compares, if the three-component principal component of the second character block is present in the overall situation among the three-component firstth In fundametal component table, then retain principal component, otherwise, it is three-component that the principal component of three-component second character block is added to Among first in global fundametal component table, global fundametal component table among the three-component secondth is constituted, and to being added to third Index value is arranged in principal component among the first of component in global fundametal component table.
First circulation unit, for recycling the function of the second Component units, until the third component of all texts has compared At using the intermediate global fundametal component table finally obtained as three-component global fundametal component table.
First indicates unit, for being indicated using the corresponding index value of principal component in three-component global fundametal component table Principal component in each character block in three-component fundametal component table obtains three-component fundametal component in each character block Table.
Optionally, according to the above embodiments of the present application, first determines that submodule includes:
Second determination unit, for determining three-component component in each character block according to three-component fundametal component It is worth corresponding mark.
First identifier unit, for identifying so that each three-component component value is corresponding as each the three-component point The index value of magnitude constitutes marked index table.
Third determination unit, for determining in each character block the corresponding index value of the three-component component value and neighborhood rope Draw the incidence relation of value.
4th determination unit, for according to the corresponding index value of the in each character block the three-component component value whether with neighbour AN domain index value is identical, determines the corresponding relation identity of each three-component component value, and according to each three-component component It is worth corresponding relation identity and constitutes relative index table.
Optionally, according to the above embodiments of the present application, the first text block coding module includes:
First recording unit, the third for the pixel of the three-component non-principal component of component value in recording mark concordance list The original value of component, and use the coding mode based on bit plane from highest bit plane each component value based on marked index table It is successively transmitted to minimum bit plane, generates three-component first compressed bit stream.
First coding unit, for carrying out monodrome Hough according to relative index table, and to each pixel in horizontal direction Graceful coding, or the pixel in level is grouped with predetermined number, and multivalue Huffman is carried out to every group of pixel after grouping Coding, obtains three-component second compressed bit stream.
Optionally, according to the above embodiments of the present application, coding module includes:
Second acquisition submodule, the 4th component in the global fundametal component table and each character block for obtaining the 4th component Fundametal component table.
Second determines submodule, for according to the 4th component in the global fundametal component table of the 4th component and each character block Fundametal component table obtain the marked index table and relative index table of the 4th component, wherein marked index table pass through each text Index value in block in the fundametal component table of the 4th component indicates that character block, relative index table pass through neighborhood in marked index table The relationship of index value obtains.
Second text block coding module, for the marked index table and relative index table according to the 4th component to each text The 4th component in block is encoded.
Optionally, according to the above embodiments of the present application, the second acquisition submodule includes:
5th determination unit, the number for occurring by the component value of the 4th component in statistics current character block, determines The principal component of 4th component, wherein principal component is greater than preset value in the ratio of all component values;
Second acquisition unit, for obtaining the initial global fundametal component table of the 4th component;
Third reconstructed unit, for the principal component in the first character block to be added to initial global basic point of the 4th component Scale constitutes global fundametal component table among the first of the 4th component, wherein the initial global fundametal component table of the 4th component is It is empty;
Fourth reconstructed unit, for the first centre of the principal component of the 4th component in the second character block and the 4th component is complete Office's fundametal component table compares, if the principal component of the 4th component of the second character block is present in the overall situation among the first of the 4th component In fundametal component table, then retain principal component, otherwise, the principal component of the second character block of the 4th component is added to the 4th component Among first in global fundametal component table, global fundametal component table among the second of the 4th component is constituted, and to being added to the 4th Index value is arranged in principal component among the first of component in global fundametal component table;
Second circulation unit, for recycling the function of fourth reconstructed unit, until the 4th component of all texts has compared At using the intermediate global fundametal component table finally obtained as the global fundametal component table of the 4th component.
Second indicates unit, and the corresponding index value of principal component indicates in the global fundametal component table for using the 4th component Principal component in each character block in the fundametal component table of the 4th component obtains the fundametal component of the 4th component in each character block Table.
Optionally, according to the above embodiments of the present application, second determines that submodule includes:
6th determination unit, for determining the component of the 4th component in each character block according to the fundametal component of the 4th component It is worth corresponding mark.
Second identifier unit, for point using the corresponding mark of the component value of each 4th component as each 4th component The index value of magnitude constitutes marked index table.
7th determination unit, for determining the corresponding index value of component value and neighborhood rope of the 4th component in each character block Draw the incidence relation of value.
8th determination unit, for according to the corresponding index value of component value of the 4th component in each character block whether with neighbour AN domain index value is identical, determines the corresponding relation identity of component value of each 4th component, and according to the component of each 4th component It is worth corresponding relation identity and constitutes relative index table.
Optionally, according to the above embodiments of the present application, the second text block coding module includes:
Second recording unit, for the pixel of the non-principal component of component value of the 4th component in recording mark concordance list the 4th The original value of component, and use the coding mode based on bit plane from highest bit plane each component value based on marked index table It is successively transmitted to minimum bit plane, generates the first compressed bit stream of the 4th component.
Second coding unit, for carrying out monodrome Hough according to relative index table, and to each pixel in horizontal direction Graceful coding, or the pixel in level is grouped with predetermined number, and multivalue Huffman is carried out to every group of pixel after grouping Coding, obtains the second compressed bit stream of the 4th component.
Optionally, according to the above embodiments of the present application, the first component is U component, and second component is V component.
Embodiment 4
According to embodiments of the present invention, a kind of embodiment of image compressing device is provided, Fig. 5 is according to embodiments of the present invention A kind of image compressing device schematic diagram, as shown in connection with fig. 5, which includes:
Second obtains module 50, for obtaining the picture block in image, and by being encoded to obtain picture to picture block The compressed bit stream of block.
Transmission module 52, for the compressed bit stream of the compressed bit stream of character block and picture block to be transmitted to decoding end.
Fig. 6 is a kind of schematic diagram of optional image Compression equipment according to an embodiment of the present invention, in conjunction with Fig. 6 institute Show, a frame video image is obtained from portable equipment, and block type identification module identifies each piece after image block of type, passes through Text block coding module encodes character block, is encoded by picture block coding module to picture block, passes through code stream group The receiving module that the code stream after coding is sent to decoding end by module by sending module is knitted, code stream is sent to code by receiving module Stream splits module, and code stream is split as the compressed bit stream and non-legible piece of compressed bit stream of character block by code stream difference block, then is led to It crosses character block decoder module to be decoded character block compressed bit stream and export to frame display module, passes through non-legible piece of decoding mould Block is decoded non-legible piece of compressed bit stream and exports to frame display module, and frame display module finally will display result output To display equipment, to complete the compression processing of image.The compression method and embodiment 3 for the character block that above-described embodiment 1 provides mention The compression set of the character block of confession is suitable for above-mentioned image Compression equipment, and is mainly used for the volume of the character block in coding side Code module.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
In the above embodiment of the invention, it all emphasizes particularly on different fields to the description of each embodiment, does not have in some embodiment The part of detailed description, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed technology contents can pass through others Mode is realized.Wherein, the apparatus embodiments described above are merely exemplary, such as the division of the unit, Ke Yiwei A kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or Person is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of unit or module It connects, can be electrical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple On unit.It can some or all of the units may be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can for personal computer, server or network equipment etc.) execute each embodiment the method for the present invention whole or Part steps.And storage medium above-mentioned includes: that USB flash disk, read-only memory (ROM, Read-OnlyMemory), arbitrary access are deposited Reservoir (RAM, Random Access Memory), mobile hard disk, magnetic or disk etc. be various to can store program code Medium.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered It is considered as protection scope of the present invention.

Claims (16)

1. a kind of compression method of character block characterized by comprising
Obtain the character block in image;
First component and the second component are extracted from the first component, second component and third component of each character block It merges, obtains the 4th component, wherein first component is U component, and the second component is V component, the third point Amount is Y-component;
The third component and the 4th component are encoded respectively, export the compressed bit stream of the character block;
The third component is encoded, comprising:
Obtain three-component fundametal component table in the three-component global fundametal component table and each character block;
It is obtained according to three-component fundametal component table in the three-component global fundametal component table and each character block To three-component marked index table and the relative index table, wherein the marked index table passes through each character block In index value in three-component fundametal component table indicate that the character block, the relative index table pass through the label rope The relationship for drawing neighborhood index value in table obtains;
The third component in each character block is carried out according to the three-component marked index table and relative index table Coding;
4th component is encoded, comprising:
Obtain the fundametal component table of the 4th component in the global fundametal component table and each character block of the 4th component;
It is obtained according to the fundametal component table of the 4th component in the global fundametal component table and each character block of the 4th component To the marked index table and relative index table of the 4th component, wherein the marked index table passes through each character block In the 4th component fundametal component table in index value indicate the character block, the relative index table passes through the label rope The relationship for drawing neighborhood index value in table obtains;
The 4th component in each character block is carried out according to the marked index table of the 4th component and relative index table Coding.
2. the method according to claim 1, wherein obtaining three-component global fundametal component table and the institute State three-component fundametal component table in each character block, comprising:
Step A1: the number occurred by three-component component value described in statistics current character block determines the third point The principal component of amount, wherein the principal component is greater than preset value in the ratio of all component values;
Step B1: three-component initial global fundametal component table is obtained;
Step C1: the principal component in the first character block is added to three-component initial global fundametal component table, constitutes third Global fundametal component table among the first of component, wherein the three-component initial global fundametal component table is sky;
Step D1: by global fundametal component among three-component principal component in the second character block and the described three-component firstth Table compares, if the three-component principal component of second character block is present in global base among the described three-component firstth In this subscale, then retain the principal component, otherwise, the principal component of three-component second character block is added to described Among three-component firstth in global fundametal component table, global fundametal component table among the three-component secondth is constituted, and right It is added to the principal component setting index value among the described three-component firstth in global fundametal component table;
Step E1: recycling the step D1, completes until the third component of all texts compares, intermediate global by what is finally obtained Fundametal component table is as the three-component global fundametal component table;
Step F1: indicate described every using the corresponding index value of principal component described in the three-component global fundametal component table The principal component in a character block in three-component fundametal component table obtains three-component base in each character block This subscale.
3. the method according to claim 1, wherein according to three-component global fundametal component table and the institute It states three-component fundametal component table in each character block and obtains three-component marked index table and the relative index table, wrap It includes:
The corresponding mark of the three-component component value is determined in each character block according to the three-component fundametal component table Know;
Using the corresponding mark of each the three-component component value as the index value of each three-component component value, Constitute the marked index table;
Determine in each character block the incidence relation of the three-component component value corresponding index value and neighborhood index value;
It is whether identical as neighborhood index value according to the corresponding index value of the in each character block the three-component component value, it determines The corresponding relation identity of each three-component component value, and according to the corresponding pass of each three-component component value System's mark constitutes the relative index table.
4. the method according to claim 1, which is characterized in that according to the three-component label Concordance list and relative index table encode the third component in each character block, comprising:
Record the three-component original value of the pixel of the three-component non-principal component of component value in the marked index table, and base Use the coding mode based on bit plane from highest bit plane to minimum bit plane each component value in the marked index table It successively transmits, generates three-component first compressed bit stream in the compressed bit stream of the character block;
Monodrome huffman coding is carried out according to the relative index table, and to each pixel in horizontal direction, or with default Pixel in several pairs of levels is grouped, and carries out multivalue huffman coding to every group of pixel after grouping, obtains the text Three-component second compressed bit stream in the compressed bit stream of block.
5. the method according to claim 1, wherein obtaining global fundametal component table and the institute of the 4th component State the fundametal component table of the 4th component in each character block, comprising:
Step A2: the number occurred by the component value of the 4th component described in statistics current character block determines described 4th point The principal component of amount, wherein the principal component is greater than preset value in the ratio of all component values;
Step B2: the initial global fundametal component table of the 4th component is obtained;
Step C2: the principal component in the first character block is added to the initial global fundametal component table of the 4th component, constitutes the 4th Global fundametal component table among the first of component, wherein the initial global fundametal component table of the 4th component is sky;
Step D2: by the global fundametal component in the first centre of the principal component of the 4th component in the second character block and the 4th component Table compares, if the principal component of the 4th component of second character block is present in global base among the first of the 4th component In this subscale, then retain the principal component, otherwise, the principal component of the second character block of the 4th component is added to described Among the first of 4th component in global fundametal component table, global fundametal component table among the second of the 4th component is constituted, and right It is added to the principal component setting index value among the first of the 4th component in global fundametal component table;
Step E2: recycling the step D2, completes until the 4th component of all texts compares, intermediate global by what is finally obtained Global fundametal component table of the fundametal component table as the 4th component;
Step F2: the corresponding index value of principal component described in the global fundametal component table using the 4th component indicates described every The principal component in a character block in the fundametal component table of the 4th component obtains the base of the 4th component in each character block This subscale.
6. the method according to claim 1, wherein according to the global fundametal component table of the 4th component and institute The fundametal component table for stating the 4th component in each character block obtains the marked index table and relative index table of the 4th component, packet It includes:
The corresponding mark of component value of the 4th component in each character block is determined according to the fundametal component of the 4th component;
The index value of component value using the corresponding mark of the component value of each 4th component as each 4th component, Constitute the marked index table;
Determine the incidence relation of the component value corresponding index value and neighborhood index value of the 4th component in each character block;
Whether the corresponding index value of component value according to the 4th component in each character block is identical as neighborhood index value, determines The corresponding relation identity of component value of each 4th component, and according to the corresponding pass of component value of each 4th component System's mark constitutes the relative index table.
7. the method according to claim 1, wherein according to the marked index table of the 4th component and related rope Draw table to encode the 4th component in each character block, comprising:
Record the original value of the 4th component of the pixel of the non-principal component of component value of the 4th component in the marked index table, and base Use the coding mode based on bit plane from highest bit plane to minimum bit plane each component value in the marked index table It successively transmits, generates the first compressed bit stream of the 4th component in the compressed bit stream of the character block;
Monodrome huffman coding is carried out according to the relative index table, and to each pixel in horizontal direction, or with default Pixel in several pairs of levels is grouped, and carries out multivalue huffman coding to every group of pixel after grouping, obtains the text Second compressed bit stream of the 4th component in the compressed bit stream of block.
8. a kind of method for compressing image, which is characterized in that the compression method including any one of claim 1 to 7 character block, Wherein, after encoding respectively to the third component and the 4th component, described image compression method includes:
The picture block in described image is obtained, and by being encoded to obtain the compressed bit stream of picture block to the picture block;
The compressed bit stream of the compressed bit stream of the character block and the picture block is transmitted to decoding end.
9. a kind of compression set of character block characterized by comprising
First obtains module, for obtaining the character block in image;
Merging module, for extracting first component from the first component, second component and third component of each character block It is merged with the second component, obtains the 4th component, wherein first component is U component, and the second component is V Component, the third component are Y-component;
Coding module exports the pressure of the character block for encoding respectively to the third component and the 4th component Contracting code stream;
The coding module includes:
First acquisition submodule, for obtaining third in the three-component global fundametal component table and each character block The fundametal component table of component;
First determines submodule, for according to third in the three-component global fundametal component table and each character block The fundametal component table of component obtains three-component marked index table and the relative index table, wherein the marked index table The character block, the correlation rope are indicated by the index value in three-component fundametal component table in each character block Draw table to obtain by the relationship of neighborhood index value in the marked index table;
First text block coding module is used for according to the three-component marked index table and relative index table to described each Third component in character block is encoded;
The coding module includes:
Second acquisition submodule, the 4th in the global fundametal component table and each character block for obtaining the 4th component The fundametal component table of component;
Second determines submodule, for the in the global fundametal component table and each character block according to the 4th component the 4th The fundametal component table of component obtains the marked index table and relative index table of the 4th component, wherein the marked index table The character block, the correlation rope are indicated by the index value in the fundametal component table of the 4th component in each character block Draw table to obtain by the relationship of neighborhood index value in the marked index table;
Second text block coding module, for the marked index table and relative index table according to the 4th component to described each The 4th component in character block is encoded.
10. device according to claim 9, which is characterized in that first acquisition submodule includes:
First determination unit, the number for occurring by three-component component value described in statistics current character block, determines The three-component principal component, wherein the principal component is greater than preset value in the ratio of all component values;
First acquisition unit, for obtaining three-component initial global fundametal component table;
First Component units, for the principal component in the first character block to be added to three-component initial global fundametal component Table constitutes global fundametal component table among the three-component firstth, wherein the three-component initial global fundametal component table For sky;
Second Component units, for will be among three-component principal component in the second character block and described the three-component firstth entirely Office's fundametal component table compares, if the three-component principal component of second character block is present in the described three-component firstth In intermediate overall situation fundametal component table, then retain the principal component, otherwise, by the principal component of three-component second character block It is added among the described three-component firstth in global fundametal component table, constitutes among the three-component secondth global basic point Scale, and index value is arranged to the principal component being added among the described three-component firstth in global fundametal component table;
First circulation unit, for recycling the function of second Component units, until the third component of all texts has compared At using the intermediate global fundametal component table finally obtained as the three-component global fundametal component table;
First indicates unit, for using the corresponding index value of principal component described in the three-component global fundametal component table It indicates the principal component in each character block in three-component fundametal component table, obtains in each character block Three-component fundametal component table.
11. device according to claim 9, which is characterized in that described first determines that submodule includes:
Second determination unit, for determining in each character block that is three-component according to the three-component fundametal component The corresponding mark of component value;
First identifier unit, for identifying so that each three-component component value is corresponding as each third component Component value index value, constitute the marked index table;
Third determination unit, for determining in each character block the corresponding index value of the three-component component value and neighborhood rope Draw the incidence relation of value;
4th determination unit, for according to the corresponding index value of the in each character block the three-component component value whether with neighbour AN domain index value is identical, determines the corresponding relation identity of each the three-component component value, and according to each third point The corresponding relation identity of the component value of amount constitutes the relative index table.
12. the device according to any one of claim 9 to 11, which is characterized in that the first text block coding mould Block includes:
First recording unit, for recording the third of the pixel of the three-component non-principal component of component value in the marked index table The original value of component, and use the coding mode based on bit plane from highest order each component value based on the marked index table Plane is successively transmitted to minimum bit plane, generates three-component first compressed bit stream in the compressed bit stream of the character block;
First coding unit, for carrying out monodrome Hough according to the relative index table, and to each pixel in horizontal direction Graceful coding, or the pixel in level is grouped with predetermined number, and multivalue Huffman is carried out to every group of pixel after grouping Coding, obtains three-component second compressed bit stream in the compressed bit stream of the character block.
13. device according to claim 9, which is characterized in that second acquisition submodule includes:
5th determination unit, the number for occurring by the component value of the 4th component described in statistics current character block, determines The principal component of 4th component, wherein the principal component is greater than preset value in the ratio of all component values;
Second acquisition unit, for obtaining the initial global fundametal component table of the 4th component;
Third reconstructed unit, for the principal component in the first character block to be added to the initial global fundametal component of the 4th component Table constitutes global fundametal component table among the first of the 4th component, wherein the initial global fundametal component table of the 4th component For sky;
Fourth reconstructed unit, for the first centre of the principal component of the 4th component in the second character block and the 4th component is complete Office's fundametal component table compares, if the principal component of the 4th component of second character block is present in the first of the 4th component In intermediate overall situation fundametal component table, then retain the principal component, otherwise, by the principal component of the second character block of the 4th component It is added among the first of the 4th component in global fundametal component table, constitutes among the second of the 4th component global basic point Scale, and index value is arranged to the principal component in the global fundametal component table in the first centre for being added to the 4th component;
Second circulation unit, for recycling the function of the fourth reconstructed unit, until the 4th component of all texts has compared At using the intermediate global fundametal component table finally obtained as the global fundametal component table of the 4th component;
Second indicates unit, for using the corresponding index value of principal component described in the global fundametal component table of the 4th component It indicates the principal component in each character block in the fundametal component table of the 4th component, obtains in each character block The fundametal component table of four components.
14. device according to claim 9, which is characterized in that described second determines that submodule includes:
6th determination unit, for determining the 4th component in each character block according to the fundametal component of the 4th component The corresponding mark of component value;
Second identifier unit, for using the corresponding mark of the component value of each 4th component as each 4th component Component value index value, constitute the marked index table;
7th determination unit, for determining the corresponding index value of component value of the 4th component and neighborhood rope in each character block Draw the incidence relation of value;
8th determination unit, for according to the corresponding index value of component value of the 4th component in each character block whether with neighbour AN domain index value is identical, determines the corresponding relation identity of component value of each 4th component, and according to each described 4th point The corresponding relation identity of the component value of amount constitutes the relative index table.
15. device according to claim 9, which is characterized in that the second text block coding module includes:
Second recording unit, for recording the 4th of the pixel of the non-principal component of component value of the 4th component in the marked index table the The original value of component, and use the coding mode based on bit plane from highest order each component value based on the marked index table Plane is successively transmitted to minimum bit plane, generates the first compressed bit stream of the 4th component in the compressed bit stream of the character block;
Second coding unit, for carrying out monodrome Hough according to the relative index table, and to each pixel in horizontal direction Graceful coding, or the pixel in level is grouped with predetermined number, and multivalue Huffman is carried out to every group of pixel after grouping Coding, obtains the second compressed bit stream of the 4th component in the compressed bit stream of the character block.
16. a kind of image compressing device, which is characterized in that including character block described in any one of claim 9 to 15 Compression set, wherein described image compression set further include:
Second obtains module, for obtaining the picture block in described image, and by being encoded to obtain figure to the picture block The compressed bit stream of tile;
Transmission module, for the compressed bit stream of the compressed bit stream of the character block and the picture block to be transmitted to decoding end.
CN201611075651.2A 2016-11-29 2016-11-29 The compression method and device and method for compressing image and device of character block Active CN106713921B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611075651.2A CN106713921B (en) 2016-11-29 2016-11-29 The compression method and device and method for compressing image and device of character block

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611075651.2A CN106713921B (en) 2016-11-29 2016-11-29 The compression method and device and method for compressing image and device of character block

Publications (2)

Publication Number Publication Date
CN106713921A CN106713921A (en) 2017-05-24
CN106713921B true CN106713921B (en) 2019-07-23

Family

ID=58934197

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611075651.2A Active CN106713921B (en) 2016-11-29 2016-11-29 The compression method and device and method for compressing image and device of character block

Country Status (1)

Country Link
CN (1) CN106713921B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108235038B (en) * 2018-02-09 2020-09-11 西安万像电子科技有限公司 Method and device for image coding, decoding and compressing

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102495998A (en) * 2011-11-10 2012-06-13 西安电子科技大学 Static object detection method based on visual selective attention computation module
CN103440348A (en) * 2013-09-16 2013-12-11 重庆邮电大学 Vector-quantization-based overall and local color image searching method
CN105049851A (en) * 2015-07-06 2015-11-11 浙江理工大学 Channel no-reference image quality evaluation method based on color perception
CN105472392A (en) * 2015-12-11 2016-04-06 钟炎培 Screen video encoding and decoding method based on progressive character block compression and encoding and decoding device
CN105556974A (en) * 2013-07-12 2016-05-04 高通股份有限公司 Palette prediction in palette-based video coding
CN106105202A (en) * 2014-03-14 2016-11-09 高通股份有限公司 For damaging the color space inverse transformation with lossless Encoded video

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9807401B2 (en) * 2011-11-01 2017-10-31 Qualcomm Incorporated Transform unit partitioning for chroma components in video coding

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102495998A (en) * 2011-11-10 2012-06-13 西安电子科技大学 Static object detection method based on visual selective attention computation module
CN105556974A (en) * 2013-07-12 2016-05-04 高通股份有限公司 Palette prediction in palette-based video coding
CN103440348A (en) * 2013-09-16 2013-12-11 重庆邮电大学 Vector-quantization-based overall and local color image searching method
CN106105202A (en) * 2014-03-14 2016-11-09 高通股份有限公司 For damaging the color space inverse transformation with lossless Encoded video
CN105049851A (en) * 2015-07-06 2015-11-11 浙江理工大学 Channel no-reference image quality evaluation method based on color perception
CN105472392A (en) * 2015-12-11 2016-04-06 钟炎培 Screen video encoding and decoding method based on progressive character block compression and encoding and decoding device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
分块K-LT及查表量化编码的彩色图像压缩方法;牛万红等;《高技术通讯》;20140831;第24卷(第8期);全文

Also Published As

Publication number Publication date
CN106713921A (en) 2017-05-24

Similar Documents

Publication Publication Date Title
CN106686384B (en) The compression method and device and method for compressing image and device of character block
JP4732660B2 (en) Visual attention system
CN106797457B (en) With the advanced screen content coding method for improving palette table and index graph code
CN106385592B (en) Method for compressing image and device
CN104657698B (en) A kind of color 2 D code decoding method for carrying several black and white Quick Response Codes
CN104853211A (en) Image compression method and apparatus employing various forms of reference pixel storage spaces
CN104853209A (en) Image coding and decoding method and device
JPH07327134A (en) Image processor and its method
JP2002541738A (en) Image compression
CN106030651A (en) Advanced screen content coding with improved color table and index map coding methods
CN106604032B (en) Method and device for compressing Chinese character blocks in image and method and device for compressing image
CN103369317A (en) Method and apparatus for image data compression
CN107147913B (en) The transmission method and device of character block
CN109587489A (en) A kind of method of video compression
CN107509079B (en) Text block coding method and device
CN106851294B (en) The compression method and device of image and its compression method and device of character block
CN107172430B (en) The coding method of character block and device
CN106713921B (en) The compression method and device and method for compressing image and device of character block
JP3462867B2 (en) Image compression method and apparatus, image compression program, and image processing apparatus
CN112383779A (en) Image encoding method and device, image decoding method and device, and processor
CN107197295A (en) A kind of coded system and method
CN109784451A (en) A kind of method and apparatus expanding two dimensional code code capacity using more colors
CN107071449A (en) A kind of trans-coding system and method
KR20020024484A (en) An encoding and decoding system of e-book
CN106851168A (en) Video format recognition methods, device and player

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20171113

Address after: 710075 D102 room, building 4, Maple new city, F District, Xi'an hi tech Zone, Shaanxi

Applicant after: XI'AN WANXIANG ELECTRONIC TECHNOLOGY CO., LTD.

Address before: 710100 Room 501, building B, 8 cool Industrial Park, Tang Yan Nan Road, Xi'an, Shaanxi

Applicant before: Zhong Yanpei

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant