ImageVerifierCode 换一换
格式:PDF , 页数:62 ,大小:3.65MB ,
资源ID:430693      下载积分:10000 积分
快捷下载
登录下载
邮箱/手机:
温馨提示:
如需开发票,请勿充值!快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝扫码支付 微信扫码支付   
注意:如需开发票,请勿充值!
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【http://www.mydoc123.com/d-430693.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(ANSI AIIM MS61-1996 Standard - Application Programming Interface (API) for Scanners in Document Imaging Systems《文档成像系统中扫描器的应用编程接口(API)》.pdf)为本站会员(brainfellow396)主动上传,麦多课文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知麦多课文库(发送邮件至master@mydoc123.com或直接QQ联系客服),我们立即给予删除!

ANSI AIIM MS61-1996 Standard - Application Programming Interface (API) for Scanners in Document Imaging Systems《文档成像系统中扫描器的应用编程接口(API)》.pdf

1、STD-AIIM MSb3-ENGL 379b 3032348 0503343 78b Approved As Standards InsaMe (ANSI) September 26,1996 ASSOCIATION FOR INFORMATION ANO IMAGE MANAGEMENT INTERNATIONAL 11 O0 Wayne Avenue Suite 11 O0 Silver Spring, Maryland 20910 AIIM 301-587-8202 COPYRIGHT Association for Information includes (but is not l

2、imited to) the active feature set, the version of the API definition supported, and the identification of the driver (name and level). This command includes the ability to retrieve and set both default and current scanner settings. A private field of undefined size is required to accommodate vendorl

3、application specific functionaiity. A querylset parameter pool-size is required so that the appiicatiodimage system can correctly aliocate memory. In addition, the API is required to query the valid values of a parameter. The values can either be a numeric range (low, high, step) or a list of values

4、. 4.13 Profile maintenance The imaging system will allow the user to set up profiles for scanners when establishing the system as well as during a scan process. When the user wants to specify parameter values for a scanner profile, the imaging system wiil notify the device driver, then open a dialog

5、 with the user, and return the results to the imaging system. When establishing the system for a scanning session, the user wiil select a pre-stored profile (owned by the imaging system) that specifies ail parameter values. During a scan operation there will always be a dialog between the imaging sy

6、stem and the user in which the user can request a change of parameter values that will trigger a request to the device driver to open a diaiog with the user. This is a defnition of the querylset functions associated with the scanner API. The data associated with these functions must be passed in a d

7、ata stream to ensure compatibility when the device driver and the API are at different levels. The new fields added in a subsequent level must be added at the end of the data stream; new values for an existing field must be resolved by the initial handshaking where the level of the driver is determi

8、ned. 43 optional functions The following optional functions can be features of the actual hardware, or features of the driver software that emulates the hardware. For example, compression can be a hardware feature or a software routine - the calling system does not know the difference. 4.2.1 Image e

9、nhancement functions 4.2.1.1 Brightness Adjust the scanner brightness control. 4.2.1.2 Contrast Adjust the scanner contrast control. 4.2.13 Dithering and halftone Group pixels in pre- defined units such that a wider tonal range can be simulated by a limited number of tones. Most commonly, this featu

10、re is used to simulate gray-scale when performing a bitonal (black and white) scan. 4.2.1.4 Gamma curve selection Select and download specific Gamma Curves used in image enhancement algorithms. 4.2.1.5 Gray-scale to bitonal thresholding Adjust the sensitivity setting of the scanner and control how a

11、 bitonal image is created from a gray-scale scan. 4.2.1.6 Speckle removal Remove random particles, speckles, and other noise from an image. 4.2.1.7 Background suppression Automatically detect, monitor, and remove background levels from image. 4.2.1.8 Sensitivity level Adjust sensitivity levels used

