Rail cross-section profile measurement method and system

Through multi-angle acquisition of target images and light bar center extraction technology, and registration is combined with ICP algorithm, the problems of high labor repetition and contact measurement risks of traditional rail profile measurement methods are solved, and rail section profile measurement with high accuracy and low labor consumption are achieved.

WO2025129443A1PCT designated stage expired Publication Date: 2025-06-26QINGDAO QIUSHI IND TECH RES INST +1

Patent Information

Application Number
PCT/CN2023/139807
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-18
Filing Date
2023-12-19
Publication Date
2025-06-26

AI Technical Summary

Technical Problem

Traditional rail profile measurement methods have high labor repetition and high labor intensity, and contact measurement methods increase the risk of rail surface defects.

Method used

The method of collecting target images from multiple angles is adopted, and precise measurement of rail cross-sectional profile is achieved through camera calibration, laser irradiation, light bar center extraction and ICP algorithm registration.

Benefits of technology

Improves measurement accuracy and consistency, reduces labor consumption and reduces the risk of defects on the rail surface.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023139807_26062025_PF_FP_ABST
    Figure CN2023139807_26062025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to a rail cross-section profile measurement method and system. Target images are collected from multiple angles, the collected target images are reconstructed into a rail profile from the current camera perspective by means of an algorithm, the obtained rail profile from the current camera perspective is corrected into the current rail cross-section profile, the current rail cross-section profile is finally compared with a standard rail cross-section profile, and an error result between the profiles is displayed; an ROI automatic extraction algorithm based on light plane calibration parameters is designed to increase the speed of light stripe center extraction by three times, and additionally, a center locating-based spline interpolation method is proposed to eliminate bending distortion in intersection regions, thereby achieving rapid and accurate light stripe center extraction; and a cross laser stripe center extraction algorithm based on an RANSAC algorithm is used for removing background interference and classifying light stripes, thereby achieving efficient transformation from coordinates of light stripe feature points of a rail laser image to spatial three-dimensional coordinates.
Need to check novelty before this filing date? Find Prior Art

Description

Rail cross-section profile measurement method and system Technical Field

[0001] The present application relates to the technical field of rail profile detection, and in particular to a rail cross-sectional profile measurement method and system. Background Art

[0002] With the continuous development of my country's railways, railway safety and intelligent railway manufacturing are receiving increasing attention. Substandard rail profile geometry can lead to a series of safety issues, including increased wear on the wheel-rail contact surface, rolling contact fatigue damage, and excessive vibration during locomotive operation.

[0003] At present, the rail profile dimension detection method used by most rail production departments in my country is for workers to perform contact measurements using mechanical calipers or gauges. During measurement, it is necessary to alternately start and stop the rail conveyor so that the section of rail to be measured on the production line is fixed to the measuring station. The worker then places the mechanical ruler against the rail and uses a plug gauge of the corresponding size for contact measurement. During the measurement process, the varying strength with which the worker presses the ruler and the randomness of the plug gauge's measurement point selection will lead to differences in the measurement results and poor consistency in the measurement results. In addition, the measurement process is labor-intensive and repetitive. Long-term measurements not only consume a large amount of manpower, but the contact measurement method also increases the risk of surface defects on the rail.

[0004] Summary of the Invention

[0005] Based on this, it is necessary to provide a rail cross-section profile measurement method and system to address the problems that the traditional measurement process has high labor repetition and labor intensity, and long-term measurement not only consumes a lot of manpower, but also the contact measurement method increases the risk of causing rail surface defects.

[0006] The present application provides a rail cross-section profile measurement method, comprising:

[0007] The camera is calibrated according to Zhang Zhengyou's calibration method to obtain the camera's intrinsic and extrinsic parameter matrices;

[0008] Acquire an image of the measured rail taken by the first camera at a shooting position, and acquire an image of the measured rail taken by the second camera at a shooting position, to obtain a set of target images; when capturing the images, control the laser to emit at least one single laser line toward the surface of the measured rail, with the irradiation direction of each single laser line being perpendicular to the surface of the measured rail, and the first camera and the second camera are respectively disposed on either side of the measured rail;

[0009] Synchronously moving the shooting position of the first camera and the shooting position of the second camera to acquire another set of target images; when synchronously moving the shooting position of the first camera and the shooting position of the second camera, the angle between the shooting direction of the first camera and the irradiation direction of each single-line laser remains unchanged, the angle between the shooting direction of the second camera and the irradiation direction of each single-line laser remains unchanged, and the angle between the shooting direction of the first camera and the shooting direction of the second camera remains unchanged;

[0010] Repeating the synchronous movement of the shooting position of the first camera and the shooting position of the second camera to obtain another set of target images, until N sets of target images are obtained, where N is a positive integer and greater than 1;

[0011] Obtaining a light stripe center image of each target image in each group of target images according to a light stripe center extraction method, and obtaining a light stripe center image corresponding to each target image;

[0012] Based on each light strip center image, obtaining the three-dimensional coordinates of each light strip center point contained in the light strip center portion of each light strip center image to form a light strip center point set for each light strip center image;

[0013] Select a set of target images;

[0014] The camera coordinate system of any target image in the group of target images is defined as a common coordinate system, and the three-dimensional coordinate system of the center point of the light stripe of another target image in the group of target images is converted to the common coordinate system to obtain the common coordinates of the center point of each light stripe in each light stripe center image;

[0015] According to the distortion profile projection correction method, the common coordinates of the center point of each light strip are calibrated to obtain the calibrated common coordinates of the center point of each light strip;

[0016] The initial value of the ICP algorithm is obtained by coarse matching of the coordinates of the dual circle centers and the dual circle centers of the standard profile. The common coordinates of the center points of each light strip in the calibrated target image set are precisely aligned with the standard rail end face profile according to the ICP algorithm. The shadow marking line is set according to the standard regulations. The intersection of the fitting marking line and the measured profile is extracted to locate the measuring point, and the rail profile measurement result is obtained.

[0017] Returning to the step of selecting a group of target images until all target images are selected;

[0018] A rail end face profile error detection model is constructed based on multiple groups of target images, the light strip center image corresponding to each target image, the common coordinates of each light strip center point in each light strip center image, the calibrated common coordinates of each light strip center point in each light strip center image, the standard rail end face profile, and the comparison error image between each corrected rail end face profile and the standard rail end face profile.

[0019] On the other hand, the present application also provides a rail cross-section profile measurement system, the rail cross-section profile measurement system comprising:

[0020] An acquisition device is used to acquire images of the measured rail at different shooting angles; the acquisition device includes a light source emitting device and an image acquisition device;

[0021] The processing device is in communication with the acquisition device, and is used to execute the rail cross-section profile measurement method mentioned above.

[0022] The present application relates to a rail cross-section profile measurement method, which captures target images from multiple angles, reconstructs the captured target images into the rail profile of the current camera perspective through an algorithm, then corrects the obtained rail profile of the current camera perspective into the profile of the current rail cross-section, and finally compares the current rail cross-section profile with the standard rail cross-section profile, and displays the error results between the profiles; an ROI automatic extraction algorithm based on light plane calibration parameters is designed to increase the light strip center extraction speed by 3 times, and a center positioning spline interpolation method is proposed to remove the bending and distortion problems in the cross-region, thereby realizing fast and accurate extraction of the light strip center; a cross laser light strip center extraction algorithm based on the RANSAC algorithm is used to remove background interference and classify light strips, thereby realizing efficient transformation of the light strip feature point coordinates of the rail laser image to three-dimensional spatial coordinates. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] FIG1 is a flow chart of a rail cross-section profile measurement method provided in an embodiment of the present application.

[0024] FIG2 is a schematic diagram of the arrangement of the cross-line laser components in the rail cross-section profile measurement method provided in one embodiment of the present application.

[0025] FIG3 is a schematic diagram of a checkerboard-based calibration method in a rail cross-section profile measurement method provided in an embodiment of the present application.

[0026] FIG4 is a schematic diagram of deformation of light stripe centers extracted from a black and white checkerboard image in a rail cross-section profile measurement method provided by an embodiment of the present application.

[0027] FIG5 is a diagram of a customized checkerboard calibration plate and a checkerboard pattern containing laser stripes in a rail cross-section profile measurement method provided in an embodiment of the present application.

[0028] FIG6 is a diagram showing the positioning results of the intersection area of ​​three light planes in the target image in the rail cross-section profile measurement method provided in one embodiment of the present application.

[0029] FIG7 is a schematic diagram showing the results of determining the left and right boundaries and the upper boundary of ROI1 in the target image of the rail cross-section profile measurement method provided in one embodiment of the present application.

[0030] FIG8 is a schematic diagram showing the results of determining the left and right boundaries and the lower boundary of ROI1 in the target image of the rail cross-section profile measurement method provided in one embodiment of the present application.

[0031] FIG9 is a schematic diagram of a result of determining ROI2 in a target image of a rail cross-section profile measurement method provided in an embodiment of the present application.

[0032] FIG10 is a diagram showing the extraction results of the ROI in the target image of the rail cross-section profile measurement method provided in one embodiment of the present application.

[0033] FIG11 is a diagram showing the precise positioning results of intersections in a target image of a rail cross-section profile measurement method provided in an embodiment of the present application.

[0034] FIG12 is a diagram showing the results of screening and distinguishing the left and right contours of the rail head in a target image of a rail cross-section profile measurement method provided in an embodiment of the present application.

[0035] FIG13 is a schematic diagram of noise removal and spline interpolation at the center of a light strip in a target image of a rail cross-section profile measurement method provided in one embodiment of the present application.

[0036] FIG14 is a comparison diagram of the center of the light strip in the target image before and after correction of the rail cross-section profile measurement method provided in one embodiment of the present application.

[0037] FIG15 is a diagram showing the results of extracting the center of the target image light stripe in the rail cross-section profile measurement method provided in one embodiment of the present application.

[0038] FIG16 is a diagram showing the results of extracting the center of the original light stripe of the cross laser calibration image in the rail cross-section profile measurement method provided in one embodiment of the present application.

[0039] FIG17 is a straight line diagram of a cross laser calibration image fitted according to the RANSAC algorithm in a rail cross-section profile measurement method provided in an embodiment of the present application.

[0040] FIG18 is a straight line graph extracted by the RANSAC algorithm in the rail cross-section profile measurement method provided in one embodiment of the present application.

