[go: up one dir, main page]

CN107147913B - The transmission method and device of character block - Google Patents

The transmission method and device of character block Download PDF

Info

Publication number
CN107147913B
CN107147913B CN201710344509.1A CN201710344509A CN107147913B CN 107147913 B CN107147913 B CN 107147913B CN 201710344509 A CN201710344509 A CN 201710344509A CN 107147913 B CN107147913 B CN 107147913B
Authority
CN
China
Prior art keywords
pixel
character block
component
frequency
essential colour
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
CN201710344509.1A
Other languages
Chinese (zh)
Other versions
CN107147913A (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 CN201710344509.1A priority Critical patent/CN107147913B/en
Publication of CN107147913A publication Critical patent/CN107147913A/en
Application granted granted Critical
Publication of CN107147913B publication Critical patent/CN107147913B/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/30Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability
    • H04N19/33Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability in the spatial domain
    • 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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • 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
    • 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/182Methods 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 pixel
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses a kind of transmission method of character block and devices.Wherein, this method comprises: the pixel of character block 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 successively transmits each layer of pixel.The present invention solves the larger technical problem of transmission occupied bandwidth of character block in the prior art.

Description

The transmission method and device of character block
Technical field
The present invention relates to field of image processings, in particular to the transmission method and device of a kind of character block.
Background technique
The video sequence of the equipment acquisition such as video sequence and video camera of the acquisition of computer screen picture has biggish difference. In computer screen picture, more scene has text screen, such as: browsing webpage, playing lantern slides etc. will appear a large amount of texts Word.Herein, interception is carried out for character image and divides blocking, obtained image block message abbreviation text by fixed size Block.Character block is based on its distinctive property and is still able to maintain the relatively reasonable distortion factor under biggish compression ratio.
At present in the compression algorithm (such as: H.264, H.265, JPEG) of mainstream, for character block compression effectiveness and pay no attention to Think.For example, the scene more demanding in the image quality and fluency of the images such as video conference, remote desktop, in network bandwidth In the case where certain, if the transmission of character block occupies biggish bandwidth, the laser propagation effect of image will affect.
For the problem that the transmission occupied bandwidth of character block in the prior art is larger, effective solution side is not yet proposed at present Case.
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.
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 the flow chart of the transmission method of character block according to an embodiment of the present invention;
Fig. 2 is a kind of schematic diagram of the transmission method of optional character block according to an embodiment of the present invention;
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;And
Fig. 4 is the schematic diagram of the transmitting device of character block 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 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.
Embodiment 2
According to embodiments of the present invention, a kind of storage medium is provided, storage medium includes the program of storage, wherein in journey Equipment executes the compaction coding method of the character block of any one of embodiment 1 where controlling storage medium when sort run.
Embodiment 3
According to embodiments of the present invention, a kind of processor is provided, which is characterized in that processor is for running program, wherein The compaction coding method of the character block of any one of embodiment 1 is executed when program is run.
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-Only Memory), 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 (9)

