CN105554504A - Index map encoding and decoding methods based on ascending and descending tuples - Google Patents

Index map encoding and decoding methods based on ascending and descending tuples Download PDF

Info

Publication number
CN105554504A
CN105554504A CN201510933456.8A CN201510933456A CN105554504A CN 105554504 A CN105554504 A CN 105554504A CN 201510933456 A CN201510933456 A CN 201510933456A CN 105554504 A CN105554504 A CN 105554504A
Authority
CN
China
Prior art keywords
tuple
descending
ascending order
index value
sequence
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
CN201510933456.8A
Other languages
Chinese (zh)
Other versions
CN105554504B (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.)
Liaoning Normal University
Original Assignee
Liaoning Normal University
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 Liaoning Normal University filed Critical Liaoning Normal University
Priority to CN201510933456.8A priority Critical patent/CN105554504B/en
Publication of CN105554504A publication Critical patent/CN105554504A/en
Application granted granted Critical
Publication of CN105554504B publication Critical patent/CN105554504B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses index map encoding and decoding methods based on ascending and descending tuples, which can lower the algorithm complexity and increase the encoding efficiency. The method comprises the following steps: firstly, constructing a two-tuple sequence through every two adjacent index values in an index map; secondly, marking information about positions of ascending and descending two-tuples in the index map with an ascending mark table and a descending mark table; thirdly, adaptively allocating code words to the two-tuples; and lastly, compressing the ascending mark table, the descending mark table and the two-tuple code words through context-based adaptive binary arithmetic coding. At a decoding end, an original index map can be reconstructed through an inverse process of the process above.

Description

