计算机与现代化 ›› 2021, Vol. 0 ›› Issue (11): 56-60.

• 图像处理 • 上一篇    下一篇

基于双目视觉的缺陷药片检测

  

  1. (1.长沙理工大学物理与电子科学学院,湖南长沙410114;2.纳威尔智能科技有限公司,湖南长沙410114)
  • 出版日期:2021-12-13 发布日期:2021-12-13
  • 作者简介:郭兆明(1995—),男,云南楚雄人,硕士研究生,研究方向:图像处理,计算机视觉,E-mail: 2225991129@qq.com; 通信作者:周庆华(1977—),男,湖南长沙人,教授,博士,研究方向:人工智能及其应用,电磁波与电磁场理论及应用,E-mail: zhouqinghua@csust.edu.cn; 曾小为(1992—),男,湖南长沙人,工程师,硕士,研究方向:图像处理,E-mail: 197025991@qq.com。
  • 基金资助:
    国家自然科学基金资助项目(42074198)

Detection of Defective Tablets Based on Binocular Vision

  1. (1. School of Physics and Electronic Science, Changsha University of Science and Technology, Changsha 410114, China;
    2. Nevil Intelligent Technology Co. LTD., Changsha 410114, China)
  • Online:2021-12-13 Published:2021-12-13

摘要: 传统基于机器视觉的药片缺陷检测方法中,药片图像多为单摄像机从药片的正上方进行拍摄,该方法难以对上下表面间断裂以及厚度不合格的药片进行有效的检测,该类缺陷药片在厚度上与标准药片可能存在着一定的差值。针对这种情况,本文提出一种基于双目视觉的药片厚度检测方法。该方法将双目摄像机放置于药片正上方,并采集药片图像,采用Canny算子提取图像中药片的边缘特征进行立体匹配,利用双目视觉的三角测距原理计算药片的视差,根据视差计算药片的深度信息,计算标准药片和缺陷药片的深度差,检测出存在厚度缺陷的药片。实验测量结果精度达到0.1 mm,具有较高的检测精度,满足检测的精度要求,表明该方法具有较好的适用性和可靠性。

关键词: 缺陷检测, Canny算子, 双目视觉, 立体匹配

Abstract: In the traditional pill defect detection method based on machine vision, the pill image is mostly shot from the right above the pill by a single camera, which is difficult to detect tablets with fracture between upper and lower surfaces and unqualified thickness effectively, the thickness of this kind of defective tablets may be different from that of standard tablets. For this kind of situation, this paper presents a method of tablet thickness detection based on binocular vision. In this method, the binocular camera is placed directly above the tablet and the image of the tablet is collected. Canny operator is used to extract the edge features of tablets for stereo matching, the parallax of tablets is calculated by using the principle of binocular vision triangulation, and the depth information of the tablet is calculated according to the parallax, the depth difference between standard tablets and tablets with transverse rupture is calculated, the tablets with thickness defects are detected. The precision of the experimental measurement results is up to 0.1 mm, which has a high detection accuracy and meets the requirements of detection accuracy, indicating that the method has good applicability and reliability.

Key words: defect detecting, Canny operator, binocular vision, stereo matching