【免费】LABVIEW-IMAQ模块中文说明书
labviewIMAQ模块介绍
IMAQ模块介绍fhinali编写IMAQ模块介绍一.LabVIEW机器视觉前面板上的模块有以下几类(如图1所示)1.IMAQ Image.ctl2.Image Display control3.IMAQ Vision controls4.Machine Vision controls图11 IMAQ Vision controls对图像进行分析和处理所用到的一些控件,包括图像的类型,图像处理的方式和不同的形态算子以及颜色的类型的选择等等。
如图2IMAQ 模块介绍 fhinali 编写图21.1 Image Type用于图片类型的选择,可以选择的类别有8bits ,16bits ,Float ,Complex ,RGB 和HSL 。
一般用在从文件中读取图片时类型的选择。
1.2 ROI DescriptorROI 区域的描述。
ROI 是Region Of Interesting 的简称,中文应该翻译为目标区域。
一般用在一个大图中取一块特定形状的区域,以便后续的处理和分析。
ROI 为一簇数据,包括一个整数数组和一个簇组成的数组。
整数数组内有4个元素,为图形最小外接矩形的四条边的坐标。
簇数组中的簇由轮廓类型(整数),ROI 类型(整数)和图形坐标点(为数组,根据ROI 类型的不同,数组的定义也不同)1.3Optional Rectangle选择的矩形区域,为四个元素的数组,代表矩形的四条边的坐标。
1.4Color Mode色彩模式,彩色图形的显示和处理模式,包括RGB,HSL,HSV,HIS 四种。
1.5Threshold Range阀值范围,为一包含两个数组元素的簇,常用于灰度或色彩图像阀值处理模块中。
1.6 Convolution Kernel二维浮点数组成的数组,用于构造一些算法的算子。
1.7 Morphology Operation形态算法的选择。
可以选择不同的数据处理方式。
1.8 Structuring Element结构元素,为二维的整数数组。
LabVIEW中文教材
计算机虚拟仪器图形编程LabVIEW实验教材北京中科泛华测控技术有限公司目录第一课LABVIEW概述 (4)第一节虚拟仪器(VI)的概念 (4)第二节L AB VIEW的操作模板 (6)工具模板(Tools Palette) (6)控制模板(Controls Palette) (8)功能模板(Functions Palette) (9)第三节创建一个VI程序 (11)1. 前面板 (11)框图程序 (12)从框图程序窗口创建前面板对象 (14)4. 数据流编程 (14)第四节程序调试技术 (15)1. 找出语法错误 (15)2. 设置执行程序高亮 (15)3. 断点与单步执行 (16)4. 探针 (16)第五节练习1-1 (16)第六节把一个VI程序作为子VI程序调用 (20)第七节练习1-2 (21)第八节练习1-3 (24)第九节练习1-4 (26)第十节练习1-5 (29)第二课数据采集 (33)第一节概述 (33)第二节数据采集VI程序的调用方法 (36)第三节模拟输入与输出 (37)练习2-1 (38)第四节波形的采集与产生 (41)练习2-2 (42)第五节扫描多个模拟输入通道 (43)练习2-3 (44)第六节连续数据采集 (45)练习2-4 (46)第三课仪器控制 (48)第一节概述 (48)第二节串行通讯 (48)第三节IEEE488(GPIB)概述 (50)练习3-1 (52)第四节VISA编程 (53)练习3-2 (55)第五节用L AB VIEW编写仪器驱动程序 (58)第六节验证仪器驱动软件 (58)练习3-3 (60)第四课分析软件 (63)第一节概述 (63)第二节、高级分析功能程序 (63)第三节信号产生 (64)练习4-1 (65)第四节信号处理 (66)练习4-2 (67)第五节数字滤波器 (68)练习4-3 (69)第六节曲线拟合 (71)练习4-4 (72)练习4-5 (74)第五课实用工具软件包 (77)第一节概述 (77)第二节常用软件工具箱 (77)第三节分析工具软件 (80)第一课LabVIEW概述第一节虚拟仪器(VI)的概念使用LabVIEW开发平台编制的程序称为虚拟仪器程序,简称为VI。
labview IMAQ模块介绍
IMAQ模块介绍fhinali编写IMAQ模块介绍一.LabVIEW机器视觉前面板上的模块有以下几类(如图1所示)1.IMAQ Image.ctl2.Image Display control3.IMAQ Vision controls4.Machine Vision controls图11 IMAQ Vision controls对图像进行分析和处理所用到的一些控件,包括图像的类型,图像处理的方式和不同的形态算子以及颜色的类型的选择等等。
如图2IMAQ 模块介绍 fhinali 编写图21.1 Image Type用于图片类型的选择,可以选择的类别有8bits ,16bits ,Float ,Complex ,RGB 和HSL 。
一般用在从文件中读取图片时类型的选择。
1.2 ROI DescriptorROI 区域的描述。
ROI 是Region Of Interesting 的简称,中文应该翻译为目标区域。
一般用在一个大图中取一块特定形状的区域,以便后续的处理和分析。
ROI 为一簇数据,包括一个整数数组和一个簇组成的数组。
整数数组内有4个元素,为图形最小外接矩形的四条边的坐标。
簇数组中的簇由轮廓类型(整数),ROI 类型(整数)和图形坐标点(为数组,根据ROI 类型的不同,数组的定义也不同)1.3Optional Rectangle选择的矩形区域,为四个元素的数组,代表矩形的四条边的坐标。
1.4Color Mode色彩模式,彩色图形的显示和处理模式,包括RGB,HSL,HSV,HIS 四种。
1.5Threshold Range阀值范围,为一包含两个数组元素的簇,常用于灰度或色彩图像阀值处理模块中。
1.6 Convolution Kernel二维浮点数组成的数组,用于构造一些算法的算子。
1.7 Morphology Operation形态算法的选择。
可以选择不同的数据处理方式。
1.8 Structuring Element结构元素,为二维的整数数组。
LabVIEW Real-Time Module配置使用指南说明书
Using Desktop PCs as RT Targets with the LabVIEW Real-Time™ModuleThe LabVIEW Real-Time Module can execute VIs on RT targets runninga real-time operating system. This document contains importantinformation about configuring a desktop PC as an RT target andinformation about installing software on the desktop PC.Refer to the Getting Started with the LabVIEW Real-Time Moduledocument for exercises you can complete to familiarize yourself with theLabVIEW Real-Time Module.ContentsSystem Requirements (2)Configuring a Desktop PC Using a Utility USB Drive (3)Boot from the USB Drive (3)Format a Drive or Partition (4)Configuring a Desktop PC Using a Boot Disk (5)Configuring a Desktop PC Using a Format Disk (6)Installing Software (7)Installing Multiple-CPU Support (8)Resources (8)System RequirementsTo configure a desktop PC as an RT target, ensure that the PC meets thefollowing requirements:•Processor based on the x86 architecture.•Supported Ethernet chipset, the Ethernet device from the LabVIEWReal-Time Deployment License Bundle for Standard PCs, or asupported Ethernet card.•Formatted hard drive or partition on the desktop PC with the FAT32 orReliance file system. Because Windows Vista requires the NTFS filesystem, you cannot install RT Module software on the same partitionas Windows Vista.• 3.5 inch floppy drive or bootable USB port on the desktop PC.etspc for up-to-date information about supported hardware and the specific desktop PCspecifications that National Instruments recommends.Configuring a Desktop PC Using a Utility USB DriveUse a utility USB drive to configure a desktop PC to boot from the USBdrive or to format the hard drive of the desktop PC and then permanentlyinstall the RT Module software on the hard drive of the desktop PC.Create a desktop PC utility USB drive using NI Measurement &Automation Explorer (MAX). Select Tools»RT Disk Utilities»CreateDesktop PC Utility USB Drive in MAX to create the utility USB drive. Boot from the USB DriveUse a utility USB drive to configure a desktop PC to boot from the USBdrive and launch the RT Module software on the hard drive of the desktopPC. If there is no RT Module software installed on the hard drive, the utilityUSB drive boots the PC into safe mode, where you can install software.Complete the following steps to configure a desktop PC to boot using autility USB drive.1.If the desktop PC does not include a motherboard with a supportedEthernet chipset, install a supported Ethernet card or the Ethernetdevice included with the LabVIEW Real-Time Deployment LicenseBundle for Standard PCs in an available PCI slot of the PC.2.Connect a monitor and keyboard to the desktop PC to display andrespond to BIOS configuration utility prompts.Using Desktop PCs as RT © National Instruments Corporation 3Using Desktop PCs as RT TargetsNote National Instruments recommends that you remove from the desktop PC any PCI boards not supported by the LabVIEW Real-Time Module to reduce the possibility of resource conflicts. For example, remove sound cards, SCSI adapters, and modems from the desktop PC.3.Turn on the desktop PC and access the BIOS configuration utility.Note BIOS configurations and configuration interfaces for desktop PCs vary among different manufacturers and system models. Consult the motherboard or system manual for information about accessing and configuring the BIOS settings of the desktop PC.4.Set the boot configuration to use a USB drive as the first boot device. 5.Disable any unnecessary integrated peripherals that use an interruptrequest line (IRQ). For example, disable unused serial ports orintegrated sound on the desktop PC.6.Save the configuration changes and exit the BIOS configuration utility.7.Insert the utility USB drive into an empty USB port on the desktop PCand reboot the desktop PC.8.Select the Boot using software installed on the hard-disk optionfrom the utility USB drive menu. The desktop PC boots into thereal-time operating system or into safe mode. Refer to the InstallingSoftware section for information about installing the RT Modulesoftware on the hard drive if the PC boots into safe mode.Format a Drive or PartitionUse a utility USB drive to permanently install the RT Module software onthe hard drive of the desktop PC. A format option of the utility USB driveresets a previously formatted and partitioned hard drive and installs files tothe desktop PC to allow you to start the PC without a boot disk.Caution The format utility of the utility USB drive overwrites the hard drive boot sector and master boot record, erasing all pointers to data on the drive. If you have a dual-boot configuration, the changes to the master boot record remove the ability to boot into the secondary operating system.Complete the following steps to format the hard drive and configure adesktop PC using a utility USB drive.1.If the desktop PC does not include a motherboard with a supportedEthernet chipset, install a supported Ethernet card or the Ethernetdevice included with the LabVIEW Real-Time Deployment LicenseBundle for Standard PCs in an available PCI slot of the PC.2.Connect a monitor and keyboard to the desktop PC to display andrespond to BIOS configuration utility prompts.Using Desktop PCs as RT Targets Note National Instruments recommends that you remove any PCI boards not supported by the LabVIEW Real-Time Module to reduce the possibility of resource conflicts. For example, remove sound cards, SCSI adapters, and modems from the desktop PC.3.Turn on the desktop PC and access the BIOS configuration utility.Note BIOS configurations and configuration interfaces for desktop PCs vary among different manufacturers and system models. Consult the motherboard or system manual for information about accessing and configuring the BIOS settings of the desktop PC.4.Set the boot configuration to use a USB drive as the first boot device. 5.Disable any unnecessary integrated peripherals that use an interruptrequest line (IRQ). For example, disable unused serial ports orintegrated sound on the desktop PC.6.Save the configuration changes and exit the BIOS configuration utility.7.Insert the utility USB drive into an empty USB port on the desktop PCand reboot the desktop PC.8.Select the Format hard disk option from the utility USB drive menu,choose a file system, and follow the directions on the screen.Formatting with the Reliance File SystemReliance is a transactional file system that provides data integrity in theevent of a power interruption. If a FAT-formatted RT target reboots orpowers down during application execution due to power loss or userintervention, data corruption can occur. The Reliance file system maintainsdata integrity in such cases. Refer to the Datalight website at for more information about the Reliance file system.After formatting with the Reliance file system, remove the utility USBdrive and reboot the desktop PC to boot into the real-time operating system.The desktop PC boots into safe mode the first time the system boots fromthe hard drive. Refer to the Installing Software section for informationabout installing the RT Module software on the hard drive if the PC bootsinto safe mode.Formatting with the FAT File SystemFormat with the FAT file system if you need to maintain compatibility withexisting FAT-formatted systems.After formatting with the FAT file system, remove the utility USB drive andreboot the desktop PC to boot into the real-time operating system. Thedesktop PC boots into safe mode the first time the system boots from thehard drive. Refer to the Installing Softwaresection for information about© National Instruments Corporation 5Using Desktop PCs as RT Targetsinstalling the RT Module software on the hard drive if the PC boots into safe mode.Configuring a Desktop PC Using a Boot DiskYou can use a boot disk to launch the RT Module software that you installon the hard drive of a desktop PC. If there is no RT Module softwareinstalled on the hard drive, the desktop PC boots into safe mode, where youcan install software.Create a desktop PC boot disk using NI Measurement & AutomationExplorer (MAX). Select Tools»RT Disk Utilities»Create Desktop PCBoot Disk in MAX to create the desktop PC boot disk.Note You cannot create a boot disk with Windows Vista. You also cannot use a boot disk with a Reliance-formatted hard drive or partition. When you need to use a boot disk with a Reliance-formatted hard drive or partition, you can use a utility USB drive instead.Complete the following steps to configure a desktop PC using a boot disk.1.If the desktop PC does not include a motherboard with a supportedEthernet chipset, install a supported Ethernet card or the Ethernetdevice included with the LabVIEW Real-Time Deployment LicenseBundle for Standard PCs in an available PCI slot of the PC.2.Connect a monitor and keyboard to the desktop PC to display andrespond to BIOS configuration utility prompts.Note National Instruments recommends that you remove from the desktop PC any PCI boards not supported by the LabVIEW Real-Time Module to reduce the possibility of resource conflicts. For example, remove sound cards, SCSI adapters, and modems from the desktop PC.3.Turn on the desktop PC and access the BIOS configuration utility.Note BIOS configurations and configuration interfaces for desktop PCs vary among different manufacturers and system models. Consult the motherboard or system manual for information about accessing and configuring the BIOS settings of the desktop PC.4.Set the boot configuration to use the floppy drive as the first boot device. 5.Disable legacy USB support. 6.Disable any unnecessary integrated peripherals that use an interruptrequest line (IRQ). For example, disable unused serial ports orintegrated sound on the desktop PC.7.Save the configuration changes and exit the BIOS configuration utility.Using Desktop PCs as RT Targets 8.Insert the desktop PC boot disk in the floppy drive and reboot thedesktop PC. The desktop PC boots into the real-time operating systemor into safe mode. Refer to the Installing Software section forinformation about installing the RT Module software on the hard drive if the PC boots into safe mode.Configuring a Desktop PC Using a Format DiskYou can use a format disk to permanently install the RT Module softwareon the hard drive of the desktop PC. A format disk resets a previouslyformatted and partitioned hard drive and installs files to the desktop PC toallow you to start the PC without a boot disk.Create a desktop PC format disk using NI Measurement & AutomationExplorer (MAX). Select Tools»RT Disk Utilities»Create Desktop PCFormat Hard Drive Disk in MAX to create the desktop PC format disk.NoteYou cannot create a format disk with Windows Vista. You can use a format disk to format with the FAT file system only. To format with the Reliance file system, you must use a utility USB drive.Caution A format disk overwrites the hard drive boot sector and master boot record, erasing all pointers to data on the drive. If you have a dual-boot configuration, the changes to the master boot record remove the ability to boot into the secondary operating system.Complete the following steps to configure a desktop PC using a formatdisk.1.If the desktop PC does not include a motherboard with a supportedEthernet chipset, install a supported Ethernet card or the Ethernetdevice included with the LabVIEW Real-Time Deployment LicenseBundle for Standard PCs in an available PCI slot of the PC.2.Connect a monitor and keyboard to the desktop PC to display andrespond to BIOS configuration utility and format prompts.Note National Instruments recommends that you remove from the desktop PC any PCI boards not supported by the LabVIEW Real-Time Module to reduce the possibility of resource conflicts. For example, remove sound cards, SCSI adapters, and modems from the desktop PC.3.Turn on the desktop PC and access the BIOS configuration utility.Note BIOS configurations and configuration interfaces for desktop PCs vary among different manufacturers and system models. Consult the motherboard or system manual forinformation about accessing and configuring the BIOS settings of the desktop PC.© National Instruments Corporation 7Using Desktop PCs as RT Targets4.Set the boot configuration to use the floppy drive as the first boot device. 5.Disable legacy USB support. 6.Disable any unnecessary integrated peripherals that use an interruptrequest line (IRQ). For example, disable unused serial ports orintegrated sound on the desktop PC.7.Save the configuration changes and exit the BIOS configuration utility.8.Insert the desktop PC format disk in the floppy drive and reboot the PC.9.Follow the directions that appear on the screen. 10.Remove the desktop PC format disk from the floppy drive and rebootthe desktop PC to boot into the real-time operating system. Thedesktop PC boots into safe mode the first time the system boots fromthe hard drive. Refer to the Installing Software section for informationabout installing the RT Module software to the hard drive if the PC boots into safe mode.Installing SoftwareComplete the following steps to install software on the desktop PC.1.Boot the desktop PC into the real-time operating system. The desktopPC loads with the basic real-time operating system and a null IPaddress of 0.0.0.0.Tip You can connect a monitor to the desktop PC to display startup messages.2.Open MAX on another computer in the same subnet and expand theRemote Systems category. MAX lists the desktop PC as 0.0.0.0 inthe Remote Systems category.3.Click on the 0.0.0.0 entry to access the Network Settings tab.4.Enter a name for the RT target in the Name text box.5.Set the network configuration options of the RT target in theIP Settings section and click the Apply button.Refer to the Configuring Network Settings book, accessible bybrowsing to MAX Remote Systems Help»LabVIEW Real-TimeTarget Configuration»Configuring Network Settings from theContents tab of the MAX Help , for information about configuringnetwork settings .6.Reboot the RT target. The RT target appears in the Remote Systems category with the assigned name. 7.Expand the RT target in the Remote Systems category and select theSoftwarecategory.National Instruments, NI, , and LabVIEW are trademarks of National Instruments Corporation.Refer to the Terms of Use section on /legal for more information about NationalInstruments trademarks. Other product and company names mentioned herein are trademarks or tradenames of their respective companies. For patents covering National Instruments products, refer to theappropriate location: Help»Patents in your software, the patents.txt file on your CD, or/patents .© 2004–2007 National Instruments Corporation. All rights reserved.371857E-01Dec078.Click the Add/Remove Software button in the toolbar to launch the LabVIEW Real-Time Software Wizard. 9.Install the LabVIEW Real-Time software and device drivers that yourequire on the RT target. Refer to the NI Web site at /info andenter the info code etspc for the latest information about supported software.Installing Multiple-CPU SupportTo take advantage of parallel processing on a multiple-CPU system, use theLabVIEW Real-Time Software Wizard in MAX to install the NI RTExtensions for SMP. Refer to the MAX Help for information about using theLabVIEW Real-Time Software Wizard. Refer to the Optimizing RTApplications for Multiple-CPU Systems book of the LabVIEW Help forinformation about optimizing RT applications for multiple-CPU systems.Note Single-CPU systems perform best without the NI RT Extensions for SMP. Also, some applications, such as those that consist mainly of single-point I/O, can achieve lower latency using a single CPU without the NI RT Extensions for SMP. Refer to the National Instruments Web site at /info and enter the info code rtsmp for further details about optimizing RT applications for systems with multiple CPUs.Resources•Refer to the NI Web site at /info and enter the info code etspc for more information about using desktop PCs as RT targets.•Refer to the readme_RT.html file on the LabVIEW Real-TimeModule installation CD for information about known issues regardingthe use of desktop PCs as RT targets.•Refer to the Getting Started with the LabVIEW Real-Time Moduledocument for exercises you can complete to familiarize yourself withthe LabVIEW Real-Time Module.•Refer to the LabVIEW Help for more information about the LabVIEWReal-Time Module features. Access the LabVIEW Help fromLabVIEW by selecting Help»Search the LabVIEW Help .。
imaq
IMAQ VISIONIMAQ Vision是LabVIEW内置的视觉开发工具包,其中包括IMAQ Vision和Vision Builder 两个组件。
IMAQ Vision是一个功能强大的函数库,提供了在LabVIEW平台上开发机器视觉系统所需要的各种子程序,例如图像采集、系统校准、图像处理、几何量测量等。
Vision Builder 是一个交互式的机器视觉系统开发环境,可以在系统软件设计的每一步看到输出的中间结果,并可以随时进行修改。
设计完成后能够自动生成LabVIEW程序代码。
NI 的IMAQ Vision 软件包为图像处理提供了完整的功能。
它将400多种功能集成到LabVIEW 和Measurement Studio(LabWindows/CVI,Visual C++及Visual Basic)开发环境中。
此外,IMAQ Vision Builder 可用于快速浏览、建立模型及测试应用,且无需编程。
NI的OCR 软件为LabVIEW 与BridgeVIEW 开发者提供了字符识别功能,可用于工业检验中读取字母。
通过交互式、可配置的软件或强大的程序库创建应用与数据采集和运动控制设备集成NI-IMAQ 驱动软件使配置和维护更简单可从LabVIEW、LabWindows/CVI、C、C++和Visual Basic中调用超过200个函数具有可配置、可编程、实时和嵌入式机器视觉的功能这个最新版本的图像软件扩充了NI的简单易用的机器视觉和图像处理工具的功能,使得流行的编程语言也能用来作图像处理。
通过IMAQ Vision 6.0,工程师们可以用Measurement Studio非常容易的创建完整的视觉检测应用程序来迅速并可靠的完成有关测量任务. Measurement Studio是一个提供各种测量工具的软件包。
所提供的工具包括数据采集,数据分析,数据图形化等. Measurement Studio支持Microsoft Visual Basic, Visual C++和ANSI标准C 语言National Instruments视觉软件产品具有机器视觉应用的众多优势。
【免费】LABVIEW-IMAQ模块中文说明书
IMAQ模块介绍 fhinali编写IMAQ模块介绍一.LabVIEW机器视觉前面板上的模块有以下几类(如图1所示)1. IMAQ Image.ctl2.Image Display control3.IMAQ Vision controls4.Machine Vision controls图11 IMAQ Vision controls对图像进行分析和处理所用到的一些控件,包括图像的类型,图像处理的方式和不同的形态算子以及颜色的类型的选择等等。
如图2 IMAQ模块介绍 fhinali编写图21.1 Image Type用于图片类型的选择,可以选择的类别有8bits,16bits,Float,Complex,RGB和HSL。
一般用在从文件中读取图片时类型的选择。
1.2 ROI DescriptorROI区域的描述。
ROI是Region Of Interesting的简称,中文应该翻译为目标区域。
一般用在一个大图中取一块特定形状的区域,以便后续的处理和分析。
ROI为一簇数据,包括一个整数数组和一个簇组成的数组。
整数数组内有4个元素,为图形最小外接矩形的四条边的坐标。
簇数组中的簇由轮廓类型(整数),ROI类型(整数)和图形坐标点(为数组,根据ROI类型的不同,数组的定义也不同)1.3Optional Rectangle选择的矩形区域,为四个元素的数组,代表矩形的四条边的坐标。
1.4Color Mode色彩模式,彩色图形的显示和处理模式,包括RGB,HSL,HSV,HIS四种。
1.5Threshold Range阀值范围,为一包含两个数组元素的簇,常用于灰度或色彩图像阀值处理模块中。
1.6 Convolution Kernel二维浮点数组成的数组,用于构造一些算法的算子。
1.7 Morphology Operation形态算法的选择。
可以选择不同的数据处理方式。
1.8 Structuring Element结构元素,为二维的整数数组。
labview中文
虚拟仪器(LabVIEW)虚拟仪器是一种高效用于构建数据采集与监测系统图形化编程语言。
使用虚拟仪器,您快速创建用户界面,让您交互控制您的软件系统。
要指定您系统的功能,您只需装配块关系图—一种自然的设计表示科学家和工程师。
测量硬件紧密集成方便了数据采集、分析与演示文稿解决方案的快速发展。
虚拟仪器包含强大的内置度量分析和一个图形的编辑器实现最佳性能。
虚拟仪器是使用于Windows 2000/NT/Me/9x、Mac OS、Linux、Sun Solaris 和HP-UX,有三种不同的开发系统选项。
更快地发展虚拟仪器通过加快发展了对传统的编程提升了4至10倍!使用模块化和层次结构的虚拟仪器,可以原型,设计,并且在一个短时间内修改系统。
您也可以重用虚拟仪器代码轻松快速地在其他应用程序中应用。
更好的投资使用虚拟仪器系统,每个用户有权访问单一的商业文书的成本低于一个完整的检测实验室。
此外,用户还可配置的虚拟仪器系统足够的灵活性,从而更好地长期投资的技术变化与适应。
优化性能虚拟仪器的所有应用程序执行以获得最佳性能的编译速度。
用虚拟仪器专业开发系统或应用程序生成器,可为您的代码的安全通讯生成独立可执行文件或dll。
您甚至可以创建共享的库或从其他编程语言中调用虚拟仪器代码的dll。
开放的开发环境用虚拟仪器在开放开发环境,您可以连接到通过ActiveX、Web、dll、共享的库、SQL(数据库)、DataSocket、TCP/IP和许多其他协议的其他应用程序。
虚拟仪器用于快速创建网络的测量和Web发布和远程数据共享最新的科技集成的自动化系统。
虚拟仪器也可以用于插件数据采集、信号调理、GPIB、VXI、PXI、基于计算机的仪器、串行协议、图像采集和运动控制的驱动程序。
除了在虚拟仪器的开发系统国家仪器还提供多种附加模块和扩展功能的虚拟仪器的工具集。
这使您可以快速构建可定制、鲁棒的测量和自动化系统。
虚拟仪器数据记录和监督控制模块高通道数的分布式应用程序日志记录的虚拟仪器数据和监督控制模块,提供了一个完整的解决方案。
Labview中Vision Utilities模块说明
Image ManagementIMAQ Create VI:创建一个暂时存储图像的缓冲区。
在labview中结合IMAQ DisposeVI来创建或处理视觉图像Border Size:设置创建的图像的宽度,以像素为单位。
这些像素仅用于特定的VI,在您的应用程序开始时创建一个边界,如果图像是使用Function中的图像处理功能,则需要一个边界(例如,标签和形态),然后才能处理图像。
默认的边框值是3。
Image Name:与创建的图像相关联的图像名称,每幅图像必须有一个唯一的名称。
Image Type:指定的图像类型。
从以下值中选择Grayscale (U8) (0):每像素8位(无符号,标准单色)Grayscale (16) (1):每像素16位(有符号)Grayscale (SGL) (2):每像素32位(浮点)Complex (CSG) (3):每像素2×32位(浮点)RGB (U32) (4):每像素32位(红,绿,蓝,alpha)HSL (U32) (5):每像素32位(色调,饱和度,亮度,α)RGB (U64) (6):每像素64位(红,绿,蓝,alpha)Grayscale (U16) (7):每像素16位(无符号,标准单色)IMAQ Dispose VI:销毁图像,释放其占用的内存空间。
在应用程序中释放I MAQ Create VI创建图像时分配的内存空间。
在应用程序中不再需要图像时执行IMAQ Dispose VI。
在所有IMAQ Create VI创建图像之后调用一次IMAQ Dispose VI。
IMAQ Image Bit Depth VI:给出图像的位深度相关信息,或修改图像的位深度。
NI视觉图像的位深度决定如何显示图像、图像转换到另一个图像类型以及写入图像为PNG文件Bit Depth (0):只有当Get/Set Bit Depth? (Set)设置为“Set”时,此端口才有效,指定新图像的位深度。
LabVIEW 中Vision各模块说明
一.LabVIEW机器视觉前面板上的模块有以下几类(如图1所示)1.IMAQ Image.ctl2.Image Display control3.IMAQ Vision controls4.Machine Vision controls图11 IMAQ Vision controls对图像进行分析和处理所用到的一些控件,包括图像的类型,图像处理的方式和不同的形态算子以及颜色的类型的选择等等。
如图2图21.1 Image Type用于图片类型的选择,可以选择的类别有8bits,16bits,Float,Complex,RGB和HSL。
一般用在从文件中读取图片时类型的选择。
1.2 ROI DescriptorROI区域的描述。
ROI是Region Of Interesting的简称,中文应该翻译为目标区域。
一般用在一个大图中取一块特定形状的区域,以便后续的处理和分析。
ROI为一簇数据,包括一个整数数组和一个簇组成的数组。
整数数组内有4个元素,为图形最小外接矩形的四条边的坐标。
簇数组中的簇由轮廓类型(整数),ROI类型(整数)和图形坐标点(为数组,根据ROI类型的不同,数组的定义也不同)1.3Optional Rectangle选择的矩形区域,为四个元素的数组,代表矩形的四条边的坐标。
1.4Color Mode色彩模式,彩色图形的显示和处理模式,包括RGB,HSL,HSV,HIS四种。
1.5Threshold Range阀值范围,为一包含两个数组元素的簇,常用于灰度或色彩图像阀值处理模块中。
1.6 Convolution Kernel二维浮点数组成的数组,用于构造一些算法的算子。
1.7 Morphology Operation形态算法的选择。
可以选择不同的数据处理方式。
1.8 Structuring Element结构元素,为二维的整数数组。
2 Machine Vision controls机器视觉中用到的一些控件,只要是对图像画面进行选择的一些工具,包括点,线和面的选择以及坐标系的设定。
IMAQ Vision for LabVIEW 6.1 用户指南说明书
IMAQ Vision for LabVIEW Release Notes About IMAQ Vision for LabVIEWIMAQ Vision for LabVIEW is for engineers and scientists who are developing machine vision and scientific imaging applications.IMAQ Vision for LabVIEW is a library of powerful functions for image processing.IMAQ Vision 6.1for LabVIEW includes the following new functionalities:support for LabVIEW Real-Time,enhanced pattern matching functions,and new overlay functionality.Support for LabVIEW Real-TimeIMAQ Vision for LabVIEW introduces LabVIEW Real-Time (RT)support for IMAQ Vision and e LabVIEW RT support to create a machine vision application for a real-time,deterministic,embedded target.For information about using IMAQ Vision with LabVIEW RT,refer to the IMAQ Vision for LabVIEW Real-Time User Manual .Note In order to take advantage of the LabVIEW RT features in IMAQ Vision,IMAQ Vision Builder,and NI-IMAQ,you must purchase and install LabVIEW 6.1or later and LabVIEW Real-Time Module 6.1or later.Pattern Matching EnhancementsIMAQ Vision for LabVIEW contains updated pattern matching VIs that perform with improved accuracy.IMAQ Vision for LabVIEW also contains three new pattern matching VIs —IMAQ Advanced Setup Learn Pattern 2,IMAQ Advanced Setup Match Pattern 2,and IMAQ Refine Matches —that give you low-level control of the pattern matching algorithm.Overlay EnhancementsThe new IMAQ Merge Overlay VI merges a non-destructive overlay into an image,making the overlay part of the image content.This feature allows you to view and print the image with its overlay information from any third-party imagingsoftware.Distributing Applications that Use IMAQ VisionUse the IMAQ Vision Deployment Engine to distribute an applicationdeveloped with IMAQ Vision.The IMAQ Vision Deployment Engine isavailable separately.To distribute an application developed with IMAQVision,you must have the IMAQ Vision Deployment Engine installed onthe development machine and you must have an IMAQ Vision deploymentlicense for each target machine.Contact a National Instruments sales representative or visit topurchase the IMAQ Vision Deployment Engine and deployment licenses. About the IMAQ Vision Documentation SetIn addition to these release notes,the IMAQ Vision documentation setconsists of the following:•The IMAQ Vision Concepts Manual contains vision conceptualinformation.Read this document if you are new to vision.•The IMAQ Vision for LabVIEW User Manual contains information onhow to build vision applications using IMAQ Vision for LabVIEW.•The IMAQ Vision for LabVIEW online help contains referenceinformation about IMAQ Vision VIs.In LabVIEW,click Help»IMAQVision to access this help.•The IMAQ Vision examples help file contains links to all installedIMAQ Vision examples.In LabVIEW,click Help»Search IMAQExamples to access these example links.•The readme.txt file,which is located on the IMAQ Visioninstallation CD,contains last-minute information concerning thisrelease of IMAQ Vision for LabVIEW.•IMAQ Vision for LabVIEW Real-Time User Manual containsinstallation,configuration,acquisition,and programming informationspecific to IMAQ Vision for LabVIEW Real-Time.For your convenience,all printed IMAQ Vision documents are alsoavailable in Portable Document Format(PDF),which you can access fromthe Start»Programs»National Instruments»Vision»Documentationmenu.©National Instruments Corporation3IMAQ Vision for LabVIEW Release Notes。
USB摄像头与LabVIEW IMAQ USB编程实现的图像获取与处理系统说明书
5th International Conference on Measurement, Instrumentation and Automation (ICMIA 2016)Image Acquistion and Processing system based on USBZhangHui1,a SiMing He1,a Changli Qiu1,a1,2,3,4,5Electrical and Electronic Teaching and Research Section ,Aviation University of Air ForceChangchun, 130022, Chinaa email:****************Keywords: LabVIEW IMAQ USB USB camemaAbstract. We use USB camera and IMAQ vision to program on LabVIEW platform.We process the contionuous acquistion of image,include adjusting the brightness,contrast,gamma value of image, and cut the image with a specified path.the design is low cost,easier implementation and flexible operation ,It’s have good prospects for development.IntroductionImage can help human perception to the outside world,is an important tool to obtain information,especially the video image is very convenience foe people’s life.With the popularization and development of usb interface ,usb camera is widely used as high speed,portable image acquisition equipment.However ,image acquistion process has some shortcoming such as long development cycle,poor universality , higher cost and so on .So ,we need design a strong commonality and hign performance of image and processing system is very important..In order to meet the above requirements,the design adopts LabVIEW as the software editor,which mainly used for data collection,analysis,display and control and other field.We program with graphical programming language LabVIEW,through IMAQ USB module and USB camera to finish real-time acquisition and processing,system structure diagram is shown in Fig.1.The design is divided into two parts,the first part is including a computer equipped with LabVIEW sofyware,mainly for video image display,processing and preservation,the second part in cluding a common USB camera,focus on real-time image acquistion[1].Fig.1. system structure diagramFor image acquisition and processing technology of labview platform,NI company provides powerfl software IMAQ VISION,which contains more than 400 image processing function and interactive image processing window,include statistics,filtering ,image processing,such as geometrictransformation shape matching,spot analysis and calulation and measurement application[2].It can process one-dimensional or multidimensional image and also customize according to the requirement of design personalized features.We use USB module of IMAQ VISION and USB camera to realize the video acquisttion,sedign control image operation panel,adjust the brightness of the image,contrast the gamma value ,capture image at a certain moment and save the specified durectory.the System is simple .The cycle is short, andoperation is flexible.The System Design ProcessThe front panel Process. The front panel as the labview software user interface,can effectively collect video image and display on the computer.We can adjust brightness ,contrast and gamma value,at the same time,we can capture the image and save it under the specified path. The front panel design is shown in Fig.2.Fig.2. The front panel designThe diagram Design. The program block diagram is used to implement vi logic functions,is the graphical code,as shown in Fig.3.We use attachment to corresponding function such as program,controls,constants and variables.It’s compared with the traditional text type code,not only the development is simple,but also the program is easy to understand[3].Fig.3. Theprogram panel designThe program block diagram of the process as shown in Fig.4.the program block is divided into four main function moduled,including image acquistion module,image processing module,image saving module and other functionnal modules[4].Fig.4 The program block diagram(1)Image acquistion module:Firstly,we use the output of the IMAQ USB Enumer-ate Cameras.vi connected to the strings array of usb camera,open the USB camera with IMAQ USB Init.vi,and by IMAQ USB Init.vi to open the usb camera. Secondly,we use while loop and IMAQ USB Grab Acquire.vi to collet the image continnuous,and IMAQ Creat can set the buffer space of IMAQ USB Grab Acquire.vi.Finally,we use IMAQ USB Close.vi to close the USB camera.The whole process,the image real-time display by Image Dis-play.(2)The Image processing module:We use the while loop to acquist the continuous image.We use IMAQ ColorB-CGLookup, Image Scr and Image Dst Out to connect input image and output image. Red BCG Values,GreenBCG Values and Blue BCG Values are used to change the brightness,contrast and gamma value,which can adjust the visual effect of image.(3)The save function:In the while loop,the conditional structure is used to judge whether we need screenshot.We use IMAQ WriteFile to set the save image type to PNG format,.The users can choose the srorage paths,including the select folder or new folder.Boolean controls the choice of control condition,if ture,the system automatically pop-up srore dialog box,you can customize the image name,and save the current video image;if false,wo must continues to collect images.In addition,if you select the cancel button in the dialog box,the system immediately to exit the save box,restore image acquisition function ,does not affect the program run.(4) Other modules: In the while loop,we can set the program to display the current time and ms timer.It is convenient for users to observation time by the current time mode.We can control code execution speed and reduce the CPU usage by ms timer.In addition,as long as the program runs,the red linghe has been bright,which can remind the user the program is using.Image process.Fiestly, we process the image such as gradation transformation and smoothing filter. Secondly, we separate the target from the background.Thirdly, we product template and match template image.Finally, we calculate the center of the target location[5].Dynamic image recognition. The static image has nothing to do with the time,it is the function of the position,but only a static image can’t descript the movement of objects.The moving target is imagesequence,each image is called a frame,The different image contains of relative information of camera and scenery.The image sequence uaually can be expressed as f(x,y,t),It add a time parameter t compared with static image..Because of time interval of all imge is equal ,so rhe image sequence can be expressed as f(x,y,i),It means the number of frame.We can analysis image sequence and get the motion parameters.we can use a algorithm which compare two different frame of the target image and we can know the differences because of the movement of objects. In the actual calculation process, we need subtracte the two frame target image, according to difference pixel can detect the moving object, calculate the movement of the target direction.ConclusionsCompared with traditional USB camera to collect video image,the system can not only realize the basic functions,abd when the image is darker,it is can adjust the brightness;the image is not clear,it is can adjust the contrast; γ valuealso can help to adjust the image color information,improve the image quality,making it easy for users to observe.At the same time,the system has good development and application scenarios.References[1].P. Fornaro, M. Guggisberg, T. Gyalog, Ch. Wattinger, E. Meyer and H.-J. Gntherodt. A RemoteControllable and Programmable Atomic Force Microscope based on LabVIEW.(2008)[2]. George C Panayi, Alan C Bovik and Umesh Rajashekar.Image Processing for Everyone.(2010)[3]National Instruments.《IMAQ Vision User's Manual》.(2011).[4]Wang Zhixiao,Dong Fuguo.Realization of Virtual Oscillograph Based on USB.The Eighth International Conference on Electronic Measurement and Instruments,Xi’an,2007[5]LabVIEW Advanced performance&Communication Course Manual[J].National instruments,2013.。
AMESim-LabVIEW实时操作说明(评测版)
LabVIEW——AMESim实时操作说明一、 安装要求1.要求的LabVIEW的版本为:8.2, 8.2.1, 当前测试的版本为8.5 。
2.需要支持LabVIEWCosim Interface的license.dat(由LMS公司提供,放置在D:\AMESim\v800\licensing目录下),该许可证根据上位机的网卡物理地址生成3.需要向LMS另外申请rttargetslicenses.h,该文件是根据实时目标机的网卡物理地址生成的。
4.需要安装Microsoft Visual C 6.0以上版本,当前测试版本是VC6.0英文版5.操作系统必须为Windows二、 许可配置1.AMESim的许可配置及编译器的选择(详见AMESim中文安装说明)2.实时目标机许可配置:要将rttargetslicenses.h 文件(由LMS提供)放置于D:\AMESim\v800\interfaces\labview 目录下即可三、 AMESim模型准备1.新建一个AMESim模型,并创建接口如图所示:然后,在接口对话框中的‘Type of Interface’下拉菜单中选择LabVIEW Simulation Module,设置input和output的个数,并逐一对每个input和output进行定义:点击‘OK’之后就会生成LabVIEW的接口模块。
2.将接口模块与AMESim模型的其余部分相连接点击‘parameter mode’(参数模式),AMESim会用VC编译器编译模型,并在工作目录下生成和模型相关的dll文件。
假设该模型名为labviewAMERT.ame,则该dll文件名为labviewAMERT_.dll(位置在E:\labviewamert下)这个dll文件可通过LabVIEW的External Model Interface模块加载到LabVIEW中,用于支持Windows环境下与LabVIEW的非实时偶合仿真。
NI-LABVIEW手册
LabVIEW TM LabVIEW 入门指南2009 年6 月373427F-0118全球技术支持及产品信息National Instruments Corporate总部11500 North Mopac Expressway Austin, Texas 78759-3504USA电话: 512 683 0100全球办事处澳大利亚 1800300800, 奥地利43662457990-0, 巴西551132623599,比利时 32(0)27570020, 波兰48223289010, 丹麦4545762600, 德国49897413130,俄罗斯74957836851, 法国0157662424, 芬兰358(0)972572511,韩国820234513400, 荷兰31(0)348433466, 加拿大8004333488,捷克共和国420224235774, 黎巴嫩961(0)1332828, 马来西亚1800887710,墨西哥018000100793, 南非270118058197, 挪威47(0)66907660, 葡萄牙351210311210, 日本0120-527196, 瑞典46(0)858789500, 瑞士41562005151, 斯洛文尼亚38634254200, 泰国6622786777, 台湾8860223772222, 土耳其902122793031, 西班牙34916400085,新加坡180********, 新西兰0800553322, 以色列97236393737, 意大利390241309277,印度918041190000, 英国4401635523545, 中国862150509800如需更多关于技术支持的信息,请查阅“技术支持和专业服务”附录。
如需对National Instruments 文档提出任何意见或建议,请登录National Instruments网站/info并输入代码feedback。
IMAQ Vision for LabVIEW版本6.0系统要求说明说明书
IMAQ ™,LabVIEW ™,National Instruments ™,and ™are trademarks of National Instruments Corporation.Product and company names mentioned herein are trademarks or trade names of their respective companies.322363B-01©Copyright 1999,2000National Instruments Corp.All rights reserved.October 2000IMAQ V ISION FOR L AB VIEWVersion 6.0IMAQ Vision for LabVIEW adds multipurpose image processing and machine vision capabilities to LabVIEW.These release notes describe system requirements,provide installation instructions,and contain updated information about IMAQ Vision for LabVIEW.System RequirementsTo run IMAQ Vision 6.0on your machine,you must have the following minimum system requirements:•Microsoft Windows 2000/NT version 4.0or Windows Me/9x •50MB or more of free hard disk space •32MB RAM or more •NI-IMAQ 2.2or higher if you use NI-IMAQ driver software •LabVIEW 5.1or higher Note Consult the LabVIEW release notes for the required system configurations for LabVIEW.Installation InstructionsFollow these instructions to install IMAQ Vision 6.0on your computer:1.Insert the IMAQ Vision for LabVIEW installation CD.2.If you do not have autorun enabled,double-click on setup.exe .If you have autorun enabled,setup.exe runs automatically.3.Follow the instructions on yourscreen.Distributing Applications that Use IMAQ VisionIf you want to distribute an application developed with IMAQ Vision,use the IMAQ Vision Deployment Engine.Before distributing an application developed with IMAQ Vision,youmust have the IMAQ Vision Deployment Engine and an IMAQ Visiondeployment license for each target machine.Contact yourNational Instruments sales representative or visit to purchasedeployment licenses.New FunctionalityThis section briefly summarizes the new functionality found in version6.0of IMAQ Vision for LabVIEW.Palette ReorganizationIMAQ Vision features reorganized palettes that create an easy interfacefor developing machine vision applications.There are three main palettesof IMAQ Vision VIs:Vision Utilities,Image Processing,and MachineVision.The Vision Utilities palette contains VIs for creating and disposingimages,display,image and pixel manipulation,calibration,and region ofinterest tools.The Image Processing palette contains a wide range of VIsfor processing and analyzing color,grayscale,and binary images.The Machine Vision palette contains new high-level machine vision VIs,as well as VIs for pattern matching,analytic geometry,and instrumentreading.Color Pattern MatchingUse color pattern matching to quickly locate known reference patterns,or fiducials,in a color image.Color pattern matching can simplify amonochrome problem by improving contrast or separation of the objectfrom the background.Color pattern matching expands the powerfulIMAQ Vision grayscale pattern matching feature by locating patternsthat can be distinguished only by color.In some cases,the extra colorinformation allows the algorithm to find patterns more quickly than withgrayscale pattern matching.Color pattern matching also providesextremely quick color location solutions.IMAQ Vision for LabVIEW Release CalibrationUse IMAQ Vision spatial calibration functions to calibrate your image totake accurate,real-world measurements from images,regardless of cameraperspective or lens distortion.You can set simple calibration data by handor let IMAQ Vision automatically learn the calibration data for an image.You can then convert from pixels to real-world coordinates for simplemeasurements or correct the image so you can do complex measurements,such as blob analysis.Machine Vision VIsIMAQ Vision6.0includes a new palette of high-level machine vision VIsto simplify common machine vision tasks,such as selecting regions ofinterest in the shapes of points,lines,rectangles,and annuluses.Othermachine vision VIs give you the ability to define coordinate systems basedon features in an image,which allows you to make reliable measurementseven as objects in your image move and change orientation.Functions thatcount and measure objects,measure intensities,measure distances betweenedges,and locate edges all make machine vision tasks easier than ever.Analytic Geometry FunctionsThe new analytic geometry functions provide common analytic geometryalgorithms,such as line fitting with outlier rejection,circle and ellipsefitting,calculating line intersections,bisecting lines,and finding the anglebetween lines.You can also use them to calculate polygon areas,get pointsalong a line or region of interest,and create a coordinate reference systembased on an arbitrary plane.Regions of InterestTwo new regions of interest—the rotated rectangle and the annulus—give you more flexibility in selecting particular regions in an image forprocessing and analysis.These new regions work with all new machinevision VIs and existing functions.Image Display OptionsIMAQ Vision6.0allows you to specify display options for16-bit grayscaleimages.You can choose to bitwise-shift the pixel values to use the mostsignificant bits,choose to have IMAQ Vision automatically use thedynamic range of pixel values in an image to scale the image to an8-bitrange,or choose to specify a user-defined range of pixel values todynamically scale into an8-bit range.©National Instruments Corporation3IMAQ Vision for LabVIEW Release NotesAbout Your IMAQ Vision Documentation SetIn addition to these release notes,the IMAQ Vision documentation setconsists of the following:•The IMAQ Vision Concepts Manual contains vision conceptualinformation.Read this document if you are new to vision.•The IMAQ Vision for LabVIEW User Manual contains information onhow to build your vision applications using IMAQ Vision forLabVIEW.•The IMAQ Vision for LabVIEW online help(from inside theLabVIEW environment:Help»IMAQ Vision)contains referenceinformation about IMAQ Vision VIs.•The IMAQ Vision examples help file(from inside the LabVIEWenvironment:Help»Search IMAQ Examples)contains links to allinstalled IMAQ Vision examples.•The readme.txt file(located on your IMAQ Vision installation CD)contains last-minute information concerning this release of IMAQVision for LabVIEW.For your convenience,all IMAQ Vision documentation is also availablein PDF format,which you can access from the Start»Programs»National Instruments»Vision»Documentation menu.。
labview 中文
所有的LabVIEW程序都被称为虚拟仪器(VI),因为程序的外观和操作方式都与诸如示波器、万用表等实际仪器类似。
LabVIEW包括齐全的用于数据采集、分析、显示、存储数据、调试代码的工具。
在LabVIEW中,您可以利用控制件和显示件建立用户界面,即前面板。
控制件包括旋钮、按钮等输入控件,显示件包括图表、LED等显示器件。
在完成用户界面的创建后,您可以通过VI和结构添加代码来控制前面板上的对象。
这些程序代码就构成了程序框图。
利用LabVIEW,您可以和诸如数据采集设备、图像设备、运动控制设备等硬件进行通信,也可以和GPIB、PXI、VXI、RS-232、RS-485仪器通信。
创建一个虚拟仪器程序(VI),在下面的练习中,您将创建一个VI,能够产生一个信号并把它在图表上显示出来。
当您完成练习,VI的前面板如图1-1所示。
图1-1 采集信号的VI前面板打开一个新的VI模板,LabVIEW模板包含的信息能够帮助您创建您的VI程序。
这些模板帮助您从LabVIEW起步。
完成下面的步骤,您可以创建一个VI程序来产生信号并把它显示在前面板上。
1. 启动LabVIEW。
2. 在LabVIEW对话框(图1-2)中,点击New按键来显示New对话框图1-2 LabVIEW对话框3. 选择Create new列表中的VI from Template>>Tutorial(Getting Started)>>Generate and Display,这个模板VI程序产生并显示一个信号。
注意在Front panel preview和Block diagram preview区域有该模板VI的预览。
在图1-3中显示了New对话框及能够产生和显示信号的模板VI。
图1-3 New对话框4. 单击OK键打开该模板,也可以双击在Create new列表中的该模板VI的名字来打开该模板。
5. 察看VI程序的前面板。
视觉调试Labview_中文帮助
视觉调试Labview_中⽂帮助NI Vision for LabVIEW基础(⽬录)NI VISION简介 (4)NI Vision控件模板 (4)NI Vision函数模板 (4)如何创建NI Vision应⽤ (8)准备测量图像 (10)建⽴图像系统 (10)校准图像系统 (11)创建图像 (11)采集或读取图像 (15)显⽰图像 (16)加⼊校准信息 (19)分析图像 (19)改善图像 (20)进⾏灰度和彩⾊测量 (25)定义关注区 (25)测量灰度统计数据 (32)测量彩⾊统计数据 (33)进⾏颗粒分析 (38)创建⼆值图像 (38)改善⼆值图像 (39)完成机器视觉任务 (42)检测物体定位 (43)设置搜索区域 (47)查找测量点 (48)将像素坐标转换成现实坐标 (66)进⾏测量 (66)辨别被测部件 (69)检查图像的缺陷 (73)显⽰结果 (74)校准图像 (77)透视和⾮线性畸变校准 (78)Simple Calibration (86)Save Calibration Information (88)Attach Calibration Information (89)在LabVIEW实时模块中使⽤NI Vision (90)Overview (90)Real-Time System Components (90)Software Installation (91)Image Display (92)Determinism in Real-Time Applications (95)Deployment (101)Troubleshooting (101)NI Vision for LabVIEW基础(⼀):NI Vision简介2010-01-2116:57:08标签:LabView机器视觉原创作品,允许转载,转载时请务必以超链接形式标明⽂章原始出处、作者信息和本声明。
Labview中NI-IMAQdx模块说明
NI-IMAQdx 模块说明IMAQdxSnapVI :配置,启动,获取和取消配置单元采集。
在便于编程的应用场合中使用低速或单捕获是必不可少的部分。
如果你调用这个VI 之前调用IMAQdxOpenCameraVI,IMAQdxSnapVI 默认情况下,使用cam0。
如果图像类型与摄像头的视频格式不匹配,该VI 将其转换到一个合适的图像类型格式。
j Sessior Out 工ImageOut L -trrocout SessionIn 指定您想重新设置的摄像机的名称。
默认值是cam0 SessionOut 是一个独特的参考相机,与SessionIn 相同IMAQdxConfigureGrabVI:配置和开始采集图像。
调用IMAQdxGrabVI 在缓冲区高速循环采集图像并复制图像。
若在调用IMAQdxOpenCameraVI 之前调用此VI,则IMAQdxConfigureGrabVI 默认情况下使用cam 。
调用IMAQdxUnconfigureAcquisitionVI 取消获取图像的配置。
error outSessionIn 指定您想重新设置的摄像机的名称。
默认值是cam0SessionOut 是一个独特的参考相机,与SessionIn 相同IMAQdxGrabVI :获取输出图像的当前帧。
在调用IMAQdxConfigureGrabVI 之后才调用此VI 。
如果图像类型与摄像头的视频格式不匹配,该VI 将其转换到一个合适的图像类型格式。
5占专ionIn >1■HJUM -WM-MM-Image In 葡 Waitfor Next Buffer?(Ves)^ err or in SessionIn 是一个独特的摄像头。
可以通过调用IMAQdxOpenCameraVI 来得到SessionOut 是一个独特的参考相机,与SessionIn 相同WaitforNextBuffer?(Yes)若值为“YeS,驱动程序将等待下一个可用的缓冲区;若值为“No”,将不会等待下一个可用的缓冲区,而是返回到最后采集的缓冲区。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
IMAQ模块介绍一.LabVIEW机器视觉前面板上的模块有以下几类(如图1所示)1.IMAQ Image.ctl2.Image Display control3.IMAQ Vision controls4.Machine Vision controls图11 IMAQ Vision controls对图像进行分析和处理所用到的一些控件,包括图像的类型,图像处理的方式和不同的形态算子以及颜色的类型的选择等等。
如图2图21.1 Image Type用于图片类型的选择,可以选择的类别有8bits ,16bits ,Float ,Complex ,RGB 和HSL 。
一般用在从文件中读取图片时类型的选择。
1.2 ROI DescriptorROI 区域的描述。
ROI 是Region Of Interesting 的简称,中文应该翻译为目标区域。
一般用在一个大图中取一块特定形状的区域,以便后续的处理和分析。
ROI 为一簇数据,包括一个整数数组和一个簇组成的数组。
整数数组内有4个元素,为图形最小外接矩形的四条边的坐标。
簇数组中的簇由轮廓类型(整数),ROI 类型(整数)和图形坐标点(为数组,根据ROI 类型的不同,数组的定义也不同)1.3Optional Rectangle选择的矩形区域,为四个元素的数组,代表矩形的四条边的坐标。
1.4Color Mode色彩模式,彩色图形的显示和处理模式,包括RGB,HSL,HSV,HIS 四种。
1.5Threshold Range阀值范围,为一包含两个数组元素的簇,常用于灰度或色彩图像阀值处理模块中。
1.6 Convolution Kernel二维浮点数组成的数组,用于构造一些算法的算子。
1.7 Morphology Operation形态算法的选择。
可以选择不同的数据处理方式。
1.8 Structuring Element结构元素,为二维的整数数组。
2 Machine Vision controls机器视觉中用到的一些控件,只要是对图像画面进行选择的一些工具,包括点,线和面的选择以及坐标系的设定。
如图3所示2.1 Point点的选择,包括两个元素的簇,分别为横坐标和纵坐标。
2.2 Line线的选择,包括四个元素的簇,分别为起点和终点的横坐标和纵坐标。
2.3 Rectangle面的选择,包括五个元素的簇,分别为对角线两点横坐标和纵坐标,以及矩形选择的角度。
2.4 Circle环形面,包括六个元素的簇,分别为圆心坐标,内外半径的长度以及起始角和终止角。
图3二以上都是程序前面板上所用到的控件,而LabVIEW强大的图像处理功能都是通过其程序面板上的功能节点来实现的。
主要的节点可以分为以下四大类,如图41 Image Acquisition2 Vision Utilities3 Image Processing4 Machine Vision图41 Image Acquisition图像采集功能模块,主要是通过NI的系列图像采集板卡来获得图像。
节点包括任务的建立,设备的初始化以及硬件参数的设定等功能节点。
如图5图52 Vision Utilities视觉应用模块,用来对图像进行一些初步的整体操作。
如图6图62.1 Image Management图像管理模块,包括建立和清除图像任务,获取图像的各类信息,图像的类型转换等功能节点。
如图72.1.1Create 创建一个图像任务2.1.2Dispose 清除图像任务2.1.3Get Image Size获得图像的大小信息2.1.4Set Image Size 设置图像的大小2.1.5Get Image Info 获得图像信息,包括图像的大小,名称,分辨率等2.1.6Copy 拷贝图像2.1.7Image to Image 一个图像映射到另一个图像上2.1.8Get Offset 针对于mask而言。
获得Mask在图像中的偏移量。
2.1.9Set Offset 针对于mask而言。
设定Mask在图像中的偏移量。
2.1.10Cast Image 图像类型的转换。
2.1.11 Is Vision Info Present 判断图像中是否存在图像信息。
图72.2Files图像文件模块,完成对图像文件的读写,以及图像附加信息的读写操作。
图82.2.1Read File读取图像文件2.2.2Write File保存图像文件2.2.3Get File Info获得图像信息,包括图像的类型,分辨率大小2.2.4Write BMP File保存为BMP图像文件2.2.5Write JPEG File保存为JPEG图像文件2.2.5Write PNG File保存为PNG图像文件2.2.5Write TIFF File保存为TIFF图像文件2.2.6Read Image And Vision Info 读取图像及其附加信息。
2.2.7Write Image And Vision Info 保存图像及其附加信息。
2.3External Display图像的外部显示。
具体功能还不太清楚。
如图9所示图92.4Region of InterestROI模块,主要完成ROI和Mask之间的转化,ROI区域的设定以及在不同坐标系下的转换。
10如图图102.4.1ROIToMask2.4.2MaskToROI以上两者Mask和ROI之间的相互转换。
在一些图像的分析模块中,除了要求输入图片外,还要一个Mask,即只对图片中的Mask区域进行分析,这就要求把自己选择的ROI转换为Mask。
2.4.3Group ROIs把多个ROI数组转换为一个ROI区域。
其中转换后的ROI区域包含原ROI 数组的所有区域。
2.4.4Ungroup ROIs为2.4.3Group ROIs的逆运算,即把一个ROI区域转换为ROI数组,数组中的每个ROI都是一个图形轮廓。
2.4.5 TransformROI把ROI区域从一个坐标系转换为另一种坐标系中。
2.4.6 ROI Conversion ROI和各种点、线、面等各类图形之间的转换。
2.5Image Manipulation11图像处理模块。
包括图像的放大和缩小,平移以及旋转。
如图图112.5.1 Resample重新定义图像的大小,使用此模块可以放大或缩小图像。
2.5.2 Expand 通过调整整幅或一部分图片的分辨率,来放大图片。
2.5.3 Extract 通过调整整幅或一部分图片的分辨率,来缩小图片。
2.5.4 Interlace 分别提取一幅图像的奇偶像素,分成两幅图片。
2.5.5 Symmetry 得到一幅图像的对称图像2.5.6 Rotate得到一幅图像的旋转图像2.5.7 Shift 得到一幅图像的平移图像2.5.8 Unwrap 将环形的图片展开成矩形2.5.9 Clipboard To Image将剪贴的数据拷贝到图像2.5.10 Image To Clipboard 将图像拷贝到剪贴板2.5.11 3DView将图像进行三维变换2.6Pixel Manipulation图像像素处理模块。
对图像的像素直接进行操作,包括图像上点,线,面像素值的获取和设定,以及在图像中插入文本。
如图12图122.6.1 Get pixel value获得图像中某一点的像素值,仅限于灰度图像。
2.6.2 GetRowCol获得图像中某一行或者列的像素值,仅限于灰度图像2.6.3 GetPixelLine获得图像中某一条直线的像素值,仅限于灰度图像2.6.4 ImageToArray将图像转化为数组2.6.5 SetPixelValue 设置图像中某一点的像素值。
2.6.6 SetRowCol 设置图像中某一行或者列的像素值2.6.7 SetPixelLine 设置图像中某一条直线上点的像素值2.6.8 ArrayToImage 将数组转化为图像2.6.9 FillImage将图像中的某块区域用像素值填充2.6.10 Draw 在图像中绘制几何图形2.6.11 Draw Text在图像中添加文字2.7Overlay图像覆盖模块。
可以对图像上的某一点,线,面(多边形,矩形和圆)进行覆盖。
此种覆盖为非破坏性的覆盖,即不破坏原有的图像,覆盖信息可以另外和图像一起保存。
如图13图132.7.1 Overlay Points在图像中覆盖一点或是一组点2.7.2 Overlay Line 在图像中覆盖一条线2.7.3 Overlay Multiple Lines 在图像中覆盖多条直线或多边形2.7.4 Overlay Rectangle 在图像中覆盖一矩形2.7.5 Overlay Oval 在图像中覆盖一椭圆2.7.6 Overlay Arc 在图像中覆盖一弧形2.7.7 Overlay Bitmap 在图像中覆盖一位图2.7.8 Overlay Text 在图像中覆盖文字2.7.9 Clear Overlay在图像中清除覆盖2.7.10 Copy Overlay 在图像中拷贝覆盖2.7.11 Overlay ROI 在图像中覆盖ROI区域2.7.12 Merge Overlay 合并图像中的覆盖2.7.13 Read Image And Vision Info读取图像以及图像信息2.7.14 Write Image And Vision Info 写入图像以及图像信息上述读写图像及信息的模块,是将图像中的覆盖信息一块读取/保存的2.8Calibration校准模块。
校准由于相机镜头的光学畸变而或拍摄角度引起图像变化。
也包含像素坐标系和实际坐标系之间的转换节点。
如图14图142.8.1 Learn Calibration Template对校准模块进行学习2.8.2 Set Simple Calibration 对校准的设置2.8.3 Set Calibration Info 设置图像校准的信息2.8.4 Get Calibration Info 获得图像校准中的信息2.8.5 Convert Real World to Pixel 将实际坐标系转化为图像像素坐标系2.8.6 Convert Pixel to Real World 将图像像素坐标系转化为实际坐标系2.8.7 Correct Calibrated Image对图像进行校准2.8.8和2.8.9与2.7.13和2.7.14模块相同。
可以将图像校准信息也写入文件。
2.9Color Utilities颜色应用模块。
彩色图像中色彩的提取,图像中某点,线,面中色彩的设定或获取,以及不同色彩模型中的转换。
如图15图152.9.1 ExtractColorPlanes 从彩色图像中提取各颜色分量的图像2.9.2 ExtractSingleColorPlane 从彩色图像中提取单个颜色图像2.9.3 ReplaceColorPlane 色彩的替代2.9.4 GetColorPixelValue获得彩色像素点的值2.9.5 SetColorPixelValue 设置彩色像素点的值2.9.6 GetColorPixelLine获得图像中某条直线的像素值数组2.9.7 SetColorPixelLine 设置图像中某条直线的像素值2.9.8 ColorImageToArray将彩色图像转化为数组2.9.9 ArrayToColorImage将数组转化为彩色图像2.9.10 RGBToColor 2 将RGB制式的彩色图像转化为其它制式的彩色图像(如HSL, HSV, HSI)2.9.11 ColorToRGB 将其它制式的彩色图像(如HSL, HSV, HSI)转化为RGB制式2.9.12 ColorValueToInteger 将表示颜色的RGB三种分量转化为整数的形式2.9.13 IntegerToColorValue 将整数形式的颜色转化为RGB三种分量的形式3 Image Processing图像处理模块,主要是对灰度和彩色图像的处理。