Based on the index map Code And Decode method of lifting sequence tuple
Technical field
The present invention relates to image compression encoding field, especially a kind of index map Code And Decode method based on lifting sequence tuple reducing algorithm complex and improve code efficiency.
Background technology
On the one hand, along with the rise of digital library, a large amount of papery data is scanned into digital image format, although save Library space, also proposes requirements at the higher level to the memory space of computer simultaneously; On the other hand, the application of video conference, remote teaching, cloud computing, in addition individual mobile terminal etc. is more and more universal, increasing application to require the content delivery of local computer screen display to remote terminal shows, to realize Screen sharing, some application even requires that two computers realize real-time response, and this just proposes requirement of real-time to the transmission of computer screen image.
Solve above-mentioned scan text storage problem and screen picture real-time Transmission problem, efficient compressed encoding is one of key technology.A distinguishing feature of scan text, screen picture and facsimile signal etc. is all mixed with the dissimilar content such as text, figure and natural image, so be otherwise known as " combination picture (CompoundImage) ".Although there is multiple typical image compression algorithm at present, as JPEG, JPEG2000, Djvu, MRC etc., JPEG encodes mainly for the natural image of continuous tone, but cannot meet the requirement of text image to compression ratio and quality well; Although the feature that Djvu, MRC scheduling algorithm can take into account text image realizes coding, but its algorithm complex is all higher.In this context, design a kind of special high efficient coding algorithm for text/graphics image and just seem very urgent and necessary.
Because text image is typical non-continuous tone image, the gray value comprised is less, so researchers propose a kind of palette-index map algorithm.The main thought of this algorithm is as primary colours using several gray values maximum for occurrence number in image, and be respectively its appointment different index value thus set up palette, again index value corresponding for the gray value of pixel each in image is substituted and just define a width index map, and then the object that coding can reach compressed image is carried out to index map.Specifically, generally adopt 4 kinds of primary colours, then with certain quantization step, other gray value is quantized into primary colours, the gray value that can not be quantized into Essential colour is then called escape look (Esccpecolor), all escape looks use same index value, so index map is just made up of 5 index values.Now, effective compression of index map is just become to the key of palette-index map algorithm realization text image Efficient Compression.Current, dictionary coding, arithmetic coding, template matches and predictive coding etc. are mainly contained to the coding method of index map.In these methods, some method complexities are higher, and some compression algorithm efficiency is lower, remains at larger room for improvement.
Summary of the invention
The present invention is the above-mentioned technical problem in order to solve existing for prior art, provides a kind of index map Code And Decode method based on lifting sequence tuple reducing algorithm complex and improve code efficiency.
Technical scheme of the present invention is: a kind of index map coding method based on lifting sequence tuple, is characterized in that carrying out as follows:
A. use the first index value of 3bit direct coding index map, generate simultaneously n× nthe two-value ascending order label table of size and n× nthe two-value descending label table of size, juxtaposition initial value 0, described in nfor index map size;
B. press raster scan order scanning index figure, current index value and next index value form two tuples; If current index value is less than next index value, then this sequence is ascending order two tuple, and putting current location list item in ascending order label table is 1, and encodes to this ascending order two tuple, the code word of ascending order two tuple is added in the encoding code stream of lifting sequence tuple sequence; If current index value is greater than next index value, then this sequence is descending two tuple, and putting current location list item in descending label table is 1, and encodes to this descending two tuple, the code word of descending two tuple is added in the encoding code stream of lifting sequence tuple sequence; If current index value equals next index value, then repeated execution of steps b; Until index map is scanned;
C. vertically sequential scanning ascending order label table and descending label table, and be placed in before lifting sequence tuple sequence encoding code stream by scanning the binary code stream obtained, finally adopt the binary arithmetic coding method based on context-adaptive to compress above-mentioned encoding code stream, thus export final encoding code stream.
The step that described b step is encoded to ascending order two tuple is as follows:
B11. judge the starting elemental of this ascending order two tuple, if it is 0, then go to step b12; If it is 1, then go to step b13; If it is 2, then go to step b14; If it is 3, then go to step b15;
B12. starting elemental be 0 ascending order two tuple (0,1), (0,2), (0,3) and (0,4) with 2bit coding, for its distribute code word respectively: 00,01,10 and 11;
B13. starting elemental be 1 ascending order two tuple (1,2), (1,3) and (Isosorbide-5-Nitrae) with 2bit coding, for its distribute code word respectively: 00,01 and 10;
B14. starting elemental be 2 ascending order two tuple (2,3) and (2,4) with 1bit coding, for its distribute code word be 0 and 1 respectively;
B15. starting elemental is ascending order two tuple (3,4) of 3, without the need to being its distribution codeword.
The step that b step is encoded to descending two tuple is as follows:
B21. judge the starting elemental of this descending two tuple, if it is 4, then go to step b22; If it is 3, then go to step b23; If it is 2, then go to step b24; If it is 1, then go to step b25;
B22. starting elemental be 4 ascending order two tuple (4,0), (4,1), (4,2) and (4,3) with 2bit coding, for its distribute code word respectively: 00,01,10 and 11;
B23. starting elemental be 3 descending two tuple (3,0), (3,1) and (3,2) with 2bit coding, for its distribute code word respectively: 00,01 and 10;
B24. starting elemental be 2 descending two tuple (2,0) and (2,1) with 1bit coding, for its distribute code word respectively: 0 and 1;
B25. starting elemental is descending two tuple (1,0) of 1, without the need to being its distribution codeword.
A coding/decoding method for the index map based on lifting sequence tuple that the above-mentioned index map coding method based on lifting sequence tuple is corresponding, when it is characterized in that decoding end receives a string code stream, performs following steps:
D. before decoding, 3bit obtains first index value of index map, simultaneously as current index value;
E. adopt arithmetic decoding method to decode to code stream, extract n× nthe ascending order label table of size and descending label table, residue code stream is the code word of lifting sequence tuple sequence;
F. scan ascending order label table and descending label table by raster scan order, if the mark value obtained is 0, be then the value of current location in index map with current index value simultaneously; If obtain mark value 1 in ascending order label table, then go to step g; If obtain mark value 1 in descending label table, then go to step h; Complete until decode;
If g. current index value is 0 or 1, then from the binary code stream of lifting sequence tuple, extracts 2bit and decode corresponding ascending order two tuple; If current index value is 2, then from the binary code stream of lifting sequence tuple, extracts 1bit and decode corresponding ascending order two tuple; If current index value is 3, then directly can obtain corresponding ascending order two tuple; The 2nd element newly obtaining two tuples is set to current index value, goes to step f;
If h. current index value is 4 or 3, then from the binary code stream of lifting sequence tuple, extracts 2bit and decode corresponding descending two tuple; If current index value is 2, then from the binary code stream of lifting sequence tuple, extracts 1bit and decode corresponding descending two tuple; If current index value is 1, then directly can obtain corresponding descending two tuple; The 2nd element newly obtaining two tuples is set to current index value, goes to step f.
Compared with prior art, the present invention has the following advantages: the first, and algorithm complex is low.Only need travel through an index map, can complete in linear time complexity; The second, code efficiency is higher.Because text image exists a large amount of smooth regions, the element that the present invention scans in the ascending order label table and descending label table obtained more than 80% is 0, adopts the binary arithmetic coding based on context-adaptive can obtain higher compression ratio.
Embodiment
Based on an index map coding method for lifting sequence tuple, it is characterized in that carrying out as follows:
A. use the first index value of 3bit direct coding index map, generate simultaneously n× nthe two-value ascending order label table of size and n× nthe two-value descending label table of size, juxtaposition initial value 0, described in nfor index map size;
B. press raster scan order scanning index figure, current index value and next index value form two tuples; If current index value is less than next index value, then this sequence is ascending order two tuple, and putting current location list item in ascending order label table is 1, and encodes to this ascending order two tuple, the code word of ascending order two tuple is added in the encoding code stream of lifting sequence tuple sequence; If current index value is greater than next index value, then this sequence is descending two tuple, and putting current location list item in descending label table is 1, and encodes to this descending two tuple, the code word of descending two tuple is added in the encoding code stream of lifting sequence tuple sequence; If current index value equals next index value, then repeated execution of steps b; Until index map is scanned;
C. vertically sequential scanning ascending order label table and descending label table, and be placed in before lifting sequence tuple sequence encoding code stream by scanning the binary code stream obtained, finally adopt the binary arithmetic coding method based on context-adaptive to compress above-mentioned encoding code stream, thus export final encoding code stream.
The step that described b step is encoded to ascending order two tuple is as follows:
B11. judge the starting elemental of this ascending order two tuple, if it is 0, then go to step b12; If it is 1, then go to step b13; If it is 2, then go to step b14; If it is 3, then go to step b15;
B12. starting elemental be 0 ascending order two tuple (0,1), (0,2), (0,3) and (0,4) with 2bit coding, for its distribute code word respectively: 00,01,10 and 11;
B13. starting elemental be 1 ascending order two tuple (1,2), (1,3) and (Isosorbide-5-Nitrae) with 2bit coding, for its distribute code word respectively: 00,01 and 10;
B14. starting elemental be 2 ascending order two tuple (2,3) and (2,4) with 1bit coding, for its distribute code word be 0 and 1 respectively;
B15. starting elemental is ascending order two tuple (3,4) of 3, without the need to being its distribution codeword.
The step that b step is encoded to descending two tuple is as follows:
B21. judge the starting elemental of this descending two tuple, if it is 4, then go to step b22; If it is 3, then go to step b23; If it is 2, then go to step b24; If it is 1, then go to step b25;
B22. starting elemental be 4 ascending order two tuple (4,0), (4,1), (4,2) and (4,3) with 2bit coding, for its distribute code word respectively: 00,01,10 and 11;
B23. starting elemental be 3 descending two tuple (3,0), (3,1) and (3,2) with 2bit coding, for its distribute code word respectively: 00,01 and 10;
B24. starting elemental be 2 descending two tuple (2,0) and (2,1) with 1bit coding, for its distribute code word respectively: 0 and 1;
B25. starting elemental is descending two tuple (1,0) of 1, without the need to being its distribution codeword.
A coding/decoding method for the index map based on lifting sequence tuple that the above-mentioned index map coding method based on lifting sequence tuple is corresponding, when it is characterized in that decoding end receives a string code stream, performs following steps:
D. before decoding, 3bit obtains first index value of index map, simultaneously as current index value;
E. adopt arithmetic decoding method to decode to code stream, extract n× nthe ascending order label table of size and descending label table, residue code stream is the code word of lifting sequence tuple sequence;
F. scan ascending order label table and descending label table by raster scan order, if the mark value obtained is 0, be then the value of current location in index map with current index value simultaneously; If obtain mark value 1 in ascending order label table, then go to step g; If obtain mark value 1 in descending label table, then go to step h; Complete until decode;
If g. current index value is 0 or 1, then from the binary code stream of lifting sequence tuple, extracts 2bit and decode corresponding ascending order two tuple; If current index value is 2, then from the binary code stream of lifting sequence tuple, extracts 1bit and decode corresponding ascending order two tuple; If current index value is 3, then directly can obtain corresponding ascending order two tuple; The 2nd element newly obtaining two tuples is set to current index value, goes to step f;
If h. current index value is 4 or 3, then from the binary code stream of lifting sequence tuple, extracts 2bit and decode corresponding descending two tuple; If current index value is 2, then from the binary code stream of lifting sequence tuple, extracts 1bit and decode corresponding descending two tuple; If current index value is 1, then directly can obtain corresponding descending two tuple; The 2nd element newly obtaining two tuples is set to current index value, goes to step f.

