采用视觉系统,测定ACF粒子的数量、强度、长度及分布来判定COG、FOG的绑定结果是否合格或不合格。
粒子检查算法流程
- 图像获取-图像扫描
- Mark模板匹配
- BUMP ROI分割
- BUMP 引脚分割
- 粒子提取
- 粒子特征分析
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