The limit detection system studied in this paper is a vehicle-mounted contact detection system based on the section detection method controlled by the upper computer software. A laser ranging-based measuring optical machine is used to measure the intrusion limit data of the intrusion limit point during the intrusion limit; the calibration system based on the two-dimensional coordinate method is used to realize the conversion from the laser center coordinate system to the orbit reference coordinate system; according to the line limit Make the detection template by drawing; set up a camera to take real-time video of each detection template to realize the traceability of the detection process; use the upper computer software to extract the limit video and generate the detection result report; realize the mileage positioning of the train by installing the laser odometer. This paper discusses the overall scheme of the software-controlled railway boundary detection system and its implementation method, introduces the dual-channel real-time intrusion limit video recording algorithm, and the control process of the outer contour of the detection device.