Detection approach of metal surface defects by four-light-source photometric stereo method based on HALCON software
-
摘要: 为了提高金属表面缺陷的检测效率,提出了一种基于四光源光度立体法的检测方法。先用CCD相机采集4个不同空间角度的打孔金属试样图像。然后,利用HALCON算子,基于四光源的光度立体技术原理计算得到表面梯度图像,再将其转化为平均曲率图像。最后,把图像各点曲率值转化为灰度值,使用全局阈值分割出缺陷区域。结果表明,与经典光度立体法相比,四光源光度立体法能够准确构建图像表面梯度信息,利用图像平均曲率信息可以快速检测出金属表面缺陷。Abstract: In order to improve the detection efficiency of metal surface defects, a detection method based on four light source photometric stereo method is proposed. Firstly, CCD camera is used to collect images of four perforated metal samples from different spatial angles. Secondly, HALCON operator is used to calculate the surface gradient image based on the principle of photometric stereo technology of four-light-source, then it is converted to the average curvature image. Finally, the curvature value of each point of the image is converted to gray value, and the global threshold is used to segment the defect area. Compared with the classical photometric stereo method, the results show that the four-light-source photometric stereo method can accurately construct the surface gradient information of the image, and the average curvature information of the image can be used to detect the defects of the metal surface quickly.
-
Key words:
- defect detection /
- photometric stereo method /
- surface gradient /
- average curvature
-
表 1 硬件参数
名称 参数 相机 传感器型号: Aptina: MT9P031
靶面尺寸: 1/2.5″
分辨率: 500万像素
光谱响应: 390~1 050 nm镜头 物方工作距离300±3 mm
最大支持CCD尺寸: 1/2″
物方最大景深: ±54@F10 mm光源 内置同轴平行点光源
波长: 460~475 nm蓝色光表 2 光源角度参数
光源\角度参数 α/(°) β/(°) 1 42.5 45 2 42.5 135 3 42.5 225 4 42.5 315 -
[1] 韩茜茜, 耿世勇, 李恒毅. 基于机器视觉的缺陷检测应用综述[J]. 电工技术, 2019(14): 117-118, 132. doi: 10.3969/j.issn.1002-1388.2019.14.051 [2] 孔祥伟. 组合光源与图像处理算法在工件表面缺陷检测中的应用[D]. 天津: 天津大学, 2007. [3] 李来平, 林涛, 陈善本. 用从明暗恢复形状方法提取焊接熔池的表面高度[J]. 焊接学报, 2005, 26(5): 5-8. https://www.cnki.com.cn/Article/CJFDTOTAL-HJXB200505001.htm [4] 刘泽, 王嵬, 王平. 钢轨表面缺陷检测机器视觉系统的设计[J]. 电子测量与仪器学报, 2010, 24(11): 1012-1017. https://www.cnki.com.cn/Article/CJFDTOTAL-DZIY201011007.htm [5] 毕昕, 丁汉. TFT-LCD Mura缺陷机器视觉检测方法[J]. 机械工程学报, 2010, 46(12): 13-19. [6] 王磊, 徐科. 基于光度立体的带钢表面缺陷三维检测方法[C]. 中国金属学会. 第十届中国钢铁年会暨第六届宝钢学术年会论文集, 2015: 1-5. [7] 徐科, 王磊, 向境. 基于多点光源的金属表面三维缺陷检测方法[J]. 中国科技论文, 2017, 12(4): 420-424. doi: 10.3969/j.issn.2095-2783.2017.04.014 [8] Robert J. Woodham. Photometric method for determining surface orientation from multiple images[J]. International Society for Optics and Photonics, 1980, 19(1): 139-144. [9] 林慕清. 基于光度立体法的三维重建技术的研究与实现[D]. 沈阳: 东北大学, 2010. [10] 黄秀玲, 陆宏建, 任超, 等. 基于四光源光度立体法的药品泡罩包装中铝箔缺陷检测方法[J]. 包装学报, 2018(3): 47-51. https://www.cnki.com.cn/Article/CJFDTOTAL-BZXB201803008.htm [11] Barsky S, Petrou M. The 4-source photometric stereo technique for three-dimensional surfaces in the presence of highlights and shadows[J]. IEEE Transactions on Pattern Analysis & Machine Intelligence, 2003, 25(10): 1239-1252. [12] Wohler C, Hafezi K. A general framework for three-dimension surface reconstruction by self-consistent fusion of shading and shadow features[J]. Pattern Recognition, 2004, 38(7): 965-983.