A line structured light profile measurement method for high-speed rail
Patent Information
- Application Number
- CN202410171355.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-07
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2044-02-07
AI Technical Summary
而上述的所有工作,都没有对双线结构光光平面重合度、垂直度的进行展开,或者仅仅是从机械结构方面来保证,没有对光平面重合度、垂直度的评估,因此系统存在着较大的隐患,为了解决上述问题,现提供一种技术方案
[0035] The technical effects and advantages of this invention, a line structured light profile measurement method for high-speed railway rails, are as follows: Based on laser triangulation technology, a line structured light monocular profile measurement system is built to extract the object profile. A line structured light binocular profile measurement system is then constructed using this monocular system to extract the complete cross-sectional profile. During the extraction process, the overlap and perpendicularity of the light plane can be evaluated, providing a reference for calibrating the light plane. Furthermore, the accuracy of profile extraction is improved by projecting a profile point cloud onto a perpendicular reference plane, thus enabling more precise measurement of rail profile data and providing guidance for railway operation and maintenance.
Smart Images

Figure CN118031841B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of line structured light profile measurement technology, and more specifically, to a line structured light profile measurement method for high-speed railway rails. Background Technology
[0002] The core of line structured light profile measurement technology for high-speed railway rails comprises two parts: line structured light measurement technology and rail profile measurement technology. Line structured light measurement technology, based on the principle of triangulation, is used to acquire the profile information of the object being tested. It can accurately reconstruct the rail profile, thereby understanding the rail's service condition, and is an important means of railway operation and maintenance. Compared with traditional contact-based profile measurement technology, line structured light measurement technology has advantages such as high speed, non-contact, and non-destructive testing, and is widely used in profile measurement, surface inspection, and 3D measurement.
[0003] In recent years, China has made significant progress in non-contact rail contour detection technology, with further research and improvements in the registration and measurement of multi-laser camera sensors in machine vision. Zhan Dong et al. studied methods for vehicle vibration compensation, contour matching, and parameter measurement under dynamic conditions during full-section rail profile measurement. Laser camera sensors were used for image acquisition and contour registration on the inner and outer sides of the track, and a vibration compensation method based on orthogonal decomposition was proposed. Wang Hao proposed a line structure cursor positioning method based on visual imaging homologous words, and a high-precision laser stripe centerline extraction method based on deep learning algorithms. Bao Yajun et al. established a measurement model of the full contour of the rail under static and dynamic conditions using four laser sensors. However, none of the above works have elaborated on the overlap and perpendicularity of the optical plane in the double-line structure, or only ensured it from the mechanical structure perspective without evaluating the overlap and perpendicularity of the optical plane. Therefore, the system has significant hidden dangers. To solve these problems, a technical solution is proposed. Summary of the Invention
[0004] To overcome the aforementioned deficiencies of existing technologies, this invention provides a line structured light profile measurement method for high-speed railway rails. Based on laser triangulation technology, a line structured light monocular profile measurement system is built to extract the object profile. A line structured light binocular profile measurement system is then constructed using the monocular system to extract the complete cross-sectional profile. During the extraction process, the overlap and perpendicularity of the light plane can be evaluated, providing a reference for calibrating the light plane. Furthermore, the accuracy of profile extraction is improved by projecting a profile point cloud onto a perpendicular reference plane, thus enabling more precise measurement of rail profile data. This method provides guidance for railway operation and maintenance, addressing the problems mentioned in the background section.
[0005] To achieve the above objectives, the present invention provides the following technical solution:
[0006] A method for measuring the profile of line structured light for high-speed railway rails includes the following steps:
[0007] Step 1: Construct a line structured light monocular contour measurement system: Based on laser triangulation technology, extract the object contour, obtain the camera's internal and external parameters as well as the light plane parameters, and iteratively calculate the transformation relationship from the image coordinate system to the world coordinate system to realize the transformation from the two-dimensional light stripe contour to the three-dimensional object contour, that is, extract the object contour.
[0008] Step 2, explore light stripe optimization algorithms: optimize the light stripe using threshold segmentation algorithm, truncation algorithm, erosion algorithm, geometric center method, centroid method, and a combination of erosion and dilation algorithm, and compare the contour restoration results and contour evaluation results after the above algorithms.
[0009] Step 3: Build a dual-line structured light binocular contour measurement system: calibrate the two sets of line structured light monocular contour measurement systems respectively, and after each system restores its contour, stitch the two contours together to obtain the complete object contour.
[0010] As a further aspect of the present invention, the steps of the line structured light monocular contour measurement system for extracting the contour of an object are as follows:
[0011] Step Q1, Camera parameter calibration: Take pictures of the HALCON calibration board in different poses, extract the coordinates of the feature points of the HALCON calibration board, use the HALCON program to iteratively calculate the camera parameters, and return the error;
[0012] Step Q2, optical plane parameter calibration: Extract the pose of the HALCON calibration board, turn on the line laser to capture the intersection line, extract the coordinates of the HALCON calibration board pose of the intersection line, fit the optical plane of the base calibration board according to the coordinates of the two intersection lines of the calibration board pose, and obtain the optical plane parameters and error.
[0013] Step Q3, Contour Extraction: Set the pose of the HALCON calibration plate to the world coordinate system, combine camera parameter calibration and light plane parameter calibration, turn on the line laser to project a laser stripe onto the object under test, use the camera to take a picture of the object's contour light stripe, and restore the object's contour from the object's contour light stripe picture.
[0014] As a further aspect of the present invention, the camera parameters are iteratively calculated using the HALCON program, wherein the formula for the iterative calculation is:
[0015]
[0016] In the formula: J(θ) is the objective function of the iteration, N is the number of feature points detected on the calibration board, (u′,v′) are the coordinates of the feature points on the calibration board in actual shooting, and (u,v) are the ideal image coordinates of the feature points on the calibration board.
[0017] As a further aspect of the present invention, the positions of the camera and the line laser cannot be changed during the contour extraction process; otherwise, it will lead to incorrect calibration parameters and an incorrect contour light stripe image of the object under test.
[0018] Camera parameter calibration aims to obtain the camera's intrinsic and extrinsic parameters, including focal length, principal point, distortion coefficients, rotation matrix, and translation vector. The results of camera parameter calibration are used to map the image data acquired by the camera to the actual world coordinate system of the object, thereby enabling the measurement of the object's size and position in the image. Light plane parameter calibration aims to obtain relevant parameters of the light plane, including its normal vector and origin coordinates. The light plane is a plane obtained by fitting two intersection lines of a calibration plate and can be used to describe the position and direction of the laser beam in the world coordinate system. The results of light plane parameter calibration are used to map the pixel coordinates of the light stripe in the image to the world coordinate system, thereby mapping the contour points in the image to their positions in the actual world coordinate system. Camera parameter calibration and light plane parameter calibration establish the mapping relationship between image pixel coordinates and the world coordinate system. These mapping relationships are used to accurately extract object contours, facilitating the mapping of points in the image to the object's true size and position. Contour extraction utilizes these mapping relationships to convert the pixel coordinates of the light stripe into the coordinates of the object's contour points, thus achieving accurate contour extraction.
[0019] As a further aspect of the present invention, step three involves constructing a dual-line structured light binocular contour measurement system, calibrating two sets of line structured light monocular contour measurement systems respectively, and reconstructing the contours of each system. The two contours are then spliced together to obtain a complete object contour. The two contours represent two light planes. The two light planes are adjusted to coincide, and the light planes are perpendicular to the object normal and perpendicular to the ground to obtain a complete object contour.
[0020] As a further aspect of the present invention, the two light planes are adjusted to coincide, the degree of coincidence of the two light planes is evaluated, the poses of the two light planes are extracted, the distance and normal vector of the two light planes are calculated, and the angle between the two normal vectors is calculated to evaluate the degree of coincidence of the two light planes. When the distance and the angle between the normal vectors of the two light planes are less than a set threshold, the two light planes are considered to coincide; when the distance and the angle between the normal vectors of the two light planes are greater than or equal to the set threshold, the two light planes will be readjusted.
[0021] As a further aspect of the present invention, the light plane is perpendicular to the object's normal and perpendicular to the ground. The perpendicularity of the light plane is evaluated by using a ruler as an aid to make the light plane perpendicular to the object's normal. A reference plane perpendicular to the ground is established. The distance and angle between the reference plane and the light plane are calculated to determine their perpendicularity. When the distance and angle between the reference plane and the light plane are less than a set threshold, the light plane is perpendicular to the ground. When the distance and angle between the reference plane and the light plane are greater than or equal to the set threshold, the light plane is not perpendicular to the ground and is readjusted.
[0022] As a further aspect of the present invention, the two sets of line structured light monocular contour measurement systems are calibrated respectively, and after each contour is reconstructed, the two contours are stitched together. The steps for stitching the two contours together are as follows:
[0023] Step W1, Construct a coordinate system: from X c ,Y c Z c The first camera coordinate system is formed by the X axes. c ′,Y c ′,Z c The x-axis forms a second coordinate system, defined by the x-axis. W ,Y W Z W The axes constitute the world coordinate system;
[0024] Step W2, Coordinate System Transformation: The transformation from the world coordinate system to the first camera coordinate system is achieved through the transformation matrix H, that is:
[0025]
[0026] The transformation from the world coordinate system to the second camera coordinate system is achieved through the transformation matrix H. ′ To achieve this, namely:
[0027]
[0028] The transformation from the second camera coordinate system to the first camera coordinate system:
[0029]
[0030] When two line structured light monocular profile measurement systems are used to reconstruct the profile, the two profiles are directly transformed into the same world coordinate system. At this time, the profiles reconstructed by the two line structured light monocular profile measurement systems are automatically in the same plane under the same reference coordinate system, thus realizing the automatic stitching of the profiles.
[0031] As a further aspect of the present invention, the operation steps for optimizing the light stripe by the cropping method are as follows: under non-uniform light conditions, the part of the light stripe image of the object to be tested with strong scattering and reflection is cropped out, and then the outline is restored.
[0032] The light stripe is optimized using an erosion algorithm, where the erosion algorithm is: when A and B are Z... 2 Given two sets, the erosion of A by B is defined as the set... Erosion is the erasure of structural element B around the edge of region A. The result of erosion is to refine the image and remove noise from the outline light stripe image of the object.
[0033] The center pixel extraction algorithm optimizes the light stripe by calculating the center pixel of the thick light stripe in the object outline light stripe image, thereby thinning the light stripe. During the calculation process, noise points that cause errors are identified, thus effectively improving the quality of the light stripe.
[0034] The combination of erosion and dilation algorithms optimizes the light stripes, repairing over-eroded object outline light stripe images and making the light stripes more uniform.
[0035] The technical effects and advantages of this invention, a line structured light profile measurement method for high-speed railway rails, are as follows: Based on laser triangulation technology, a line structured light monocular profile measurement system is built to extract the object profile. A line structured light binocular profile measurement system is then constructed using this monocular system to extract the complete cross-sectional profile. During the extraction process, the overlap and perpendicularity of the light plane can be evaluated, providing a reference for calibrating the light plane. Furthermore, the accuracy of profile extraction is improved by projecting a profile point cloud onto a perpendicular reference plane, thus enabling more precise measurement of rail profile data and providing guidance for railway operation and maintenance. Attached Figure Description
[0036] Figure 1 This is a flowchart illustrating a linear structure optical profile measurement method for high-speed railway rails according to the present invention.
[0037] Figure 2 This is a schematic diagram of the optical plane calibration model of the present invention;
[0038] Figure 3 This is a diagram showing the contour reconstruction result of the interception method of the present invention;
[0039] Figure 4 This is a comparison image of the light streaks before and after corrosion with a corrosion radius of 1 according to the present invention;
[0040] Figure 5 This is a diagram showing the contour restoration result after the light stripe has been processed by the erosion algorithm of this invention;
[0041] Figure 6 This is an evaluation result diagram of the light stripe after processing by the erosion algorithm of this invention;
[0042] Figure 7 This is a light stripe pattern for the present invention when the corrosion radius is 6 and the expansion radius is 6.5.
[0043] Figure 8 This is a contour reconstruction diagram of the present invention when the corrosion radius is 6 and the expansion radius is 6.5.
[0044] Figure 9 This is an evaluation result diagram of the present invention when the corrosion radius is 6 and the expansion radius is 6.5. Detailed Implementation
[0045] The technical solutions of this embodiment will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0046] A method for measuring the profile of line structured light for high-speed railway rails includes the following steps:
[0047] Step 1: Construct a line structured light monocular contour measurement system: Based on laser triangulation technology, extract the object contour, obtain the camera's internal and external parameters as well as the light plane parameters, and iteratively calculate the transformation relationship from the image coordinate system to the world coordinate system to realize the transformation from the two-dimensional light stripe contour to the three-dimensional object contour, that is, extract the object contour.
[0048] Step 2, explore light stripe optimization algorithms: optimize the light stripe using threshold segmentation algorithm, truncation algorithm, erosion algorithm, geometric center method, centroid method, and a combination of erosion and dilation algorithm, and compare the contour restoration results and contour evaluation results after the above algorithms.
[0049] Step 3: Build a dual-line structured light binocular contour measurement system: calibrate the two sets of line structured light monocular contour measurement systems respectively, and after each system restores its contour, stitch the two contours together to obtain the complete object contour.
[0050] In this embodiment of the invention, the steps of extracting the contour of an object using the line structured light monocular contour measurement system are as follows:
[0051] Step Q1, Camera parameter calibration: Take pictures of the HALCON calibration board in different poses, extract the coordinates of the feature points of the HALCON calibration board, use the HALCON program to iteratively calculate the camera parameters, and return the error;
[0052] Step Q2, optical plane parameter calibration: Extract the pose of the HALCON calibration board, turn on the line laser to capture the intersection line, extract the coordinates of the HALCON calibration board pose of the intersection line, fit the optical plane of the base calibration board according to the coordinates of the two intersection lines of the calibration board pose, and obtain the optical plane parameters and error.
[0053] Step Q3, Contour Extraction: Set the pose of the HALCON calibration plate to the world coordinate system, combine camera parameter calibration and light plane parameter calibration, turn on the line laser to project a laser stripe onto the object under test, use the camera to take a picture of the object's contour light stripe, and restore the object's contour from the object's contour light stripe picture.
[0054] Figure 2 This is a schematic diagram of the light plane calibration model. A camera is used to photograph calibration board 1. After the program recognizes calibration board 1, it provides the pose of calibration board 1, thus establishing a rectangular coordinate system with plane 1, where the calibration board is located, as the xoy plane. The camera photographs the intersection line AB of the light plane and plane 1, i.e., the light stripe. Since the light stripe is on plane 1, its coordinates can be extracted. Then, a plane 2, which does not coincide with plane 1, is introduced. Similarly, after calibration board 2 is placed on this plane and recognized by the program, the pose of this plane can also be obtained. The light plane and this plane have an intersection line CD, and the coordinates of this intersection line can also be extracted. The coordinates of the intersection line CD are transformed into plane 1 based on the pose difference between the two planes, resulting in two non-coincident linear point clouds on the same plane in the same coordinate system. When the equation of the light plane is C1x + C2y + C3z = 0, the two linear point clouds are fitted using least squares to obtain C1, C2, and C3, thus obtaining the equation of the light plane.
[0055] In this embodiment of the invention, the HALCON program is used to iteratively calculate the camera parameters, wherein the formula for the iterative calculation is:
[0056]
[0057] In the formula: J(θ) is the objective function of the iteration, N is the number of feature points detected on the calibration board, (u′,v′) are the coordinates of the feature points on the calibration board in actual shooting, and (u,v) are the ideal image coordinates of the feature points on the calibration board.
[0058] In this embodiment of the invention, the positions of the camera and the line laser cannot be changed during the contour extraction process; otherwise, it will lead to incorrect calibration parameters and an incorrect contour light stripe image of the object under test.
[0059] Camera parameter calibration aims to obtain the camera's intrinsic and extrinsic parameters, including focal length, principal point, distortion coefficients, rotation matrix, and translation vector. The results of camera parameter calibration are used to map the image data acquired by the camera to the actual world coordinate system of the object, thereby enabling the measurement of the object's size and position in the image. Light plane parameter calibration aims to obtain relevant parameters of the light plane, including its normal vector and origin coordinates. The light plane is a plane obtained by fitting two intersection lines of a calibration plate and can be used to describe the position and direction of the laser beam in the world coordinate system. The results of light plane parameter calibration are used to map the pixel coordinates of the light stripe in the image to the world coordinate system, thereby mapping the contour points in the image to their positions in the actual world coordinate system. Camera parameter calibration and light plane parameter calibration establish the mapping relationship between image pixel coordinates and the world coordinate system. These mapping relationships are used to accurately extract object contours, facilitating the mapping of points in the image to the object's true size and position. Contour extraction utilizes these mapping relationships to convert the pixel coordinates of the light stripe into the coordinates of the object's contour points, thus achieving accurate contour extraction.
[0060] In this embodiment of the invention, step three involves building a dual-line structured light binocular contour measurement system, calibrating two sets of line structured light monocular contour measurement systems respectively, and reconstructing the contours of each system. The two contours are then stitched together to obtain a complete object contour. The two contours represent two light planes. The two light planes are adjusted to coincide, and the light planes are perpendicular to the object's normal and perpendicular to the ground to obtain a complete object contour.
[0061] In this embodiment of the invention, two light planes are adjusted to coincide, the degree of coincidence of the two light planes is evaluated, the poses of the two light planes are extracted, the distance and normal vectors of the two light planes are calculated, and the angle between the two normal vectors is calculated to evaluate the degree of coincidence of the two light planes. When the distance and the angle between the normal vectors of the two light planes are less than a set threshold, the two light planes are considered to coincide; when the distance and the angle between the normal vectors of the two light planes are greater than or equal to the set threshold, the two light planes will be readjusted.
[0062] In this embodiment of the invention, the light plane is perpendicular to the object's normal and perpendicular to the ground. To evaluate the perpendicularity of the light plane, a ruler is used as an aid to make the light plane perpendicular to the object's normal. A reference plane perpendicular to the ground is established. The distance and angle between the reference plane and the light plane are calculated to determine their perpendicularity. When the distance and angle between the reference plane and the light plane are less than a set threshold, the light plane is perpendicular to the ground. When the distance and angle between the reference plane and the light plane are greater than or equal to the set threshold, the light plane is not perpendicular to the ground and is readjusted.
[0063] In this embodiment of the invention, two sets of line structured light monocular contour measurement systems are calibrated respectively, and after each system reconstructs its contour, the two contours are stitched together. The steps for stitching the two contours together are as follows:
[0064] Step W1, Construct a coordinate system: from X c ,Y c Z c The first camera coordinate system is formed by the X axes. c ′,Y c ′,Z c The x-axis forms a second coordinate system, defined by the x-axis. W ,Y W Z W The axes constitute the world coordinate system;
[0065] Step W2, Coordinate System Transformation: The transformation from the world coordinate system to the first camera coordinate system is achieved through the transformation matrix H, that is:
[0066]
[0067] The transformation from the world coordinate system to the second camera coordinate system is achieved through the transformation matrix H′, that is:
[0068]
[0069] The transformation from the second camera coordinate system to the first camera coordinate system:
[0070]
[0071] When two line structured light monocular profile measurement systems are used to reconstruct the profile, the two profiles are directly transformed into the same world coordinate system. At this time, the profiles reconstructed by the two line structured light monocular profile measurement systems are automatically in the same plane under the same reference coordinate system, thus realizing the automatic stitching of the profiles.
[0072] In this embodiment of the invention, the operation steps for optimizing the light stripe by the cropping method are as follows: under non-uniform light conditions, the part of the light stripe image of the object to be tested with strong scattering and reflection is cropped out, and then the outline is restored.
[0073] Example 1
[0074] The portion of the light stripe with strong scattering and reflection under non-uniform light conditions was clipped out, and the outline was restored. The comparison of the light plane fitting error of the clipping method with the two lighting environments without processing the light stripe is shown in Table 1. It can be seen from the table that the light plane fitting degree is improved, and its quality exceeds that of the light plane fitting degree under uniform light conditions, indicating that the light plane fitting quality has been greatly improved.
[0075] Table 1 Comparison of Fitting Error Values
[0076] Non-uniform light conditions 0.000365604 Uniform light conditions 0.000199677 Cut-off method 0.000151474
[0077] Figure 3 The results of contour reconstruction using the cropping method are shown. While the contour lines are formed, significant noise remains. Calculations show that the noise ratio after non-uniform light processing is 0.1084, and the contour nonlinearity is 0.0615. These figures represent a significant improvement compared to the unprocessed contour extraction results under uniform light (0.1490 noise ratio, 0.1356 nonlinearity). Therefore, it can be concluded that cropping areas with strong local scattering and reflection can effectively improve the quality of the light stripe and enhance the accuracy of contour reconstruction.
[0078] The light stripe is optimized using an erosion algorithm, where the erosion algorithm is: when A and B are Z... 2 Given two sets, the erosion of A by B is defined as the set... Erosion is the erasure of structural element B around the edge of region A. The result of erosion is to refine the image and remove noise from the outline light stripe image of the object.
[0079] Example 1
[0080] HALCON has two built-in erosion operators: circular erosion and rectangular erosion. When using the circular erosion operator, it only has one control parameter: the erosion radius. Since the smallest pixel unit in HALCON's image processing is 0.5 pixels, the erosion radius takes effect in multiples of 0.5. That is, when the erosion radius is set between 0 and 0.5, the results will all be based on an erosion radius of 0.5. To suppress noise, the erosion radius should be set to at least 1 to eliminate clustered noise and avoid damaging the overall structure of the light stripe, such as causing severe deformation or breakage due to excessive erosion. Tests have shown that the deformation of the light stripe is relatively large at erosion radii above 6. Therefore, contour extraction experiments were performed at 0.5 intervals for erosion radii between 1 and 6.
[0081] An etch with a radius of 1 was performed on a light stripe image obtained using an industrial camera under non-uniform lighting. A comparison of the light stripe images before and after etching is shown below. Figure 4 As shown in the comparison, it can be seen that the noise near the light stripe is filtered out, and the thickness distribution of the light stripe is more uniform, and the linearity is also improved.
[0082] The contour restoration result after processing the light stripe using the erosion algorithm is as follows: Figure 5 As shown, the extracted contour has been formed with low noise. The reconstructed light plane contour is evaluated, and the noise ratio of the contour portion is calculated to be 0.0037. The evaluation result after processing the light stripe using the erosion algorithm is as follows. Figure 6As shown in the evaluation graph, the noise ratio is low and the nonlinearity of the contour is 0.1200, indicating that the contour linearity is high. There is a lot of noise in the non-contour part, mainly because the non-contour part is located in the area with strong scattering and reflection, so there is a lot of noise. However, the overall noise ratio is 0.0949.
[0083] The comparison results of the light stripe profile quality evaluation processed by the erosion algorithm with different erosion radii are shown in Table 2. It can be seen that as the erosion radius increases, the fitting degree of the light plane continuously increases, and the noise is completely eliminated starting from the erosion radius of 2.5.
[0084] Table 2 Comparison of light stripe profile quality evaluation for different erosion radii processed by erosion algorithms.
[0085]
[0086]
[0087] The center pixel extraction algorithm optimizes the light stripe by calculating the center pixel of the thick light stripe in the object outline light stripe image, thereby thinning the light stripe. During the calculation process, noise points that cause errors are identified, thus effectively improving the quality of the light stripe.
[0088] Example 2
[0089] During the optimization of the light stripe, it was found that the light stripe began to truncate after the etch radius started at 4.5. At an etch radius of 6, the light stripe exhibited high dispersion and severe damage. To alleviate the damage and further improve the quality of the light stripe, a combination of etch and dilation algorithms was used for optimization. Dilation can mitigate the damage caused by etch and further improve the quality of the light stripe. When the dilation radius was above 6.5, the goodness of fit of the light plane fluctuated around 4.3e-5 to 4.4e-5, and the nonlinearity of the profile remained between 0.045 and 0.050. Figure 7 , 8 Figures 9 show the experimental results when the corrosion radius is 6 and the expansion radius is 6.5. Although there are still a few breaks, the light stripes are uniform and have high integrity.
[0090] When the dilation radius is between 2.5 and 6.5, the fitting degree of the light plane is better than that without dilation, and the nonlinearity of the contour is also better than the experimental results without dilation. When the erosion radius is between 0.5 and 2, the fitting degree of the light plane and the nonlinearity of the contour are similar to the experimental results without dilation. Therefore, setting an appropriate dilation radius can optimize the eroded light stripe image, making the uniformity of the light stripes better, reducing the damage of erosion to the light stripes, improving the fitting degree of the light plane, and increasing the accuracy of contour reconstruction. The combined use of erosion and dilation algorithms, when set with appropriate parameters, not only filters out most of the noise in the light stripes and increases the linearity of the light stripes, but also makes the light stripes more uniform, improving the fitting degree of the light plane and the accuracy of contour reconstruction.
[0091] The combination of erosion and dilation algorithms optimizes the light stripes, repairing over-eroded object outline light stripe images and making the light stripes more uniform.
[0092] Based on laser triangulation technology, a line structured light monocular contour measurement system was built to extract object contours. By constructing a line structured light binocular contour measurement system through the line structured light monocular contour measurement system, a complete cross-sectional contour can be extracted. During the extraction process, the overlap and perpendicularity of the light plane can be evaluated, thus providing a reference for calibrating the light plane. Furthermore, the accuracy of contour extraction is improved by establishing a method of projecting contour point cloud onto a perpendicular reference plane, thereby measuring rail contour data more accurately and providing guidance for railway operation and maintenance.
[0093] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0094] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for measuring the linear structured light profile of high-speed railway rails, characterized in that, Includes the following steps: Step 1: Construct a line structured light monocular contour measurement system: Based on laser triangulation technology, extract the object contour, acquire the camera's intrinsic and extrinsic parameters and the light plane parameters, and iteratively calculate the transformation relationship from the image coordinate system to the world coordinate system to realize the transformation from the two-dimensional light stripe contour to the three-dimensional object contour, i.e., extract the object contour; the specific steps are as follows: Step Q1, Camera parameter calibration: Capture images of the HALCON calibration board in different poses, extract the coordinates of feature points on the HALCON calibration board, use the HALCON program to iteratively calculate the camera parameters, and return the error. The formula for iterative calculation is: ; In the formula: Let the objective function be the iteration function. To calibrate the number of feature points detected on the board, These are the coordinates of the feature points on the calibration board as actually captured in the photograph. The ideal image coordinates for the feature points of the calibration board; Step Q2, optical plane parameter calibration: Extract the pose of the HALCON calibration board, turn on the line laser to capture the intersection line, extract the coordinates of the HALCON calibration board pose of the intersection line, fit the optical plane of the base calibration board according to the coordinates of the two intersection lines of the calibration board pose, and obtain the optical plane parameters and error. Step Q3, Contour Extraction: Set the pose of the HALCON calibration plate to the world coordinate system, perform integrated camera parameter calibration and optical plane parameter calibration, turn on the line laser to project a laser stripe onto the object under test, use the camera to capture an image of the object's contour light stripe, and reconstruct the object's contour from the image of the object's contour light stripe. Step 2, explore light stripe optimization algorithms: optimize the light stripe using threshold segmentation algorithm, truncation algorithm, erosion algorithm, geometric center method, centroid method, and a combination of erosion and dilation algorithm, and compare the contour restoration results and contour evaluation results after the above algorithms. Step 3: Build a dual-line structured light binocular contour measurement system: calibrate the two sets of line structured light monocular contour measurement systems respectively, restore the contours of each system, and then stitch the two contours together to obtain the complete object contour. Two light planes are aligned and their degree of alignment is evaluated. Their poses are extracted, and the distance, normal vector, and angle between them are calculated. If the distance and angle are less than a set threshold, the two light planes are considered aligned. If they are greater than or equal to the set threshold, they need to be readjusted. The light plane is perpendicular to the object's normal and to the ground. The perpendicularity of the light plane is evaluated using a ruler to ensure it is perpendicular to the object's normal. A reference plane perpendicular to the ground is established, and the distance and angle between the reference plane and the light plane are calculated to determine perpendicularity. If the distance and angle are less than a set threshold, the light plane is perpendicular to the ground. If they are greater than or equal to the set threshold, the light plane is not perpendicular to the ground and needs to be readjusted.
2. The method for measuring the linear structured light profile of high-speed railway rails according to claim 1, characterized in that, The positions of the camera and the line laser remain unchanged throughout the contour extraction process.
3. The method for measuring the linear structured light profile of high-speed railway rails according to claim 1, characterized in that, Step 3: Build a dual-line structured light binocular contour measurement system, calibrate the two sets of line structured light monocular contour measurement systems respectively, and restore the contours of each system. Then, stitch the two contours together to obtain the complete object contour. The two contours represent two light planes. Adjust the two light planes to coincide, and make sure that the light planes are perpendicular to the object normal and the ground to obtain the complete object contour.
4. The method for measuring the linear structured light profile of high-speed railway rails according to claim 1, characterized in that, Two sets of line structured light monocular profilometry systems were calibrated separately, and their respective profilographs were reconstructed. The two profilographs were then stitched together. The steps for stitching the two profilographs together are as follows: Step W1, Construct a coordinate system: from The axes form the first camera coordinate system, which is composed of... The axes form a second coordinate system, by The axes constitute the world coordinate system; Step W2, Coordinate System Transformation: The transformation from the world coordinate system to the first camera coordinate system is achieved through a transformation matrix. Implementation, that is: ; The transformation from the world coordinate system to the second camera coordinate system is achieved through a transformation matrix. To achieve this, namely: ; The transformation from the second camera coordinate system to the first camera coordinate system: 。
Citation Information
Patent Citations
Method and device for adjusting laser plane of rail profile measurement system
CN112902869A
Steel rail near laser visual dynamic measuring device and method
CN1776364A