[0041] FIG19 is a comparison diagram of the results of extracting the center of the cross-calibrated laser image light stripe in the rail cross-section profile measurement method provided in one embodiment of the present application.

[0042] FIG20 is a diagram showing the light plane fitting results of the left and right cross structured lights in the rail cross-section profile measurement method provided in one embodiment of the present application.

[0043] FIG21 is a diagram showing the result of the dual-target coordinate conversion of the target image in the rail cross-section profile measurement method provided in one embodiment of the present application.

[0044] FIG22 is a diagram showing the coordinate transformation results after correction of the common vector of the target image in the rail cross-section profile measurement method provided in one embodiment of the present application.

[0045] FIG23 is a diagram illustrating characteristic points of a rail profile in a rail cross-sectional profile measurement method provided in an embodiment of the present application.

[0046] FIG24 is a schematic diagram of target image feature points in a rail cross-section profile measurement method provided in an embodiment of the present application.

[0047] FIG25 is a schematic diagram of rail longitudinal vector calibration in a rail cross-section profile measurement method provided in an embodiment of the present application.

[0048] FIG26 is a schematic diagram of the Douglas-Peucker algorithm in the rail cross-section profile measurement method provided in an embodiment of the present application.

[0049] FIG27 is a graph showing the result of feature point extraction using the Douglas-Peucker algorithm in the rail cross-section profile measurement method provided in one embodiment of the present application.

[0050] FIG28 is a schematic diagram of the projection results of feature points extracted from a target image in a rail cross-section profile measurement method provided in an embodiment of the present application.

[0051] FIG29 is a schematic diagram of the calculation results of the longitudinal vector of the rail in the rail cross-section profile measurement method provided in an embodiment of the present application.

[0052] FIG30 is a schematic diagram of the distortion profile correction by auxiliary plane projection in the rail cross-section profile measurement method provided in one embodiment of the present application.

[0053] FIG31 is a diagram showing the result of correction of the distorted profile of rail measurement in the rail cross-section profile measurement method provided in an embodiment of the present application.

[0054] FIG32 is a diagram showing the rough registration results of the straight line segments on the side of the rail head in the rail cross-section profile measurement method provided in one embodiment of the present application.

[0055] FIG33 is a diagram showing the positioning results of the endpoints of the large and small arcs in the rail cross-section profile measurement method provided in one embodiment of the present application.

[0056] FIG34 is a diagram showing the result of obtaining the center of a small circle fitting in the rail cross-section profile measurement method provided in one embodiment of the present application.

[0057] FIG35 is a diagram showing the results of dual-center coordinate fitting and registration in the rail cross-section profile measurement method provided in an embodiment of the present application.

[0058] FIG36 is a comparison error diagram between the corrected rail end face profile and the standard rail end face profile in the rail cross-sectional profile measurement method provided in an embodiment of the present application.

[0059] FIG37 is a diagram showing the measurement point marking results in the rail cross-section profile measurement method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0061] As shown in FIG1 , in one embodiment of the present application, the rail cross-section profile measurement method includes: S100 to S800:

[0062] S100, calibrating the camera according to the Zhang Zhengyou calibration method to obtain the camera's intrinsic parameter and extrinsic parameter matrix.

[0063] In this embodiment, the relative position between the fixed line laser and the camera is fixed, and the checkerboard calibration plate's position is adjusted so that the light plane intersects with the checkerboard calibration plate to form a straight line of light stripes. The intersection of the checkerboard and the light stripes is within the camera's field of view. A pair of images of the checkerboard with laser stripes and the checkerboard without laser stripes are captured at the same position. The camera and line laser are then fixed, the checkerboard calibration plate's position is changed, and the above steps are repeated to obtain multiple sets of image pairs. The checkerboard image without laser stripes is used as an image group for camera calibration to obtain the camera's intrinsic parameters K and the extrinsic parameter matrix [R t] relative to the world coordinate system defined by the current checkerboard calibration plate's position. The checkerboard image with laser stripes is primarily used to extract the pixel coordinates (u, v) of the light stripe center point. The corresponding three-dimensional coordinates of the light stripe center point in the world coordinate system are then calculated using the extrinsic parameter matrix. The camera imaging model is then used to transform the light stripe center point on the calibration plate to the camera coordinate system.

[0064] S200: Acquire an image of the rail being measured taken by a first camera at a shooting position, and acquire an image of the rail being measured taken by a second camera at a shooting position, to obtain a set of target images. When capturing the images, control a laser to emit at least one single laser line onto the surface of the rail being measured, with each single laser line irradiating perpendicularly to the surface of the rail being measured. The first camera and the second camera are respectively positioned on either side of the rail being measured.

[0065] In this embodiment, a cross laser is used in conjunction with two single-line lasers arranged on either side. As shown in Figure 2, the cross laser is installed directly above the rail head. Using a cross laser has two main advantages: First, the cross laser increases the number of light stripes at the rail head, allowing multi-line structured light to be used to extract feature points such as the rail jaw. This, combined with the geometric relationships of the rail profile, can be used to correct the distortion of the measured profile due to installation offset or directional offset. Second, the rail head area is within the common field of view of the industrial cameras on both sides. The public point cloud in the coordinate system of the two cameras can be supplemented in the subsequent contour stitching and registration algorithms as a registration basis, further improving the accuracy of binocular registration.

[0066] S300: Synchronously move the shooting position of the first camera and the shooting position of the second camera to acquire another set of target images. When the shooting position of the first camera and the shooting position of the second camera are synchronously moved, the angle between the shooting direction of the first camera and the irradiation direction of each single-line laser remains unchanged, the angle between the shooting direction of the second camera and the irradiation direction of each single-line laser remains unchanged, and the angle between the shooting direction of the first camera and the shooting direction of the second camera remains unchanged.

[0067] In this embodiment, the first camera and the second camera are arranged on both sides of the length extension direction of the rail, and the first camera and the second camera are respectively at a fixed angle to the rail. The first camera and the second camera can both capture images of the rail head and the rail waist, and the relative positions between the first camera and the second camera and each single-line laser are fixed.

[0068] S400 , repeatedly performing the synchronous movement of the shooting position of the first camera and the shooting position of the second camera to obtain another set of target images, until N sets of target images are obtained, where N is a positive integer and greater than 1.

[0069] In this embodiment, by repeatedly performing synchronous movement of the shooting position of the first camera and the shooting position of the second camera, multiple groups of images containing chess and card grids and laser stripes at different positions of the rail are obtained.

[0070] S500 , obtaining a light stripe center image of each target image in each group of target images according to a light stripe center extraction method, and obtaining a light stripe center image corresponding to each target image.

[0071] In this embodiment, each target image is extracted by a light stripe center extraction method to obtain a light stripe center image corresponding to each image, and the target image and the light stripe center image of the target image are stored correspondingly.

[0072] S600 , based on each light strip center image, obtaining the three-dimensional coordinates of each light strip center point contained in the light strip center portion of each light strip center image to form a light strip center point set of each light strip center image.

[0073] In this embodiment, based on the target images obtained by the calibrated camera, the three-dimensional coordinates of the light strip center image corresponding to each target image are converted, and then the intrinsic parameter and extrinsic parameter matrix of the calibrated camera are used to convert the three-dimensional coordinates of the light strip center image to the coordinates in the camera coordinate system.

[0074] S700: Select a group of target images.

[0075] The camera coordinate system of any target image in the group of target images is defined as a common coordinate system, and the three-dimensional coordinate system of the center point of the light stripe of another target image in the group of target images is converted to the common coordinate system to obtain the common coordinates of each light stripe center point in each light stripe center image.

[0076] According to the distortion profile projection correction method, the common coordinates of the center point of each light strip are corrected to obtain the calibrated common coordinates of the center point of each light strip.

[0077] The initial value of the ICP algorithm is obtained by coarse matching of the dual-center coordinates and the dual-center positions of the standard contour. The common coordinates of the center point of each light strip in the calibrated target image group are precisely aligned with the standard rail end face contour according to the ICP algorithm. The shadow marking line is set according to the standard regulations, and the intersection of the fitted marking line and the measured contour is extracted to locate the measuring point to obtain the rail contour measurement result.

[0078] Return to selecting a group of target images until all target images are selected.

[0079] In this embodiment, the coordinate system of one camera in a set of target images is set as a common coordinate system. The three-dimensional coordinates of the light strip center in another image are converted to the common coordinate system. The obtained three-dimensional coordinates of the light strip center in the common coordinate system are corrected using the distortion profile projection correction method. The corrected three-dimensional coordinates of the light strip center are then registered with the standard rail cross-section profile using the ICP algorithm to obtain the registered measured rail cross-section profile and the standard rail cross-section profile. The error between the measured rail cross-section profile and the standard rail cross-section profile is then calculated.

[0080] S800, based on multiple groups of target images, the light bar center image corresponding to each target image, the common coordinates of each light bar center point in each light bar center image, the calibrated common coordinates of each light bar center point in each light bar center image, the standard rail end face profile, and the comparison error image between each corrected rail end face profile and the standard rail end face profile, builds a rail end face profile error detection model.

[0081] Specifically, multiple groups of target images, the light strip center image of each image, the three-dimensional coordinate parameters of the light strip center point of each image, the three-dimensional coordinate parameters after the fusion of the three-dimensional coordinate parameters of the light strip center points of a group of images, the three-dimensional coordinate parameters after the fusion of the three-dimensional coordinate parameters of the light strip center points of a group of images after calibration, the standard rail end face profile, and the comparison error image of the corrected rail end face profile and the standard rail end face profile are used as training data to train the rail end face profile error detection model, and the trained rail end face profile error detection model is obtained.

[0082] In this embodiment, multiple groups of target images, the light strip center image of each image, the three-dimensional coordinate parameters of the light strip center point of each image, the three-dimensional coordinate parameters after the fusion of the three-dimensional coordinate parameters of the light strip center points of a group of images, the three-dimensional coordinate parameters after the fusion of the three-dimensional coordinate parameters of the light strip center points of a group of images after calibration, the standard rail end face profile, and the error image of the comparison between the corrected rail end face profile and the standard rail end face profile are used as training data to train the constructed rail end face profile error detection model, so that the rail end face profile error detection model has the function of comparing the error of the detected rail cross-sectional profile with the standard rail cross-sectional profile.

[0083] As shown in FIG2 , in one embodiment of the present application, controlling the laser to emit at least one single line of laser light to the surface of the rail being measured includes the following steps S201 to S204 :