Claims (4)

1., based on an index map coding method for lifting sequence tuple, it is characterized in that carrying out as follows:
A. use the first index value of 3bit direct coding index map, generate simultaneously n× nthe two-value ascending order label table of size and n× nthe two-value descending label table of size, juxtaposition initial value 0, described in nfor index map size;
B. press raster scan order scanning index figure, current index value and next index value form two tuples; If current index value is less than next index value, then this sequence is ascending order two tuple, and putting current location list item in ascending order label table is 1, and encodes to this ascending order two tuple, the code word of ascending order two tuple is added in the encoding code stream of lifting sequence tuple sequence; If current index value is greater than next index value, then this sequence is descending two tuple, and putting current location list item in descending label table is 1, and encodes to this descending two tuple, the code word of descending two tuple is added in the encoding code stream of lifting sequence tuple sequence; If current index value equals next index value, then repeated execution of steps b; Until index map is scanned;
C. vertically sequential scanning ascending order label table and descending label table, and be placed in before lifting sequence tuple sequence encoding code stream by scanning the binary code stream obtained, finally adopt the binary arithmetic coding method based on context-adaptive to compress above-mentioned encoding code stream, thus export final encoding code stream.
2. the index map coding method based on lifting sequence tuple according to claim 1, is characterized in that the step that described b step is encoded to ascending order two tuple is as follows:
B11. judge the starting elemental of this ascending order two tuple, if it is 0, then go to step b12; If it is 1, then go to step b13; If it is 2, then go to step b14; If it is 3, then go to step b15;
B12. starting elemental be 0 ascending order two tuple (0,1), (0,2), (0,3) and (0,4) with 2bit coding, for its distribute code word respectively: 00,01,10 and 11;
B13. starting elemental be 1 ascending order two tuple (1,2), (1,3) and (Isosorbide-5-Nitrae) with 2bit coding, for its distribute code word respectively: 00,01 and 10;
B14. starting elemental be 2 ascending order two tuple (2,3) and (2,4) with 1bit coding, for its distribute code word be 0 and 1 respectively;
B15. starting elemental is ascending order two tuple (3,4) of 3, without the need to being its distribution codeword.
3. the index map coding method based on lifting sequence tuple according to claim 1, is characterized in that the step that described b step is encoded to descending two tuple is as follows:
B21. judge the starting elemental of this descending two tuple, if it is 4, then go to step b22; If it is 3, then go to step b23; If it is 2, then go to step b24; If it is 1, then go to step b25;
B22. starting elemental be 4 ascending order two tuple (4,0), (4,1), (4,2) and (4,3) with 2bit coding, for its distribute code word respectively: 00,01,10 and 11;
B23. starting elemental be 3 descending two tuple (3,0), (3,1) and (3,2) with 2bit coding, for its distribute code word respectively: 00,01 and 10;
B24. starting elemental be 2 descending two tuple (2,0) and (2,1) with 1bit coding, for its distribute code word respectively: 0 and 1;
B25. starting elemental is descending two tuple (1,0) of 1, without the need to being its distribution codeword.
4. corresponding with the index map coding method based on the being elevated sequence tuple according to claim 1 coding/decoding method of index map based on being elevated sequence tuple, when it is characterized in that decoding end receives a string code stream, performs following steps:
D. before decoding, 3bit obtains first index value of index map, simultaneously as current index value;
E. adopt arithmetic decoding method to decode to code stream, extract n× nthe ascending order label table of size and descending label table, residue code stream is the code word of lifting sequence tuple sequence;
F. scan ascending order label table and descending label table by raster scan order, if the mark value obtained is 0, be then the value of current location in index map with current index value simultaneously; If obtain mark value 1 in ascending order label table, then go to step g; If obtain mark value 1 in descending label table, then go to step h; Complete until decode;
If g. current index value is 0 or 1, then from the binary code stream of lifting sequence tuple, extracts 2bit and decode corresponding ascending order two tuple; If current index value is 2, then from the binary code stream of lifting sequence tuple, extracts 1bit and decode corresponding ascending order two tuple; If current index value is 3, then directly can obtain corresponding ascending order two tuple; The 2nd element newly obtaining two tuples is set to current index value, goes to step f;
If h. current index value is 4 or 3, then from the binary code stream of lifting sequence tuple, extracts 2bit and decode corresponding descending two tuple; If current index value is 2, then from the binary code stream of lifting sequence tuple, extracts 1bit and decode corresponding descending two tuple; If current index value is 1, then directly can obtain corresponding descending two tuple; The 2nd element newly obtaining two tuples is set to current index value, goes to step f.
CN201510933456.8A 2015-12-15 2015-12-15 Index map coding and decoding methods based on lifting sequence tuple Expired - Fee Related CN105554504B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510933456.8A CN105554504B (en) 2015-12-15 2015-12-15 Index map coding and decoding methods based on lifting sequence tuple

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510933456.8A CN105554504B (en) 2015-12-15 2015-12-15 Index map coding and decoding methods based on lifting sequence tuple

