Summary of the invention
The embodiment of the invention provides a kind of transmission method of character block and devices, at least to solve text in the prior art
The larger technical problem of the transmission occupied bandwidth of block.
According to an aspect of an embodiment of the present invention, a kind of transmission method of character block is provided, comprising: by character block
Pixel is divided into multilayer according to the frequency that pixel occurs;The sequence of the frequency occurred according to each layer of pixel from high to low is successively to every
One layer of pixel is transmitted.
Further, current network bandwidth is obtained;When current network bandwidth is less than pre-set bandwidths, by character block
The step of pixel is divided into multilayer according to the frequency that pixel occurs.
Further, according to the Essential colour of the frequency acquisition pixel of pixel and escape color;The pixel of character block is divided into two
Layer determines that the Essential colour of character block is the first layer of character block, determines that the escape color of character block is the second layer of character block.
Further, the first frequency histogram of the first component of acquisition and preset first step-length;Existed with the first step-length
Sequence in first frequency histogram according to energy from large to small searches the N number of section for being arranged in top N from large to small, determines
The corresponding color value in N number of section found is the first Essential colour of the first component, wherein N is the integer more than or equal to 2;Really
Surely meet the first preset condition the corresponding color of the first component be first escape color, wherein the first preset condition be and first
The absolute value of the difference of Essential colour is greater than the first preset value, and be not belonging in first frequency histogram where the first Essential colour the
One pre-set interval.
Further, obtain second component second frequency histogram and preset second step-length;Existed with the second step-length
Sequence in second frequency histogram according to energy from large to small, lookup are arranged in front M M sections from large to small, determine
The corresponding color value in M section found is the second Essential colour of second component, wherein M is the integer more than or equal to 2;Really
Surely meet the second preset condition the corresponding color of second component be second escape color, wherein the second preset condition be and second
The absolute value of the difference of Essential colour is greater than the second preset value, and be not belonging in second frequency histogram where the second Essential colour the
Two pre-set intervals.
Further, three-component third frequency histogram and preset third step-length are obtained;Existed with third step-length
Sequence in third frequency histogram according to energy from large to small, lookup are arranged in front K K sections from large to small, determine
The corresponding color value in K section found is three-component third Essential colour, wherein K is the integer more than or equal to 2;Really
Surely the corresponding color of third component for meeting third preset condition is that third is escaped color, wherein third preset condition is and third
The absolute value of the difference of Essential colour is greater than third preset value, and be not belonging in third frequency histogram where third Essential colour the
Three pre-set intervals.
Further, according to the Essential colour of each component of pixel in character block and escape color, determine that each component is corresponding
Marked index value;According to the incidence relation of the marked index value of pixel and the marked index value of neighborhood territory pixel, pixel is determined
Predict index value;Compressed encoding is carried out to character block according to the marked index value of pixel each in character block and prediction index value.
Further, successively the compressed encoding result of multilayer pixel is decoded in the order received into decoding end,
Wherein, it in the case where all not receiving the compressed encoding result of multilayer pixel, replaces not receiving by the 4th preset value
The pixel for decompressing coding result, after all receiving the compressed encoding result of multilayer pixel, to the 4th preset value substitution
Pixel is updated.
According to another aspect of an embodiment of the present invention, a kind of compression-encoding device of character block is additionally provided, comprising: layering
Module, for the pixel of character block to be divided into multilayer according to the frequency that pixel occurs;Transmission module, for according to each layer of pixel
The frequency of appearance from high to low successively transmits each layer of pixel.
According to another aspect of an embodiment of the present invention, a kind of storage medium is additionally provided, the control storage in program operation
Equipment where medium executes the compaction coding method of the character block of above-mentioned any one.
According to another aspect of an embodiment of the present invention, a kind of processor is additionally provided, processor is used to run program,
In, program executes the compaction coding method of the character block of above-mentioned any one when running.
In embodiments of the present invention, the pixel of character block is divided into multilayer according to the frequency that pixel occurs, according to each layer
The sequence of the frequency that pixel occurs from high to low successively transmits each layer of pixel.It is most main that character block is utilized in above scheme
The main energy of the feature wanted concentrates on this characteristic in less several pixels, according to each character block picture occur frequency,
Pixel is layered, then according to pixel occur frequency have it is high to low every layer of pixel is transmitted, to not only protect
The display effect of character block has been demonstrate,proved, while having also reduced character block and transmitting occupied bandwidth, and then solving in the prior art
The larger technical problem of the transmission occupied bandwidth of character block, has reached the technical effect for improving the efficiency of transmission of character block.
Embodiment 1
According to embodiments of the present invention, a kind of embodiment of the transmission method 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 the flow chart of the transmission method of character block according to an embodiment of the present invention, as shown in Figure 1, this method includes
Following steps:
The pixel of character block is divided into multilayer according to the frequency that pixel occurs by step S102.
Specifically, above-mentioned character block, which can be, carries out the character block obtained after piecemeal for image.In a kind of optional implementation
In example, picture can be subjected to piecemeal, determine the type of block, to obtain the character block of picture.It counts in each character block
The frequency that pixel occurs, and the frequency occurred respectively to the pixel in each character block is ranked up, according still further to ranking results
The pixel of each character block is layered.
Step S104, the sequence of the frequency occurred according to each layer of pixel from high to low successively pass each layer of pixel
It is defeated.
In an alternative embodiment, each pixel of character block is divided into tri- layers of A, B, C, wherein what pixel occurred
The size relation of frequency is A layers pixel > B layers pixel > C layers of pixel, then during transmission, first passes the pixel for belonging to A layers
It transports to decoding end, then B layers of pixel transmission will be belonged to decoding end, will finally belong to C layers of pixel transmission to decoding end,
That is, frequency and every layer of transmission priority that pixel occurs are positively correlated.
In above-mentioned steps, for a character block, the higher pixel of the pixel frequency of occurrences is that the character block is main
Part, will this partial information carry out compressed encoding after be sent to decoding end, decoding end is decoded this partial content, due to
The pixel of character block is more concentrated, therefore only one layer of transmission can obtain preferably showing result.Above scheme not only guarantees
The display effect of character block, while also reducing character block and transmitting occupied bandwidth.
From the foregoing, it will be observed that the pixel of character block is divided into multilayer according to the frequency that pixel occurs by the above embodiments of the present application, press
The frequency sequence from high to low occurred according to each layer of pixel successively transmits each layer of pixel.Text is utilized in above scheme
The main energy of the most important feature of block concentrates on this characteristic in less several pixels, is occurred according to each character block picture
Frequency, pixel is layered, then according to pixel occur frequency have it is high to low every layer of pixel is transmitted, thus
It not only ensure that the display effect of character block, while also reducing character block and transmitting occupied bandwidth, and then solving existing
The larger technical problem of the transmission occupied bandwidth of character block in technology, has reached the technology effect for the efficiency of transmission for improving character block
Fruit.
Optionally, more the pixel of character block to be divided into according to the frequency that pixel occurs according to the above embodiments of the present application
Before layer, method further include:
Step S106 obtains current network bandwidth.
Step S108 occurs by the pixel of character block according to pixel when current network bandwidth is less than pre-set bandwidths
Frequency the step of being divided into multilayer.
In an alternative embodiment, by taking videoconference as an example, the current network bandwidth of real-time detection works as network bandwidth
When wider, the normal transmission for guaranteeing character block can be crossed, then without carrying out Delamination Transmission to character block, when network bandwidth is relatively narrow,
For guarantee video in meeting be capable of it is smooth transmit, then start to carry out Delamination Transmission to character block, to reduce text
Block transmits occupied bandwidth, and then guarantees the fluency of transmission of video.
Optionally, according to the above embodiments of the present application, the pixel of character block is divided into multilayer according to the frequency that pixel occurs,
Include:
Step S1021, according to the Essential colour of the frequency acquisition pixel of pixel and escape color.
Specifically, above-mentioned Essential colour be character block in pixel sort from high to low according to the frequency of appearance before several pixels
Corresponding color value, and color of escaping is the color in each character block in addition to Essential colour.
By taking screen shows the article of a white gravoply, with black engraved characters as an example, it is most can to determine that main energetic concentrates on the frequency of occurrences
In white pixel and black picture element, thereby determine that the pixel (i.e. the more pixel of the frequency of occurrences) that energy is concentrated is Essential colour, and
Other pixel definitions are escape color.
The pixel of character block is divided into two layers by step S1023, determines that the Essential colour of character block is the first layer of character block,
The escape color for determining character block is the second layer of character block.
In above-mentioned steps, character block is divided into the first layer including Essential colour and the second layer including color of escaping,
Essential colour is first transmitted, then transmits escape color.
Herein it should be noted that the color due to character block is more single, UV component includes that information is less, with a small amount of base
True qualities can satisfy vision needs;2, the much complex color of character block all concentrates on the transitional region at text edge, these mistakes
Color of escaping can be identified as in compression algorithm by crossing color, these escape color information redundancies are more, and help imaging definition
Less, therefore in first time transmission up to transmission Essential colour, without being transmitted to escape color.
Further, due to only transmitting Essential colour when first layer transmits, the escape color of YUV is transmitted in the second layer,
To significantly reduce the size of the first layer bit stream under the premise of guaranteeing picture quality.The biography of character block first layer in the program
Defeated code stream reduces 50% or more compared to regardless of layered scheme.This compressed in layers transmission plan pair for literal code device
Bandwidth requirement is smaller, can more flexible adaptation network environment, while based on computer picture particularity (such as: part draw
Face is unchanged), being to the display picture of user's " gradually clear " under many scenes can be received.
Optionally, is obtained by the Essential colour of character block and is escaped for the first component of pixel according to the above embodiments of the present application
Escape color, comprising:
Step S10211, the first frequency histogram of the first component of acquisition and preset first step-length.
Step S10213, with sequence of first step-length in first frequency histogram according to energy from large to small, search by
Greatly to minispread in N number of section of top N, determine that the corresponding color value in N number of section found is the first base of the first component
True qualities, wherein N is the integer more than or equal to 2.
Specifically, the frequency highest that pixel occurs in section, the energy in the section are bigger.For for indicating pixel intensity
Y-component for, N=4 can be taken, that is, take four Essential colour.
Step S10215 determines that the corresponding color of the first component for meeting the first preset condition is the first escape color, wherein
First preset condition is to be greater than the first preset value with the absolute value of the difference of the first Essential colour, and be not belonging to first frequency histogram
In the first pre-set interval where the first Essential colour.
Herein it should be noted that pixel for being unsatisfactory for the first preset condition, i.e., for the difference with the first Essential colour
The absolute value of value is less than or equal to the first preset value, or belongs to the picture of the first pre-set interval in histogram where the first Essential colour
Element is closer to the Essential colour of the first component, can be quantified as Essential colour, therefore, satisfaction first can be preset item
The pixel of part is as escape color.
For example, the first preset value is 8, and color value 125 is in frequency so that the color value of the Essential colour of the first component is 125 as an example
Section belonging in rate histogram be (112,128], be less than or equal to the first preset value with the absolute value of the difference of the first Essential colour
Pixel value belong to [117,133], or belong to the pixel of the first pre-set interval in histogram where the first Essential colour and be in
(112,128] in range, it is hereby achieved that be not belonging to [117,133], and be not belonging to (112,128] the corresponding color of pixel
For color of escaping.
In an alternative embodiment, by taking the first component is Y-component as an example, Y points of each character block in picture are counted
Measure statistic frequency histogram;With 2 σ1(the first step-length) is that step-length searches maximum 4 areas of energy in statistic frequency histogram
Between, and the corresponding color in the maximum section of energy is recorded, using the corresponding color in the maximum section of energy as Y_base_color,
That is the Essential colour of Y-component.Then it will be greater than the first preset value with the absolute value of Y_base_color difference, and it is straight not fall within frequency
The color in the affiliated section Y_base_color is as escape color in square figure.
Optionally, is obtained by the Essential colour of character block and is escaped for the second component of pixel according to the above embodiments of the present application
Escape color, comprising:
Step S10217, obtain second component second frequency histogram and preset second step-length.
Step S10219, with sequence of second step-length in second frequency histogram according to energy from large to small, search by
Greatly to minispread in first M of M section, determine that the corresponding color value in M section found is the second base of second component
True qualities, wherein M is the integer more than or equal to 2.
Specifically, the frequency highest that pixel occurs in section, the energy in the section are bigger.It, can for for U component
To take M=2, that is, take two Essential colour.
Step S102111 determines that the corresponding color of second component for meeting the second preset condition is the second escape color,
In, the second preset condition is to be greater than the second preset value with the absolute value of the difference of the second Essential colour, and it is straight to be not belonging to second frequency
The second pre-set interval in square figure where the second Essential colour.
In an alternative embodiment, by taking second component is U component as an example, each character block in difference statistical picture
The frequency histogram of U component, with 2 σ2(the second step-length, can be identical as first step length) is that step-length is searched in frequency histogram
Maximum 2 sections of energy, and the corresponding color in maximum 2 sections of energy is recorded, maximum two sections of energy is corresponding
Color as U_base_color, i.e. U component Essential colour, then will with the absolute value of U_base_color difference be greater than second
Preset value, and the color in the affiliated section U_base_color in frequency histogram is not fallen within as escape color.
Optionally, is obtained by the Essential colour of character block and is escaped for the third component of pixel according to the above embodiments of the present application
Escape color, comprising:
Step S102113 obtains three-component third frequency histogram and preset third step-length.
Step S102115, with sequence of the third step-length in third frequency histogram according to energy from large to small, search by
Greatly to minispread in first K of K section, determine that the corresponding color value in K section found is three-component third base
True qualities, wherein K is the integer more than or equal to 2.
Specifically, the frequency highest that pixel occurs in section, the energy in the section are bigger.It, can for for V component
To take K=2, that is, take two Essential colour.
Step S102117 determines that the corresponding color of third component for meeting third preset condition is third escape color,
In, third preset condition is to be greater than third preset value with the absolute value of the difference of third Essential colour, and it is straight to be not belonging to third frequency
Third pre-set interval in square figure where third Essential colour.
In an alternative embodiment, by taking third component is K component as an example, each character block in difference statistical picture
The frequency histogram of K component, with 2 σ3(third step-length, can or second step identical as first step length length identical) be step-length in frequency
Maximum 2 sections of energy are searched in rate histogram, and record the corresponding color in maximum 2 sections of energy, by energy maximum
The corresponding color in two sections as V_base_color, i.e. V component Essential colour, then by with V_base_color difference
Absolute value is greater than the second preset value, and does not fall within the color in the affiliated section V_base_color in frequency histogram as escape
Color.
Optionally, according to the above embodiments of the present application, before the pixel of character block is divided into two layers, method further include:
Step S1010, Essential colour and escape color to pixel quantify, wherein
To the Essential colour of pixel carry out quantization include: respectively by the first component for being unsatisfactory for the first preset condition, be unsatisfactory for
The second component of second preset condition and the third element quantization for being unsatisfactory for third preset condition be the first Essential colour, second basic
Color and third Essential colour.
In an alternative embodiment, by taking the first component of pixel as an example, the first preset condition is and the first Essential colour
The absolute value of difference be greater than the first preset value, and be not belonging in first frequency histogram first default where the first Essential colour
Section, therefore the first component for being unsatisfactory for the first preset condition is to be less than or equal to first with the absolute value of the difference of the first Essential colour
Preset value, or belong to the component of the first pre-set interval in first frequency histogram where the first Essential colour, such as: with first point
For the color value of the Essential colour of amount is 125, the first preset value is 8, and the section affiliated in frequency histogram of color value 125 is
(112,128], the pixel value for being less than or equal to the first preset value with the absolute value of the difference of the first Essential colour belongs to [117,133],
Thus belong to [117,133], or belong to (112,128] pixel can be quantified as Essential colour.
To the escape color of pixel carry out quantization include: by following formula to the first component of character block, second component and
Three-component escape color is quantified:Wherein, A is used to characterize the escape color after quantization, and B is used for table
Show that any one component of pixel, σ are used to indicate the corresponding step-length of any one component of pixel.
Optionally, according to the above embodiments of the present application, in the frequency according to each layer of pixel from high to low successively to each
Before layer pixel is transmitted, method further include: step S1012, according to the frequency of each layer of pixel from high to low successively to every
One layer of pixel carries out compressed encoding, successively carries out compressed encoding to each layer of pixel from high to low according to the frequency of each layer of pixel
The step of include: according to the Essential colour of each component of pixel in character block and escape color, determine the corresponding label of each component
Index value;According to the incidence relation of the marked index value of pixel and the marked index value of neighborhood territory pixel, the pre- measuring rope of pixel is determined
Draw value;Compressed encoding is carried out to character block according to the marked index value of pixel each in character block and prediction index value.
In an alternative embodiment, still by taking pixel includes tri- components of YUV as an example, to the compressed encoding after layering into
Row description.
Firstly, the step of determining each component corresponding marked index value includes:
(1) value of the Y-component in image after quantization is indicated with manipulative indexing, in which: Y_base_color is 4, right
0-3 should be indexed.If Y-component value is quantified as Essential colour, indicated with the corresponding index (0-3) of Y_base_color;If Y
Component is escape color, then is indicated with 4.
(2) value of the U component in image after quantization is indicated with manipulative indexing, in which: U_base_color is 2, right
0-1 should be indexed.If U component value is quantified as Essential colour, indicated with the corresponding index (0-1) of U_base_color;If U
Component is escape color, then is indicated with 2.
(3) value of the V component in image after quantization is indicated with manipulative indexing, in which: V_base_color is 2, right
(0-1) should be indexed.If V component value is quantified as Essential colour, indicated with the corresponding index (0-1) of V_base_color;Such as
Fruit V component is escape color, then is indicated with 2.
Secondly, determining pixel according to the incidence relation of the marked index value of pixel and the marked index value of neighborhood territory pixel
Predict index value the step of include:
(1) L is labeled as when the value after quantifying is equal with the pixel value of left pixel.
(2) U is labeled as when the value after quantifying is equal with the pixel value of upside pixel.
(3) value and left side after quantifying and when all unequal upside, or if when value is all not present in upside and left side, label
For O.
Finally, carrying out compressed encoding to character block according to the marked index value of pixel each in character block and prediction index value
Include:
(1) the corresponding sequence of O value is encoded and is transmitted.
(2) escape color is encoded and is transmitted.
Optionally, according to the above embodiments of the present application, in the frequency according to each layer of pixel from high to low successively to each
After layer pixel is transmitted, the above method further include:
Decoding end is in the order received successively decoded the compressed encoding result of multilayer pixel, wherein incomplete
In the case that portion receives the compressed encoding result of multilayer pixel, replace not receiving decompression coding knot by the 4th preset value
The pixel of fruit is updated the pixel of the 4th preset value substitution after all receiving the compressed encoding result of multilayer pixel.
In an alternative embodiment, for pixel is divided into two layers, when carrying out the transmission of first layer, by YUV
The Essential colour and its index value of component are encoded and are transmitted, and the escape color initial value that decoding end defaults YUV component is 0, decoding the
When one layer data, decodes using 0 as escape color and generate image;When carrying out the transmission of the second layer, by escaping for YUV component
Ease color and its index value are encoded and are transmitted, and are decoded in decoding end to the second layer data, and update the escape chromatic number of YUV component
According to using new escape chromatic number according to generating clearly image.
Fig. 2 is a kind of schematic diagram of the transmission method of optional character block according to an embodiment of the present invention, below with reference to Fig. 2
It is shown, above scheme is described further.
S21 obtains current bandwidth and determines layered scheme.
S22, if need to be layered pixel.S24 is entered step in the case where being layered, and is otherwise entered
Step S23.
S23 transmits whole coded compressed datas of character block.
If current bandwidth is not necessarily to carry out Delamination Transmission to character block, whole compress coding datas of character block are transmitted
To decoding end.
S24 transmits the first layer data.
S25 transmits the second layer data.
If current network bandwidth needs to carry out character block literary layer transmission, the coding letter of first layer character block is first transmitted
Breath, then transmit the encoded information of second layer character block.
S26 is decoded generation image to data.
Decoding end is decoded the data of compressed encoding, to obtain the word segment of image.
Fig. 3 is the signal being decoded according to a kind of decoding end of the embodiment of the present application to first layer compress coding data
Figure, Fig. 3 indicate different colours by different texture, do not include the part of text for the picture block in image as shown in connection with fig. 3,
Herein without discussing, for character block part, by taking the text in left side as an example, since text is a kind of color, the background color of text
For another color, therefore first layer pixel is Essential colour, i.e. the color of the color and character background of text, decoding end is receiving
The background that text and text are decoded after to first layer compress coding data, constitutes image as shown in Figure 3.
Embodiment 2
According to embodiments of the present invention, a kind of embodiment of the transmitting device of character block is provided, Fig. 4 is real according to the present invention
The schematic diagram of the transmitting device of the character block of example is applied, as shown in figure 4, this method comprises the following steps:
Hierarchical block 40, for the pixel of character block to be divided into multilayer according to the frequency that pixel occurs.
Transmission module 42 from high to low successively transmits each layer of pixel for the frequency according to each layer of pixel.
From the foregoing, it will be observed that the above embodiments of the present application pass through the frequency that hierarchical block occurs the pixel of character block according to pixel
Be divided into multilayer, the sequence of the frequency occurred by transmission module according to each layer of pixel from high to low successively to each layer of pixel into
Row transmission.Above scheme is utilized the main energy of the most important feature of character block and concentrates on this spy in less several pixels
Property, according to the frequency that each character block picture occurs, pixel is layered, is then had according to the frequency that pixel occurs high to low
Every layer of pixel is transmitted, to not only ensure that the display effect of character block, while being also reduced shared by character block transmission
Bandwidth, and then the technical problem that the transmission occupied bandwidth that solves character block in the prior art is larger, have reached raising text
The technical effect of the efficiency of transmission of block.
Optionally, according to the above embodiments of the present application, above-mentioned apparatus further include:
First obtains module, for being used for before the pixel of character block is divided into multilayer according to the frequency that pixel occurs
Obtain current network bandwidth.
Switch process module, for when current network bandwidth be less than pre-set bandwidths when, by the pixel of character block according to
The step of frequency that pixel occurs is divided into multilayer.
Optionally, according to the above embodiments of the present application, hierarchical block includes:
Second obtains module, for the Essential colour and escape color according to the frequency acquisition pixel of pixel.
Determining module determines that the Essential colour of character block is the first of character block for the pixel of character block to be divided into two layers
Layer determines that the escape color of character block is the second layer of character block.
Optionally, according to the above embodiments of the present application, for the first component of pixel, the second acquisition module includes:
First acquisition submodule, for obtain the first component first frequency histogram and preset first step-length.
First searches submodule, for the first step-length in first frequency histogram according to energy from large to small suitable
Sequence searches the N number of section for being arranged in top N from large to small, determines that the corresponding color value in N number of section found is the first component
The first Essential colour, wherein N is integer more than or equal to 2.
First determines submodule, for determining that the corresponding color of the first component for meeting the first preset condition is the first escape
Color, wherein the first preset condition is to be greater than the first preset value with the absolute value of the difference of the first Essential colour, and be not belonging to the first frequency
The first pre-set interval in rate histogram where the first Essential colour.
Optionally, is obtained by the Essential colour of character block and is escaped for the second component of pixel according to the above embodiments of the present application
Escape color, comprising:
Second acquisition submodule, for obtain second component second frequency histogram and preset second step-length.
Second searches submodule, for the second step-length in second frequency histogram according to energy from large to small suitable
Sequence, lookup are arranged in front M M sections from large to small, determine that the corresponding color value in M section found is second component
The second Essential colour, wherein M is integer more than or equal to 2.
Second determines submodule, for determining that the corresponding color of second component for meeting the second preset condition is the second escape
Color, wherein the second preset condition is to be greater than the second preset value with the absolute value of the difference of the second Essential colour, and be not belonging to the second frequency
The second pre-set interval in rate histogram where the second Essential colour.
Optionally, is obtained by the Essential colour of character block and is escaped for the third component of pixel according to the above embodiments of the present application
Escape color, comprising:
Third acquisition submodule, for obtaining three-component third frequency histogram and preset third step-length.
Third searches submodule, for third step-length in third frequency histogram according to energy from large to small suitable
Sequence, lookup are arranged in front K K sections from large to small, determine that the corresponding color value in K section found is third component
Third Essential colour, wherein K is integer more than or equal to 2.
Third determines submodule, for determining that the corresponding color of third component for meeting third preset condition is third escape
Color, wherein third preset condition is to be greater than third preset value with the absolute value of the difference of third Essential colour, and be not belonging to third frequency
Third pre-set interval in rate histogram where third Essential colour.
Optionally, according to the above embodiments of the present application, above-mentioned apparatus further include: quantization modules, for by character block
Pixel is divided into before two layers, and the Essential colour and escape color to pixel quantify, wherein
To the Essential colour of pixel carry out quantization include: respectively by the first component for being unsatisfactory for the first preset condition, be unsatisfactory for
The second component of second preset condition and the third element quantization for being unsatisfactory for third preset condition be the first Essential colour, second basic
Color and third Essential colour;
To the escape color of pixel carry out quantization include: by following formula to the first component of character block, second component and
Three-component escape color is quantified:Wherein, A is used to characterize the escape color after quantization, and B is used for table
Show that any one component of pixel, σ are used to indicate the corresponding step-length of any one component of pixel.
Optionally, according to the above embodiments of the present application, above-mentioned apparatus further include: compressed encoding module, for according to every
Before the frequency of one layer of pixel from high to low successively transmits each layer of pixel, according to the frequency of each layer of pixel by up to
It is low that compressed encoding successively is carried out to each layer of pixel, according to each layer of pixel frequency from high to low successively to each layer of pixel into
The step of row compressed encoding includes: to determine each component according to the Essential colour of each component of pixel in character block and escape color
Corresponding marked index value;According to the incidence relation of the marked index value of pixel and the marked index value of neighborhood territory pixel, picture is determined
The prediction index value of element;Compression volume is carried out to character block according to the marked index value of pixel each in character block and prediction index value
Code.
Optionally, according to the above embodiments of the present application, above-mentioned apparatus further include:
Decoder module, for from high to low successively carrying out transmitting it to each layer of pixel in the frequency according to each layer of pixel
Afterwards, decoding end is in the order received successively decoded the compressed encoding result of multilayer pixel, wherein is not receiving all
To multilayer pixel compressed encoding result in the case where, by the 4th preset value replace do not receive decompression coding result picture
Element is updated the pixel of the 4th preset value substitution after all receiving the compressed encoding result of multilayer pixel.