




已阅读5页,还剩54页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
MIL 8.0 GUIDEIncluding Active MILOverviewMatrox Imaging Library (MIL) is a modular programming library with commands for image capture, image processing, patternrecognition, blob analysis, edge extraction and analysis, measurement, character recognition, 1D and 2D code reading, calibration, graphics, image compression, image display and archiving. Included with MIL is ActiveMIL, a collection of ActiveX controls (OCXs) for managing image capture, processing, analysis, display and archiving.This guide has been designed to complement the Matrox Imaging Library (MIL) brochure by providing a list of benchmarkson different platforms and a comprehensive overview of the MIL and ActiveMIL APIs. Included with the command and parame- ter descriptions of MIL are real programming examples for each module. Also included are brief descriptions of some of the control methods, events and properties available in ActiveMIL. For additional information on MIL commands and parameters, as well as ActiveMIL control methods, events, and properties, refer to the MIL and ActiveMIL Command Reference respectively.Software ArchitectureMatrox Imaging Library (MIL) and ActiveMILApplication ControlBlob AnalysisBuffer ControlCalibrationCode ReaderDigitizer ControlDisplayEdge FinderGeometricModel FinderGraphicsImage ProcessingMeasurementOCRPattern MatchingString ReaderBoard-Level DriversMatrox CronosPlusMatrox Meteor-IIfamilyMatrox Orion familyMatrox Corona-IIFutureMatrox HardwareIEEE 1394* IIDC DriverMatrox Morphis familyMatrox Solios familyMatrox Helios familyMatrox Odyssey family*MIL/ActiveMIL has a common API across Matrox Imagings entire hardware line.* Matrox Meteor-II/1394, 4Sight-II or third-party adapter.* Matrox Odyssey family supported through Matrox Odyssey SDK.Table ofOverviewContents1MIL/ActiveMIL Benchmarks4MIL Command Listing and Description1D and 2D Code Reader module71D and 2D code symbologies7Composite code symbologies8Application and System modules9Blob analysis module10Blob features11Buffer and Data generation modules12Calibration module14Digitizer module15Display module15Edge Finder module16Edge features16Function Developers Toolkit18Geometric Model Finder module19Graphics module20Image processing module21Measurement module23OCR module24Pattern matching module25String Reader module26Thread module27Programming ExamplesBlob analysis28Calibration 29Camera auto-focus 31Capture and display a video sequence33Code Reader34Digitizer allocation and control35Displaying a MIL buffer under Windows36Edge Finder 37Geometric Model Finder 39Image processing (convolution)41Measurement 42Multi-buffered image capture and processing 44OCR47Pattern matching 49String Reader51Watershed segmentation 54ActiveMIL Control Listing and DescriptionApplication and System control55BlobAnalysis control56Blob features and results57Calibration control58CharacterRecognition control59Code control60Digitizer control62Display control64EdgeFinder control65EdgeFinder features and results66GraphicsContext control67Image control68ImageProcessing control69Measurement control72ModelFinder control74PatternMatching control76StringReader control*77Threading control79*Available as of Processing Pack 1.MIL/ActiveMIL BenchmarksThe following benchmarks provide a performance overview for a range of imaging operations running on different platforms. A brief description of all functions, parameters and imagesused are included. Note that the benchmarks assume full processor and memor y bandwidth (i.e., no other system activity), and include command overheads.Note: Operations executed on 512 x 512 images1.Image ProcessingPoint-to-pointAdd two 8-bit images and store results in an 8-bit destination image.0.58 ms0.08 ms0.08 ms0.05 ms0.23 ms2Edge Detection (sobel)Perform an edge detection (sobel) on an 8-bit source image and store results in an 8-bit destination image.1.4 ms0.74 ms0.51 ms0.74 ms0.17 ms2Convolution (3 x 3)Perform a general 3 x 3 convolution with arbitrary coefficients on an 8-bit source image and store results in an 8-bit destination image. Results are saturated.1.8 ms1.1 ms0.63 ms0.54 ms0.15 ms2Convolution (5 x 5)Same as above except with a 5 x 5 kernel.4.6 ms2.9 ms1.6 ms1.5 ms0.21 ms2Convolution (11 x 11)Same as above except with a 11 x 11 kernel.19.8 ms12.7 ms7.1 ms5.8 ms0.96 ms2Erosion/Dilation (3 x 3, predefined, binary)Perform a binary erosion/dilation on a 1-bit source image using a predefined 3 x 3 structuring element and store results in a 1-bit destination image.0.08 ms0.05 ms0.04 ms0.04 ms0.09 ms2Erosion/Dilation (3 x 3, predefined, grayscale)Same as above except perform a grayscale operation.3.5 ms0.17 ms0.13 ms0.16 ms0.16 ms2Erosion/Dilation (3 x 3, user-defined, binary)Perform a binary erosion/dilation on a 1-bit source image using an arbitrary 3 x 3 structuring element and store results in a 1-bit destination image.0.34 ms0.22 ms0.15 ms0.14 ms0.10 ms2Erosion/Dilation (3 x 3, user-defined, grayscale)Same as above except perform a grayscale erosion/dilation operation.0.92 ms0.51 ms0.39 ms0.51 ms0.16 ms2Erosion/Dilation (5 x 5, user-defined, binary)Perform a binary erosion/dilation on a 1-bit source image using an arbitrary5 x 5 structuring element and store results in a 1-bit destination image.1.4 ms0.88 ms0.58 ms0.55 ms0.09 ms2Erosion/Dilation (5 x 5, user-defined, grayscale)Same as above except perform a grayscale erosion/dilation.1.8 ms1.1 ms0.75 ms1.1 ms0.22 ms2LUT mapPerform a point-to-point LUT mapping operation for an 8-bit source image and store results in an 8-bit destination image.0.59 ms0.33 ms0.54 ms0.24 ms0.28 ms2HistogramCalculate the histogram of an 8-bit source image and store result in a 32-bit buffer.0.58 ms0.38 ms0.28 ms0.31 ms0.31 msLossy JPEG Compression (monochrome)Perform lossy JPEG compression on an 8-bit source image and store results in an 8-bit destination image.2.5 ms1.6 ms1.2 ms1.5 ms1.5 msImage Processing (cont.)Lossless JPEG Compression (monochrome)Perform lossless JPEG compression on an 8-bit source image and store results in an 8-bit destination image.2.9 ms1.9 ms2.2 ms2.3 ms2.3 msRotate (30)Rotate by 30 an 8-bit source image and store results in 8-bit destination image.1.2 ms0.64 ms0.90 ms0.69 ms0.69 msWarp PolynomialWarping using a first-order polynomial mapping with nearest neighbor interpolation on an 8-bit source image and store results in an 8-bit destination image.1.2 ms0.64 ms0.90 ms0.69 ms0.69 msGeometric Model Finder 3, 4Find a Model (1 model, 1 occurrence, very high speed, limited scaling)Find a single 128 x 128 model in an 8-bit image. The whole image is searched for a model rotated within 0-360and scaled within 90-110% using the highest speed (lowest robustness and accuracy) setting.6.2 ms3.7 ms2.8 ms3.4 ms3.4 msFind a Model (1 model, 1 occurrence, medium speed, limited scaling)Find a single 128 x 128 model in an 8-bit image. The whole image is searched for a model rotated within 0-360and scaled within 90-110% using medium speed setting.15.6 ms10.2 ms6.5 ms8.1 ms8.1 msFind a Model (1 model, 1 occurrence, medium speed, max. scaling)Find a single 128 x 128 model in an 8-bit image. The whole image is searched for a model rotated within 0-360and scaled within 50-200% using medium speed setting.16.2 ms10.7 ms7.1 ms8.5 ms8.5 msFind Models (1 model, 4 occurrences, medium speed, limited scaling)Same as above except find four occurrences of a single 128 x 128 model.21.6 ms13.5 ms9.3 ms11.8 ms11.8 msFind Models (4 models, 4 occurrences, medium speed, limited scaling)Same as above except find a single occurrence of four 128 x 128 models.25.6 ms15.7 ms11.1 ms14.2 ms14.2 msPattern Matching (Normalized Grayscale Correlation) 3, 4Find a Model (128 x 128, non-rotated)Find a 128 x 128 model in an 8-bit grayscale image. The whole image is searched for a model that is not rotated.0.42 ms0.19 ms0.16 ms0.19 ms0.19 msFind a Model (128 x 128, -5 to +5)Find a 128 x 128 model located at 0 in an 8-bit grayscale image. The whole image is searched for a a model rotated within +/-5.1.7 ms0.89 ms0.70 ms0.89 ms0.89 msFind a Model (32 x 32, non-rotated)As above except perform a pattern match of a 32 x 32 model.2.1 ms1.0 ms0.71 ms0.83 ms0.83 msFind a Model (32 x 32, -5 to +5)As above except perform a pattern match of a 32 x 32 model.3.4 ms1.8 ms1.2 ms1.4 ms1.4 msEdge Finder (4000 edge elements or edgels)4Extract contours15.4 ms9.0 ms6.2 ms8.0 ms8.0 msExtract thin line crests68.3 ms24.3 ms19.5 ms24.8 ms24.0 msBlob Analysis (100 blobs that occupy 25% of area)4Calculate Area0.24 ms0.15 ms0.15 ms0.12 ms0.12 msCalculate Area and Binary Center of Gravity0.28 ms0.18 ms0.17 ms0.15 ms0.15 msCalculate Area and Grayscale Center of Gravity0.86 ms0.56 ms0.43 ms0.45 ms0.45 msMeasurementFind an EdgeLocate an edge in a 16 x 4 measurement region of an 8-bit image.0.06 ms0.02 ms0.03 ms0.07 ms0.08 msFind Multiple StripesLocate 24 stripes in a 128 x 16 measurement region of an 8-bit image.0.17 ms0.08 ms0.08 ms0.09 ms0.15 msString ReaderString ReadingRead a 6 character string using a 28 character font within a 512 x 512 image region.OCR42.7 ms26.4 ms20.3 ms25.0 ms25.0 msOCR ReadingRead an unknown string of twelve 33 x 21 characters (no grammar rules) within a 404 x 54 image region.10.6 ms6.6 ms4.9 ms5.8 ms5.8 msVerificationVerify that a known string of 12 SEMI font characters (33 x 21) within a 404 x 54 image region can be read properly.4.0 ms0.83 ms0.59 ms0.84 ms0.84 msBar and Matrix Code RecognitionBar Code ReadingRead a EAN13 bar code (no rotation).0.28 ms0.18 ms0.15 ms0.18 ms0.27 msDataMatrix ReadingRead a DataMatrix code.3.7 ms1.6 ms2.1 ms2.2 ms2.3 ms1. Benchmarks for larger images do not necessarily scale linearly due to CPU cache effects.2. Performed using PA.3. Faster search speeds can be obtained by reducing accuracy.4. Search speeds will vary with image content.MIL指令简介MIL Command Listing and DescriptionThis section provides an overview of each MIL module and a brief description of each MIL command. For a complete description of the syntax and use of each command, refer to the MIL Command Reference manual.1维和2维条形码识别模块1D and 2D Code Reader module用于读写各种1维和2维条形码及编码机制Used to read (and write) various 1D and 2D code symbologies.指令Commands形参Command parameters功能DescriptionMcodeAlloc()SystemId, CodeType, ControlFlag, CodeIdPtr分配一个条形码对象Allocate a code object.McodeControl()CodeId, ControlType, ControlValue控制一个条形码对象Control a code object.McodeFree()CodeId释放一个条形码对象Free a code object.McodeGetResult()CodeId, ResultType, ResultPtr从读写操作中获得一个结果Get a result from a read or write operation.McodeInquire()CodeId, InquireType, UserVarPtr查询条形码的参数设置Inquire about a code object parameter setting.McodeRead()CodeId, ImageBufId, ControlFlag从图中读取特定类型的条形码Read a specific type of code in an image.McodeRestore()FileName, SystemId, ControlFlag, CodeIdPtr从磁盘文件中恢复从前保存的条形码对象Restore a code object previously saved to a file.McodeSave()FileName, CodeId, ControlFlag将特定的条形码对象保存到磁盘文件中Save the specified code object in a file.McodeStream()MemPtrOrFileName, SystemId Operation, StreamType, Version ControlFlag, CodeIdPtr, SizeByteVarPtr从(到)文件或内存中加载、恢复或者保存条形码对象Load, restore, or save a code object from/to a file or memory.McodeVerify()CodeId, ImageBufId, String, ControlFlag从源图像中计算不同质量等级的条形码Compute the different quality-grades of the code in the specified source image.McodeWrite()CodeId, ImageBufId, String, ControlFlag以ASCII码的格式进行编码Encode an ASCII string.1维和2维条形码编码机制1D and 2D code symbologies对于指令McodeAlloc(),编码的方式包括以下几种类型:For the McodeAlloc() command, the code type(s) that can be read or written include(s):编码类型Code Type编码方式Encoding Type纠错Error CorrectionBC412标准编码方式Standard encoding type无纠错No error correctionCodabar标准编码方式Standard encoding type无纠错No error correctionCode39ASCII编码,标准编码ASCII encoding, Standard encoding type无纠错;检验位错误No error correction; check-digit error correctionCode93ASCII编码ASCII encoding检验位纠错Check-digit error correctionCode128 (UCC/EAN128)Continued.ASCII编码ASCII encoding检验位纠错Check-digit error correction1D and 2D code symbologies (cont.)For the McodeAlloc() command, the code type(s) that can be read or written include(s):编码类型Code Type编码方式Encoding Type纠错Error CorrectionDataMatrixNumeric encoding, Alpha encoding,10, 40, 50, 60, 70, 80,90, 100, 110, 120, 130,AlphaNumericPunc encoding,140 or 200 error correctionAlphaNumeric encoding,ASCII encoding, IS08 encodingEAN8Numeric encodingCheck-digit error correctionEAN13Numeric encodingCheck-digit error correctionInterleaved 2/5Numeric encodingNo error correction; check-digit error correcionMaxicodeEncoding mode 2, 3, 4, 5, 6Reed Solomon error correctionMicroPDF417Standard encoding typeReed Solomon error correctionPDF417Standard encoding typeReed Solomon 1 - 8 error correctionPharmaNumeric encodingNo error correctionPlanetNumeric encodingCheck-digit error correctionPostnetNumeric encodingCheck-digit error correctionQRQR code Model 1, 2 encodingLowest-level QR, Low-level QR, High-level QR, Highest-level QRRSSRSS 14, RSS 14 Stacked, RSS 14 Stacked Omni,RSS 14 Truncated, RSS ExpandedRSS Expanded Stacked, RSS Limited encoding.Check-digit error correctionUPC-ANumeric encodingCheck-digit error correctionUPC-ENumeric encodingCheck-digit error correction复合编码机制Composite code symbologies这是一种1维和2维的复合编码类型This code type is a composite of a 1D (RSS, UPC-A, UPC-E, EAN-8, EAN-13, or UCC/EAN128) and a 2D code type (PDF417 orMicroPDF417).应用和系统模块Application and System modules分别用于初始化和控制MIL应用环境和系统(帧捕获器板块,视觉处理板块或者主系统)。应用(Application)模块包括集成调试功能,系统资源补偿,命令线程和相关活动和定时器功能的控制。Used to initialize and control the MIL application environment and system (frame grabber boards, vision processor boards, or host system) respectively. The Application module includes control of integrated debugging features, system resource compen- sation, command threads and related events, as well as a timer function.指令Commands形参Command parameters功能DescriptionMappAlloc()InitFlag, ApplicationIdPtr分配一个MIL应用Allocate a MIL application.MappAllocDefault()nitFlag, ApplicationIdPtr, SystemIdPtr,DisplayIdPtr, DigIdPtr, ImageBufIdPtr分配MIL默认应用Allocate MIL application defaults.MappControl()ControlType, ControlFlag控制应用环境的设置Control an application environment setting.MappFree()ApplicationId释放MIL应用Free a MIL application.MappFreeDefault()ApplicationId, SystemId, DisplayId, DigId释放MIL默认应用Free MIL application defaults.MappGetError()ErrorType, ErrorPtr得到错误代码和相关信息Get error codes and related information.MappGetHookInfo()EventId, InfoType, UserVarPtr得到回调事件的信息Get information about a hooked event.MappHookFunction()HookType, HookHandlerPtr, 给一个事件创建回调函数(指向函数的指针)Hook a function to an event.MappInquire()InquireType, UserVarPtr查询应用的参数设置Inquire about the application parameter setting.MappTimer()ControlValue, TimePtr控制MIL定时器Control the MIL timer.MsysAlloc()SystemTypePtr, SystemNum, InitFlag, 分配一个硬件系统Allocate a hardware system.MsysControl()SystemId, ControlType, ControlFlag控制系统的行为Control system behavior.MsysFree()SystemId释放系统Free a system.MsysHookFuntion()SystemId, HookType, HookHandlerPtr, UserDataPtr给一个系统时间创建回调函数Hook a function to a system event.MsysInquire()SystemId, ParamToInquire, UserVarPtr查询系统参数设置Inquire about a system parameter setting.Blob分析模块Blob analysis module用于鉴定和测量图像中的连通域(blobs)Used to identify and measure connected components (blobs) in an image.指令Commands形参Command parameters功能DescriptionMblobAllocFeatureList()SystemId, FeatureListIdPtr分配一个blob分析特征列表Allocate a blob analysis feature list.MblobAllocResult()SystemId, BlobResIdPtr分配一个blob分析结果指针Allocate a blob analysis result buffer.MblobCalculate()BlobIdentImageId, GrayImageId, FeatureListId, BlobResId执行blob分析计算Perform blob analysis calculations.MblobControl()BlobResId, Procmode, Value控制blob分析处理方式的设置Control a blob analysis processing mode setting.MblobDraw()GraphContId, ResultId, DestImageId, Operation, Label, ControlFlag在图像指
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 初高中学习中的心理健康问题解析
- 企业人身保险理赔方案
- 农产品安全风险评估预警
- 家电维修节约资源方案
- 地产项目竞争分析总结
- 2025中国工商银行山西省分行社会招聘120人笔试备考试题及答案解析
- 如何提高自己的沟通能力
- 云计算网络性能优化报告
- 创新个性化定制产品吸引用户
- 纺织服饰出口市场规定
- 麻精药品管理课件
- 2025年潍坊市中考英语试卷(含答案解析)
- GB/T 45933-2025养老机构康复辅助器具基本配置
- 实验室生物安全监督制度
- 小型水库维修养护项目方案投标文件(技术方案)
- 企业宣传用品管理办法
- 中国城市轨道交通全自动运行系统技术指南
- JJG 207-2025气象用玻璃液体温度表检定规程
- 梅毒诊断及治疗
- 表面贴装技术课件
- 酒店mod培训课件
评论
0/150
提交评论