[0084] S201, controlling a first laser disposed above the rail to emit two single-line laser beams to the rail head of the rail to be measured, wherein the light planes formed by the two single-line laser beams are perpendicular to each other.

[0085] S202, controlling a second laser disposed on one side of the rail to emit a single line of laser light to the rail to be measured.

[0086] S203, controlling a third laser disposed on the other side of the rail to emit a single line of laser light to the rail being measured.

[0087] S204 : A light plane formed by the single-line laser emitted by the second laser and a light plane formed by the single-line laser emitted by the third laser are coplanar.

[0088] In this embodiment, the light source module can be composed of two line laser emitters (the laser emitter is hereinafter referred to as laser) and a cross laser. Also due to obstruction, the single-line laser needs to be arranged in conjunction with the industrial cameras on both sides, and the light emission planes of the two line lasers should be installed to overlap as much as possible to ensure that the light stripe curves intersecting the laser planes on both sides and the rail surface are coplanar, so as to truly reflect the contour data of the same section of the rail.

[0089] To address the profile distortion issue and minimize measurement errors caused by directional deviations in the rail measurement section, this paper proposes a solution using a cross laser paired with two single-line lasers positioned on either side. As shown in Figure 2, the cross laser is installed directly above the rail head of the rail being measured.

[0090] There are two main advantages of using a cross laser:

[0091] (1) The cross laser increases the number of light stripes at the rail head, and can use multi-line structured light to extract feature points such as the rail jaw. Combined with the geometric relationship of the rail profile, the measurement profile of installation offset or direction offset can be distorted and corrected.

[0092] (2) The rail head area is within the public field of view of the industrial cameras on both sides. In the subsequent S700, the public point cloud under the coordinate system of the two cameras can be supplemented as the basis for alignment, which can further improve the accuracy of binocular alignment.

[0093] As shown in FIG3 to FIG5 , in one embodiment of the present application, after calibrating the camera according to the Zhang Zhengyou calibration method, the method further includes calibrating the light plane. The calibrating the light plane includes the following steps S101 to S111:

[0094] S101, fixing the relative position between the calibration laser and the camera.

[0095] S102, adjust the posture of the checkerboard calibration plate so that the light plane formed by the single-line laser emitted by the calibration laser intersects with the checkerboard calibration plate to form a straight light stripe line, and at the same time control the straight light stripe line and the checkerboard calibration plate to appear within the shooting range of the camera.

[0096] S103 , keeping the posture of the checkerboard calibration plate unchanged, taking a checkerboard image without laser stripes and a checkerboard image containing laser stripes as a checkerboard image pair.

[0097] S104: Change the position of the checkerboard calibration plate, return to the position of the checkerboard calibration plate, capture a checkerboard image without laser stripes and a checkerboard image containing laser stripes, and use them as a checkerboard image pair until M checkerboard image pairs are obtained, where M is a positive integer greater than 1.

[0098] S105: Acquire M checkerboard image pairs. Each checkerboard image pair includes a checkerboard image without laser stripes and a checkerboard image with laser stripes.

[0099] S106 , extracting a checkerboard image without laser stripes from each checkerboard image pair.

[0100] S107, according to the Zhang Zhengyou calibration method, obtain the camera intrinsic parameter matrix and the relative checkerboard extrinsic parameter matrix from the checkerboard image without laser stripes.

[0101] S108 , extracting the pixel coordinates of the center point of the light stripe of the checkerboard image containing the laser stripe in each checkerboard image pair according to the light stripe center extraction method.

[0102] S109 , calculating the three-dimensional coordinates of the center point of the laser stripe in each chessboard image pair in the world coordinate system based on the relative chessboard extrinsic parameter matrix.

[0103] S110, based on the pixel coordinates of the center point of the light stripe of the checkerboard image containing laser stripes in each checkerboard image pair and the three-dimensional coordinates of the center point of the light stripe of the checkerboard image containing laser stripes in a checkerboard image pair in the world coordinate system, obtain the three-dimensional coordinates of the center point of the light stripe of the checkerboard image containing laser stripes in each checkerboard image pair in the camera coordinate system.

[0104] S111 , fitting the center points of the light stripes containing the laser stripe images in all obtained checkerboard image pairs in a camera coordinate system to obtain a light plane calibration equation.

[0105] In this embodiment, a schematic diagram of the checkerboard-based calibration method is shown in FIG3 . For the checkerboard image without laser stripes, its role is to calibrate the image group for camera calibration to obtain the camera intrinsic parameter K and the extrinsic parameter matrix [Rt] relative to the world coordinate system defined by the current checkerboard calibration plate posture. The checkerboard image with laser stripes is mainly used to extract the pixel coordinates (u, v) of the center point of the light stripe. The corresponding three-dimensional coordinates of the center point of the light stripe in the world coordinate system are then calculated by the extrinsic parameter matrix, and then the center point of the light stripe on the calibration plate is transformed into the camera coordinate system through the camera imaging model. The light plane equation in the camera coordinate system can be solved by plane fitting of the multiple groups of transformed light stripe center points. The complete light plane calibration process is shown in FIG4 .

