为了提高钢轨表面缺陷检测的效率和准确率, 提出了一种基于背景差分与最大熵的轨面缺陷检测算法. 首先建立钢轨图像背景模型并将原图像与背景图进行差分操作, 以此来避免光照变化和反射不均的影响, 更准确地突出缺陷区域; 然后将改进的遗传算法与最大熵值法相结合来寻找最佳分割阈值并对差分图进行二值化, 通过结合改进遗传算法加快了最大熵值法的运算速度; 最后对二值图进行滤波操作, 完成钢轨表面缺陷的分割. 仿真结果表明该方法能够更加快速准确地分割出缺陷, 精确率、召回率和正确率分别达88.6%、93.4%和90.6%.
To improve the efficiency and accuracy of rail surface defect detection, a rail surface defect detection algorithm based on background difference and maximum entropy is proposed. Firstly, the background model of the rail images is built, and the original images are differentiated from the background images to avoid the influence of illumination change and uneven reflection and accurately highlight the defect area. Then, the improved genetic algorithm is combined with the maximum entropy method to seek the best segmentation threshold and binarize the difference graph. The operational speed of the maximum entropy method is accelerated by the improved genetic algorithm. Finally, the binary images are filtered to complete the segmentation of rail surface defects. The simulations indicate that this method can segment defects quickly and accurately, and the precision, recall, and accuracy are 88.6%, 93.4%, and 90.6%, respectively.