1.轮盘有很多齿轮,计算有多少个齿,输出总数在图像左上角位置;
2.给轮盘每个齿进行编号,黑色三角位置为初始位,顺时针进行编号,偶数齿数显示红色,奇数齿数显示绿色;
3.按照编号保存所有的齿的坐标位置到数据表,保存位置C:\Cognex\count.csv。
用拉直工具好些,直接确定起始位置。用斑点工具或者模板工具,抓取齿,显示序号。 判断偶数 奇数显示不同颜色。 最后保存数据。
CogPolarUnwrapTool1 工具名字。
方案设计
Advance Script
(做法一)
#region namespace imports using System; using System.Collections; using System.Collections.Generic; using System.Drawing; using System.IO; using System.Windows.Forms; using Cognex.VisionPr