为实现铸件布氏硬度的在线检测,应用基于机器视觉的布氏硬度自动测量系统采集压痕图像,研究压痕图像滤波、压痕图像轮廓直径提取、直径标定系数等算法。根据压痕图像的特点,提出基于粒子群的Snake模型压痕轮廓提取算法。引入压痕直径标定系数,解决了视觉测量中的压痕直径像素与压痕物理直径的换算关系,并对直径标定系数进行最小二乘法拟合,提高了测量精度。应用布氏硬度在线测量装置对180-210 HBW标准硬度块进行试验测试。试验表明:测量平均误差为0.72%,测量精度在±2 HBW之间,测量标准差为125 HBW,装置重复性好,精度高,完全能够满足铸件的布氏硬度在线检测要求。
In order to realize online-detection of casting the Bfinell hardness, automatic measurement system for the hardness based on machine vision, is applied to collect the Indentation image, to study the algorithm of image filtering, image contour diameter extraction and diameter coefficient calibration. According to the characteristics of the indentation image, a snake model of indentation contour extraction algorithm based on particle swarm is proposed. The indentation diameter calibration coefficient is introduced to solve the conversion relation between the indentation diameter pixels and indentation diameter in the visual measurement, to achieve the least-squares fitting what can improve the measurement accuracy. The online-detection device of the Brinell hardness is used to test 180-210 HBW standard hardness test block. Test shows that the average error is 0.72%, the measurement precision is between ±2 HBW, the standard deviation is 125 HBW, the device has good repeatability and high precision. So the device can meet the online-detection requirement of the hardness of castings.