[0106] In detail, the checkerboard calibration plane is used as the OX of the world coordinate system w Y z Plane, establish world coordinate system OX w Y w Z w , let the pixel coordinates of the center point of the light strip on the checkerboard calibration plate be (u, v), given the camera intrinsic parameter matrix K and the extrinsic parameter matrix [R t] that transforms the world coordinate system to the camera coordinate system, find the corresponding coordinates (x c ,y c ,z c The derivation of the calculation process is given below:

[0107] According to the camera imaging model, the transformation relationship between pixel coordinates and the world coordinate system is:

[0108] The rotation matrix R and translation vector t obtained by camera calibration at this time are:

[0109] Substituting into formula 1, we can get: c =R 31 x w +R 32 y w +R 33 z w +t3 Formula 2

[0110] Multiply both sides of Formula 1 by R. -1 K -1 We can get:

[0111] Let M = R -1 K -1 , due to z c As a scalar, it can be moved to the front, and the above formula can be rewritten as:

[0112] Since the light strip feature points are all located at the OX w Z w In the plane, there is Z for all the light strip feature points w =0, substitute into formula 2 and formula 3, and combine the two formulas to obtain:

[0113] Due to the orthogonal property of the rotation matrix R, there exists R -1 =R T , then the above formula can be rewritten as

[0114] Take the first two terms of formula 3 and record m1 = M 11 u+M 12 v+M 13 , m2=M 21 u+M 22 v+M 23 Available

[0115] The final solution is:

[0116] After completing the coordinate mapping of the light strip feature points from the pixel coordinate system to the world coordinate system, the coordinate system conversion can be performed using Formula 1 to obtain the coordinates of the light strip center point in the camera coordinate system.

[0117] When capturing a checkerboard image without laser streaks, the camera exposure time should be set longer to ensure accurate extraction of the checkerboard corners. When capturing a checkerboard image with laser streaks, the checkerboard calibration plate should be fixed in position, and the camera exposure time should be reduced to darken the checkerboard area as a whole. This increases the contrast between the light streaks and other non-light streak areas, allowing for better extraction of the light streak centers.

[0118] In addition, as shown in Figure 5, since the black and white grids in the checkerboard area have different reflection effects on the light strip, when the light strip falls into the checkerboard area, the grayscale distribution of the light strip will change due to different background colors, causing the center extraction result of the straight light strip to be distorted.

[0119] To address the problem of interference from the black and white checkerboard background on the extraction of the light bar center, a checkerboard calibration plate, as shown in Figure 6, was designed. The blank area around the calibration plate was enlarged. During calibration, the light plane was made to intersect with the blank area outside the calibration plate so that the light bar falls within the blank area of ​​the calibration plate. This maintains the grayscale distribution of the linear light bar and avoids distortion of the light bar center extraction results.

[0120] As shown in FIG6 to FIG16, in one embodiment of the present application, obtaining the light stripe center image of each target image in each group of target images according to the light stripe center extraction method, and obtaining the light stripe center image corresponding to each target image includes the following S501 to S509:

[0121] S501: Select a target image.

[0122] S502: extracting a precise light stripe region image of the target image according to a ROI algorithm.

[0123] S503: Based on the precise light stripe region image of the target image, the pixel coordinates of the center points of all light stripes of the target image in the pixel coordinate system are obtained using a Hessian algorithm. The intersection line of the light plane formed by two single laser lines emitted by the first laser is projected based on the calibration parameters to obtain a first light plane projection line. Furthermore, the intersection line of the light plane formed by a single laser line emitted by the second laser and the light plane formed by a single laser line emitted by the first laser is projected based on the calibration parameters to obtain a second light plane projection line.

[0124] S504: Extract the intersection points between all the light bar center points, the first light plane projection line, and the second light plane projection line as light bar intersection points. The number of the light bar intersection points is 2.

[0125] S505 , based on the pixel coordinates of the intersection of the two light strips, obtain a straight line equation passing through the intersection of the two light strips and the pixel coordinates of the midpoint of the straight line.

[0126] S506 , calculating the straight-line distance between each light bar center point and the straight line passing through the intersection of two light bars, deleting the light bar center points whose straight-line distance is less than the straight-line distance threshold, and obtaining the denoised light bar center points.

[0127] S507, calculating the straight-line distance between each two adjacent denoised light bar center points as the adjacent straight-line distance, and deleting the denoised light bar centers whose adjacent straight-line distances are greater than the adjacent straight-line distance threshold to remove the noise segments.

[0128] S508 , completing the noise segment according to the Spline interpolation completion method, obtaining a pixel coordinate point set of the completed light bar center point, and storing the completed light bar center point coordinate point set and the target image in correspondence.

[0129] S509, returning to the step of selecting a target image until all target images are selected once.

[0130] In this embodiment, the input target image is first preprocessed. The OTSU method is used to adaptively determine the threshold and binarize the target image to separate the light strip pixels from the background. A straight line passing through the intersection of the rail head light strips is then determined based on the calibrated camera intrinsic parameter matrix and the two light plane parameter matrices, thereby assisting in locating the intersection area. The following is the derivation process for determining the straight line equation:

[0131] make according to We can get:

[0132] In the same camera coordinate system, the light plane parameter matrices of the two intersecting light planes are L1 = [A1 B1 C1 D1] and L2 = [A2 B2 C2 D2]. The intersection of the two light stripes in the image is the same point when converted to the target image coordinate system, which satisfies the following equation:

[0133] The above formula can be rewritten as

[0134] According to the formula We can get:

[0135] The above formula can be further rewritten as:

[0136] In the formula This equation shows that a straight line passing through the intersection point can be determined in the pixel coordinate system. The physical meaning of this line is the projection of the intersection of the two intersecting light planes in space in the pixel coordinate system. After calibrating the camera intrinsic parameter matrix and the two light plane parameter matrices, the parameters of this line can be determined using the above equation.

[0137] In the rail target image, the rail head light strip is formed by the intersection of three light planes to form two intersection points. Two straight lines calculated according to the calibration parameters are drawn in the target image. By calculating the distance between all light strip pixels and the straight line, a certain distance threshold is set, and the intersection area is screened and located. The positioning result is shown in Figure 7.

[0138] A point was randomly selected from each of the left and right intersections. The area to be selected was expanded 500 pixels horizontally and 200 pixels vertically to ensure that all pixels on the horizontal strip of the rail head in the target image were selected. Based on the left and right boundary points of the horizontal strip and the upper boundary point of the rail head outline in the target image, the left and right boundaries X00 and X01 and the upper boundary y00 of the rail head ROI1 were expanded outward by 50 pixels. The positioning results are shown in Figure 8.

[0139] The geometry of the target image's contour strips indicates a gap between the rail head and waist strips. This allows the lower boundary to be determined by locating the mutation point. First, a point is randomly selected from the intersection above the waist strips in the target image. A candidate box is defined by expanding downward by 100 and 800 pixels, and to the left and right by 300 pixels. After selecting the strip point, the distance between adjacent points is calculated to locate the mutation point within the gap. The median of the vertical coordinates of the two mutation points is used as the lower boundary y01 of ROI1 and the upper boundary y10 of ROI2. The localization results are shown in Figure 9.

[0140] At this point, the upper boundary of the waist light strip in the target image has been determined. Based on the location of the mutation point, a new candidate region is defined by expanding 200 pixels to the left and right, along with the upper boundary and the lowest end of the image. The left and right boundaries of the candidate region serve as the left and right boundaries x10 and x11 of ROI2. The geometry of the waist light strip in the target image is essentially a continuous curve. If there is interference from background light strips below the waist light strip in the target image within the candidate region, the mutation point can also be located to find the lowest point of the light strip, thereby determining the lower boundary y10 of ROI2. The positioning results are shown in Figure 10.

[0141] The final ROI extraction results are shown in Figure 11. As can be seen, the algorithm can automatically locate and distinguish rail regions in rail images with varying light stripe distributions and backgrounds, demonstrating its robustness and reliability. By extracting only the light stripe centers within the ROI and calculating the average runtime, the runtime was reduced from 311.4ms to 90.7ms, increasing the speed threefold.

[0142] To solve the problems of bending, twisting and breaking in the intersection area, this paper proposes a center positioning spline interpolation method to distinguish the center points of the extracted rail head light strips for correction.

[0143] Although aliasing enhances the light stripe width and normal direction, the localized light stripe center extraction still contains valid information, and the intersection location is relatively accurate. Based on the camera intrinsic parameter matrix and the two light plane parameter matrices, a straight line passing through the light stripe intersection can be determined. Based on this information, the intersection point of the straight line and the originally extracted light stripe center curve is determined as the intersection point. The localization results are shown in Figure 12.

[0144] Since the rail head's transverse light strips in the target image are generally distributed along the longitudinal direction of the rail, they are mostly linear in the target image. After successfully locating the coordinates of the two intersection points, a straight line passing through the two intersection points can be constructed. This line is generally consistent with the rail head's transverse light strips.

[0145] By calculating the distance from all light bar centers to this line, points with distances less than a certain threshold are filtered out as the rail head's horizontal light bar centers and intersection bending points. Furthermore, the horizontal coordinate center of the two intersection points can be set as a horizontal boundary to distinguish the left and right rail head outline light bar centers in the target image. The results of positioning, filtering, and differentiation are shown in Figure 13.

[0146] As shown in Figure 13, the rough rail surface causes multiple diffuse reflections of the laser, resulting in noise in the stripe center extraction results. Therefore, the distances between the center point of the contour stripe in the target image and its adjacent points are calculated, and points with large distance deviations are removed as noise points. Spline interpolation is then used to complete the missing segments in the filtered intersection region, using the remaining points as a reference. The noise removal and spline interpolation completion process is shown in Figure 14.

[0147] The results of direct light strip center extraction and correction using the center positioning spline interpolation method are compared, as shown in Figure 15. It can be seen that the correction eliminates the bending, distortion and breakage in the intersection area, and the center curve of the contour light strip extracted in the target image is smoother.

[0148] While successfully extracting key light stripe measurement points from the rail head outline in the target image, the proposed light stripe center extraction algorithm can also exclude the center points of the rail head's transverse light stripes, which are not included in the calculation. Furthermore, any noise points extracted near the outline light stripes are filtered out. As shown in Figure 16, the light stripe center extraction results for rail images show that the proposed light stripe center extraction algorithm can effectively handle rail images with background interference and multiple intersecting light stripes from left and right perspectives.

[0149] As shown in FIG. 17 to FIG. 21 , in one embodiment of the present application, after calibrating the camera according to the Zhang Zhengyou calibration method to obtain the camera's intrinsic and extrinsic parameter matrices, the following steps are also included, S100a to S100k:

[0150] S100a, fixing the relative position between the first laser and the camera.

[0151] S100b, adjust the posture of the checkerboard calibration plate so that the two intersecting light planes formed by the two single-line lasers emitted by the first laser fall on the checkerboard calibration plate, intersecting with the checkerboard calibration plate to form a cross light bar, and at the same time control the cross light bar and the checkerboard calibration plate to appear within the shooting range of the camera.

[0152] S100c: Keeping the posture of the checkerboard calibration plate unchanged, capture a checkerboard image without cross light stripes and a checkerboard image with cross light stripes as a cross light strip checkerboard image pair.

[0153] S100d: Change the position of the checkerboard calibration plate, return to the method of keeping the position of the checkerboard calibration plate unchanged, capture a checkerboard image without cross light stripes and a checkerboard image with cross light stripes, and use them as a checkerboard image pair with cross light stripes, until K checkerboard image pairs are obtained, where K is a positive integer greater than 1.

[0154] S100e, select a checkerboard image containing a crosshair pattern.

[0155] S100f, executing the Hessian algorithm to extract the pixel coordinates of the center points of all cross light stripes in the checkerboard image containing the cross light stripes in the pixel coordinate system.

[0156] S100g: Use the RANSAC algorithm to select the cross light bar center point that matches the first best matching line as the first type of cross light bar center point.

[0157] S100h: Using the RANSAC algorithm, select the cross light bar center points that match the second best matching line from the remaining cross light bar center points except the first cross light bar center point as the second type of cross light bar center points.

[0158] S100i, calculating the intersection of the first best matching straight line and the second best matching straight line, removing the center points of the first type of cross light strips whose distance from the intersection straight line is greater than a first preset distance, and removing the center points of the second type of cross light strips whose distance from the intersection straight line is greater than a second preset distance.

[0159] S100j, returning to the process of selecting a checkerboard image containing a cross light bar, until all checkerboard images containing a cross light bar are selected once, and obtaining the first type of cross light bar center point and the second type of cross light bar center point of each checkerboard image containing a cross light bar.

[0160] S100k, according to the center points of the first type of cross light stripes and the second type of cross light stripes in each checkerboard image containing a cross light stripe, the light plane calibration equation is corrected.

[0161] In this embodiment, during the actual calibration process, since the laser stripes cannot be guaranteed to fall completely on the checkerboard plane, the laser image captured within the camera field of view often has background interference.

[0162] For single-line laser calibration, since the camera and laser positions of the line structured light measurement module are fixed, when the chessboard posture is changed for image acquisition, the position variation range of the laser stripes on the calibration plate in the image is small. Therefore, the center can be extracted by only intercepting the light strips within the fixed pixel coordinate area, which can simply and efficiently eliminate the interference of the background area.

[0163] For cross laser calibration, as shown in Figure 17, the captured cross laser calibration image also has the problem of background interference, but unlike the calibration image of single-line laser, the cross laser calibration image also has the problem of bending in the cross area and distinguishing the corresponding light strips.

[0164] The precise positioning of the intersection point when extracting the center of the rail light strip image is based on the completion of the light plane parameter calibration, which is not applicable in the calibration process of the cross laser.

[0165] By observing and analyzing multiple sets of cross laser calibration images, we draw the following conclusions: (1) The cross light bars falling on the calibration board are basically in the shape of intersecting straight lines. (2) Since the position of the linear structured light measurement module is fixed during calibration, the directions of the light bars in the calibration image are basically distributed within a certain range. (3) The number of valid points falling on the calibration board is greater than the proportion of interference points.

[0166] A light stripe center extraction algorithm for cross laser calibration images based on the RANSAC (Random Sample Consensus) algorithm is proposed. The basic idea is to give a mathematical model to be fitted and iteratively estimate the parameters of the mathematical model from a set of observation data containing outliers.

[0167] The RANSAC algorithm is a nondeterministic algorithm. When repeated sufficiently many times, it produces a result that maximizes the probability of satisfying the conditions and eliminating outliers. Therefore, it is suitable for extracting the center of light stripes on a calibration plate while removing the influence of background interference and outliers. For the light stripes of a cross laser on a checkerboard calibration plate, the corresponding mathematical model is a straight line equation. The flow chart for line extraction using the RANSAC algorithm is shown in Figure 18.

[0168] The algorithm steps are as follows:

[0169] (1) Randomly select two points from the complete point set and calculate the parameters of the line l based on the two points.

[0170] (2) Set a threshold δ and classify the data point set S(l) whose geometric distance to the line l is less than δ as the consistent set of the line l.

[0171] (3) Repeat the random selection n times to find the straight lines l1, l2, ..., l n The parameters and their corresponding consistent sets S(l1), S(l2), ..., S(l n ).

[0172] (4) Integrate all random selection results and select the fitting line corresponding to the largest consistent set as the best matching line of the complete point set. Its parameter result is the final fitting result.

[0173] A light stripe center extraction algorithm based on RANSAC algorithm is proposed for cross laser calibration images.

[0174] First, the Hessian matrix method is used directly on the cross-calibrated laser image to extract the center point set of the light stripe. Since the valid points are basically distributed in a straight line, while the interference points are irregularly distributed and there are more valid points that conform to the straight line distribution, the RANSAC algorithm can be directly used to extract the line point set with more inliers and remove it from the original point set. The remaining point set contains the second line point set and the interference outlier points. The RANSAC algorithm is used again to fit the parameters of the second line. The extracted outliers are background interference points and can be directly removed. The results of the two RANSAC extractions are shown in Figure 19.

[0175] For the problem of bending and distortion in the intersection area, after obtaining the parameters of the two straight lines, we can find the intersection of the straight lines, set a certain distance threshold, and remove the points whose distance from the intersection point is less than the threshold to avoid the impact of the bending in the intersection area on the calibration of the light plane parameters.

[0176] Furthermore, to prevent errors introduced by poor imaging quality at the ends of the light stripe, a certain number of extraction points were removed from both ends of the light stripe. Finally, based on the obtained line parameters, a slope threshold was set to separate the line point sets corresponding to the two light planes. The final light stripe center extraction results for the cross laser image are shown in Figure 20.

[0177] The two groups of classified light bar center points were then calibrated according to the single-line laser light plane calibration process. The final quantitative and visual calibration results for the left and right light plane parameters are shown in Table 1 and Figure 21, respectively. Compared to the single-line laser, the light plane fitting results showed an increase in both the distance mean and variance. The calculated angle between the two light planes showed an error of 0.28° and 0.17° from the ideal angle, respectively. Considering that the cross laser serves only as a supplementary contour feature point to assist in calculating the rail normal and is not used as rail profile measurement data, this result satisfies the measurement requirements.

[0178] Table 1

[0179] As shown in FIG22 and FIG23, in one embodiment of the present application, defining the camera coordinate system of any target image in the group of target images as a common coordinate system, and converting the three-dimensional coordinate system of the center point of the light strip of another target image in the group of target images to the common coordinate system to obtain the common coordinates of each center point of the light strip in each light strip center image includes the following steps: S701 to S706:

[0180] S701, select a group of target images.

[0181] S702: Define the camera coordinate system of any target image in the group of target images as a common coordinate system.

[0182] S703, obtaining the common coordinates of the intersection of the two light bars of one target image in the common coordinate system, and the common coordinates of the intersection of the two light bars of another target image in the common coordinate system.

[0183] S704: Obtain a common vector based on the common coordinates of the two light bar intersections of one target image in the common coordinate system, and obtain another common vector based on the common coordinates of the two light bar intersections of another target image in the common coordinate system.

[0184] S705: Using two common vectors, transform the three-dimensional coordinate systems of the light stripe center points of the two target images in the group of target images into a common coordinate system to obtain the common coordinates of each light stripe center point in each light stripe center image.

[0185] S706, returning to the process of selecting a group of target images until each group of target images is selected once.

[0186] In this example, coordinate transformation is performed to obtain the coordinates of the left and right rail profiles in their respective camera coordinate systems. Based on the results of dual-target calibration of the left and right cameras, the left camera coordinate system is defined as a common coordinate system. Based on the calibration results, the profile coordinates of the right camera coordinate system are transformed to the left camera coordinate system, achieving global unification of the coordinate systems and data fusion of the complete cross-sectional profile. The transformation results for coordinate system one are shown in Figure 22.

[0187] A light source design combining single-line and cross lasers is proposed to increase the common feature points of the rail head contour point cloud in the target image under the binocular perspective. By accurately extracting the three-dimensional coordinates corresponding to the intersection of the cross laser itself and the intersection of the single-line laser and the cross laser in the rail target image, a common vector under the left and right perspectives is formed in space.

[0188] The common vector is used to perform precise matching based on the binary positioning transformation results. The matching process is simple and efficient. As shown in Figure 23, compared with the results of coordinate system transformation using binary positioning parameters, the common parts of the rail head contour in the target image basically coincide with each other, and the error of global unification of the coordinate system is significantly reduced.

[0189] As shown in FIG. 24 to FIG. 32 , in one embodiment of the present application, the steps of calibrating the common coordinates of the center point of each light strip according to the distortion profile projection correction method to obtain the calibrated common coordinates of the center point of each light strip include the following steps: S707 to S715:

[0190] S707, select a group of target images.

[0191] S708: Project the common coordinates of the center point of each light strip in the set of target images onto the light plane formed by the single-line laser emitted by the second laser to obtain the two-dimensional coordinates of the center point of each light strip in the set of target images.

[0192] S709: Perform two-dimensional feature point positioning on the center point of each light strip in the set of target images according to the Douglas-Peucker algorithm to obtain a symmetry plane.

[0193] S710: Obtain the intersection of the symmetry plane and the center point of each light strip in the set of target images to obtain two intersection points, and calculate the coordinates of the two intersection points.

[0194] S711, connect the two intersection points to obtain the longitudinal vector of the rail.

[0195] S712: Based on the longitudinal vector of the rail, construct an auxiliary plane parallel to the rail section.

[0196] S713: Project the center point of each light strip in the set of target images onto the auxiliary plane to obtain the calibrated common coordinates of the center point of each light strip in the set of target images.

[0197] S714: Output the common coordinates of the center point of each light bar in the set of target images after calibration, and store the common coordinates of the center point of each light bar in the set of target images after calibration corresponding to the set of target images.

[0198] S715: Return to the process of selecting a group of target images until each group of target images is selected once.

[0199] In this embodiment, distortion of the rail profile caused by vibration and directional deviation during dynamic rail measurement can introduce significant errors in rail index measurement. A correction method is employed by calibrating the rail longitudinal vector, constructing an auxiliary plane perpendicular to the rail longitudinal direction, and then projecting the distorted profile onto the auxiliary plane. Analysis of the standard cross-sectional profile of a 60 kg / m rail, shown in Figure 2.1, reveals several easily extractable feature points, the specific locations of which are indicated in Figure 24.

[0200] A complete rail is divided into three parts: (1) The rail head, where point A is the midpoint of the rail top, segment BC is a straight line with a slope of 1:20 on the side of the rail head, and point C is the rail jaw. (2) The rail waist, where segment DE is an R400 arc, segment EF is an R20 arc, and point K is the center of the R20 arc. The two arcs are tangent at point E. (3) The rail foot, where segment FG is a straight line with a slope of 1:3, and segment GH is a straight line with a slope of 1:9. The two straight lines intersect at point G.

[0201] When vibration or placement direction deviation occurs, and the light plane and the longitudinal vector of the rail do not meet the perpendicular relationship, the change between the measured distorted profile and the standard profile can be described by affine transformation.

[0202] The single-line contour distortion correction method based on affine transformation obtains the affine transformation parameters between the distorted contour and the standard contour, and then performs inverse transformation to achieve the purpose of contour correction.

[0203] Take any point p(x,y) on the distorted contour and its corresponding point on the standard contour is p'(x',y'). The affine transformation relationship between the two is:

[0204] Where θ is the rotation angle. Sx and Sy are the expansion coefficients. Tx and Ty are the translation coefficients. When entering the single-line profile distortion correction, the affine transformation parameters [θ S x S y T x T Y ]The distorted profile of the rail waist area is fitted with the R400 arc and R20 arc matching segments of the standard profile.

[0205] However, this method has the following problems: since the R400 arc and the R20 arc are distorted and transformed into elliptical arcs after affine transformation, when the arc segment that can be fitted is short, the tangent point of the two elliptical arcs and the endpoints of the transformed R20 elliptical arc are difficult to locate, the arc segment positioning is inaccurate, and the fitting accuracy is low. It is difficult to ensure its accuracy and robustness in practical applications.

[0206] Furthermore, the affine transformation requires five parameters, requiring at least three pairs of distorted and standard contour points to solve the problem. The accuracy of these point pairs significantly impacts the parameter solution, making it difficult to guarantee fitting accuracy. A method for correcting distorted contours based on multi-line structured light projection was designed to address the geometric constraints imposed by rail contour feature points and the surface.

[0207] The light plane was angled to the rail cross section to simulate distortion, and a set of rail laser images were captured, as shown in Figure 25. Although the measured profile reflected by the intersection of the light stripes on the rail surface is distorted compared to the standard profile, the light stripe curve at the rail head always contains three pairs of feature points, regardless of the deflection of the light plane. The locations of these feature points are indicated in Figure 25. They correspond to points Bl1 and Br1 on the rail head profile on each side of the rail by the dual-line laser, points Bl2 and Br2 on the left and right rail head profiles by the cross laser, and points Cl1 and Cr1 on the left and right rail jaws by the single-line laser, respectively.

[0208] By analyzing the geometric constraints of the rail shape, we can know that the vector and vector The directions are consistent with the longitudinal direction of the rail, and no matter how the rail direction is skewed, these three pairs of feature points will only move on the corresponding straight line along the longitudinal direction of the rail.

[0209] According to the left-right symmetry relationship of the rail cross-section profile, the midpoint of each pair of feature points falls on the symmetry plane perpendicular to the gauge direction. Therefore, this paper proposes a rail longitudinal vector calibration method based on symmetry plane fitting.

[0210] As shown in Figure 26, for the rail profile point cloud obtained in a single measurement, by locating points Bl1 and Br1 of the single-line laser rail head profile, the midpoint Bm1 can be calculated. The midpoint Cm1 is calculated using the left and right rail jaw points Cl1 and Cr1. Similarly, the midpoint Bm2 of points Bl2 and Br2 of the cross-line laser rail head profile is extracted. Knowing the coordinates of points Bm1, Bm2, and Cm1, the parameters of the symmetrical median perpendicular plane can be calculated. The intersection of the symmetry plane and the two rail head profile segments is calculated. The midpoints A1 and A2 of the rail head profiles of the single-line laser and cross-line laser are located, respectively. The vector XX formed by the two rail top midpoints is the longitudinal vector of the rail.

[0211] To fit the symmetry plane using feature points, we first need to locate the feature points. During this process, we project the left and right contour point clouds onto their respective optical planes, reducing the dimensionality of the three-dimensional points to two dimensions. This reduces the amount of data processing and improves the algorithm's computational efficiency. Given the optical plane parameter matrix L = [ABCD], for a point p(x, y, z) in the contour point set, its projection point on the optical plane is p'(x', y', z'). Based on the point-to-plane projection properties, we have:

[0212] Solving the above equation, we can get the coordinates of the projection point. After the rail head profile is projected onto the light plane, we use the Douglas-Peucker algorithm to locate the feature points of the projected two-dimensional points.

[0213] The Douglas–Peucker algorithm is an algorithm for curve downsampling proposed by David Douglas and Thomas Peucker in 1973. Its basic idea is to use multiple polylines to approximate the curve and use the Hausdorff distance (i.e., the maximum distance) between the points on the curve and the polyline to measure the similarity between the polyline and the approximated curve. Points with a Hausdorff distance less than a set threshold are retained, and points with a greater Hausdorff distance are taken as the new endpoints. The curve is further subdivided and approximated.

[0214] For the curve shown in Figure 27, the execution process of the algorithm is divided into the following steps:

[0215] 1) Determine the endpoints A and B of the curve and connect them as the chord lAB of the curve.

[0216] 2) Calculate the distance from all discrete points between points A and B on the curve to the straight line l AB Distance, locate the point C with the largest distance, and record the Hausdorff distance d corresponding to point C.

