Train settlement is an important reason for affecting the speed and safe operation of train, meanwhile the changing of train axle box acceleration caused by track irregularities can reflect the status information of track irregularity. Extracting the steady target characteristics of pathway can provide the matching point of orbit for subsequent SLAM algorithm. Through the analysis of components of the pathway, the steady target characteristic of pathway parts could be extracted. Image equalization, enhancing and filling in with hole is to be used to complete the rail and fasteners outline at the beginning of the recognition. Binary expansion and generating linear structure of 0 or 90 degree, horizontal and vertical closing-opening operation, generating elements in pairs is to be used to complete the rail and fasteners initial contour extraction. According to the experiments it will prove that the improved RHT on linear feature extraction can increase the speed of PC and reduce the memory space, which can reduce the Flash on the subsequent DSP hardware development. It has great theoretical significance in supporting for the whole project.