摘要
针对目前的螺纹计数方法中存在的检测效率低、工作强度大等问题,提出了一种快速、非接触式的螺纹计数方法。本文介绍了方法的整体结构,通过图像预处理获取螺纹的边沿,由两次hough直线检测获取螺钉两侧的边沿直线和螺钉中轴线,按连通关系遍历螺纹边沿获取各边沿点到中轴线的距离并进行滤波处理,通过各距离的变化趋势获得螺纹的波峰点和波谷点并进行清理,最后由波峰点和波谷点的总数得到螺纹数。在5个型号螺钉各100次随机摆放的测量实验中,最大计数误差为±1个螺纹,使用OpenCV实现的该算法平均用时为50.31 ms,计数精度和速度方面都达到了实际工业应用的要求。
Aiming at the problems of low detection efficiency and high work intensity in the current thread counting methods,a fast and non-contact thread counting method is proposed.The overall structure of the method is introduced.Firstly,the edge of thread is obtained by image preprocessing,and the edge lines on both sides of the screw and the central axis of the screw are obtained by twice hough line detection.Then,the thread edge is traversed according to the connectivity relationship,and the distance from each edge point to the central axis is obtained and filtered.After that,the crest points and trough points of the thread are obtained through the change trend of each distance and cleaned up.Finally,the number of threads is obtained from the total number of crest points and trough points.In the measurement experiment of 100 random placements of 5 types of screws,the maximum counting error is 1 thread,and the average time of the algorithm implemented by OpenCV is 50.31 ms,which meets the requirements of actual industrial applications in terms of counting accuracy and speed.
作者
易焕银
YI Huanyin(Guangdong Communication Polytechnic,Guangzhou 510650,Guangdong,China)
出处
《广东交通职业技术学院学报》
2023年第4期68-71,79,共5页
Journal of Guangdong Communication Polytechnic
基金
2022年度广州市基础与应用基础研究项目(编号:202201011675)
2022年广东省职业院校创新创业教育工作指导委员会教育教学改革项目(编号:YZSCJG14)。
关键词
机器视觉
螺纹
计数
HOUGH变换
峰谷值点搜索
machine vision
thread
counting
hough transform
crest and trough points search