[0217] 3) Compare the distance d with the set threshold δ. If the distance d is less than the threshold δ, then l AB It can be used as an approximate broken line for this curve segment.

[0218] 4) If it is greater than the threshold δ, point C is added as a new endpoint, AC and BC are connected and the segmentation is continued. The above process is repeated until no new endpoints are generated. All endpoints are connected in sequence to complete the multi-fold line approximation of the curve segment.

[0219] Based on experience and experimental results, this paper sets the distance threshold δ to 0.6 mm. The segmentation results of the rail head contours projected on the left and right sides using the Douglas-Peucker algorithm are shown in Figure 28.

[0220] Take the end of the rail head contour curve segment of the cross laser in the target image as the feature point B l2 and B r2The extracted feature points are back-projected into the laser image with increased contrast. The visualization results shown in Figure 29 verify that the feature point extraction results are relatively accurate.

[0221] The midpoint coordinates of the three pairs of feature points are then calculated as reference points for extracting the symmetry plane parameters. By locating the intersection of the symmetry plane and the rail head contours of the two rail segments, the two rail top midpoints along the longitudinal direction of the rail are obtained. Connecting these two points allows the calculation of the rail's longitudinal vector. The extraction results are shown in Figure 30.

[0222] The midpoint coordinates of the three pairs of feature points are then calculated as reference points for extracting the symmetry plane parameters. By locating the intersection of the symmetry plane and the rail head contours of the two rail segments, the two rail top midpoints along the longitudinal direction of the rail are obtained. Connecting these two points allows the calculation of the rail longitudinal vector. The extraction results are shown in Figure 30.