12、in automatic thresholding. 4.2.1.9 Text-photo mode Automatically detect and enhance image corrections for pages with text and photo content. 4.2.2 Image processing functions 433.1 Bar-de detection and reading Interpret the bar- code(s) on scanned page and retuni the information to the calling system

13、. 4.2.2.2 Border detection and page size determination Detect the border of a page that is smailer than the designated scan area and return an image that has the same size as the physical input page. 43.2.3 Compression Use algorithmic techniques to reduce the image file size. Examples of these techn

14、iques would be Group 3 for example, to correct for variance in form position due to feeder or placement inaccuracies. 4.2.2.9 Resolution Scan at various resolutions (pixels per unit). 4.2.2.10 scaling Adjust the physical size of the image to fit a bigger or smaller rectangular area. 4.2.2.11 Skew de

15、tection and correction Detect that a sheet has rotated during the feed process and the resulting page image data are skewed and (optional) correct the image for skew. 4.2.3 Scan functions 4.2.3.1 Duplex scanning Scan both sides of a sheet in one pass. 4.232 Streaming device control Enablddisable a s

16、treaming device (such as a tape Wnter, CD writer, etc.). 4.2.4 Scan inpu/output functions 4.2.4.1 Feeder control Control the scanner feed mechanism (e.g., feed a page from the input hopper through the scanner). 4.2.4.2 Format controls Control format of the image file produced from the scanning proce

17、ss. At a minimum this would include specification of byte-ordering and line- ordering. 4.2.43 Multiple-mode scan Scan bitonal and gray-scale in one scan pass. 4.2.4.4 Stacker selection and sorting Cause the sheet to move to a specific stacker on a scanner with multiple stackers. This could be caused

18、 by processing function such as counters, forms recognition, bar-code, and patch-code. 4.2.5 Miscellaneous functions 4.2.5.1 Endorsement (electronic and physical) Add an endorsement to the page and/or the page image. Although many devices do not directly support endorsement incrementation, some driv

19、ers implement this automatic increment feature. 43.53 Multiple buffering support Manage more than one data area used to receive the images from the scanner. The calling system owns any buffers it uses to transfer the image or coded data. 4.2.53 Operator display Send visuai messages to the operator o

20、n a scanners display device. 4.2.5.4 Operator signais Detect operator signais; for example, activation of a foot pedal or console key. 5 API syntactical structure The API syntax is a function call with a parameter list. All data storage areas are under control of the imaging system that is calling t

21、he device driver. This structure allows the API to be extensible to accommodate features, operations, and formats not yet in existence. By using this syntactical model, the API can grow in a straightforward and compatible way - implementation of new features by developers does not require a new vers

22、ion of this specification. All strings can be stored in system resources (regardless of the host operating system) allowing customization and harmonization with international standards and techniques without a need to modify source code. Furthermore, while the API does provide the valid parameter va

23、lues it does not assume that a particular set of values is legal in all circumstances. Figure 1 shows the block diagram of the system and where the functions represented by this API definition fit. 5 Association for Information and Image Management International STD*AIIM MSb2-ENGL 199b 2022348 05023

24、53 825 COPYRIGHT Association for Information two signed 32-bit quantities (Num. and Denom.) Used for unchecked tmeless variables SCANIRRT SCANHRV SCAN“ Image Registration/rotation/translation (structure shown in 6.1.7.4.1) I pscANIRRT PSCANHDRV PSCANHRUN Data structure which is a handle to a driver

25、Handle for operations (scanning, compression, etc.) SCA“ST SCANHMEM SCANHWM) IPSCANHWND 1 Handle toa window PSCA“ST PSCANHMEM Handle to an instance (usually a process or thread ID) A memorv handle (lock with ScanMemLock) SCANRC I PSCANRC3 I Function return Results Code (unsigned 32-bit integer) SCAN

26、DRVENTRY PSCANDRVENTRY Used to hide pascal and other platform dependent T I kevwords when defining a scanner driver entrv. SCANCALLBACK I PSCANCALLBACK I callback Function returning SCANRC result Table 1 - Data types SCANIMAGE is provided solely for the purpose of funire portability to define specia

