The invention discloses a turnout open range vision measurement method and
system, and relates to the technical field of turnout open range detection, a line
structured light 3D camera shoots images of a switch rail and a stock rail based on
encoder signals, and after filtering and enhancement preprocessing, a switch is positioned through a trained target detection model, and a
region of interest is extracted; judging the type of the
railroad switch according to the center distance of the
railroad switch, obtaining a steel rail region
depth map through segmentation, extracting an effective detection region of the steel rail through morphological operation, and extracting and fitting the edge of the steel rail; obtaining a plurality of measuring points according to the intersection points of the center connecting line of the
railroad switch and the edge of the fitted steel rail; the
Euclidean distance of the intersection point of the turnout switch rail and the stock rail on the same side is calculated to serve as a measured open range value, error correction of the measured open range value is conducted according to the type of the
branch frog, a result is marked in an original image, marking alarm is conducted on unqualified point positions, and a report is generated synchronously. According to the invention, high-precision, non-contact and real-time measurement of the turnout opening is realized, and the safety guarantee capability is improved.