1. a kind of transmission method of character block characterized by comprising
The pixel of the character block is divided into multilayer according to the frequency that the pixel occurs;
The sequence of the frequency occurred according to each layer of pixel from high to low successively transmits each layer of pixel;
Before the pixel of the character block is divided into multilayer according to the frequency that pixel occurs, the method also includes:
Obtain current network bandwidth;
When the current network bandwidth is less than pre-set bandwidths, into the frequency for occurring the pixel of the character block according to pixel The step of being divided into multilayer;
After successively transmitting from high to low to each layer of pixel according to the frequency of each layer of pixel, the method is also Include:
Decoding end is in the order received successively decoded the compressed encoding result of multilayer pixel, wherein is not connecing all In the case where the compressed encoding result for receiving the multilayer pixel, the compressed encoding knot not received is replaced by the 4th preset value The pixel of fruit, after all receiving the compressed encoding result of the multilayer pixel, to the pixel of the 4th preset value substitution It is updated.
2. the method according to claim 1, wherein the pixel of the character block occurred according to the pixel Frequency is divided into multilayer, comprising:
According to the Essential colour of pixel described in the frequency acquisition of the pixel and escape color;
The pixel of the character block is divided into two layers, determines that the Essential colour of the character block is the first layer of the character block, really The escape color of the fixed character block is the second layer of the character block.
3. according to the method described in claim 2, it is characterized in that, the first component for the pixel, obtains the text The Essential colour and escape color of block, comprising:
Obtain first component first frequency histogram and preset first step-length;
Sequence with first step-length in the first frequency histogram according to energy from large to small, lookup are arranged from large to small It is listed in N number of section of top N, determines that the corresponding color value in N number of section found is the first Essential colour of first component, Wherein, N is the integer more than or equal to 2;
Determine that the corresponding color of the first component for meeting the first preset condition is the first escape color, wherein the first default item Part is to be greater than the first preset value with the absolute value of the difference of first Essential colour, and be not belonging in the first frequency histogram The first pre-set interval where first Essential colour.
4. according to the method described in claim 3, it is characterized in that, second component for the pixel, obtains the text The Essential colour and escape color of block, comprising:
Obtain the second component second frequency histogram and preset second step-length;
Sequence with second step-length in the second frequency histogram according to energy from large to small, lookup are arranged from large to small M M sections before being listed in determine that the corresponding color value in M section found is the second Essential colour of the second component, Wherein, M is the integer more than or equal to 2;
Determine that the corresponding color of second component for meeting the second preset condition is the second escape color, wherein the second default item Part is to be greater than the second preset value with the absolute value of the difference of second Essential colour, and be not belonging in the second frequency histogram The second pre-set interval where second Essential colour.
5. according to the method described in claim 4, it is characterized in that, third component for the pixel, obtains the text The Essential colour and escape color of block, comprising:
Obtain the three-component third frequency histogram and preset third step-length;
Sequence with the third step-length in the third frequency histogram according to energy from large to small, lookup are arranged from large to small K K sections before being listed in determine that the corresponding color value in K section found is the three-component third Essential colour, Wherein, K is the integer more than or equal to 2;
Determine that the corresponding color of third component for meeting third preset condition is third escape color, wherein the third presets item Part is to be greater than third preset value with the absolute value of the difference of the third Essential colour, and be not belonging in the third frequency histogram Third pre-set interval where the third Essential colour.
6. according to the method described in claim 5, it is characterized in that, before the pixel of the character block is divided into two layers, institute State method further include: Essential colour and escape color to the pixel quantify, wherein
To the Essential colour of the 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;
Carrying out quantization to the escape color of the pixel includes: by following formula to the first component of the character block, second point Amount and three-component escape color are quantified:Wherein, A is used to characterize the escape color after quantization, and B is used In any one component for indicating pixel, σ is used to indicate the corresponding step-length of any one component of pixel.
7. according to the method described in claim 6, it is characterized in that, successively right from high to low in the frequency according to each layer of pixel Before each layer of pixel is transmitted, the method also includes: it is successively right from high to low according to the frequency of each layer of pixel The each layer of pixel carries out compressed encoding, 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:
According to the Essential colour of each component of pixel in the character block and escape color, the corresponding label of each component is determined Index value;
According to the incidence relation of the marked index value of the pixel and the marked index value of neighborhood territory pixel, the pre- of the pixel is determined Survey index value;
Compressed encoding is carried out to the character block according to the marked index value of pixel each in the character block and prediction index value.
8. a kind of transmitting device of character block characterized by comprising
Hierarchical block, for the pixel of the character block to be divided into multilayer according to the frequency that the pixel occurs;
Transmission module, the frequency for occurring according to each layer of pixel from high to low successively pass each layer of pixel It is defeated;
Described device further include:
First obtains module, for before the pixel of character block is divided into multilayer according to the frequency that pixel occurs, for obtaining Current network bandwidth;
Switch process module, for when current network bandwidth is less than pre-set bandwidths, conversion to hierarchical block execution will be literary The pixel of block is divided into multilayer according to the frequency that pixel occurs;
Described device further include:
Decoder module, for being successively decoded in the order received to the compressed encoding result of multilayer pixel, wherein not In the case where the compressed encoding result for all receiving the multilayer pixel, the compression not received is replaced by the 4th preset value The pixel of coding result substitutes the 4th preset value after all receiving the compressed encoding result of the multilayer pixel Pixel be updated.
9. a kind of storage medium, which is characterized in that the storage medium includes the program of storage, wherein run in described program When control the storage medium where equipment perform claim require any one of 1 to 7 described in character block transmission method.
CN201710344509.1A 2017-05-16 2017-05-16 The transmission method and device of character block Active CN107147913B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710344509.1A CN107147913B (en) 2017-05-16 2017-05-16 The transmission method and device of character block

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710344509.1A CN107147913B (en) 2017-05-16 2017-05-16 The transmission method and device of character block

