针对钢轨表面缺陷提取时的灰度分布不均与杂散光干扰问题,在背景差分法的基础上提出了一种钢轨表面缺陷图像自适应分割算法.首先,通过统计钢轨图像中各行像素灰度特征,结合其均值与标准差分布曲线快速提取钢轨表面区域;然后,进行区域与边缘特征的均值窗口自适应选取;最后,根据均值模糊原理建立背景图像模型并进行图像差分,实现了钢轨表面缺陷分割.实验结果表明:提出的轨面提取算法快速、有效;钢轨表面缺陷自适应分割算法在凸显图像中缺陷部分的同时,有效减少了光照变化和反射不均的影响.该方法对测试图像的召回率和准确率分别达到了95.4%和81.3%.
To solve the problem such as interference of stray light and uneven gray distribution when extracting defects from rail surface,an adaptive segmentation algorithm for rail surface defect image was proposed based on background subtraction. Firstly,through the statistics for pixel gray feature of each row in rail image,rail surface area was quickly located by combining the distribution curve of gray mean and standard deviation for each row. Secondly,the mean window was adaptively selected based on feature of region and edge. Finally,a background image model was set up based on the mean fuzzy principle,and the image subtraction operation was made,in which the segmentation of rail surface defects was achieved. Results show that the extraction method for rail surface area proposed in this paper is fast and effective,and the adaptive segmentation algorithm for rail surface defects can highlight the defects in the image and effectively reduce the effect of illumination change and uneven reflections. The recall and accuracy of the proposed method are 95. 4% and 81. 3% respectively.