ag品牌最佳真人电游 联系ag品牌最佳真人电游

客服热线:0755-89482646

0755-36917666

公司传真:0755-89482579

销售客服

行业新闻

aoi中通用的图像检测方法检测方法 -ag品牌最佳真人电游

发布时间:2019-5-17 8:15:39 | 信息来源:
| | | 浏览:2191 次 | 点此浏览更多 《行业新闻》 | 【】
aoi中通用的图像检测方法方法有3个: 
(1)将rgb图转换为灰度图再进行比对 
(2)将母版图上的金面作为roi 
(3)使用腐蚀算子来消除边缘干扰


****************************************************************
*使用与母版相减的方式
***************************************************************
(1)将rgb图转换为灰度图再进行比对
***************************************************************
rgb1_to_gray (brightleftwirebondingimagereduced, grayrec)
rgb1_to_gray(darkleftwirebondingimagereduced,graystandard)
****************************************************************
(2)根据母版图像的金面设定检测区域
****************************************************************
threshold (graystandardimagereduced, standardregion, 200, 255)
****************************************************************
(3)使用腐蚀算子来消除边缘干扰
****************************************************************
erosion_circle (standardregion, standardregion, 2)
*缩小检测范围
reduce_domain (grayrec, standardregion, grayrecimagereduced)
reduce_domain (graystandard, standardregion, graystandardimagereduced)
 abs_diff_image (grayrecimagereduced,graystandardimagereduced,imageabsdiff, 1)
threshold (imageabsdiff, region, 80, 255)
connection (region, connectedregions)
*误差主要是水平线,因此通过高度大于3个像素、面积大于9个像素来判断
select_shape (connectedregions, connectedregions, ['area','height'], 'and', [9,3], [99999,99999])
count_obj (connectedregions, number)
if(number > 0)
    currentnglight := 0
    currentngcode := 0
    union1 (connectedregions, regionunion)
    smallest_rectangle1 (regionunion, row1, column1, row2, column2)
    currentngpos := [row1-10, column1-10, row2 10, column2 10]
    currentngdescribe := 'lwbconnectedregions有变色'
    mfol2_gather_ng (currentngcode, currentngpos, currentngdescribe, 0, 0)
endif
return ()
上一篇:软膜脱泡机有气泡无法除干净
下一篇:aoi技术员如何为质量把关
网站地图