[0223] After obtaining the rail longitudinal vector, as shown in Figure 31, the rail longitudinal vector can be used to construct an auxiliary plane for projection correction. The designed rail longitudinal vector is The coordinates of the center point of the rail top where the single-line laser forms the profile are A(x0,y0,z0). An auxiliary plane perpendicular to the longitudinal vector of the rail is constructed through point A, and the distorted profile is projected onto the auxiliary plane to finally achieve the measured profile correction. Take a point p(x,y,z) where the distorted profile points are concentrated, and let the projection point of point p on the auxiliary plane be p'(x',y',z'). According to the properties of the plane, we can get

[0224] According to the above formula, the coordinates of the projection point can be obtained, and the measured contour point set is subjected to projection correction. The result of distortion correction is shown in Figure 32.

[0225] As shown in FIG25 and FIG26 , in one embodiment of the present application, performing two-dimensional feature point positioning on the center point of each light strip in the set of target images according to the Douglas-Peucker algorithm to obtain a symmetry plane includes the following S709a to S709c:

[0226] S709a: 2D feature point location is performed on the center point of each light strip in the target image set using the Douglas-Peucker algorithm, resulting in three pairs of feature points. The three pairs of feature points are: BL1 and BR1 on the rail head contour on each side of the rail using the double-sided single-line laser; BL2 and BR2 on the left and right rail head contours using the cross laser; and CL1 and CR1 on the left and right rail jaws using the single-line laser.

[0227] S709b, calculate the midpoint coordinates BM1 between points BL1 and BR1, calculate the midpoint coordinates BM2 between points BL2 and BR2, and calculate the midpoint coordinates CM1 between points CL1 and CR.

[0228] S709c, based on the midpoint coordinates BM1, BM2 and CM1, obtain a symmetry plane by fitting.

[0229] In this embodiment, the light plane is set at a certain angle to the rail cross section to simulate distortion, and a group of rail laser target images as shown in FIG25 are captured.

[0230] Although the measured profile reflected by the intersection of the light stripes on the rail surface is distorted compared to the standard profile, the light stripe curve at the rail head always contains three pairs of feature point information regardless of how the light plane is tilted. The positions of the feature points are marked in Figure 25, corresponding to points Bl1 and Br1 on the rail head profile on each side of the rail by the double-sided single-line laser, points Bl2 and Br2 on the left and right rail head profiles by the cross laser, and points Cl1 and Cr1 on the left and right rail jaws by the single-line laser.

[0231] By analyzing the geometric constraints of the rail shape, we can know that the vector and vector The directions are all consistent with the longitudinal direction of the rail, and regardless of the degree of rail skew, these three pairs of feature points will only move along the corresponding straight lines along the longitudinal direction of the rail. Due to the bilateral symmetry of the rail cross-sectional profile, the midpoint of each pair of feature points falls on a symmetry plane perpendicular to the track gauge direction. Therefore, this paper proposes a rail longitudinal vector calibration method based on symmetry plane fitting.

[0232] As shown in Figure 26, for the rail profile point cloud that can be obtained in one measurement, the midpoint Bm1 can be calculated by locating points Bl1 and Br1 of the single-line laser rail head profile. The midpoint Cm1 can be calculated using the left and right side rail jaw points Cl1 and Cr1. Similarly, the midpoint Bm2 of points Bl2 and Br2 of the cross laser rail head profile can be extracted.

[0233] Knowing the coordinates of three points Bm1, Bm2, and Cm1, the parameters of the symmetrical median perpendicular plane can be calculated. The intersection of the symmetrical plane and the two rail head contours can be calculated. The midpoints A1 and A2 of the rail head contours of the single-line laser and the cross laser are located respectively. The midpoints of the two rail tops form a vector It is the longitudinal vector of the rail.

[0234] As shown in FIG27 to FIG38, in one embodiment of the present application, the initial value of the ICP algorithm is obtained by coarse matching of the dual-center coordinates and the dual-center positions of the standard profile, the common coordinates of the center point of each light strip in the calibrated set of target images are precisely aligned with the standard rail end face profile according to the ICP algorithm, the shadow marking line is set based on the standard provisions, the intersection of the fitting marking line and the measured profile is extracted to locate the measuring point, and the rail profile measurement result is obtained, including the following steps S716 to S725:

[0235] S716: Select a group of target images.

[0236] S717 , obtaining a straight line feature point of a 1:20 slope of the rail head side profile in the common coordinates of the center point of each light bar in the group of target images after calibration.

[0237] S718, using the transformation of the endpoint coordinates of the straight line and the endpoint coordinates of the standard contour line, a rough alignment is performed with the contour line segment on one side of the rail head as a matching reference and the rail jaw point as a base point to obtain the result of the rough alignment of the rail head.

[0238] S719: Obtain one side of the rail waist after the rail head is roughly aligned, and locate the endpoints and tangent points of the two arcs of the rail waist on one side of the standard profile according to the Douglas-Peucker algorithm to obtain the coordinates of the major circle center corresponding to the major arc and the coordinates of the minor circle center corresponding to the minor arc.

[0239] S720, obtain the coordinates of the center of the large circle corresponding to the large arc and the coordinates of the center of the small circle corresponding to the small arc on the rail waist of one side of the standard profile, define one of the center coordinates as the base point, use the vectors of the coordinates of the center of the large circle and the coordinates of the center of the small circle to calculate the rigid body transformation coefficient of the profile after rough alignment of the rail head to the standard profile, fit the waist rail, and obtain the dual center coordinate fitting and alignment result.

[0240] S721 , performing fine registration on the dual-center coordinate fitting registration result according to the ICP algorithm to obtain a fine registration result of the dual-center coordinate fitting registration result and the standard contour.

[0241] S722: Based on the obtained dual-center coordinate fitting registration result and the fine registration result of the standard contour, a marking line is established to obtain the dual-center coordinate fitting registration result with the marking line and the fine registration result of the standard contour.

[0242] S723 , extracting the coordinates of the five measurement points closest to the marking line, fitting the extracted coordinates of each measurement point according to the least squares method, and obtaining the linear equation of each marking line.

[0243] S724, based on the straight line equation of each marking line, obtain the coordinates of each measuring point, compare the obtained coordinates of each measuring point with the standard contour size standard, obtain the detection result of each measuring point, and store it accordingly.

[0244] S725, returning to the process of selecting a group of target images until each group of target images has been selected once.

[0245] In this example, referring to the ICP execution process, the accuracy of point pair matching is a key factor affecting the registration results. ICP registration is also sensitive to initial value settings. Therefore, this paper uses a dual-center coordinate fitting method as a precursor to ICP registration. This method uses a rough match between the dual-center coordinates and the dual-center positions of the standard contour to provide initial values ​​for ICP registration.

[0246] As shown in Figure 27, based on the extraction of the 1:20 straight line feature points of the rail head side profile slope, the coordinates of the straight line endpoints are transformed with the coordinates of the BC straight line segment of the standard profile. The straight line segment of the left side of the rail head is used as the matching reference, and the rail jaw point C is used as the base point for rough alignment.

[0247] Let the measured contour point B be p B (x B ,y B ) The rail jaw point is p C (x C ,y C ), the corresponding points of the standard contour are p' B (x' B ,y' B ) and p' C (x' C ,y' C ), then for a contour point p(x,y), its corresponding point p'(x',y') after rough registration is:

[0248] Where θ is the angle between the measured profile and the standard profile straight line, and xx is the translation of the two profile rail jaw points. The calculation method is:

[0249] Substitute the located corresponding point coordinates into Formula 10 and Formula 11 for registration. The registration result is shown in Figure 33.

[0250] As can be seen from the above figure, the measured profile pose after rough alignment of the straight line segment is basically consistent with the standard profile, and the rail waist profile can be intercepted within the set height range.

[0251] The dual-center coordinate fitting method is used to further roughly align the contour. The left rail waist contour is used as the matching reference. The Douglas-Peucker algorithm is used to locate the two arc endpoints and the tangent point of the intercepted rail waist area, corresponding to points D, E, and F in Figure 24. According to the experimental results, the distance threshold is set to 0.6mm. The first and third sampling points are the endpoints of the large arc, and the third and sixth sampling points are the endpoints of the small arc. The positioning results are shown in Figure 34.

