Visual detection algorithm for rail surface defects based on image sensor

Rail surface defects impact the riding quality and safety of railway system seriously. Therefore,visual detection algorithm for rail surface defects based on image sensor is proposed,and it focuses on image enhancement and automatic threshold segmentation. Local contrast measurement method is adopted to enhance the contrast of rail images and highlights defects from background notably. Improved maximum between-cluster variance( Otsu) is adopted to segment rail enhancement images,and it eliminates more noise and keeps the necessary information of defects. Experimental results show that accuracy and recall ratio is 86. 1 % and 91. 9 %,respectively.