Abstract:In order to locate the edge in the rail obstacle recognition, an improved algorithm for rail image’s edge extraction based on threshold segmentation with the features of rail images was proposed. Firstly, the main gray area of the rail was defined, to find the grayscale threshold through Otsu. The connected component in binary image was labeled so that clear edge image was extracted. Several edge extraction methods such as edge gradient operator sobel, wavelet segmentation algorithm, Otsu adaptive thresholding, were analyzed and applied in real-time rail image, and comparison experiments were conducted with that using the improved Otsu method. Experimental comparison results show that the experimental results by the improved method were more accurate and complete, with background noise being suppressed effectively.