Publications (2)

Publication Number Publication Date
CN105554504A true CN105554504A (en) 2016-05-04
CN105554504B CN105554504B (en) 2018-07-03

Family

ID=55833411

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510933456.8A Expired - Fee Related CN105554504B (en) 2015-12-15 2015-12-15 Index map coding and decoding methods based on lifting sequence tuple

Country Status (1)

Country Link
CN (1) CN105554504B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107147913A (en) * 2017-05-16 2017-09-08 西安万像电子科技有限公司 The transmission method and device of character block

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101042295A (en) * 2007-01-23 2007-09-26 浙江工业大学 Producing method capable of global indexing coding sequence and uses thereof
CN102223541A (en) * 2011-07-14 2011-10-19 北京工业大学 Method for coding hybrid image
US20120082223A1 (en) * 2010-10-01 2012-04-05 Qualcomm Incorporated Indicating intra-prediction mode selection for video coding

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101042295A (en) * 2007-01-23 2007-09-26 浙江工业大学 Producing method capable of global indexing coding sequence and uses thereof
US20120082223A1 (en) * 2010-10-01 2012-04-05 Qualcomm Incorporated Indicating intra-prediction mode selection for video coding
CN102223541A (en) * 2011-07-14 2011-10-19 北京工业大学 Method for coding hybrid image

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107147913A (en) * 2017-05-16 2017-09-08 西安万像电子科技有限公司 The transmission method and device of character block

