CN108881913A - The method and apparatus of image coding - Google Patents

The method and apparatus of image coding Download PDF

Info

Publication number
CN108881913A
CN108881913A CN201810878359.7A CN201810878359A CN108881913A CN 108881913 A CN108881913 A CN 108881913A CN 201810878359 A CN201810878359 A CN 201810878359A CN 108881913 A CN108881913 A CN 108881913A
Authority
CN
China
Prior art keywords
block
code stream
layer
frequency
layer encoding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810878359.7A
Other languages
Chinese (zh)
Other versions
CN108881913B (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 CN201810878359.7A priority Critical patent/CN108881913B/en
Publication of CN108881913A publication Critical patent/CN108881913A/en
Application granted granted Critical
Publication of CN108881913B publication Critical patent/CN108881913B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/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/30Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses a kind of method and apparatus of image coding.Wherein, this method includes:Macro block (mb) type is divided to frame image to be encoded;Intra block in macro block (mb) type is encoded, the first layer encoding code stream and remaining layer bit stream of intra block are obtained;By in the first layer encoding code stream and macro block (mb) type, motion vector, macro block (mb) type of intra block same color lump and invariant block encode, obtain the first layer encoding code stream of frame image;Send the first layer encoding code stream and remaining layer bit stream of frame image.The present invention is solved due to the low technical problem of compression efficiency during carrying out coding compression to image in the prior art.

Description

The method and apparatus of image coding
Technical field
The present invention relates to image technique application fields, in particular to a kind of method and apparatus of image coding.
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. Wherein biggish difference has:
The discontinuous content of computer picture is more, such as text etc.;It is more that image content is contacted in natural video frequency;
Computer picture has more macro block, is that there is no solid block of color in natural video frequency.
At present in the compression algorithm of computer picture, the compression scheme based on content is relatively mostly used, that is, is directed to solid block of color, text Block, picture block use different compression schemes.For the compressed in layers of image, wavelet algorithm Delamination Transmission is relatively mostly used.
But small echo layered velocity is slow, is not suitable for real-time Transmission;And for based on content after whole figure wavelet transformation Sorting code number has certain destructive and increases unnecessary code stream.
For above-mentioned due to the low problem of compression efficiency, mesh during carrying out coding compression to image in the prior art It is preceding not yet to put forward effective solutions.
Summary of the invention
The embodiment of the invention provides a kind of method and apparatus of image coding, at least to solve due to existing in the prior art The low technical problem of compression efficiency during coding compression is carried out to image.
According to an aspect of an embodiment of the present invention, a kind of method of image coding is provided, including:To frame to be encoded Image divides macro block (mb) type;Intra block in macro block (mb) type is encoded, obtain intra block first layer encoding code stream and its Remaining layer bit stream;By same color lump in the first layer encoding code stream and macro block (mb) type, motion vector, macro block (mb) type of intra block and constant Block is encoded, and the first layer encoding code stream of frame image is obtained;Send the first layer encoding code stream and remaining layer bit stream of frame image.
Optionally, macro block (mb) type includes:Same color lump, invariant block and intra block;Wherein, include with color lump:The macroblock number of N*N According to all equal macro block of value;Invariant block includes:The macro block equal with previous frame corresponding position content;Intra block includes:Except homochromy Other macro blocks except block and invariant block, wherein N is natural number.
Optionally, the intra block in macro block (mb) type is encoded, obtain intra block first layer encoding code stream and remaining Layer bit stream includes:The number of high gradient pixel and the accounting of Essential colour in intra block are screened, picture block and character block are obtained;To figure Tile is converted, and the subband of each frequency type is obtained, wherein and frequency type includes first frequency and second frequency, and first Frequency is less than second frequency;The Essential colour of subband and character block to first frequency encodes, and obtains the first layer of intra block Encoding code stream;The escape color and residual error of the subband residual error of first frequency, the subband of second frequency and character block are encoded, Obtain remaining layer bit stream of intra block.
Further, optionally, the Essential colour of the subband of first frequency and character block is encoded, obtains intra block First layer encoding code stream includes:Discrete cosine transform is carried out to the subband of first frequency, and transformed subband is quantified, Obtain the first layer encoding code stream of picture block;The nearest Essential colour of distance escape color is obtained to the escape color after quantization, and is generated Essential colour code table and prediction index code table;By the first layer encoding code stream of picture block and Essential colour code table and prediction index code table It is encoded, obtains the first layer encoding code stream of intra block.
Optionally, the escape color and residual error of the subband to the subband residual error of first frequency, second frequency and character block into Row coding, the remainder layer code stream for obtaining intra block include:The subband residual error of first frequency is encoded, the of picture block is obtained Two layers of encoding code stream;The subband of second frequency is encoded, the third layer encoding code stream of picture block is obtained;To in character block The position of escape color and escape colour coding table are encoded, and the second layer encoding code stream of character block is obtained;To the residual error in character block It is encoded, obtains the third layer encoding code stream of character block;Respectively by the of the second layer encoding code stream of picture block and character block The third layer encoding code stream of the third layer encoding code stream and character block of two layers of encoding code stream and picture block is encoded, and is obtained Remaining layer bit stream.
According to another aspect of an embodiment of the present invention, a kind of device of image coding is additionally provided, including:Categorization module, For dividing macro block (mb) type to frame image to be encoded;First coding module, for being compiled to the intra block in macro block (mb) type Code obtains the first layer encoding code stream and remaining layer bit stream of intra block;Second coding module, for compiling the first layer of intra block Code code stream and macro block (mb) type, motion vector, the same color lump in macro block (mb) type and invariant block are encoded, and the first of frame image is obtained Layer encoding code stream;Sending module, for sending the first layer encoding code stream and remaining layer bit stream of frame image.
Optionally, macro block (mb) type includes:Same color lump, invariant block and intra block;Wherein, include with color lump:The macroblock number of N*N According to all equal macro block of value;Invariant block includes:The macro block equal with previous frame corresponding position content;Intra block includes:Except homochromy Other macro blocks except block and invariant block, wherein N is natural number.
Optionally, the first coding module includes:Screening unit, for screening the number and base of high gradient pixel in intra block The accounting of true qualities, obtains picture block and character block;Converter unit obtains each frequency type for converting to picture block Subband, wherein frequency type includes first frequency and second frequency, and first frequency is less than second frequency;First coding unit, Essential colour for subband and character block to first frequency encodes, and obtains the first layer encoding code stream of intra block;Second Coding unit is carried out for the subband of subband residual error, second frequency to first frequency and the escape color and residual error of character block Coding, obtains remaining layer bit stream of intra block.
Further, optionally, the first coding unit includes:Subelement is converted, is carried out for the subband to first frequency Discrete cosine transform, and transformed subband is quantified, obtain the first layer encoding code stream of picture block;Subelement is generated, For obtaining the nearest Essential colour of distance escape color to the escape color after quantization, and generate Essential colour code table and prediction index code Table;First coded sub-units, for by the first layer encoding code stream of picture block and Essential colour code table and prediction index code table into Row coding, obtains the first layer encoding code stream of intra block.
Optionally, the second coding unit includes:Second coded sub-units are compiled for the subband residual error to first frequency Code, obtains the second layer encoding code stream of picture block;Third coded sub-units are encoded for the subband to second frequency, are obtained To the third layer encoding code stream of picture block;4th coded sub-units, for in character block escape color position and escape color Code table is encoded, and the second layer encoding code stream of character block is obtained;5th coded sub-units, for the residual error in character block into Row coding, obtains the third layer encoding code stream of character block;6th coded sub-units, for respectively encoding the second layer of picture block The third layer encoding code stream of the second layer encoding code stream and picture block of code stream and character block and the third layer of character block encode code Stream is encoded, remaining layer bit stream is obtained.
Another aspect according to an embodiment of the present invention, additionally provides a kind of storage medium, and storage medium includes the journey of storage Sequence, wherein the method that program executes above-mentioned image coding.
Another aspect according to an embodiment of the present invention additionally provides a kind of processor, and processor is used to run program, In, program executes the method that above-mentioned image encodes when running.
In embodiments of the present invention, by dividing macro block (mb) type to frame image to be encoded;To in the frame in macro block (mb) type Block is encoded, and the first layer encoding code stream and remaining layer bit stream of intra block are obtained;By the first layer encoding code stream of intra block and Macro block (mb) type, motion vector, the same color lump in macro block (mb) type and invariant block are encoded, and the first layer coding code of frame image is obtained Stream;The first layer encoding code stream and remaining layer bit stream for sending frame image, have achieved the purpose that hierarchical coding, to realize promotion The technical effect of compression efficiency, and then solve due to compressing effect during carrying out coding compression to image in the prior art The low technical problem of rate.
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 diagram of the method for image coding according to an embodiment of the present invention;
Fig. 2 is the flow diagram of overall algorithm in the method for image coding according to an embodiment of the present invention;
Fig. 3 is the process signal of intra block data preparation subalgorithm in the method for image coding according to an embodiment of the present invention Figure;
Fig. 4 be image according to an embodiment of the present invention coding method in count the coding flow diagram of encoder;
Fig. 5 is the structural schematic diagram of the device of image coding according to an embodiment of the present invention.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people The model that the present invention protects all should belong in member's every other embodiment obtained without making creative work It encloses.
It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, " Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way Data be interchangeable under appropriate circumstances, so as to the embodiment of the present invention described herein can in addition to illustrating herein or Sequence other than those of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that cover Cover it is non-exclusive include, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited to Step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, product Or other step or units that equipment is intrinsic.
Embodiment 1
According to embodiments of the present invention, a kind of embodiment of the method for image coding is provided, it should be noted that in attached drawing The step of process illustrates can execute in a computer system such as a set of computer executable instructions, although also, Logical order is shown in flow chart, but in some cases, it can be to be different from shown by sequence execution herein or retouch The step of stating.
Fig. 1 is the flow diagram of the method for image coding according to an embodiment of the present invention, as shown in Figure 1, this method packet Include following steps:
Step S102 divides macro block (mb) type to frame image to be encoded;
Step S104 encodes the intra block in macro block (mb) type, obtain intra block first layer encoding code stream and its Remaining layer bit stream;
Step S106, will be homochromy in the first layer encoding code stream and macro block (mb) type, motion vector, macro block (mb) type of intra block Block and invariant block are encoded, and the first layer encoding code stream of frame image is obtained;
Step S108 sends the first layer encoding code stream and remaining layer bit stream of frame image.
In embodiments of the present invention, by dividing macro block (mb) type to frame image to be encoded;To in the frame in macro block (mb) type Block is encoded, and the first layer encoding code stream and remaining layer bit stream of intra block are obtained;By the first layer encoding code stream of intra block and Macro block (mb) type, motion vector, the same color lump in macro block (mb) type and invariant block are encoded, and the first layer coding code of frame image is obtained Stream;The first layer encoding code stream and remaining layer bit stream for sending frame image, have achieved the purpose that hierarchical coding, to realize promotion The technical effect of compression efficiency, and then solve due to compressing effect during carrying out coding compression to image in the prior art The low technical problem of rate.
Optionally, macro block (mb) type includes:Same color lump, invariant block and intra block;Wherein, include with color lump:The macroblock number of N*N According to all equal macro block of value;Invariant block includes:The macro block equal with previous frame corresponding position content;Intra block includes:Except homochromy Other macro blocks except block and invariant block, wherein N is natural number.
Optionally, the intra block in macro block (mb) type is encoded in step S104, obtains the first layer coding of intra block Code stream and remainder layer code stream include:
Step S1041 screens the number of high gradient pixel and the accounting of Essential colour in intra block, obtains picture block and text Block;
Step S1042, converts picture block, obtains the subband of each frequency type, wherein frequency type includes the One frequency and second frequency, first frequency are less than second frequency;
The Essential colour of step S1043, subband and character block to first frequency encode, and obtain the first layer of intra block Encoding code stream;
Step S1044, to the escape color and residual error of the subband residual error of first frequency, the subband of second frequency and character block It is encoded, obtains remaining layer bit stream of intra block.
Further, optionally, the subband of first frequency and the Essential colour of character block are encoded in step S1043, The first layer encoding code stream for obtaining intra block includes:
Step S10431 carries out discrete cosine transform to the subband of first frequency, and transformed subband is quantified, Obtain the first layer encoding code stream of picture block;
Step S10432 obtains the nearest Essential colour of distance escape color to the escape color after quantization, and generates basic colour coding Table and prediction index code table;
Step S10433 compiles the first layer encoding code stream of picture block and Essential colour code table and prediction index code table Code, obtains the first layer encoding code stream of intra block.
Optionally, the escape in step S1044 to the subband and character block of the subband residual error of first frequency, second frequency Color and residual error are encoded, and the remainder layer code stream for obtaining intra block includes:
Step S10441 encodes the subband residual error of first frequency, obtains the second layer encoding code stream of picture block;
Step S10442 encodes the subband of second frequency, obtains the third layer encoding code stream of picture block;
Step S10443, position and escape colour coding table to the escape color in character block encode, and obtain character block Second layer encoding code stream;
Step S10444 encodes the residual error in character block, obtains the third layer encoding code stream of character block;
Step S10445, respectively by the second layer encoding code stream of the second layer encoding code stream of picture block and character block, and The third layer encoding code stream of picture block and the third layer encoding code stream of character block are encoded, remaining layer bit stream is obtained.
To sum up, the method for image coding provided by the present application is specific as follows:
Macro block can be divided according to 16*16 size in the method for image provided by the present application coding, if wherein long or width not It is that continuation (mend for 0) is then added in 16 integral multiple;Three components of image are handled respectively.
Wherein, Fig. 2 is the flow diagram of overall algorithm in the method for image coding according to an embodiment of the present invention, such as Fig. 2 Shown, the overall algorithm of the method for image coding provided by the present application is described in detail below:
1. a pair frame image carries out macro block (mb) type division;
Same color lump:The macro block data value of 16*16 is all equal;
Invariant block:It is equal with previous frame corresponding position (or corresponding position after addition motion vector) content;
Intra block:Remove other above types of macro blocks.
2. macro block (mb) type, motion vector, same to color lump, constant block coding
After coding completes macro block (mb) type, the coding of invariant block is just had finished on.For same color lump, each piece also needs to transmit The value of all same color lumps of present frame can be carried out Huffman encoding transmission by one value.For macro block (mb) type, motion vector, homochromy The code stream accounting of block coding is minimum, and in layered scheme, these contents are placed on first layer transmission.
3. intra block data preparation
Main code stream after encoding in one frame is encoded from intra block.Data preparation is that layering is prepared.
4. compressed in layers simultaneously exports
Intra block coding first layer and above-mentioned macro block (mb) type, motion vector, homochromy block coding content be added in It is together the first layer of layered scheme.The second layer of intra block is to the last one layer second layer for layered scheme to last one layer.
Fig. 3 is the process signal of intra block data preparation subalgorithm in the method for image coding according to an embodiment of the present invention Figure, as shown in figure 3, encoded in the method for image coding provided by the present application by compressed in layers here, it is specific as follows:
1. carrying out macro block (mb) type division
The accounting for judging the number of high gradient pixel and Essential colour in the macro block, when having certain amount or more in a macro block Height pixel and primary color concentrate on certain several value, it is believed that be character block, it is other to be determined as picture block.
2. when type is picture block
According to the classification schemes of front, the content for being judged as picture block is more gentle.The difference of adjacent pixel is little.This Shen The method for the image coding that please be provided is for character block using 1 grade of Haar wavelet transformation.16*16 macro block after Haar transform There are a low frequency 8*8 subband and 3 high frequency 8*8 subbands.It is 0 that wherein the value of 3 high-frequency sub-bands, which has larger proportion,.
3. when type is character block
Character block keeps the data of 16*16 constant.
Specifically, compressed in layers and transmitting:
In the algorithm of the method introduction of image coding provided by the present application, intra block data can be divided into three layers and passed It is defeated, the compressed content of each layer of corresponding picture block and character block is described below.
Picture block first layer:
The each 16*16 macro block for being divided into picture block is done into 1 grade of Haar wavelet transformation, obtained 8*8 low frequency sub-band.It should 8*8 low frequency sub-band does 8*8 (discrete cosine transform, Discrete Cos ine Transform, DCT) transformation, quantifies, after coding Obtained code stream is as picture block first layer encoded content.Encryption algorithm for 8*8 macro block may include:JPEG compression is calculated Method.
The picture block second layer:
8*8 low frequency sub-band can generate error due to quantifying when carrying out the first layer compression, i.e., after first layer restores It is worth not fully equal with initial value.This partial difference is known as residual error.The part residual error carries out compression volume using the encoder that counts Code.First layer encoded content adds residual error portion, and 8*8 low frequency sub-band can Distortionless.The size of each macroblock residuals is 8*8.
Picture block third layer:
It is left tri- high-frequency sub-bands of LH, HL, HH during 16*16 is macro, is encoded respectively with the encoder that counts.Such as:It can press It is encoded according to different sub-band, encodes all HL subbands after encoding LH subband all in a frame, finally encode HH subband.No The subband coder of same type need to initialize the encoder data that counts.The corresponding probability initial value of each subband is obtained according to statistical law ?.
8*8 macro block count encoder as shown in figure 4, Fig. 4 be image according to an embodiment of the present invention coding method in calculate The coding flow diagram of number encoder device, scanning and coded sequence rule are as follows:
1. successively handling each macro block;
2. if mark 0 is written, skips to step 1 work as macro block all zero;
3. if mark 1 is written current macro has nonzero element;
4. the case where judging the current value of current macro one by one according to one-dimensional scanning sequence;
5. if mark 0 is written, skips to step 9 current value is 0;
6. if mark 1 is written current value is non-zero;
7. current value is greater than zero, mark 1 is written;Current value is less than or equal to zero, and mark 0 is written;
8. taking the absolute value -1 of current value and being written after carrying out binaryzation;
9. whether current block has been handled, if not skipping to step 6;
10. whether current clip has been handled, if not skipping to step 1.
In addition to this, in step 8, the scheme of binaryzation is that unitary truncated code adds Columbus's code, every unitary code when coding A corresponding probabilistic model, Columbus's code bypass encoder;
Step 2, the write-in mark mentioned in 5,8 are to generate different contexts based on neighborhood, are adjusted after calculating probable range Range.
Input each symbol when, whether be zero for the value, the positive and negative of the value utilizes neighborhood relevance progress condition Probability divides.Current point is set as A point, and the point on the A point left side is set as B point, and the point of A point upper left is set as C point.Determine the value and B, C of A point The value of point has similitude.Whether A is that zero can be divided into three classes situation:B and C be all zero, B and C be all 1, B and C have one for 0.Institute The context logic can all be applied by having all types of macro blocks of 8*8.
Character block layered scheme:
Text block coding is summarized as follows:
The most important feature of character block is that main energy concentrates in less several pixels, such as screen is shown as one The article of piece white gravoply, with black engraved characters, main energetic concentrate in white pixel and black picture element.Thus the pixel domain of energy concentration is defined For Essential colour, others are defined as escape color.Essential colour is determined according to the frequency histogram of character block, determines Essential colour later i.e. Obtain Essential colour code table.According to Essential colour and escape color, pixel in character block is encoded according to corresponding serial number (such as really Fixed four Essential colour, serial number 0,1,2,3, all escape color serial numbers 4), prediction is introduced in an encoding process.I.e. each pixel Whether tri- components of YUV of point are equal with tri- components of pixel YUV in left side, if equal indicated with symbol L;With above Whether tri- components of pixel YUV are equal, if equal indicated with symbol U;If unequal indicated with symbol O.Thus it obtains Prediction index code table.The pixel for being O for symbol, due to that can not obtain the value of itself according to neighborhood, therefore needs to write O data Corresponding code table.It is 4 for escape color Unified number in preceding step, therefore needs to write escape color and correspond to code table.Finally by front Essential colour code table, prediction index code table, O data code table, the escape colour coding table mentioned are transmitted after encoding.
Character block code stream is divided into three layers by the method for image coding provided by the present application, and specific layering is as follows.
Character block first layer:
In the transmission of this layer, escape color is not embodied.The color that will escape i.e. in quantizing process is also quantized into apart from recently basic Color.Prediction code table is generated later.It is separately encoded O data and corresponds to code table, Essential colour code table, prediction index code table.
The character block second layer:
The position for color of escaping and escape colour coding table coding are transmitted.
Character block third layer:
Quantization bring loss is subjected to coding transmission, the available encoder that counts of coded residual is encoded to obtain.
To sum up, first layer is smaller in the method for image coding provided by the present application and has preferable viewing effect;It is each The decoding of layer has obvious visual effect to be promoted;Algorithms T-cbmplexity is lower, and change algorithm is simple;Total code after layering Stream does not increase substantially.
Embodiment 2
According to another aspect of an embodiment of the present invention, a kind of device of image coding is additionally provided, Fig. 5 is according to the present invention The structural schematic diagram of the device of the image coding of embodiment, as shown in figure 5, the device includes:
Categorization module 52, for dividing macro block (mb) type to frame image to be encoded;First coding module 54, for macro block Intra block in type is encoded, and the first layer encoding code stream and remaining layer bit stream of intra block are obtained;Second coding module 56, For in the first layer encoding code stream and macro block (mb) type, motion vector, macro block (mb) type by intra block same color lump and invariant block into Row coding, obtains the first layer encoding code stream of frame image;Sending module 58, for send frame image first layer encoding code stream and Remaining layer bit stream.
In embodiments of the present invention, by dividing macro block (mb) type to frame image to be encoded;To in the frame in macro block (mb) type Block is encoded, and the first layer encoding code stream and remaining layer bit stream of intra block are obtained;By the first layer encoding code stream of intra block and Macro block (mb) type, motion vector, the same color lump in macro block (mb) type and invariant block are encoded, and the first layer coding code of frame image is obtained Stream;The first layer encoding code stream and remaining layer bit stream for sending frame image, have achieved the purpose that hierarchical coding, to realize promotion The technical effect of compression efficiency, and then solve due to compressing effect during carrying out coding compression to image in the prior art The low technical problem of rate.
Optionally, macro block (mb) type includes:Same color lump, invariant block and intra block;Wherein, include with color lump:The macroblock number of N*N According to all equal macro block of value;Invariant block includes:The macro block equal with previous frame corresponding position content;Intra block includes:Except homochromy Other macro blocks except block and invariant block, wherein N is natural number.
Optionally, the first coding module 54 includes:Screening unit, for screen in intra block the number of high gradient pixel and The accounting of Essential colour, obtains picture block and character block;Converter unit obtains each frequency class for converting to picture block The subband of type, wherein frequency type includes first frequency and second frequency, and first frequency is less than second frequency;First coding is single Member, the Essential colour for subband and character block to first frequency encode, and obtain the first layer encoding code stream of intra block;The Two coding units, for first frequency the subband of subband residual error, second frequency and the escape color of character block and residual error into Row coding, obtains remaining layer bit stream of intra block.
Further, optionally, the first coding unit includes:Subelement is converted, is carried out for the subband to first frequency Discrete cosine transform, and transformed subband is quantified, obtain the first layer encoding code stream of picture block;Subelement is generated, For obtaining the nearest Essential colour of distance escape color to the escape color after quantization, and generate Essential colour code table and prediction index code Table;First coded sub-units, for by the first layer encoding code stream of picture block and Essential colour code table and prediction index code table into Row coding, obtains the first layer encoding code stream of intra block.
Optionally, the second coding unit includes:Second coded sub-units are compiled for the subband residual error to first frequency Code, obtains the second layer encoding code stream of picture block;Third coded sub-units are encoded for the subband to second frequency, are obtained To the third layer encoding code stream of picture block;4th coded sub-units, for in character block escape color position and escape color Code table is encoded, and the second layer encoding code stream of character block is obtained;5th coded sub-units, for the residual error in character block into Row coding, obtains the third layer encoding code stream of character block;6th coded sub-units, for respectively encoding the second layer of picture block The third layer encoding code stream of the second layer encoding code stream and picture block of code stream and character block and the third layer of character block encode code Stream is encoded, remaining layer bit stream is obtained.
Embodiment 3
Another aspect according to an embodiment of the present invention, additionally provides a kind of storage medium, and storage medium includes the journey of storage Sequence, wherein the method that program executes above-mentioned image coding.
Embodiment 4
Another aspect according to an embodiment of the present invention additionally provides a kind of processor, and processor is used to run program, In, program executes the method that above-mentioned image encodes when running.
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: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 (10)

1. a kind of method of image coding, which is characterized in that including:
Macro block (mb) type is divided to frame image to be encoded;
Intra block in the macro block (mb) type is encoded, the first layer encoding code stream and remainder layer code of the intra block are obtained Stream;
It will be homochromy in the first layer encoding code stream of the intra block and the macro block (mb) type, motion vector, the macro block (mb) type Block and invariant block are encoded, and the first layer encoding code stream of the frame image is obtained;
Send the first layer encoding code stream and remaining described layer bit stream of the frame image.
2. the method according to claim 1, wherein the macro block (mb) type includes:It is the same color lump, described constant Block and the intra block;Wherein, the same color lump includes:The all equal macro block of the macro block data value of N*N;The invariant block packet It includes:The macro block equal with previous frame corresponding position content;The intra block includes:In addition to the same color lump and the invariant block Other macro blocks, wherein N is natural number.
3. method according to claim 1 or 2, which is characterized in that the intra block in the macro block (mb) type carries out Coding, the first layer encoding code stream and remainder layer code stream for obtaining the intra block include:
The accounting for screening the number of high gradient pixel and Essential colour in the intra block, obtains picture block and character block;
The picture block is converted, the subband of each frequency type is obtained, wherein frequency type includes first frequency and Two frequencies, the first frequency are less than second frequency;
The Essential colour of subband and the character block to the first frequency encodes, and the first layer for obtaining the intra block is compiled Code code stream;
Escape color and residual error to the subband residual error of the first frequency, the subband of the second frequency and the character block into Row coding, obtains remaining layer bit stream of the intra block.
4. according to the method described in claim 3, it is characterized in that, the subband and the character block to the first frequency Essential colour encoded, the first layer encoding code stream for obtaining the intra block includes:
Discrete cosine transform is carried out to the subband of the first frequency, and the transformed subband is quantified, obtains institute State the first layer encoding code stream of picture block;
The Essential colour nearest apart from the escape color is obtained to the escape color after quantization, and generates Essential colour code table and prediction Index code table;
The first layer encoding code stream of the picture block and the Essential colour code table and prediction index code table are encoded, Obtain the first layer encoding code stream of the intra block.
5. according to the method described in claim 3, it is characterized in that, the subband residual error to the first frequency, described The escape color and residual error of the subband of two frequencies and the character block are encoded, and the remainder layer stream packet of the intra block is obtained It includes:
The subband residual error of the first frequency is encoded, the second layer encoding code stream of the picture block is obtained;
The subband of the second frequency is encoded, the third layer encoding code stream of the picture block is obtained;
Position and escape colour coding table to the escape color in the character block encode, and the second layer for obtaining the character block is compiled Code code stream;
Residual error in the character block is encoded, the third layer encoding code stream of the character block is obtained;
Respectively by the second layer encoding code stream and the picture of the second layer encoding code stream of the picture block and the character block The third layer encoding code stream of block and the third layer encoding code stream of the character block are encoded, remaining described layer bit stream is obtained.
6. a kind of device of image coding, which is characterized in that including:
Categorization module, for dividing macro block (mb) type to frame image to be encoded;
First coding module obtains the first layer of the intra block for encoding to the intra block in the macro block (mb) type Encoding code stream and remaining layer bit stream;
Second coding module, for by the first layer encoding code stream of the intra block and the macro block (mb) type, motion vector, described Same color lump and invariant block in macro block (mb) type are encoded, and the first layer encoding code stream of the frame image is obtained;
Sending module, for sending the first layer encoding code stream and remaining described layer bit stream of the frame image.
7. device according to claim 6, which is characterized in that the macro block (mb) type includes:It is the same color lump, described constant Block and the intra block;Wherein, the same color lump includes:The all equal macro block of the macro block data value of N*N;The invariant block packet It includes:The macro block equal with previous frame corresponding position content;The intra block includes:In addition to the same color lump and the invariant block Other macro blocks, wherein N is natural number.
8. device according to claim 6 or 7, which is characterized in that first coding module includes:
Screening unit, for screening the accounting of the number of high gradient pixel and Essential colour in the intra block, obtain picture block and Character block;
Converter unit obtains the subband of each frequency type for converting to the picture block, wherein frequency type packet First frequency and second frequency are included, the first frequency is less than second frequency;
First coding unit, the Essential colour for subband and the character block to the first frequency encode, and obtain institute State the first layer encoding code stream of intra block;
Second coding unit, subband and the text for subband residual error, the second frequency to the first frequency The escape color and residual error of block are encoded, remaining layer bit stream of the intra block is obtained.
9. device according to claim 8, which is characterized in that first coding unit includes:
Subelement is converted, carries out discrete cosine transform for the subband to the first frequency, and by the transformed subband Quantified, obtains the first layer encoding code stream of the picture block;
Subelement is generated, for obtaining the Essential colour nearest apart from the escape color to the escape color after quantization, and is generated Essential colour code table and prediction index code table;
First coded sub-units, for by the first layer encoding code stream of the picture block and the Essential colour code table and described pre- Measuring rope draws code table and is encoded, and obtains the first layer encoding code stream of the intra block.
10. device according to claim 8, which is characterized in that second coding unit includes:
Second coded sub-units encode for the subband residual error to the first frequency, obtain the second of the picture block Layer encoding code stream;
Third coded sub-units are encoded for the subband to the second frequency, and the third layer for obtaining the picture block is compiled Code code stream;
4th coded sub-units are encoded for the position to the escape color in the character block and colour coding table of escaping, are obtained The second layer encoding code stream of the character block;
5th coded sub-units, for encoding to the residual error in the character block, the third layer for obtaining the character block is compiled Code code stream;
6th coded sub-units, for respectively compiling the second layer of the second layer encoding code stream of the picture block and the character block Code code stream and the third layer encoding code stream of the picture block and the third layer encoding code stream of the character block are encoded, and are obtained To remaining described layer bit stream.
CN201810878359.7A 2018-08-03 2018-08-03 Method and apparatus for image encoding Active CN108881913B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810878359.7A CN108881913B (en) 2018-08-03 2018-08-03 Method and apparatus for image encoding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810878359.7A CN108881913B (en) 2018-08-03 2018-08-03 Method and apparatus for image encoding

Publications (2)

Publication Number Publication Date
CN108881913A true CN108881913A (en) 2018-11-23
CN108881913B CN108881913B (en) 2020-09-22

Family

ID=64307378

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810878359.7A Active CN108881913B (en) 2018-08-03 2018-08-03 Method and apparatus for image encoding

Country Status (1)

Country Link
CN (1) CN108881913B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110460855A (en) * 2019-07-22 2019-11-15 西安万像电子科技有限公司 Image processing method and system
CN111277829A (en) * 2020-02-25 2020-06-12 西安万像电子科技有限公司 Encoding and decoding method and device
CN111586416A (en) * 2020-06-02 2020-08-25 浙江大华技术股份有限公司 Video coding method, video coding device, video coder and storage device
CN112929672A (en) * 2021-02-04 2021-06-08 山东云海国创云计算装备产业创新中心有限公司 Video compression method, device, equipment and computer readable storage medium
CN113542740A (en) * 2019-06-04 2021-10-22 西安万像电子科技有限公司 Image transmission method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008017281A (en) * 2006-07-07 2008-01-24 Kddi Corp Scrambling device and decoding device for coded image data
CN105472392A (en) * 2015-12-11 2016-04-06 钟炎培 Screen video encoding and decoding method based on progressive character block compression and encoding and decoding device
CN106713924A (en) * 2017-01-24 2017-05-24 钟炎培 Layered compression method and device for characters
CN107147913A (en) * 2017-05-16 2017-09-08 西安万像电子科技有限公司 The transmission method and device of character block
CN107172430A (en) * 2017-06-06 2017-09-15 西安万像电子科技有限公司 The coding method of character block and device
CN107197273A (en) * 2017-06-09 2017-09-22 西安万像电子科技有限公司 The coding method of image and device
CN107566842A (en) * 2017-08-31 2018-01-09 西安万像电子科技有限公司 The methods, devices and systems of image coding and decoding compression
KR20180008843A (en) * 2010-07-16 2018-01-24 한국전자통신연구원 Encoding method and apparatus for transformming hierarchical variable block and decoding method and apparatus

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008017281A (en) * 2006-07-07 2008-01-24 Kddi Corp Scrambling device and decoding device for coded image data
KR20180008843A (en) * 2010-07-16 2018-01-24 한국전자통신연구원 Encoding method and apparatus for transformming hierarchical variable block and decoding method and apparatus
CN105472392A (en) * 2015-12-11 2016-04-06 钟炎培 Screen video encoding and decoding method based on progressive character block compression and encoding and decoding device
CN106713924A (en) * 2017-01-24 2017-05-24 钟炎培 Layered compression method and device for characters
CN107147913A (en) * 2017-05-16 2017-09-08 西安万像电子科技有限公司 The transmission method and device of character block
CN107172430A (en) * 2017-06-06 2017-09-15 西安万像电子科技有限公司 The coding method of character block and device
CN107197273A (en) * 2017-06-09 2017-09-22 西安万像电子科技有限公司 The coding method of image and device
CN107566842A (en) * 2017-08-31 2018-01-09 西安万像电子科技有限公司 The methods, devices and systems of image coding and decoding compression

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113542740A (en) * 2019-06-04 2021-10-22 西安万像电子科技有限公司 Image transmission method and device
CN110460855A (en) * 2019-07-22 2019-11-15 西安万像电子科技有限公司 Image processing method and system
CN110460855B (en) * 2019-07-22 2023-04-18 西安万像电子科技有限公司 Image processing method and system
CN111277829A (en) * 2020-02-25 2020-06-12 西安万像电子科技有限公司 Encoding and decoding method and device
CN111586416A (en) * 2020-06-02 2020-08-25 浙江大华技术股份有限公司 Video coding method, video coding device, video coder and storage device
CN112929672A (en) * 2021-02-04 2021-06-08 山东云海国创云计算装备产业创新中心有限公司 Video compression method, device, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN108881913B (en) 2020-09-22

Similar Documents

Publication Publication Date Title
CN108881913A (en) The method and apparatus of image coding
CN107566842B (en) The methods, devices and systems of image coding and decoding compression
Li et al. Learning convolutional networks for content-weighted image compression
US6853755B2 (en) Method and apparatus for adaptive compression of scanned documents
Pandey et al. Application of integrated steganography and image compressing techniques for confidential information transmission
Sadek et al. Robust video steganography algorithm using adaptive skin-tone detection
CN106385592B (en) Method for compressing image and device
CN107302700A (en) Adaptive direction loop filter
CN107147913B (en) The transmission method and device of character block
WO2008045705A1 (en) Color image coding using inter-color correlation
CN107172430B (en) The coding method of character block and device
CN101841709A (en) Shunting coding method for digital video monitoring system and video monitoring system
Brahimi et al. An improved SPIHT algorithm for lossless image coding
CN107197273B (en) The coding method of image and device
CN106713924B (en) For text layered compression method and device
Singh et al. JPEG2000: A review and its performance comparison with JPEG
Aguzzi et al. A novel approach to sparse histogram image lossless compression using JPEG2000
Shen et al. Classification-based adaptive compression method for computer screen image
CN106791841B (en) Method for compressing image and device
CN106878728B (en) The compression method and device of image
CN111491166A (en) Dynamic compression system and method based on content analysis
Balaji et al. Spatial domain image packet prioritization for energy-constrained wireless communications
Keerthi et al. Investigations On Image Compression Methodologies Using Hybrid Algorithms
Galan-Hernandez et al. Advances in image and video compression using wavelet transforms and fovea centralis
Shwetha et al. Analysis of Image Compression Algorithms in WSN: A Review

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