The invention relates to a detection method, in particular to a detection method for workpiece breakage. The invention calculates the distance from each pixel of the damaged area to the edge of the area by the region distance transformation, effectively avoiding the influence of copper slag, burr and other defects. The method improves the calculation precision, automatically divides the area according to the collected pictures, calculates the distance by pixel and calculates the damage rate automatically, and calculates the damage rate according to the distance from the point on the skeleton to the edge and the standard line width. The detection process has the characteristics of simple calculation, short computation time and high accuracy.
【技术实现步骤摘要】
一种用于工件破损率的检测方法
本专利技术涉及一种检测方法,尤其是涉及一种用于工件破损率的检测方法。
技术介绍
在工件板制作过程中,因腐蚀不均匀等原因导致工件破损,破损程度决定了该工件板是否属于合格品。计算破损率主要有区域面积法,区域个数法等算法,当工件板上存在毛刺、铜渣等因素时,采用上述算法计算工件破损率比实际破损率相差较大,无法满足检测要求。工件板在加工过程中,由于多种原因导致工件不同程度的破损。目前多数厂家使用AOI光学检测方式,该方法一般只能检测工件的一些比较明显的缺陷,无法对工件边缘毛刺等细微的缺陷进行检测,检测速度相对较慢。
技术实现思路
本专利技术的上述技术问题主要是通过下述技术方案得以解决的:一种用于工件破损率的检测方法,其特征在于,包括:步骤1、采集模板工件图像Image1和待测工件图像Image2,Image1和Image2是通过灰度相机采集得到,所以两幅图像为单通道灰度图像,设定灰度阈值范围(0,128)对图像进行阈值分割预处理得到阈值后的二值图,其中工件区域像素点灰度值为255,背景区域像素点灰度值为0。模板工件图像Image1与待测工件图像Im ...
【技术保护点】
1.一种用于工件破损率的检测方法,其特征在于,包括:步骤1、采集模板工件图像Image1和待测工件图像Image2,Image1和Image2是通过灰度相机采集得到,所以两幅图像为单通道灰度图像,设定灰度阈值范围(0,128)对图像进行阈值分割预处理得到阈值后的二值图,其中工件区域像素点灰度值为255,背景区域像素点灰度值为0;模板工件图像Image1与待测工件图像Image2已对齐校正完成;步骤2、根据下面公式计算图像预处理后的Image1图像工件区域骨架m,设骨架上每个像素点为(xsk,ysk);
【技术特征摘要】
1.一种用于工件破损率的检测方法,其特征在于,包括:步骤1、采集模板工件图像Image1和待测工件图像Image2,Image1和Image2是通过灰度相机采集得到,所以两幅图像为单通道灰度图像,设定灰度阈值范围(0,128)对图像进行阈值分割预处理得到阈值后的二值图,其中工件区域像素点灰度值为255,背景区域像素点灰度值为0;模板工件图像Image1与待测工件图像Image2已对齐校正完成;步骤2、根据下面公式计算图像预处理后的Image1图像工件区域骨架m,设骨架上每个像素点为(xsk,ysk);其中S(A)表示为集合A上的骨架,Sk(A)为骨架子集;步骤3、根据公式1计算Image1工件区域内像素点到该点距离最近的背景像素点的距离最...
【专利技术属性】
技术研发人员:舒军,涂杏,沈开斌,李鑫武,蒋明威,吴柯,杨露,舒心怡,潘健,王淑青,陈张言,徐成鸿,李志愧,刘伟,
申请(专利权)人:湖北工业大学,
类型:发明
国别省市:湖北,42
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。