27、l pointers (e.g., for thunking from a 32 bit flat pointer to a 16:16 segmented pointer, a concern not directly addressed by this API.) PSCANRC is provided for consistency and convenience to the application programmer that might need it for special reasons such as saving the result of a threaded acqu

28、isition in the allocated memory of the parent, this API does not require this type for any of its functions. ?SCANDRVENTRY is provided for consistency and convenience to the application programmer, this API does not require this type for any of its functions. 7 Association for information and Image

29、Management international STD-AIIM MSbL-ENGL L97b = LO32348 0501355 bT8 - COPYRIGHT Association for Information 3 #endif /* WIN environment logic */ Listing 1 - Environment logic example 5.4 Setting and getting API parameter values This section explains how to get and set parameter values. 9 Associat

30、ion for Information and Image Management International STDmAIIM MSbL-ENGL 377b = 30L2348 0503357 1.170 COPYRIGHT Association for Information SCANRATIO ratXRes ; SCANUCHAR pcDitherMAX-DTH - LENGTH; ScanParmGetLong( ScanParmGetRational( ScanParmGetString( Listing 2 - Parameter access example The 0 in

31、the rst two function calls specifies which element to retrieve from the parameter. All parameter values are signed. Some parameters may have more than one element (for example PARM-GRAYRESPONSECURVE). To find out how many elements a parameter has, the function ScanParmGetLength can be used: SCANUINT

32、32 dwlength; ScanParmGetLength( a pointer to the driver handle and the parameter number. If a parameter number of zero is used, ail values are set to their defaults. 5.43 Misceiianeous parameter functions ScanParmGetFlags can be used to remieve a 32-bit flag-word for a parameter. Currently, no bits

33、are dened. The function ScanParmGetType retrieves the data-type of a parameter. ScanParmSaveValue and ScanParmRestoreValue save and restore a single parameter or all parameters. The function ScanParmFluchValue should be used if ScanParmRestoreValue is not called. This frees the system resources that

34、 are being used to hold the saved values. 5.4.4 Getting parameter choice values An application can get a set of legal values for each parameter. This set can be represented either as a list or as a range. 10 Association for Information and Image Management International STD*AIIM MSbL-ENGL L97b 30323

35、LI8 0503358 307 COPYRIGHT Association for Information SCANUCHAR pcBufferLl281; /* params are always represented as lists */ ScanChoiceGetCount( for (j=O; ji; j+) CcanChoiceGetString( printf(“%d. %sn“, j, pcBuffer); 11 Association for Information and Image Management International STD.AIIM MSbL-ENGL

36、L99b 10123Li8 0501359 243 M COPYRIGHT Association for Information if (dwFlags SCAN-CHOICEHIGH, SCAN-CHOICE-STEP, LratValue3); /* give ratvaluel and ratValue3 a common denominator */ if (ratValue3.Denom != ratVa1uel.Denom) ratValuel.Num *= ratValue3.Denom; ratValuel.Denom *= ratValue3.Denom; ratValue

37、3.Num *= ratValuel.Denom; ratValue3.Denom *= ratValuel.Denom) ratValue2.Num * ratValuel.Denom) printf(“%ld / %ldn“, ratValuel.Num , ratVa1uel.Denom); ratValuel.Num += ratValue3.Num) while (ratValuel.Num * ratValue2.Denom = else /* if (dwFlags for (i=O; iwCount; i+) ScanChoiceGetRational( printf(“%ld

38、 / %ldn“, ratValuel.Num, ratValuel.Denom) 1 The following example displays all the X Resolution values that a driver supports. SCANUINT32 dwFlags; SCANUINT16 wCount; SCANRATIO ratvaluel, ratValue2, ratValue3; SCANUINT16 i; Listing 5 - Range processing example 5.4.5 Setting parameters An application

39、program can either set values using the choice values as a guide, or it can call the driver itself to set these parameters. The foilowing function displays a dialog-box with choices for the user. The exact format and extent of the dialog box depends on the scanner and the parameters it is able to se

40、t. Using this dialog box makes it possible to set features that are unique to a scanner. SCANHDRV hDr iver ; SCAN“D hWnd; SCANHINST hInst ; /* handle to driver */ /* handle to parent window */ /* instance of parent */ IScanDrvSetDialog( Listing 6 - Parameter setting example 12 Association for Inform

41、ation and Image Management International STD*AIIM MSbL-ENGL L77b = 1012348 05D13b0 Tb5 W COPYRIGHT Association for Information if (dwBits if (dwBits else printf(“The feeder is empty.“); 1 else printf(“Cannot tell if page is present.“); dwBi t s ; Listing 7 - Feeder detection example Scanning a page

42、involves a “RunZone“ loop such as in listing 8. The loop consists of three parts: ScanDrvRunStart, ScanDrvRunStep, and ScanDrvRunDone. Breaking the process into steps makes it possible for background scanning or reading to occur in multitasking environments. Note: This is one example of a way to sca

43、n. SCANRC MyScanRunZone(pDriver, ibBuffer, ulSize) PSCANHDRV pDriver: SCANBUF ibBuf f er: SCANULONG ulSize: E SCANDRVRUN hRun ; SCANRC rcStatus, rcStatus2 ; if (SCANRC-OK(rcStatus = ScanDrvRunStart(pDriver, rcstatus = ScanDrvRunStep(hRun, ibBuffer, ulSize, O); break; (SCANUINT32)rcStatus, ibBuffer):

44、 1 if (SCANRC-ERRID(rcStatus) = SCAN-ERR-ENDZONE) rcstatus = SCAN-SUCCESS; 3 rcStatus2 = ScanDrvRunDone(hRun); if (SCANRC-ISOK(rcStatus) ) rcstatus = rcStatus2 ; return rcstatus; 1 Listing 8 - Scanning example 13 Association for Information and Image Management International STD-AIIM MSbL-ENGL 377b

45、m LL23q 0503363 9T3 m - COPYRIGHT Association for Information ScanDrvGetString( printf (“Version: %sn“ I aucBuf) ; ScanDrvGetString( printf(“Name: %sn“ , aucBuf) ; ScanDrvGetString( Drintf“Vendor: %sn“ , aucBuf) : Listing 9 - Scanner information example This program fragment produces a display simii

46、ar to the following: Version: Version 1.39 Name: “Manufacturer“ “Series“ / “Model“ Vendor: Copyright O 1992 “Company Name“ Listing 10 - Get string results 5.7 Error handihg 5.7.1 Result code overview Unless otherwise specified, ail functions or macros return a signed 32-bit integer result code value

47、. The SCANRC-* macros (see 5.3.2) are provided to help checking and manipulating these result codes. If this number is negative, an error has occurred. Either zero or a positive value indicates success. Functions are provided to retrieve the name of the driver that caused the error, and a string des

48、cribing the error. It is strongly recommended that applications implement error-handling functions. Example results codes for error conditions are given in Annex A (Informative) Example Error Codes. A sample error-handiing function for Microsoft Windowsm environment is shown below. Simply displaying

49、 a generic “Scanner Error“ makes it very difficult for end-users and technical support staff to determine the problem. It is recommended that error checking be implemented at the beginning of application development to aid in debugging as well as providing important information to users. 14 Association for Information and image Management International STD*AIIM MSbL-ENGL 199b LOL23iB 050L3b2 838 w COPYRIGHT Association for Information i f ( SCANRC-ISOK (rcstatus ) ) if (!pDriver rcStatus = SCANRC-MAKERC(SCANRC_ERRID(rcCtatus) 1; c /* custom erro

copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1