1、 Reference numberISO/IEC 14492:2001(E)ISO/IEC 2001Information technology Lossy/lossless coding of bi-level images Technologies de linformation Codage avec/sans perte dimages deux niveaux National Standard of CanadaCAN/CSA-ISO/IEC 14492:04(ISO/IEC 14492:2001)International Standard ISO/IEC 14492:2001
2、(first edition, 2001-12-15) has been adopted without modification(IDT) as CSA Standard CAN/CSA-ISO/IEC 14492:04, which has been approved as a National Standard of Canadaby the Standards Council of Canada.ISBN 1-55397-328-3 January 2004The Canadian Standards Association (CSA), The Standards Council o
3、f Canada is theunder whose auspices this National Standard has been coordinating body of the National Standards system, produced, was chartered in 1919 and accredited by a federation of independent, autonomousthe Standards Council of Canada to the National organizations working towards the furtherSt
4、andards system in 1973. It is a not-for-profit, development and improvement of voluntarynonstatutory, voluntary membership association standardization in the national interest.engaged in standards development and certification The principal objects of the Council are to foster activities. and promot
5、e voluntary standardization as a means CSA standards reflect a national consensus of of advancing the national economy, benefiting theproducers and users including manufacturers, health, safety, and welfare of the public, assisting consumers, retailers, unions and professional and protecting the con
6、sumer, facilitating domestic organizations, and governmental agencies. The and international trade, and furthering internationalstandards are used widely by industry and commerce cooperation in the field of standards.and often adopted by municipal, provincial, and A National Standard of Canada is a
7、standard whichfederal governments in their regulations, particularly in has been approved by the Standards Council ofthe fields of health, safety, building and construction, Canada and one which reflects a reasonableand the environment. agreement among the views of a number of capableIndividuals, co
8、mpanies, and associations across individuals whose collective interests provide to theCanada indicate their support for CSAs standards greatest practicable extent a balance ofdevelopment by volunteering their time and skills to representation of producers, users, consumers, andCSA Committee work and
9、 supporting the Associations others with relevant interests, as may be appropriateobjectives through sustaining memberships. The more to the subject in hand. It normally is a standardthan 7000 committee volunteers and the 2000 which is capable of making a significant and timelysustaining memberships
10、 together form CSAs total contribution to the national interest.membership from which its Directors are chosen. Approval of a standard as a National Standard ofSustaining memberships represent a major source of Canada indicates that a standard conforms to theincome for CSAs standards development act
11、ivities. criteria and procedures established by the StandardsThe Association offers certification and testing Council of Canada. Approval does not refer to theservices in support of and as an extension to its technical content of the standard; this remains thestandards development activities. To ens
12、ure the continuing responsibility of the accreditedintegrity of its certification process, the Association standards-development organization.regularly and continually audits and inspects products Those who have a need to apply standards arethat bear the CSA Mark. encouraged to use National Standard
13、s of CanadaIn addition to its head office and laboratory complex whenever practicable. These standards are subject in Toronto, CSA has regional branch offices in major to periodic review; therefore, users are cautioned centres across Canada and inspection and testing to obtain the latest edition fro
14、m the organizationagencies in eight countries. Since 1919, the preparing the standard.Association has developed the necessary expertise to The responsibility for approving National Standards meet its corporate mission: CSA is an independent of Canada rests with theservice organization whose mission
15、is to provide an Standards Council of Canadaopen and effective forum for activities facilitating the 270 Albert Street, Suite 200exchange of goods and services through the use of Ottawa, Ontario, K1P 6N7standards, certification and related services to meet Canadanational and international needs.For
16、further information on CSA services, write toCanadian Standards Association5060 Spectrum Way, Suite 100Mississauga, Ontario, L4W 5N6CanadaAlthough the intended primary application of this Standard is stated in its Scope, it is importantto note that it remains the responsibility of the users to judge
17、 its suitability for their particular purpose.Registered trade-mark of Canadian Standards AssociationCAN/CSA-ISO/IEC 14492:04 Information technology Lossy/lossless coding of bi-level imagesJanuary 2004 Canadian Standards Association CSA/1CAN/CSA-ISO/IEC 14492:04Information technology Lossy/lossless
18、coding of bi-levelimagesCSA PrefaceStandards development within the Information Technology sector is harmonized with internationalstandards development. Through the CSA Technical Committee on Information Technology (TCIT),Canadians serve as the Canadian Advisory Committee (CAC) on ISO/IEC Joint Tech
19、nical Committee 1 onInformation Technology (ISO/IEC JTC1) for the Standards Council of Canada (SCC), the ISO memberbody for Canada and sponsor of the Canadian National Committee of the IEC. Also, as a member of theInternational Telecommunication Union (ITU), Canada participates in the International
20、Telegraph andTelephone Consultative Committee (ITU-T).This International Standard was reviewed by the CSA TCIT under the jurisdiction of the StrategicSteering Committee on Information Technology and deemed acceptable for use in Canada. (Acommittee membership list is available on request from the CSA
21、 Project Manager.) From time to time,ISO/IEC may publish addenda, corrigenda, etc. The CSA TCIT will review these documents for approvaland publication. For a listing, refer to the CSA Information Products catalogue or CSA Info Update orcontact a CSA Sales representative. This Standard has been form
22、ally approved, without modification, bythe Technical Committee and has been approved as a National Standard of Canada by the StandardsCouncil of Canada.January 2004 Canadian Standards Association 2004All rights reserved. No part of this publication may be reproduced in any form whatsoever without th
23、e prior permission ofthe publisher. ISO/IEC material is reprinted with permission. Where the words “this International Standard” appear in thetext, they should be interpreted as “this National Standard of Canada”.Inquiries regarding this National Standard of Canada should be addressed to Canadian St
24、andards Association 5060 Spectrum Way, Suite 100, Mississauga, Ontario, Canada L4W 5N6 1-800-463-6727 416-747-4044www.csa.caReference numberISO/IEC 14492:2001(E)ISO/IEC 2001INTERNATIONAL STANDARD ISO/IEC14492First edition2001-12-15Information technology Lossy/lossless coding of bi-level images Techn
25、ologies de linformation Codage avec/sans perte dimages deux niveaux ISO/IEC 14492:2001(E) PDF disclaimer This PDF file may contain embedded typefaces. In accordance with Adobes licensing policy, this file may be printed or viewed but shall not be edited unless the typefaces which are embedded are li
26、censed to and installed on the computer performing the editing. In downloading this file, parties accept therein the responsibility of not infringing Adobes licensing policy. The ISO Central Secretariat accepts no liability in this area. Adobe is a trademark of Adobe Systems Incorporated. Details of
27、 the software products used to create this PDF file can be found in the General Info relative to the file; the PDF-creation parameters were optimized for printing. Every care has been taken to ensure that the file is suitable for use by ISO member bodies. In the unlikely event that a problem relatin
28、g to it is found, please inform the Central Secretariat at the address given below. ISO/IEC 2001 All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying and microfilm, wit
29、hout permission in writing from either ISO at the address below or ISOs member body in the country of the requester. ISO copyright office Case postale 56 CH-1211 Geneva 20 Tel. + 41 22 749 01 11 Fax + 41 22 749 09 47 E-mail copyrightiso.ch Web www.iso.ch ii ISO/IEC 2001 All rights reserved ISO/IEC 1
30、4492:2001(E) ISO/IEC 2001 All rights reserved iiiCONTENTSPage0 Introduction . viii0.1 Interpretation and use of the requirements viii0.1.1 Subject matter for JBIG2 coding. viii0.1.2 Relationship between segments and documents. ix0.1.3 Structure and use of segments. ix0.1.4 Internal representations i
31、x0.1.5 Decoding results. xi0.1.6 Decoding procedures xi0.2 Lossy coding. xii0.2.1 Symbol coding. xii0.2.2 Generic coding. xii0.2.3 Halftone coding xiii0.2.4 Consequences of inadequate segmentation xiii1 Scope. 12 Normative References 13 Terms and Definitions 14 Symbols and Abbreviations 34.1 Abbrevi
32、ations 34.2 Symbol definitions 44.3 Operator definitions 105 Conventions. 105.1 Typographic conventions 105.2 Binary notation . 105.3 Hexadecimal notation 115.4 Integer value syntax 115.4.1 Bit packing. 115.4.2 Multi-byte values . 115.4.3 Bit numbering 115.4.4 Signedness. 115.5 Array notation and co
33、nventions . 115.6 Image and bitmap conventions 116 Decoding Procedures 126.1 Introduction to decoding procedures 126.2 Generic region decoding procedure 136.2.1 General description 136.2.2 Input parameters. 136.2.3 Return value. 136.2.4 Variables used in decoding. 146.2.5 Decoding using a template a
34、nd arithmetic coding 146.2.6 Decoding using MMR coding. 186.3 Generic Refinement Region Decoding Procedure. 196.3.1 General description 196.3.2 Input parameters. 196.3.3 Return value. 196.3.4 Variables used in decoding. 206.3.5 Decoding using a template and arithmetic coding 20ISO/IEC 14492:2001(E)
35、iv ISO/IEC 2001 All rights reserved Page6.4 Text Region Decoding Procedure 236.4.1 General description 236.4.2 Input parameters. 236.4.3 Return value. 246.4.4 Variables used in decoding. 246.4.5 Decoding the text region. 256.4.6 Strip delta T . 286.4.7 First symbol instance S coordinate 286.4.8 Subs
36、equent symbol instance S coordinate . 286.4.9 Symbol instance T coordinate. 296.4.10 Symbol instance symbol ID 296.4.11 Symbol instance bitmap . 296.5 Symbol Dictionary Decoding Procedure 306.5.1 General description 306.5.2 Input parameters. 306.5.3 Return value. 306.5.4 Variables used in decoding.
37、306.5.5 Decoding the symbol dictionary . 326.5.6 Height class delta height. 346.5.7 Delta width 346.5.8 Symbol bitmap. 346.5.9 Height class collective bitmap 376.5.10 Exported symbols. 376.6 Halftone Region Decoding Procedure 386.6.1 General description 386.6.2 Input parameters. 386.6.3 Return value
38、. 396.6.4 Variables used in decoding. 396.6.5 Decoding the halftone region 396.7 Pattern Dictionary Decoding Procedure . 426.7.1 General description 426.7.2 Input parameters. 426.7.3 Return value. 426.7.4 Variables used in decoding. 436.7.5 Decoding the pattern dictionary 437 Control Decoding Proced
39、ure 447.1 General description . 447.2 Segment header syntax 457.2.1 Segment header fields 457.2.2 Segment number 457.2.3 Segment header flags . 457.2.4 Referred-to segment count and retention flags. 457.2.5 Referred-to segment numbers. 477.2.6 Segment page association. 477.2.7 Segment data length .
40、477.2.8 Segment header example 477.3 Segment types. 487.3.1 Rules for segment references 497.3.2 Rules for page associations. 507.4 Segment syntaxes 507.4.1 Region segment information field. 507.4.2 Symbol dictionary segment syntax 517.4.3 Text region segment syntax 567.4.4 Pattern dictionary segmen
41、t syntax. 667.4.5 Halftone region segment syntax 677.4.6 Generic region segment syntax. 707.4.7 Generic refinement region syntax . 727.4.8 Page information segment syntax . 73ISO/IEC 14492:2001(E) ISO/IEC 2001 All rights reserved vPage7.4.9 End of page segment syntax . 767.4.10 End of stripe segment
42、 syntax 767.4.11 End of file segment syntax . 767.4.12 Profiles segment syntax 767.4.13 Code table segment syntax . 777.4.14 Extension segment syntax. 777.4.15 Defined extension types . 778 Page Make-up 788.1 Decoder model 788.2 Page image composition 78Annex A Arithmetic Integer Decoding Procedure
43、82A.1 General description . 82A.2 Procedure for decoding values (except IAID). 82A.3 The IAID decoding procedure .84Annex B Huffman Table Decoding Procedure . 86B.1 General description . 86B.2 Code table structure. 86B.2.1 Code table flags . 87B.2.2 Code table lowest value 87B.2.3 Code table highest
44、 value. 87B.3 Assigning the prefix codes. 87B.4 Using a Huffman table 88B.5 Standard Huffman tables . 89Annex C Gray-scale Image Decoding Procedure. 97C.1 General description . 97C.2 Input parameters 97C.3 Return value 97C.4 Variables used in decoding 97C.5 Decoding the gray-scale image 98Annex D Fi
45、le Formats. 99D.1 Sequential organisation . 99D.2 Random-access organisation 99D.3 Embedded organisation . 100D.4 File header syntax . 100D.4.1 ID string. 100D.4.2 File header flags. 100D.4.3 Number of pages 100Annex E Arithmetic Coding 101E.1 Binary encoding 101E.1.1 Recursive interval subdivision
46、101E.1.2 Coding conventions and approximations. 101E.2 Description of the arithmetic encoder. 102E.2.1 Encoder code register conventions 103E.2.2 Encoding a decision (ENCODE). 103E.2.3 Encoding a 1 or 0 (CODE1 and CODE0) 103E.2.4 Encoding an MPS or LPS (CODEMPS and CODELPS) . 104E.2.5 Probability es
47、timation. 105E.2.6 Renormalisation in the encoder (RENORME). 105E.2.7 Compressed data output (BYTEOUT) 106E.2.8 Initialisation of the encoder (INITENC) 107E.2.9 Termination of encoding (FLUSH) . 107E.2.10 Minimisation of the compressed data. 107ISO/IEC 14492:2001(E) vi ISO/IEC 2001 All rights reserv
48、ed PageE.3 Arithmetic decoding procedure 109E.3.1 Decoder code register conventions 111E.3.2 Decoding a decision (DECODE) 111E.3.3 Renormalisation in the decoder (RENORMD) 111E.3.4 Compressed data input (BYTEIN) 111E.3.5 Initialisation of the decoder (INITDEC) 114E.3.6 Resynchronisation of the decod
49、er . 114E.3.7 Resetting arithmetic coding statistics 115E.3.8 Saving arithmetic coding statistics 115Annex F Profiles 116Annex G Arithmetic Decoding Procedure (Software Conventions) 119Annex H Datastream Example and Test Sequence 121H.1 Datastream example 121H.2 Test sequence for arithmetic coder. 142Bibliography. 149Annex I P atents . 147ISO/IEC 14492:2001(E) ISO/IEC 2001 All rights reserved viiForeword ISO (the International Organization for Standardization) and IEC (the International Electrotechnical C