跟我学机器视觉-HALCON学习例程中文详解-开关引脚测量
跟我学机器视觉-HALCON学习例程中文详解-开关引脚测量
This example program demonstrates the basic usage of a measure object.
Here, the task is to determine the width of and the distance between the
pins of a switch.
*本例程演示了如何使用测量工具测量开关的引脚宽度和间距
- First, read in the image and initialize the program.
**************************打开图像***********************************
read_image (Image, 'bin_switch/bin_switch_1')
get_image_size (Image, Width, Height)
dev_close_window ()
dev_open_window_fit_image (Image, 0, 0, 640, 640, WindowHandle)
set_display_font (WindowHandle, 14, 'mono', 'true', 'false')
dev_display (Image)
*显示图片如下
Define the rectangular ROI within which the edges will be detected
and create the measure.
Row := 390
Column := 380
Phi := rad(-60)
Length1 := 60
Length2 := 10
Interpolation := 'nearest_neighbor'
*************************生成测量矩形ROI**************************************
gen_measure_rectangle2 (Row, Column, Phi, Length1, Length2, Width, Height, Interpolation, MeasureHandle)
*测量矩形位置尺寸如下:
Determine all edge pairs that have a negative transition, i.e., edge pairs
that enclose dark regions.
Sigma := 0.9
Threshold := 12
Transition := 'negative'
Select := 'all'
*************************************测量边缘对*******************************
measure_pairs (Image, MeasureHandle, Sigma, Threshold, Transition, Select, RowEdgeFirst, ColumnEdgeFirst, AmplitudeFirst,
RowEdgeSecond, ColumnEdgeSecond, AmplitudeSecond, IntraDistance, InterDistance)
- Visualize the results
dev_display (Image)
dev_set_draw ('margin')
dev_set_color ('black')
*********显示测量矩形ROI**************************************************
gen_rectangle2 (Rectangle, Row, Column, Phi, Length1, Length2)
显示测量的边缘对的尺寸,length1要用ROI的宽度**************************
p_disp_dimensions (RowEdgeFirst, ColumnEdgeFirst, RowEdgeSecond, ColumnEdgeSecond, IntraDistance, InterDistance, Phi, Length2, WindowHandle)
*结果如下:
- Free the memory that has been allocated for the measure.
close_measure (MeasureHandle)
跟我学机器视觉-HALCON学习例程中文详解-开关引脚测量的更多相关文章
- 跟我学机器视觉-HALCON学习例程中文详解-IC引脚测量
跟我学机器视觉-HALCON学习例程中文详解-IC引脚测量 Lead Measurement: Example for the application of the measure object in ...
- 跟我学机器视觉-HALCON学习例程中文详解-FUZZY检测用于开关引脚测量
跟我学机器视觉-HALCON学习例程中文详解-FUZZY检测用于开关引脚测量 * This example program demonstrates the basic usage of a fuzz ...
- 跟我学机器视觉-HALCON学习例程中文详解-测量圆环脚宽间距
跟我学机器视觉-HALCON学习例程中文详解-测量圆环脚宽间距 This example program demonstrates the basic usage of a circular meas ...
- 跟我学机器视觉-HALCON学习例程中文详解-QQ摄像头读取条码
跟我学机器视觉-HALCON学习例程中文详解-QQ摄像头读取条码 第一步:插入QQ摄像头,安装好驱动(有的可能免驱动) 第二步:打开HDevelop,点击助手-打开新的Image Acquisitio ...
- 《TensorFlow学习指南深度学习系统构建详解》英文PDF+源代码+部分中文PDF
主要介绍如何使用 TensorFlow 框架进行深度学习系统的构建.涉及卷积神经网络.循环神经网络等核心的技术,并介绍了用于图像数据和文本序列数据的模型.给出了分布式深度学习系统在TensorFlow ...
- Nginx配置文件nginx.conf中文详解(转)
######Nginx配置文件nginx.conf中文详解##### #定义Nginx运行的用户和用户组 user www www; #nginx进程数,建议设置为等于CPU总核心数. worker_ ...
- Nginx中文详解、配置部署及高并发优化
一.Nginx常用命令: 1. 启动 Nginx /usr/local/nginx/sbin/nginxpoechant@ubuntu:sudo ./sbin/nginx2. 停 ...
- iOS学习之UINavigationController详解与使用(一)添加UIBarButtonItem
http://blog.csdn.net/totogo2010/article/details/7681879 1.UINavigationController导航控制器如何使用 UINavigati ...
- [转]iOS学习之UINavigationController详解与使用(三)ToolBar
转载地址:http://blog.csdn.net/totogo2010/article/details/7682641 iOS学习之UINavigationController详解与使用(二)页面切 ...
随机推荐
- 使用ajaxFileUpload实现异步上传图片
index.html <head runat="server"> <title></title> <script src="jq ...
- linux之vim编辑器
Vi简介1. Vi是一种广泛存在于各种UNIX和Linux系统中的文本编辑程序.2. Vi不是排版程序,只是一个纯粹的文本编辑程序.3. Vi是全屏幕文本编辑器,它没有菜单,只有命令.4. Vi不是基 ...
- Iis load balance
http://www.agilesharp.com/u/yanyangtian/Blog.aspx/t-196 IIS负载均衡-Application Request Route详解第二篇:创建与配 ...
- Wix 安装部署(一)同MSBuild 自动生成打包文件 转
原文地址:http://www.cnblogs.com/stoneniqiu/p/3355086.html 因为项目需要,最近在研究Wix打包部署,园子里也有一些关于wix的博客,方方面面,讲的点各不 ...
- delphi xe5 android iny绿色版+最新SDK/NDK安装方法
转自: http://bbs.2ccc.com/topic.asp?topicid=438595 首先感谢iny的绿色版,因为我的精简Win7 32位安装原版镜像4.63G过程正常,但是编译出错,后来 ...
- ***PHP各种编码的汉字字符串截取
虽然PHP有现成的截取字符串函数substr(),但是这个函数不能对汉字字符串进行截取,要实现这种效果还需要我们自己去编写相应的函数.汉字有多种编码,比如GB2312,UTF-8等,汉字字符串的截取需 ...
- c#中的delegate(委托)和event(事件)
c#中的delegate(委托)和event(事件) 一.delegate是什么东西? 完全可以把delegate理解成C中的函数指针,它允许你传递一个类A的方法m给另一个类B的对象,使得类B的对象能 ...
- *[topcoder]AstronomicalRecords
http://community.topcoder.com/stat?c=problem_statement&pm=12804&rd=15706 首先A和B的长度都不一定一样,里面的元 ...
- 目录重定向的源代码工程( linux平台利用VFS实现目录重定向驱动)虚拟磁盘MINIPORT驱动代码(雨中风华)
http://download.csdn.net/user/fanxiushu/uploads/2 http://download.csdn.net/user/fanxiushu/uploads/1
- [译]GotW #6b Const-Correctness, Part 2
const和mutable对于书写安全代码来说是个很有利的工具,坚持使用它们. Problem Guru Question 在下面代码中,在只要合适的情况下,对const进行增加和删除(包括 ...