收藏 分销(赏)

MatroxImagingLibrary(MIL)双语手册.pdf

上传人:快乐****生活 文档编号:4887179 上传时间:2024-10-17 格式:PDF 页数:59 大小:2.66MB 下载积分:14 金币
下载 相关 举报
MatroxImagingLibrary(MIL)双语手册.pdf_第1页
第1页 / 共59页
MatroxImagingLibrary(MIL)双语手册.pdf_第2页
第2页 / 共59页


点击查看更多>>
资源描述
MIL 8.0 GUIDEIncluding Active MIL2Edge FinderOverviewMatrox 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 ControlDisplayGeometricModel 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.3Table 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 msMIL/ActiveMIL Benchmarks(cont.)Image 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 msMIL/ActiveMIL Benchmarks(cont.)Edge 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.7MIL 指令简介指令简介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 correction81D 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 CorrectionNumeric encoding,Alpha encoding,10,40,50,60,70,80,90,100,110,120,130,AlphaNumericPunc encoding,140 or 200 error correctionAlphaNumeric encoding,DataMatrixASCII 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).9应用和系统模块应用和系统模块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 hardwar
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传

当前位置:首页 > 包罗万象 > 大杂烩

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2025 宁波自信网络信息技术有限公司  版权所有

客服电话:4009-655-100  投诉/维权电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服