首页|基于机器视觉的透明方杯位姿与缺陷检测方法

基于机器视觉的透明方杯位姿与缺陷检测方法

扫码查看
针对医用透明方杯人工检测效率与精确率低、对产品有磨损的问题,引入视觉检测技术,结合图像处理与深度学习,设计开发一种医用透明方杯位姿与缺陷检测系统.针对方杯位姿检测,首先,通过基于改进动态阈值准确分割方杯图像边缘区域.然后,改进Canny算法的高低阈值设计,检测出更多细微幅值差别的边缘,设定共线边缘合并的阈值条件,进而拟合得到两边缘直线,基于两边缘计算出虚拟中轴线.最后,通过最小外接矩形粗定位中心,粗定位点到轴线的垂足作为方杯精定位坐标,根据仿射变换将方杯图像矫正到参考位姿.缺陷检测方面,对图像局部缺陷进行灰度拼接,构建3种缺陷类间均衡的图像数据集.基于SqueezeNet、Inception-V3与ResNet-50三种神经网络迁移学习训练后,综合评估发现SqueezeNet模型的性能表现最优,在测试集平均精度达98.6%,识别精确率和召回率分别达99.8%与98.8%.实验验证结果表明对单张图像位姿与缺陷检测速度分别为770.5 ms与553.1 ms,改进后位姿检测精度更高,检测缺陷准确率达到94%,具有良好的实时性与稳定性,可满足检测要求.该研究可为医用透明方杯的位姿与缺陷检测提供技术支持.
Transparent square cup pose and defect detection method based on machine vision
Aiming at the problems of low efficiency and accuracy of manual inspection of medical transparent square cups and wear on products,visual inspection technology is introduced,combining image processing and deep learning,a medical transparent square cup posture and defect detection system is designed and developed.For square cup posture detection,firstly,the edge area of the square cup image is accurately segmented based on the improved dynamic threshold.Then,the high and low threshold design of the Canny algorithm is improved to detect more edges with subtle amplitude differences,and the threshold condition for merging collinear edges is set,and then the two edge straight lines are fitted,and the virtual central axis is calculated based on the two edges.Finally,the center is roughly located by the minimum circumscribed rectangle,and the foot of the rough positioning point to the axis is used as the square cup precise positioning coordinate,and the square cup image is corrected to the reference posture according to the affine transformation.In terms of defect detection,the local defects of the image are grayscale spliced to construct an image data set that is balanced between the three defect classes.After training three neural networks,SqueezeNet,Inception-V3 and ResNet-50,through comprehensive evaluation,it was found that the SqueezeNet model had the best performance,with an average accuracy of 98.6%in the test set,and recognition accuracy and recall rates of 99.8%and 98.8%respectively.The experimental verification results show that the detection speeds for the pose and defects of a single image are 770.5 ms and 553.1 ms respectively.After the improvement,the pose detection accuracy is higher,and the defect detection accuracy rate reaches 94%,which has good real-time performance and stability and can meet the detection requirements.This research can provide technical support for the pose and defect detection of medical transparent square cups.

machine visionimage processingpose detectionobject detectiondefect detection

王龙达、刘强、任志贵、王军利、刘文帅

展开 >

陕西理工大学机械工程学院 汉中 723000

机器视觉 图像处理 位姿检测 目标检测 缺陷检测

2024

电子测量技术
北京无线电技术研究所

电子测量技术

CSTPCD北大核心
影响因子:1.166
ISSN:1002-7300
年,卷(期):2024.47(22)