The longitudinal displacement of the seamless rail is the longitudinal movement of the rail along the top surface of the track panel or road bed caused by the internal longitudinal stress of the rail. The timely and highprecision measurement of the longitudinal displacement is of great significance for the safe operation of the highspeed railway. In this paper, a method for measuring the longitudinal displacement of seamless rail based on binocular vision technology is proposed. This convenient and efficient noncontact measurement solution consists of a reference target deployed on the trackside fixed facility, a coded mark to be measured deployed on the rail waist and a binocular camera. A coding feature point detection algorithm based on doubleline constraint is proposed, which focuses on solving the problem of accurate detection and matching of coded feature points in complex field acquisition environment. The threedimensional distance measurement algorithm of chain binocular camera is proposed. The highprecision measurement of the longitudinal displacement of seamless rail is achieved with accurate threedimensional reconstruction. The indoor simulation experiment and outdoor field experiment verify the effectiveness of the proposed method. The measurement accuracy of the rail longitudinal displacement in outdoor field experiment reaches 02 mm.