halcon例程解析:测量生鱼条的大小——check_fish_stick_dimension
In this program the size of raw fish sticks is measured before they are coated with bread crumbs. First, the fish sticks are segmented from the background. Then, their dimensions are measured, compared to the required minimum size, and the result is displayed.
在这个项目中,生鱼条的大小是在涂上面包屑之前测量的。首先,将鱼条从背景中分割出来。然后,测量它们的尺寸,与所需的最小尺寸进行比较,并显示结果。
1. 效果展示




2. 思路分析
根据亮度信息进行阈值分割,利用面积选取有效区域,去除与图像边缘重合的部分,计算长度判断是否合格。
- 分割出鱼片区域

本文详细介绍如何使用Halcon库通过分割、边缘处理和最小外接矩形测量生鱼条尺寸,确保其符合规格。涉及关键步骤包括图像预处理、区域选择和尺寸合规判断。
最低0.47元/天 解锁文章
2606

被折叠的 条评论
为什么被折叠?