[0252] In order to use all the measurement points of the two arc segments to obtain the parameters of the large and small circles, and thus obtain the coordinates of the centers of the two circles, this paper uses the nonlinear least squares method to fit the measurement points of the double arc segments. The general expression of the circle to be fitted is: (x i -x0)+(y i -y0)=R 2 Formula 12

[0253] In formula 12, R is the arc radius specified in the standard. The arc segment point set is N is the number of points. The coordinates of the circle center point to be determined are (x0, y0), and the known arc radius is used as a constraint condition. Let:

[0254] Based on the optimization conditions of the nonlinear least squares method, the objective function to be optimized is:

[0255] When the objective function value reaches the minimum, the center coordinates (x0, y0) obtained at this time are the optimal solution for fitting. The fitting results of the center of the small arc segment are shown in Figure 35. This method is fast, the fitting results are stable, and the accuracy is high.

[0256] According to the measurement contour R400 center C 400 (x 400 ,y 400 ) and the center of R20 C 20 (x 20 ,y 20 ) and the center C' of the circle with known standard outline 400 (x' 400 ,y' 400 ) and C' 20 (x' 20 ,y' 20 ), taking the center of the small circle as the base point, the rigid body transformation coefficient of the measured contour to the standard contour is calculated using the double center coordinate vector. Take the point pairs p(x,y) and p'(x',y') of the measured contour and the standard contour, and the transformation process is the same as formula 10, the angle θ and the translation [t x t y ] T The calculation method is:

[0257] The contours are aligned based on the circle center fitting results, and the alignment results are shown in Figure 36. The ICP algorithm is used to further perform fine alignment on the rail contours after rough alignment, and the error between the measured contour and the standard contour is calculated. The results are shown in Figure 37.

[0258] According to the tolerance data benchmark provisions in the standard, the measuring points are located according to the corresponding marking lines for different measurement indicators. The setting method of the marking lines and the corresponding dimension standards are shown in Table 2.

[0259] Table 2

[0260] Specifically, asymmetry and rail foot height are measured at one location on each side. The final result is the average of the two combined results. The asymmetry measurement point is calculated using both the rail head width and rail foot width measurement points. The measurement points are located along the marking lines, and the measurement indicators are calculated based on the positioning results. The results of the marking and positioning are shown in Figure 38.

[0261] Typically, the coordinates of points on the measured contour don't strictly match those of the marked lines. Therefore, this paper selects the five measurement points closest to the marked lines. Within a small region, the contour segments can be differentiated into fine straight line segments. Based on this assumption, the extracted measurement point coordinates are fitted using the least squares method to obtain the line parameters. The measured points are then interpolated from the corresponding coordinates of the marked lines. The resulting coordinates of the measured points are consistent with those of the marked lines. Finally, various rail measurement indicators are calculated based on the comparison of the measurement points. The results are shown in Table 3.

[0262] Table 3

[0263] In one embodiment of the present application, a rail cross-section profile measurement system is provided. The rail cross-section profile measurement system includes an acquisition device and a processing device.

[0264] The acquisition device is used to acquire images of the measured rail at different shooting angles. The acquisition device includes a light source emitting device and an image acquisition device.

[0265] The processing device is in communication with the acquisition device, and the processing device is used to execute the rail cross-section profile measurement method as described in any of the above embodiments.

[0266] In this embodiment, the hardware facilities of the data back-end processing module are mainly processing equipment. The light source emitting device illuminates the laser plane on both sides of the rail and the light stripe curves intersecting the rail surface are coplanar. The cross laser is installed just above the rail head. There are two main advantages of using a cross laser: first, the cross laser supplements the number of light stripes at the rail head, and can use multi-line structured light to extract feature points such as the rail jaw, and combine the geometric relationship of the rail profile to perform distortion correction on the measurement profile of installation offset or direction offset. Second, the rail head area is within the common field of view of the industrial cameras on both sides. In the subsequent contour splicing and registration algorithm, the common point cloud in the bilateral camera coordinate system can be supplemented as the registration basis, which can further improve the binocular registration accuracy. The digital image acquired by the image acquisition device is transmitted to the processing equipment for a series of data processing tasks such as image processing, feature extraction, measurement point positioning and index analysis and calculation, and realizes the automatic control of other modules.

[0267] The various technical features of the above-described embodiments can be combined arbitrarily, and the execution order of the method steps is not restricted. In order to make the description concise, not all possible combinations of the various technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0268] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A method for measuring the cross-sectional profile of a rail, characterized in that, The method for measuring the cross-sectional profile of the rail includes: Calibrating the camera according to the Zhang Zhengyou calibration method to obtain the internal and external parameter matrices of the camera; Obtaining an image of the rail to be measured taken by the first camera at a shooting position, and obtaining an image of the rail to be measured taken by the second camera at a shooting position, to obtain a set of target images; when taking the images, controlling the laser to emit at least one single-line laser onto the surface of the rail to be measured, and the irradiation direction of each single-line laser is perpendicular to the surface of the rail to be measured, and the first camera and the second camera are respectively arranged on both sides of the rail to be measured; Synchronously moving the shooting position of the first camera and the shooting position of the second camera to obtain another set of target images; when synchronously moving the shooting position of the first camera and the shooting position of the second camera, the included angle between the shooting direction of the first camera and the irradiation direction of each single-line laser remains unchanged, the included angle between the shooting direction of the second camera and the irradiation direction of each single-line laser remains unchanged, and the included angle between the shooting direction of the first camera and the shooting direction of the second camera remains unchanged; Repeatedly executing the synchronous movement of the shooting position of the first camera and the shooting position of the second camera to obtain another set of target images until N sets of target images are obtained; N is a positive integer and N is greater than 1; Obtaining the light strip center image of each target image in each set of target images according to the light strip center extraction method to obtain the light strip center image corresponding to each target image; Based on each light strip center image, obtaining the three-dimensional coordinates of each light strip center point included in the light strip center part of each light strip center image to form the light strip center point set of each light strip center image; Selecting a set of target images; Defining the camera coordinate system of any one target image in this set of target images as the common coordinate system, and converting the three-dimensional coordinate system of the light strip center points of another target image in this set of target images to the common coordinate system to obtain the common coordinates of each light strip center point in each light strip center image; Calibrating the common coordinates of each light strip center point according to the distortion contour projection correction method to obtain the calibrated common coordinates of each light strip center point; Performing rough matching using the matching relationship between the double center coordinates and the double center positions of the standard contour to obtain the initial value of the ICP algorithm, accurately registering the common coordinates of each light strip center point in the calibrated set of target images with the standard rail end face contour according to the ICP algorithm, setting the marking line of the shadow according to the standard regulations, positioning the intersection points of the extracted fitting marking line and the measured contour as the measurement points, and obtaining the rail contour measurement result; Returning to the step of selecting a set of target images until all target images are selected; Constructing a rail end face contour error detection model based on multiple sets of target images, the light strip center image corresponding to each target image, the common coordinates of each light strip center point in each light strip center image, the calibrated common coordinates of each light strip center point in each light strip center image, the standard rail end face contour, and the comparison error image between each corrected rail end face contour and the standard rail end face contour.

2. The method for measuring the cross-sectional profile of a rail according to claim 1, wherein The controlling the laser to emit at least one single-line laser onto the surface of the rail to be measured includes: Control the first laser set above the rail to emit two single-line lasers to the rail head of the rail to be measured, and the light planes formed by the two single-line lasers are perpendicular to each other; Control the second laser set on one side of the rail to emit a single-line laser to the rail to be measured; Control the third laser set on the other side of the rail to emit a single-line laser to the rail to be measured; The light plane formed by the single-line laser emitted by the second laser and the light plane formed by the single-line laser emitted by the third laser are coplanar.

3. The rail cross-section profile measurement method according to claim 2, characterized in that, After calibrating the camera according to the Zhang Zhengyou calibration method, the method further includes calibrating the light plane, and the calibrating the light plane includes: Fix the relative position between the calibration laser and the camera; Adjust the pose of the checkerboard calibration board so that the light plane formed by the single-line laser emitted by the calibration laser intersects the checkerboard calibration board to form a light stripe straight line, and at the same time control the light stripe straight line and the checkerboard calibration board to appear within the shooting range of the camera; Keep the pose of the checkerboard calibration board unchanged, and take a checkerboard image without laser stripes and a checkerboard image containing laser stripes as a pair of checkerboard images; Change the pose of the checkerboard calibration board, return to keeping the pose of the checkerboard calibration board unchanged, take a checkerboard image without laser stripes and a checkerboard image containing laser stripes as a pair of checkerboard images until M pairs of checkerboard images are obtained; M is a positive integer and greater than 1; Obtain M pairs of checkerboard images; each pair of checkerboard images includes a checkerboard image without laser stripes and a checkerboard image containing laser stripes; Extract the checkerboard images without laser stripes in each pair of checkerboard images; According to the Zhang Zhengyou calibration method, obtain the camera internal parameter matrix and the external parameter matrix relative to the checkerboard from the checkerboard images without laser stripes; According to the light stripe center extraction method, extract the pixel coordinates of the light stripe center points of the checkerboard images containing laser stripes in each pair of checkerboard images; According to the external parameter matrix relative to the checkerboard, calculate the three-dimensional coordinates of the light stripe center points of the checkerboard images containing laser stripes in each pair of checkerboard images in the world coordinate system; According to the pixel coordinates of the light stripe center points of the checkerboard images containing laser stripes in each pair of checkerboard images and the three-dimensional coordinates of the light stripe center points of the checkerboard images containing laser stripes in the world coordinate system in a pair of checkerboard images, obtain the three-dimensional coordinates of the light stripe center points of the checkerboard images containing laser stripes in each pair of checkerboard images in the camera coordinate system; Fit the light stripe center points of the laser stripe images in all the obtained pairs of checkerboard images in the camera coordinate system to obtain the light plane calibration equation.

