【Halcon机器视觉】粒子检查


采用视觉系统,测定ACF粒子的数量、强度、长度及分布来判定COG、FOG的绑定结果是否合格或不合格。

粒子检查算法流程

  1. 图像获取-图像扫描
  2. Mark模板匹配
  3. BUMP ROI分割
  4. BUMP 引脚分割
  5. 粒子提取
  6. 粒子特征分析
Step1 图像获取

业界普遍使用DIC(Differential Interference Contrast 微分干涉差技术)线扫相机+自动对焦(激光位移传感器)方案,DIC技术可以使得ACF 粒子压痕突出部分形成亮暗对比,便于前景分离,激光位移传感器和Z轴组成自动对焦系统,弥补了DIC线扫相机景深小的缺点。

线扫相机供应商有:
在这里插入图片描述

激光位移传感器供应商有:舜宇光学科技,欧姆龙,基恩士。在这里插入图片描述

Step2 Mark模板匹配

MARK标记了BUMP区的起点和终点,通常有“回字”“十字”形状。
在这里插入图片描述

什么是模板匹配?

模板匹配需要人工划定一个模板,在待检测图像上对比匹配程度,找出匹配程度一定阈值的区域,从而实现识别的功能。

通过Halcon自带的模板匹配助手工具可以迅速建立模板图像以及相关代码。
在这里插入图片描述
从图像加载,图像窗口中提取,绘制矩形,右键确定,暂时不理会其他参数,生成代码即可。
在这里插入图片描述
在这里插入图片描述
输入图片:
在这里插入图片描述

处理程序,生成代码结果:

*粒子检查
read_image(Image, 'acf1')
rgb1_to_gray(Image, GrayImage)
* Matching 01: BEGIN of generated code for model initialization
set_system ('border_shape_models', 'false')
* Matching 01: Obtain the model image
* Matching 01: *************
* Matching 01: * ATTENTION *
* Matching 01: *************
* Matching 01: The image from the graphics window is not available. At this point,
* Matching 01: it is necessary to ensure an image is stored in the variable 'Image'
* Matching 01: build the ROI from basic regions
gen_rectangle1 (ModelRegion, 172.334, 121.953, 390.254, 339.823)
* Matching 01: reduce the model template
reduce_domain (Image, ModelRegion, TemplateImage)
* Matching 01: create the shape model
create_shape_model (TemplateImage, 5, rad(0), rad(360), rad(1.0503), ['none','no_pregeneration'], 'use_polarity', [22,43,9], 4, ModelId)
* Matching 01: get the model contour for transforming it later into the image
get_shape_model_contours (ModelContours, ModelId, 1)
* Matching 01: END of generated code for model initialization
* Matching 01: BEGIN of generated code for model application
* Matching 01: the following operations are usually moved into
* Matching 01: that loop where the aquired images are processed
* Matching 01: Find the model
find_shape_model (Image, ModelId, rad(0), rad(360), 0.5, 0
  • 2
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值