| With the continuous improvement of the transportation system and railway lines,railway transportation has played a crucial role in the economic development.Therefore,the safety detection of rail which supporting train operation is very important.In the past,the detection of rail mainly relies on manual patrol detection which certain disadvantages,such as the omission rate and misjudgment rate.In recent years,the detection technology of rail surface defects based on machine vision has gradually replaced manual detection with the development of computer technology.However,due to the complex rail distribution and wide space in the railway system,rail detection still has some difficulties.The images taken by the camera are also affected by the light environment and therefore the rail detection still has certain difficulties.Based on the existing surface defect detection algorithms,the surface defect detection algorithm of rail is studied in this paper.The main research contents are as follows:According to the brightness of background and rail surface in the collected images,a rail positioning method based on the standard deviation of brightness and the maximum brightness sum is proposed to extract the rail surface in the collected images.The method can quickly extract the information of rail surface area and simultaneously process color image and gray image.The method has wide applicability and high efficiency.By analyzing the common denoising method,adaptive median filter is used to denoise the image after experimental comparison.In terms of image enhancement,the chaotic beetle antennae search is used to enhance the image which is better than the histogram equalization method and linear transformation.The gray gradient feature information of the rail surface is analyzed.A 3D-Otsu algorithm based on the beetle antennae search is used to segment track image defects.The segmented binary images were processed by using the expansion and corrosion operation in morphology,and then the rust was removed according to the gray gradient characteristic information of track surface rust and track surface defect.Finally,the defect was marked by connected area marking method.Through the experimental analysis of the actual collected images,the effectiveness of the algorithm adopted in this paper is verified.It can complete the automatic segmentation of complex defects on the rail surface,At the same time,it is more suitable for the detection of dropped blocks on rail surface. |