halcon例程解析:检查饼干的质量——check_hazelnut_wafers

This example demonstrates a quality inspection on hazelnut wavers. Using the morphology tools the waver is extracted and examined according to a few shape features like Rectangularity and AreaHoles. This program also shows the use of the operator area_holes.

这个例子展示了饼干的质量检验。利用形态学工具,根据矩形和面积孔等一些形状特征提取和检测抖动。这个程序还展示了算子area_holes的用法。

1. 效果展示

在这里插入图片描述
在这里插入图片描述

2. 思路分析

解决这个问题的基础是饼干部分灰度值比较高,碎裂的部分灰度值低。

  1. 自动阈值分割
  2. 形态学处理
  3. 计算孔洞面积
  4. 计算矩形的形状因子

2.1自动阈值分割

* 自动阈值分割
binary_threshold(Image, Foreground, 'smooth_histo', 'light', UsedThreshold)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值