Also Published As

Publication number Publication date
CN105554504B (en) 2018-07-03

Similar Documents

Publication Publication Date Title
CN106170921B (en) It is related to the source code and decoding method and device of the data of sign compression
CN101816177B (en) Textual image coding
WO2020057182A1 (en) Image compression method and apparatus
CN100581252C (en) Method for improving entropy coding
CN104780379B (en) A kind of compression method of screen picture set
CN101039374B (en) Image lossless compression method
US11202083B2 (en) Encoder, decoder and method employing palette utilization and compression
CN103458242A (en) Method for compressing and uncompressing image based on color classification and cluster
CN113542740B (en) Image transmission method and device
CN1694058A (en) Remote display processing method based on server end/client end structure
JP2016226001A (en) Decoder and decoding method
CN108141591A (en) For non-4:4:The entropy coding technology of the display stream compression (DSC) of 4 coloration sub-samplings
US20150030066A1 (en) Screen content coding systems and methods
TW201625003A (en) Coding method and decoding method for color palette and electronic device
US8933826B2 (en) Encoder apparatus, decoder apparatus and method
WO2014131527A1 (en) Data encoder, data decoder and method
CN100425066C (en) Image compression method
CN102550009B (en) Joint scalar embedded graphics coding for color images
CN102256126A (en) Method for coding mixed image
CN105554504A (en) Index map encoding and decoding methods based on ascending and descending tuples
CN105491384A (en) Palette encoding method, palette decoding method, and electronic device
CN115037941A (en) Intelligent bracelet picture compression storage method for improving compression rate
CN103024246A (en) Documentary archive image compressing method
CN105007483B (en) A kind of screen content coding-decoding method compatible with H264 standards
Gupta et al. Lossless compression based Kmp technique

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180703

Termination date: 20181215

CF01 Termination of patent right due to non-payment of annual fee