Publications (2)

Publication Number Publication Date
CN107147913A CN107147913A (en) 2017-09-08
CN107147913B true CN107147913B (en) 2019-11-19

Family

ID=59777077

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710344509.1A Active CN107147913B (en) 2017-05-16 2017-05-16 The transmission method and device of character block

Country Status (1)

Country Link
CN (1) CN107147913B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107770539A (en) * 2017-10-13 2018-03-06 西安万像电子科技有限公司 The coding method of character block and device and its coding/decoding method and device
CN108632612B (en) * 2018-05-23 2021-10-08 上海京像微电子有限公司 Method and apparatus for code compression
CN108881913B (en) * 2018-08-03 2020-09-22 西安万像电子科技有限公司 Method and apparatus for image encoding
CN110460855B (en) * 2019-07-22 2023-04-18 西安万像电子科技有限公司 Image processing method and system
CN111932643B (en) * 2020-06-24 2025-07-18 西安万像电子科技有限公司 Image processing method, device, equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3108658B1 (en) * 2014-03-14 2020-05-06 HFI Innovation Inc. Method of color index coding with palette stuffing
CN105472392B (en) * 2015-12-11 2018-11-20 西安万像电子科技有限公司 Screen video decoding method and codec based on the compression of gradual character block
CN105554504B (en) * 2015-12-15 2018-07-03 辽宁师范大学 Index map coding and decoding methods based on lifting sequence tuple
CN106604032B (en) * 2016-11-29 2020-02-04 西安万像电子科技有限公司 Method and device for compressing Chinese character blocks in image and method and device for compressing image

Also Published As

Publication number Publication date
CN107147913A (en) 2017-09-08

Similar Documents

Publication Publication Date Title
CN107147913B (en) The transmission method and device of character block
CN106385592B (en) Method for compressing image and device
CN107566842B (en) The methods, devices and systems of image coding and decoding compression
US8780996B2 (en) System and method for encoding and decoding video data
US20240105193A1 (en) Feature Data Encoding and Decoding Method and Apparatus
CN106385585B (en) The method, apparatus of frame encoding and decoding, system, storage medium
CN106331716B (en) Video-frequency compression method and device
CN106604032B (en) Method and device for compressing Chinese character blocks in image and method and device for compressing image
CN108881913B (en) Method and apparatus for image encoding
CN110087083A (en) Method for selecting intra chroma prediction mode, image processing apparatus, and storage apparatus
CN106686384A (en) Character block compression method, device, image compression method and device
CN108235038B (en) Method and device for image coding, decoding and compressing
US8630500B2 (en) Method for the encoding by segmentation of a picture
CN106851280B (en) The method and apparatus of compression of images
CN103929640A (en) Techniques For Managing Video Streaming
CN107172430B (en) The coding method of character block and device
Krasnorutsky et al. Integration of Video Image Decryption Coding into a Remote Video Information Service
CN106851294B (en) The compression method and device of image and its compression method and device of character block
US20240121439A1 (en) Point cloud attribute information encoding method and apparatus, point cloud attribute information decoding method and apparatus, and related device
CN106713924B (en) For text layered compression method and device
CN107197273B (en) The coding method of image and device
CN106791841B (en) Method for compressing image and device
CN106878728B (en) The compression method and device of image
CN107197295A (en) A kind of coded system and method
Zhang et al. A hybrid data compression scheme for improved VNC

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230105

Address after: Room 740, No. 1256 and 1258, Wanrong Road, Jing'an District, Shanghai, 200072

Patentee after: Shanghai Jingda Xinlian Information Technology Co.,Ltd.

Address before: Room d102, building 4, Fengye Xindu District, hi tech Zone, Xi'an City, Shaanxi Province

Patentee before: XI'AN VANXVM ELECTRONICS TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230726

Address after: 710075, 2nd Floor, Building 5, Taiwei Zhilian Center, No. 8 Tangyan South Road, High tech Zone, Xi'an City, Shaanxi Province

Patentee after: XI'AN VANXVM ELECTRONICS TECHNOLOGY Co.,Ltd.

Address before: Room 740, No. 1256 and 1258, Wanrong Road, Jing'an District, Shanghai, 200072

Patentee before: Shanghai Jingda Xinlian Information Technology Co.,Ltd.