With the rapid development of modern railway,the periodic maintenance of railway track is becoming more and more important.Currently,we still rely on manual inspection in our country,which has large labor and high risk,so it’s urgently needed to have a kind of automatic detection device to complete the railway track detection with high speed and accuracy.Based on the machine vision theory and taking automatic detection technology of rai surface defects as the research object,this paper presents an automatic inspection system for rail surface defects,and We identify rail surface defects automatically by using image processing,which provides reliable data for railway maintenance workers.The main contents of this paper are as follows:(1)we elaborate the background and the significance of rail flaw detection.On the summary of the current rail flaw detection method and the existed testing equipment,we analyze machine vision method,which is more excellent than before.And then,the general situation of machine vision and its application to detect the defects in rail surface are discussed.(2)According to the detection of rail surface defects,which needs movement and real-time,we design the imaging system based on line scan camera with high speed.Through analyzing the technical indicators of inspection system,we select imaging system components including line scan camera,etc.Based on the imaging factors such as camera performance,outside light and vibration,we design imaging system including linear module,high-speed turntable and electric vehicles.Through testing,we have mastered the imaging parameters of camera and the collaboration between the various components.The imaging system of rail inspection car captures rail surface image successfully.(3)According to the characteristics of the rail surface defects,discrete and crack defect detection algorithm are designed.We presents an algorithm to detect discrete defects based on image enhancement and automatic thresholding,which overcomes the nonuniform reflection of rail surface and selects a threshold that maximizes the background-class variance and meanwhile keeps the defect proportion in a low level.In view of the crack defects detection,we adopt Chan-Vese model,which is based on partial differential equation and adapts to changing topology of track crack.Through the experimental simulation of transverse and longitudinal crack,we confirm the feasibility of the method for crack defects detection.Finally,we design the application software to detect the defects in rail surface.In the VS2008 compile environment,we design inspection system using microsoft foundation class library,camera’s SDK and OpenCV library.Through testing on the real track,we achieve good results. |