1、National Standard of Canada CAN/CSA-ISO/!lEC 12088-4-00 CSA INTERNATIONAL / 1 (ISO/IEC 12088-41995) International Standard ISO/IEC 12088-4:1995 (f3st edition 1995-12-15) has been adopted without modification as CSA Standard CAN/CSA-ISO/IEC 12088-4-00, which has been approved as a National Standard o
2、f Canada by the Standards Council of Canada. ISBN 2 -55324-062-6 Febnrary 2000 Information technology - Computer graphics and image processing - Image processing and interchange - Application program interface language bindings - Part 4: C 7 i echnoiogies de /information - Infographie et trailement
3、de /image - Traitement et echange de /image - lianls de langage d interface de programme dappiication - Partie 4: C (Reaffirmed 2004) Reference number ISO/IEC 12088-4.7 995(Ei The Canadian Standards Association, which operates under the name CSA International (CSA), under whose auspices this Nationa
4、l Standard has been produced, was chartered in 191 9 and accredited by the Standards Council of Canada to the National Standards system in 1973. It is a not-for-profit, nonstatutory, voluntary membership association engaged in standards development and certification activities. and users - including
5、 manufacturers, consumers, retailers, unions and professional organizations, and governmental agencies. The standards are used widely by industry and commerce and often adopted by municipal, provincial, and federal governments in their regulations, particularly in the fields of health, safety, build
6、ing and construction, and the environment. indicate their support for CSAs standards development by volunteering their time and skills to CSA Committee work and supporting the Associations objectives through sustaining memberships. The more than 7000 committee volunteers and the 2000 sustaining memb
7、erships together form CSAs total membership from which its Directors are chosen. Sustaining memberships represent a major source of income for CSAs standards development activities. in support of and as an extension to its standards development activities. To ensure the integrity of its certificatio
8、n process, the Association regularly and continually audits and inspects products that bear the CSA Mark. Toronto, CSA has regional branch offices in major centres across Canada and inspection and testing agencies in eight countries. Since 191 9, the Association has developed the necessary expertise
9、 to meet its corporate mission: CSA is an independent service organization whose mission is to provide an open and effective forum for activities facilitating the exchange of goods and services through the use of standards, certification and related services to meet national and international needs.
10、 For futher information on CSA services, write to CSA International 178 Rexdale Boulevard Toronto, Ontario, M9W 1 R3 Canada CSA standards reflect a national consensus of producers I nd ivid ua Is, com pa nies, and associations across Canada The Association offers certification and testing services I
11、n addition to its head office and laboratory complex in The Standards Council of Canada is the coordinating body of the National Standards system, a federation of independent, autonomous organizations working towards the further development and improvement of voluntary standardization in the nationa
12、l interest. The principal objects of the Council are to foster and promote voluntary standardization as a means of advancing the national economy, benefiting the health, safety, and welfare of the public, assisting and protecting the consumer, facilitating domestic and international trade, and furth
13、ering international cooperation in the field of standards. has been approved by the Standards Council of Canada and one which reflects a reasonable agreement among the views of a number of capable individuals whose collective interests provide to the greatest practicable extent a balance of represen
14、tation of producers, users, consumers, and others with relevant interests, as may be appropriate to the subject in hand. It normally is a standard which is capable of making a significant and timely contribution to the national interest. Approval of a standard as a National Standard of Canada indica
15、tes that a standard conforms to the criteria and procedures established by the Standards Council of Canada. Approval does not refer to the technical content of the standard; this remains the continuing responsibility of the accredited sta nda rds-deve Io pmen t o rg an ization . Those who have a nee
16、d to apply standards are encouraged to use National Standards of Canada whenever practicable. These standards are subject to periodic review; therefore, users are cautioned to obtain the latest edition from the organization preparing the standard. The responsibility for approving National Standards
17、of Canada rests with the Standards Council of Canada 45 OConnor Street, Suite 1200 Ottawa, Ontario, Kl P 6N7 Canada A National Standard of Canada is a standard which CSA I N T E RN All 0 NAL / - Although the intended primary application of this Standard is stated in its Scope, it is important to not
18、e that it remains the responsibility of the users to judge its suitability for their particular purpose. Information technology - Computer graphics and image processing - Image processing and interchange - Application program interface language bindings - Part 4: C CAN/CSA-/SO/EC 7 2 088 -4 - 0 0 CA
19、N/CSA-ISO/IEC 12088-4-00 Infomation technology - Computer graphics and image processing - Image processing and interchange - Application program interfiace language bindings - Paut4: C CSA Preface Standards development within the Information Technology sector is harmonized with international standar
20、ds development. Through the CSA Technical Committee on Information Technology (TCIT), Canadians sewe as the Canadian Advisory Committee (CAC) on ISO/IEC Joint Technical Committee 1 on Information Technology (ISO/IEC JTC1) for the Standards Council of Canada (SCC), the IS0 member body for Canada and
21、sponsor of the Canadian National Committee of the IEC. Also, as a member of the International Telecommunication Union (ITU), Canada participates in the International Telegraph and Telephone Consultative Committee (ITU-T). This International Standard was reviewed by the CSA TClT under the jurisdictio
22、n of the Strategic Steering Committee on Information Technology and deemed acceptable for use in Canada. (A committee membership list is available on request from the CSA Project Manager.) From time to time, ISO/IEC may publish addenda, corrigenda, etc. The CSA TClT will review these documents for a
23、pproval and publication. For a listing, refer to the CSA Information Products catalogue or CSA lnfo Update or contact a CSA Sales representative. This Standard has been formally approved, without modification, by these Committees and has been approved as a National Standard of Canada by the Standard
24、s Council of Canada. February 2000 0 CSA International - 2000 All rights reserved. No part of this publication may be reproduced in any form whatsoever without the prior permission of the publisher. ISOIIE C material is reprinted with permission. Inquiries regarding this National Standard of Canada
25、should be addressed to CSA International, 178 Rexdale Boulevard, Toronto, Ontario, M9W 1 R3. February 2000 CSA/I I NTE R N AT1 0 NAL STANDARD ISOIIEC 12088-4 First edition 7 995-1 2-1 5 Information technology - Computer graphics and image processing - Image processing and interchange - Application p
26、rogram interface language bindings - Part 4: C Technologies de llnformation - lnfographie et traitement de /image - Traitement et echange de Iirnage - Ljants de langage dinterface de programme dapplica fion - Partie 4: C Reference number ISO/IEC 12088-4.1 995(E) ISsO/lFC 12088-4:199S(E) Contents Con
27、tents I Scope . 1 2 Normati1.e references 2 3 The C language binding of the Image Processing and Interchange Standard . 3 3.1 Classification and designation 3 3.2 Functions versus macros 3 7.3 Implications of the language 3 3.3.1 Character strings . 4 3 3.1.3 Data object repository 3 3.4 Identifier
28、mapping . 5 3.7 Memoc management 7 3.8 Error handling . 9 3.8.1 Application defined error handlers 9 3.8.2 Function identification . 9 3.8.3 Error presentation 9 -3 . 9 Virtual register support 10 3.10 Convenience functions . 10 -I Tables 11 4.1 Abbreviations . f 1 4.1.1 Table of abbreviations 11 4.
29、1.3 Abbreviation policy in construction of identifiers . 14 4.2 Function names 15 4.2.1 AIphabetxal by bction name 15 4.2.2 Alphabetical by bound name 27 5 Data hpe definitions 39 5.1 Mapping of data h-pes 39 5.2 Environment data QTe definitions 40 5.2.1 External physical image data types 40 5.2.2 B
30、asic parameter data types . 41 5.2.2. 1 IPI-PIKS parameter data types 41 5.2.2.2 IPI-IIF parameter data cpes 41 5.2.3 Data object identifiers 42 5.2.3. I IPI-PIKS object identifiers . 32 5.2.3.2 IPI-IIF object identification . 33 5.1 Implementation dependent data type definitions . 43 5.3 Implementa
31、tion independent data type definitions 15 5.9. I Enumerated data type definitions . 45 5.4.1.2 IPI-IIF enumerated data type definitions SO 7 . 3.2 Implementation dependencies 3.5 Return aIues . 6 3 . 6 Header files 6 -% . 3 . 1 1 Program examples . 10 5.3. I . 1 IPI-PIKS enumerated data type definit
32、ions 45 0 ISOlIEC 1995 AH 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 protocopying and microfilm. without permission in writing from the publisher . ISO/IEC Copyright Office C
33、ase posde 56 CH-1211 Genkve 20 Switzerland 11 0 ISOlIEC ISO/IEC 12088-4: 1995(E) Contents 5.4.2 Union data type defirUtio ns 51 5.4.2.1 PI-PIKS union data type definitions . 51 5.4.2.2 PI-IIF union type data definitions . 66 5.4.3 Structure data type definitions . 68 5.4.3.1 PI-PKS structures . 68 5
34、.4.3.2 LPI-IIF structures . 83 6 Macro definitions . 87 6.1 Unbounded option and status codes 87 6.1.1 IPZ-PKS unbounded option and status codes . 87 6.1.2 IPJ-IIF unbounded option and status codes . 10 1 6.2 IPI-IIF syntax descriptors . 103 6.2.1 LPJ-IIF syntax entity types 103 6.2.2 IPI-IF syntax
35、components . 107 4.3 Function descriptors . 123 6.3.1 IPI-PIKS function descriptors . -123 6.3.2 IPI-PKS convenience function descriptors 135 6.3.3 IPI-IF function descriptors 136 6.3.4 IPI-IF convenience function descriptors 137 6.4 Error descriptors 138 6.4.1 IPI-PIKS errors 138 6.4.2 IPI-IF error
36、s . 143 6.4.3 System errors . 145 6.4.4 Binding-specific errors 145 6.5 Implementation-specific data lengths . 146 . 6.6 Repository object descriptors 147 6.6.2 Repositor?: dither arrays . 149 6.6.3 Repsito rq. colour conversion matrices . 149 7 C functional elements . 155 7.1 Notational conventions
37、 155 7.2 IPI-PIKS functional element prototypes . 156 7.3 WI-IIF functional element protohpes . 273 8 Convenience functions . 282 8.1 Pi-PIKS convenience functions . 282 8.1. I Image preparation functions 282 8.1.1.1 prepare-coiour image . 283 8.1.1.2 prepare-monochrome-image 284 8.1.1.3 create-unbo
38、unded-image-copy . 285 8.1.2 ROI creation functions . 287 8.1.2.1 generate-2d-roi-rec . 288 8.1.2.2 generate-roi-coordinate 289 8.1.2.3 generate-roi-elliptical . 290 8.1.2.4 generate-roigolygon 291 8.1.2.5 generate-mi-rectangular . 293 8.1.2.6 prepare-2d-roi-rectangular 294 8.1 2.7 prepare roi 295 8
39、.1.3 Tuple generation hnctions 2% 8 . I .3. 1 generate-nd-1 tuple . 297 8.1.3.2 generate-nd 3 tuple . 298 8 . I . 3.3 generate-nd-4-tuple . 299 8 . 1.3.4 generate-nd-5-tuple . 300 8.1.3.5 generate-rd-3-tuple 301 8.1.3.7 generate-rd-5-tuple 303 6.6.1 Repository impulse response function arrays 147 -
40、- - - 8.1.3.6 generate-rd-4-tuple 302 . 111 304 30s 306 ?( )-? ;ox 70% 3 IO 8.2.1. Attach entity functions , , -3 10 8.2.1.2 attach - sequence .3 l(1 8.2.1 .? attach-sequence - end 3 11 8.2.2 Create identifier function 3 I 1 8.2.7 Get entip- component functions .3 I2 8.2 .?, 1 get - component .3 I 2
41、 8.2.3.2 getsequencecomporient .3 12 8.2.1.1 get entit, boolean -7 I3 8.2.1.2 get-entic-integer -3 1 4 8.2.1.7 get - entih - real 3 11 8.2.4.4 get - entits _- string .3 I1 8.1.7.8 generate-sd- 1 -tuple 8.1 .? . . - 8.2.5.3 put entih.-real . - - - Annexes A Memo? management. . .32 1 A.2 Functions tha
42、t import the application data to the implementation memo? . ,323 A.3 Functions that export the implementation data to the application Inemon . 325 B Macros. data types in compilation order and ex3ernal fiinctions .327 B. 1 IPI-PIKS macros. opes and functions 327 B. 1. I Macro definitions 327 B. 1 .3
43、 Functions . ,390 E. 1.4 Convenience functions 475 A. 1 Introduction 32.1 B. 1.2 Data types in compilation order . 767 3.2 IPI-IIF macros- types and functions .180 B.2. I Macro definitions . 380 B.2.2 Data t_;pes in compilation order . 549 B.2.3 Functions . .SO1 B2.1 Convenience functions . .5 10 iv
44、 ISOIIEC 12088-4:1995(E) Contents C Sample programs . . . 513 C . I IPI-PIKS application cramplcs . 513 C . 1.1 Application iisc of PI-PIKS for mcmov-managed image import/csporl 513 C . I . 2 Histogram generation ._ . 319 523 C . 1 . C 1 .-I Simulated iinsharp mask operation . -526 C 1 . 3 Demonstra
45、tion of asynchronous and chained application . 531 C . I 5.1 Image blend by synchronous . unchained functional representation _. 531 C . 1.5.2 Image blend b!- asynchronous functional representation . _ 533 C I 5.7 Irnase blend by chained functional reprcscntation . _. ._. . 537 541 . ._._ 550 Rcgion
46、 of interest control - C.3 TPI-TIF application exampic D Macros for short fiinction identifiers lndcr 562 V TSW1 EC 1 2088-4:199S(E) Con tents 1 - Buffered memory management of InImportIma_gel . ) .; 21 2 - Buffered memory management of InErportInia_ec( . ) . !26 List of tables I Data tvpe prefixes
47、. 5 2 Abbreviations 11 3 Function names alphabetical by function iiame . 17 4 Function names alphabetical by borrnd name . 27 5 Data ryes . 39 6 IPT-PIKS function descriptors . 123 7 IPI-PIKS con.enience function descriptors . 135 8 IPI-TIF function descriptors 136 9 IPI-IIF convenience function des
48、criptors 137 10 IPT-PIKS error descriptors 138 1 1 PI-IIF error descriptors . 137 12 System error descriptors . 145 I 3 Binding-specific error descriptors . 115 14 IPT-PIKS data lengths . 116 1 5 Repositov impulse response function array descriptors 147 16 Reposito n. dither array indices . 119 17 R
49、eposito 5 colour conversion matrix indices . 149 . Foreword IS0 (the International Organization for Standardization) and IEC (the International ElectrotechnicaI Com- mission) form the specialized system for worldwide standardization. National bodies that are members of IS0 or IEC participate in the development of International Standards through technical committees estab- lished by the respective organization to deal with particular fields of technica1 activity. IS0 and IEC tech- nicaI committees collaborate in fields of mutual interest. Other international organiz