4. The method for measuring the cross-sectional profile of a rail according to claim 3, wherein The obtaining the light stripe center image of each target image in each group of target images according to the light stripe center extraction method to obtain the light stripe center image corresponding to each target image includes: Select a target image; Extract the accurate light stripe region image of the target image according to the ROI algorithm; Based on the accurate light stripe region image of the target image, use the Hessian algorithm to obtain the pixel coordinates of all the light stripe center points of the target image in the pixel coordinate system; project the intersection line of the two single-line lasers emitted by the first laser based on the calibration parameters to obtain the first light plane projection line, and project the intersection line of the light plane formed by the single-line laser emitted by the second laser and the light plane formed by one single-line laser emitted by the first laser based on the calibration parameters to obtain the second light plane projection line; Extract the intersection points between all the light stripe center points, the first light plane projection line, and the second light plane projection line as the light stripe intersection points; the number of the light stripe intersection points is 2; Based on the pixel coordinates of the two light stripe intersection points, obtain the linear equation of the straight line passing through the two light stripe intersection points and the pixel coordinates of the midpoint of the straight line; Calculate the straight-line distance between each light stripe center point and the straight line passing through the two light stripe intersection points, delete the light stripe center points with the straight-line distance less than the straight-line distance threshold, and obtain the denoised light stripe center points; Calculate the straight-line distance between every two adjacent denoised light stripe center points as the adjacent straight-line distance, delete the denoised light stripe centers with the adjacent straight-line distance greater than the adjacent straight-line distance threshold to remove the noise segments; Complete the noise segments according to the Spline spline interpolation completion method, obtain the pixel coordinate point set of the completed light stripe center points, and store the coordinate point set of the completed light stripe center points corresponding to the target image; Return the selected one target image until all target images have been selected once.

5. The method for measuring the rail cross-section profile according to claim 4, characterized in that, After calibrating the camera according to the Zhang Zhengyou calibration method to obtain the camera coordinate system, it further includes: Fix the relative position between the first laser and the camera; Adjust the pose of the checkerboard calibration board so that the two intersecting light planes formed by the two single-line lasers emitted by the first laser fall on the checkerboard calibration board, intersect with the checkerboard calibration board to form a cross light stripe, and at the same time control the cross light stripe and the checkerboard calibration board to appear within the shooting range of the camera; Keep the pose of the checkerboard calibration board unchanged, and take a checkerboard image without a cross light stripe and a checkerboard image containing a cross light stripe as a pair of cross light stripe checkerboard images; Change the pose of the checkerboard calibration board, return to the step of keeping the pose of the checkerboard calibration board unchanged, take a checkerboard image without a cross light stripe and a checkerboard image containing a cross light stripe as a pair of cross light stripe checkerboard images until K pairs of checkerboard images are obtained; K is a positive integer and greater than 1; Select a checkerboard image containing a cross light stripe; Execute the Hessian algorithm to extract the pixel coordinates of all the cross light stripe center points in the pixel coordinate system in the checkerboard image containing the cross light stripe; Use the RANSAC algorithm to screen the cross light stripe center points that match the first best matching straight line as the first type of cross light stripe center points; Use the RANSAC algorithm to screen the cross light stripe center points that match the second best matching straight line among the remaining cross light stripe center points except the first cross light stripe center points as the second type of cross light stripe center points; Calculate the intersection point of the first best-matching straight line and the second best-matching straight line, remove the center points of the first type of cross-shaped light bars whose distance from the intersection line is greater than the first preset distance, and remove the center points of the second type of cross-shaped light bars whose distance from the intersection line is greater than the second preset distance; Return the selected checkerboard image containing cross-shaped light bars until each checkerboard image containing cross-shaped light bars has been selected once, and obtain the center points of the first type of cross-shaped light bars and the center points of the second type of cross-shaped light bars of each checkerboard image containing cross-shaped light bars; Modify the light plane calibration equation based on the center points of the first type of cross-shaped light bars and the center points of the second type of cross-shaped light bars of each checkerboard image containing cross-shaped light bars.

6. The method for measuring the cross-sectional profile of a rail according to claim 5, characterized in that, Define the camera coordinate system of any one of the target images in this group of target images as the common coordinate system, and convert the three-dimensional coordinate system of the light bar center points of another target image in this group of target images to the common coordinate system to obtain the common coordinates of each light bar center point in each light bar center image, including: Select a group of target images; Define the camera coordinate system of any one of the target images in this group of target images as the common coordinate system; Obtain the common coordinates of the two light bar intersection points of a target image in the common coordinate system and the common coordinates of the two light bar intersection points of another target image in the common coordinate system; Obtain a common vector based on the common coordinates of the two light bar intersection points of a target image in the common coordinate system, and obtain another common vector based on the common coordinates of the two light bar intersection points of another target image in the common coordinate system; Use the two common vectors to convert the three-dimensional coordinate system of the light bar center points of the two target images in this group of target images to the common coordinate system to obtain the common coordinates of each light bar center point in each light bar center image; Return the selected group of target images until each group of target images has been selected once.

7. The method for measuring the rail cross-sectional profile according to claim 6, wherein According to the distortion contour projection correction method, calibrate the common coordinates of each light bar center point to obtain the calibrated common coordinates of each light bar center point, including: Select a group of target images; Project the common coordinates of each light bar center point in this group of target images onto the light plane formed by the single-line laser emitted by the second laser to obtain the two-dimensional coordinates of each light bar center point in this group of target images; Perform two-dimensional feature point positioning on each light bar center point in this group of target images according to the Douglas-Peucker algorithm to obtain the symmetry plane; Obtain the intersection points of the symmetry plane and each light bar center point in this group of target images to obtain two intersection points, and calculate the coordinates of the two intersection points; Connect the two intersection points to obtain the longitudinal vector of the rail; Based on the longitudinal vector of the rail, construct an auxiliary plane parallel to the rail section; Project each light bar center point in this group of target images onto the auxiliary plane to obtain the calibrated common coordinates of each light bar center point in this group of target images; Output the calibrated common coordinates of each light bar center point in this group of target images, and store the calibrated common coordinates of each light bar center point in this group of target images correspondingly with this group of target images; Return the selected group of target images until each group of target images has been selected once.

8. The method for measuring the cross-sectional profile of a rail according to claim 7, wherein Performing two-dimensional feature point localization on the center points of each light strip in the set of target images according to the Douglas-Peucker algorithm to obtain a symmetry plane, including: Performing two-dimensional feature point localization on the center points of each light strip in the set of target images according to the Douglas-Peucker algorithm to obtain three pairs of feature points; the three pairs of feature points are the BL1 point and the BR1 point on the rail head contour on each side of the rail by the bilateral single-line laser, the BL2 point and the BR2 point on the rail head contours on the left and right sides of the rail by the cross laser, and the CL1 point and the CR1 point on the rail jaws on the left and right sides by the single-line laser respectively; Calculating the midpoint coordinates BM1 of the BL1 point and the BR1 point, calculating the midpoint coordinates BM2 of the BL2 point and the BR2 point, and calculating the midpoint coordinates CM1 of the CL1 point and the CR point; Fitting a symmetry plane based on the midpoint coordinates BM1, the midpoint coordinates BM2, and the midpoint coordinates CM1.

9. The method for measuring the rail cross-sectional profile according to claim 8, characterized in that, Performing rough matching using the matching relationship between the double center coordinates and the double center positions of the standard contour to obtain the initial value of the ICP algorithm, precisely registering the common coordinates of the center points of each light strip in the calibrated set of target images with the standard rail end face contour according to the ICP algorithm, setting the marking line of the shadow based on the standard regulations, positioning the measuring points at the intersections of the extracted fitting marking line and the measured contour, and calculating to obtain the rail contour measurement indexes, including: Selecting a set of target images; Obtaining the 1:20 straight line feature points of the rail head side contour in the common coordinates of the center points of each light strip in the calibrated set of target images of this set of target images; Using the coordinate transformation of the endpoints of the straight line and the endpoints of the straight line of the standard contour, taking the straight line segment of one side of the rail head contour as the matching reference and the rail jaw point as the base point for rough registration to obtain the result after rough registration of the rail head; Obtaining one side of the rail waist after rough registration of the rail head, and performing positioning on the endpoints and tangent points of the two arcs on one side of the rail waist of the standard contour according to the Douglas-Peucker algorithm to obtain the large center coordinates corresponding to the large arc and the small center coordinates corresponding to the small arc; Obtaining the large center coordinates corresponding to the large arc and the small center coordinates corresponding to the small arc on one side of the rail waist of the standard contour, defining one of the center coordinates as the base point, calculating the rigid body transformation coefficient from the contour after rough registration of the rail head to the standard contour using the large center coordinate and the small center coordinate vector, and fitting the rail waist to obtain the fitting registration result of the double center coordinates; Precisely registering the fitting registration result of the double center coordinates according to the ICP algorithm to obtain the precise registration result of the fitting registration result of the double center coordinates and the standard contour; Based on the obtained precise registration result of the fitting registration result of the double center coordinates and the standard contour, establishing a marking line to obtain the precise registration result of the fitting registration result of the double center coordinates with the marking line and the standard contour; Extracting the coordinates of the 5 measurement points closest to the marking line, and fitting each of the extracted measurement point coordinates according to the least squares method to obtain the straight line equation of each marking line; Based on the straight line equation of each marking line, obtaining the coordinates of each measurement point, comparing the obtained coordinates of each measurement point with the standard contour dimension standard to obtain the detection result of each measurement point, and storing it accordingly; Returning the selected set of target images until each set of target images has been selected once.

10. A rail cross-section profile measurement system, characterized in that, The described rail cross-section profile measurement system includes: An acquisition device for acquiring images of the rail to be measured at different shooting angles; the acquisition device includes a light source emission device and an image acquisition device; A processing device communicatively connected to the acquisition device, and the processing device is used to execute the rail cross-section profile measurement method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Method and system for three-dimensionally reconstructing object surface based on cross-structured light

    CN104677305A

  • Dynamic measurement method of rail corrugation

    CN109017867A

  • Automatic contour registration method in rail abrasion dynamic measuring

    CN109798844A

  • Calibration method and verification method of steel rail profile and abrasion detection system

    CN110615016A

  • Steel rail abrasion rapid measurement algorithm based on structured light

    CN112414318A

Cited By

  • Precise calibration method for external reference initial value of camera array based on space laser beam linear extrapolation

    CN120894434A

  • Shaft part measuring method and device, medium and equipment

    CN120947528A

  • Wafer pre-alignment device and pre-alignment method

    CN121310950A

  • Sample detection method and system for ratchet wheel preparation

    CN121498541A

  • Structural deformation measurement method based on cross laser reference and unmanned aerial vehicle

    CN121576944A