A detection algorithm for rail wear detection based on machine vision is proposed. The algorithm of laser trace refinement and multi-segment synthesis, camera calibration and edge registration was presented. The experimental results show that the method can complete the detection of a rail profile within 40ms with the average error is 0.06mm, which can meet the requirements of precision and...