This paper describes the highly accurate stereo-based measuring and tracking system that measures the distance to a specific landmark installed on a target side. Our goal is to obtain the accurate distance from a vessel to a target such as a wharf for precise vessel control. In order to achieve this, the system should have high distance measurement accuracy and the robustness against waving motion on a vessel. In this study, high accurate distance measurement is achieved by improved target detection that has sub-pixel positional accuracy. The robustness of the measurement against the motion is also achieved by synchronizing the capture timing of the stereo cameras. The effectiveness of the sub-pixel estimation is demonstrated by comparing the measurement results with or without the improved target detection. Another result of the measurement from 5 to 20 m distance demonstrates that the system has 10 mm accuracy. We also conducted the swing experiment to verify the robustness of the system against waving motion. Then, the system robustly measures the distance within 5 mm errors on 20 degrees per second and 5 Hz swing.