I’m building a vision module that sits on the roof of a moving train and continuously reports the height of the overhead contact wire. An Intel RealSense D435i or D455—sometimes both during testing—feeds depth and RGB data through the Python SDK (pyrealsense2). Scope • Measure the vertical distance from the rail top to the wire while the train is travelling at line speed, typically reading 5 000–5 800 mm. • Hold accuracy to ±10 mm and stream each reading to a CSV file with a timestamp. • Show the live height value on an on-board screen so operators can glance at the current clearance in real-time. Key technical points • Camera-to-wire distance is roughly 1.5–3 m, camera looks upward. • System must stay reliable during high-speed movement; vibration filtering and frame-to-frame stabilisation are critical. • Implementation language is Python. Use the RealSense SDK plus any computer-vision libraries you need (OpenCV, NumPy, etc.). Deliverables 1. Well-documented Python script(s) that: • auto-detect and initialise either the D435i or D455, • compute the contact-wire height every frame, • display the result live, and • append <timestamp, height_mm> to a CSV file. 2. Calibration routine or config file so the system can be re-deployed on different locomotives without code edits. 3. Short README explaining hardware mounting guidelines, software dependencies, and how to run the module. Acceptance criteria • Bench test: within ±10 mm on a static rig. • Field test: maintain the same tolerance over a 1 km run at operational speed with no dropped frames. If this outline is clear, jump straight to the implementation details—I’m ready to integrate your code into the broader train-borne monitoring suite.