A method and device for automatically matching a rail profile based on a line structured light

By using a line structured light-based automatic rail profile matching method, and leveraging feature acquisition points and an improved ICP algorithm, the problems of noise and deformation interference in rail wear detection were solved, achieving efficient and accurate rail profile matching and wear measurement.

CN115311481BActive Publication Date: 2025-12-16HEFEI JUNDA HI TECH INFORMATION TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210944043.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-05
Publication Date
2025-12-16
Estimated Expiration
2042-08-05

AI Technical Summary

Technical Problem

In existing technologies, rail wear detection methods based on line structured light are prone to breakpoints and noise in the contour point cloud when faced with interference from engine oil, paint, dirt, etc., which makes it impossible for traditional matching algorithms to accurately segment and match, and the ICP algorithm is prone to non-convergence due to initial value deviation.

Method used

An automatic rail profile matching method based on line structured light is adopted. By acquiring the feature acquisition points of the rail profile, coarse matching and fine matching are achieved using initial affine transformation parameters and an improved ICP algorithm. The optimal affine transformation parameters are obtained, and noise and deformation interference are eliminated.

Benefits of technology

It improves the robustness and accuracy of rail profile matching, avoids the non-convergence problem caused by the initial value deviation of the ICP algorithm, and realizes accurate measurement of rail wear.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115311481B_ABST
    Figure CN115311481B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on line structure light rail profile automatic matching method and device, the method includes obtaining rail profile collection point set, based on collection point set obtains first feature collection point;Based on the position relationship of first feature collection point pairing point and preset second feature collection point pairing point in standard profile in first feature collection point, the second feature collection point in the rail profile collection point set is obtained;Based on first feature collection point, second feature collection point, first feature collection point pairing point and second feature collection point pairing point, initial affine transformation parameter is obtained;Based on initial affine transformation parameter, the optimal affine transformation parameter between the point set of rail profile collection point set and standard profile is iteratively searched using ICP algorithm, and the pairing point set of standard profile is obtained under the optimal affine transformation parameter and is matched with the rail profile collection point set.The robustness of rail profile matching is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of rail wear detection, and particularly relates to a rail profile automatic matching method and device based on line structured light. BACKGROUND

[0002] Rail transportation can cause different degrees of wear of the rail, and regular railway line detection and maintenance is needed. In recent years, the non-contact detection technology of the rail based on the line structured laser image vision has replaced the traditional inefficient method of manual caliper measurement, and has become the mainstream means of railway line detection and maintenance.

[0003] Rail matching is a prerequisite for realizing rail wear measurement. According to the inherent characteristic information of the standard rail profile curve and the 2D point cloud information of the line structured light collected profile, the matching and transformation of the actual measurement profile and the standard profile can be realized. The traditional matching algorithm is based on the ideal condition that the visual device is perpendicular to the section of the rail, and the fitting of the circular arc and the curvature is performed based on the feature point information of the circular arc and the straight line of the rail in the dynamic rail wear measurement. However, due to the influence of machine oil, paint, soil and the like, the actual collected profile point cloud will have breakpoints and large fluctuation noise, and the fitting of the circular arc and the curvature fails to accurately segment, and the coarse matching is prone to failure.

[0004] In addition, the traditional ICP algorithm accumulates the minimum distance between the matching points between the measurement profile and the standard profile by continuously adjusting, and since the rail waist bottom is easily blocked by stones or fallen leaves, the distance between the nearest neighbor matching points cannot reach the optimal value, and the algorithm cannot converge. SUMMARY

[0005] In view of the problems existing in the prior art, the present application provides a rail profile automatic matching method and device based on line structured light, which provides a good initial value for the ICP algorithm of fine matching, avoids the problem that the ICP algorithm does not converge due to too large initial value deviation, and specifically comprises the following steps.

[0006] In a first aspect, the present application provides a rail profile automatic matching method based on line structured light, comprising the following steps.

[0007] Obtaining a rail profile collection point set obtained based on line structured light inclined scanning of the rail, and obtaining a first feature collection point based on the collection point set;

[0008] Obtaining a second feature collection point in the rail profile collection point set based on the positional relationship of the first feature collection point and the preset second feature collection point in the standard profile, the first feature collection point and the first feature collection point matching, and the second feature collection point and the second feature collection point matching;

[0009] The initial affine transformation parameter between the rail profile obtained based on the line structured light oblique scanning of the rail and the standard profile is acquired based on a first feature acquisition point and a second feature acquisition point in a point set of the rail profile acquisition points, and a first feature acquisition point matching point and a second feature acquisition point matching point in the standard profile.

[0010] Based on the initial affine transformation parameter, an optimal affine transformation parameter between the point set of the rail profile acquisition points and the point set of the standard profile is searched iteratively by using an ICP algorithm, and a matching point set of the standard profile matched with the point set of the rail profile acquisition points under the optimal affine transformation parameter is acquired.

[0011] In some embodiments, the first feature acquisition point and the first feature acquisition point matching point represent a rail head and rail waist intersection point, and the second feature acquisition point and the second feature acquisition point matching point represent a point in a neighborhood of a rail waist middle breakpoint obtained based on the line structured light oblique scanning of the rail;

[0012] The positional relationship is a distance length relationship;

[0013] The second feature acquisition point in the point set of the rail profile acquisition points is acquired by:

[0014] Based on consistency between a first distance between the first feature acquisition point and the second feature acquisition point and a second distance between the first feature acquisition point matching point and the second feature acquisition point matching point, the second feature acquisition point satisfying the first distance between the first feature acquisition point and the second feature acquisition point being the second distance is searched in the point set of the rail profile acquisition points starting from the first feature point acquisition point.

[0015] In some embodiments, the initial affine transformation parameter between the rail profile obtained based on the line structured light oblique scanning of the rail and the standard profile is acquired based on a first feature acquisition point and a second feature acquisition point in a point set of the rail profile acquisition points, and a first feature acquisition point matching point and a second feature acquisition point matching point in the standard profile, and includes:

[0016] A rigid transformation relationship between a straight line l1 on which the first feature acquisition point and the second feature acquisition point are located and a straight line l2 on which the first feature acquisition point matching point and the second feature acquisition point matching point are located is acquired.

[0017] Based on the rigid transformation relationship, the initial affine transformation parameter between the rail profile obtained based on the line structured light oblique scanning of the rail and the standard profile is determined.

[0018] In some embodiments, the rigid transformation relationship between the straight line l1 and the straight line l2 includes:

[0019] A rotation angle θ satisfies: Wherein α is an inclination angle of the straight line l1, and β is an inclination angle of the straight line l2.

[0020] The rotation matrix is:

[0021] The translation matrix is: where (x B′ , y B′ ) is the first feature acquisition point pair point coordinate, and (x B , y B ) is the first feature acquisition point coordinate.

[0022] In some embodiments, the first feature acquisition point and the second feature acquisition point in the rail profile acquisition point set, the first feature acquisition point pair point and the second feature acquisition point pair point in the standard profile are used to obtain the initial affine transformation parameters between the rail profile obtained by the line structured light inclined scanning of the rail and the standard profile, including:

[0023] The positions of the first feature acquisition point and the second feature acquisition point, and the first feature acquisition point pair point and the second feature acquisition point pair point in the standard profile are optimized and corrected to obtain the first feature acquisition point and the second feature acquisition point after optimization, and the first feature acquisition point pair point and the second feature acquisition point pair point in the standard profile;

[0024] A rigid transformation relationship between the straight line l3 where the first feature acquisition point and the second feature acquisition point are located and the straight line l4 where the first feature acquisition point pair point and the second feature acquisition point pair point are located is obtained;

[0025] The initial affine transformation parameters between the rail profile obtained by the line structured light inclined scanning of the rail and the standard profile are determined based on the rigid transformation relationship;

[0026] The optimization correction method includes:

[0027] In the rail profile obtained by the line structured light inclined scanning of the rail, a first straight line segment formed by extending the first feature acquisition point in the rail top direction by a first preset distance is obtained, and the centroid position of the first straight line segment is taken as the first feature acquisition point after optimization; a second straight line segment formed by extending the second feature acquisition point in the rail bottom direction by a second preset distance is obtained, and the centroid position of the second straight line segment is taken as the second feature acquisition point after optimization;

[0028] In the standard profile, a third straight line segment formed by extending the first feature acquisition point pair point in the rail top direction by a first preset distance is obtained, and the centroid position of the third straight line segment is taken as the first feature acquisition point pair point after optimization; a fourth straight line segment formed by extending the second feature acquisition point pair point in the rail bottom direction by a second preset distance is obtained, and the centroid position of the fourth straight line segment is taken as the second feature acquisition point pair point after optimization;

[0029] The initial affine transformation parameter between the rail profile obtained based on the line structured light inclined scanning of the rail and the standard profile is obtained based on the optimized first feature collection point, the second feature collection point, the first feature collection point pairing point and the second feature collection point pairing point.

[0030] In some embodiments, the rigid transformation relationship between the straight line l3 and the straight line l4 includes:

[0031] The rotation angle θ' satisfies: Wherein α' is the inclination angle of the straight line l3, and β' is the inclination angle of the straight line l4.

[0032] The rotation matrix is:

[0033] The translation matrix is: Wherein, is the coordinate of the optimized first feature collection point pairing point, is the coordinate of the optimized first feature collection point.

[0034] In some embodiments, the initial affine transformation parameter is used to iteratively search the optimal affine transformation parameter between the rail profile collection point set and the point set of the standard profile by using the ICP algorithm, including:

[0035] Let the rail profile collection point set be X0={x i ,y i}, and the whole point set of the standard profile be S={x In the registration process, the point set to be matched is X0 In the registration process, the pairing point set of the standard profile matched with the point set to be matched is SR

[0036] (1) Based on the initial affine transformation parameter, the rail profile X0 is subjected to affine transformation to obtain the updated point set to be matched X

[0037] (2) The nearest point of each point in the point set X a to be matched in the set S is obtained to form the pairing point set SR of the standard profile matched with the point set X a to be matched.

[0038] (3) The affine transformation parameter is updated based on a preset target optimization function, and the target optimization function is based on the distance minimization between the point set X a to be matched after affine transformation and the pairing point set SR.

[0039] (4) The rail profile X a is updated based on the updated affine transformation parameter.

[0040] (5) repeating steps (2)-(4) until a preset maximum number of iterations is reached or a difference between a target optimization function value solved in step (3) and a target optimization function value solved in a last iteration is less than a preset error threshold, obtaining the optimal affine transformation parameter based on an affine transformation parameter in the iteration stop, and obtaining a paired point set of the standard profile matched with the steel rail profile point set under the optimal affine transformation parameter.

[0041] In some embodiments, the preset target optimization function is:

[0042]

[0043] wherein n is a number of points in the to-be-matched point set, R Z and T Z are a first affine parameter matrix and a second affine parameter matrix in the iterative optimization process, respectively,

[0044] In some embodiments, the updating of X a based on the updated affine transformation parameter comprises:

[0045] wherein T xy is a translation matrix, S xy is a scaling matrix, R is a rotation matrix, H is a shear transformation matrix, is a coordinate of the to-be-matched point before the updating, is a coordinate of the to-be-matched point after the updating.

[0046] In a second aspect, the present application provides a device for automatic matching of a steel rail profile based on a line structured light, the device comprising:

[0047] a steel rail profile acquisition data obtaining unit configured to obtain a steel rail profile point set obtained based on a line structured light inclined scanning of a steel rail, and obtain a first feature acquisition point based on the point set;

[0048] an initial to-be-matched feature point obtaining unit configured to obtain a second feature acquisition point in the steel rail profile point set based on a positional relationship of a first feature acquisition point and a preset second feature acquisition point in the standard profile, the first feature acquisition point and the first feature acquisition point matched, and the second feature acquisition point and the second feature acquisition point matched;

[0049] An initial affine transformation parameter unit is configured to obtain initial affine transformation parameters of the rail profile based on the first feature acquisition point and the second feature acquisition point in the rail profile acquisition point set, the first feature acquisition point pair point and the second feature acquisition point pair point in the standard profile, and the rail profile obtained based on the line structured light oblique scanning of the rail.

[0050] A rail profile matching unit is configured to obtain the optimal affine transformation parameters between the rail profile acquisition point set and the point set of the standard profile by using the ICP algorithm to iteratively search the optimal affine transformation parameters based on the initial affine transformation parameters, and obtain the pair point set of the standard profile matched with the rail profile acquisition point set under the optimal affine transformation parameters.

[0051] In some embodiments, the first feature acquisition point and the first feature acquisition point pair point represent the intersection of the rail head and the rail waist, the second feature acquisition point and the second feature acquisition point pair point represent the points in the neighborhood of the rail waist middle breakpoint obtained based on the line structured light oblique scanning of the rail, and the first distance between the first feature acquisition point and the second feature acquisition point is consistent with the second distance between the first feature acquisition point pair point and the second feature acquisition point pair point.

[0052] The rail profile automatic matching method and device based on the line structured light of the present application have the following beneficial effects:

[0053] 1. In the present application, a coarse-to-fine matching strategy is adopted. In the coarse matching process, the coarse matching is quickly completed based on the geometric features, the initial matching feature points are obtained by using the distance invariance of the first feature acquisition point and the second feature acquisition point, and then the initial affine transformation parameters are solved, thereby providing a good initial value for the ICP algorithm fine matching in the next step, and avoiding the problem of ICP algorithm not converging caused by too large initial value deviation.

[0054] 2. In the ICP algorithm fine matching process of the present application, the ICP algorithm is improved, the affine transformation considering multiple transformation matrix parameters is adopted, and the Cauchy penalty factor is added in the target optimization function, thereby realizing the reduction of the influence of vibration, tilt deviation, deformation interference and the like on the measurement, and greatly improving the robustness of the profile matching. BRIEF DESCRIPTION OF DRAWINGS

[0055] Figure 1 is a schematic diagram of the profile structure and features of a standard rail of 60 kg / m;

[0056] Figure 2 is a schematic diagram of the coarse matching feature line segment of the profile of the collected rail of 60 kg / m;

[0057] Figure 3 is a flowchart of the rail profile automatic matching method based on the line structured light in the embodiment of the present application;

[0058] Figure 4Fig. 1 is a schematic diagram of a structure of an automatic matching device for rail profile based on line structured light according to an embodiment of the present application. DETAILED DESCRIPTION

[0059] In the dynamic measurement process, due to track irregularities, vehicle structure and other reasons, random vibration will occur in the vehicle, and the posture of the laser camera assembly relative to the rail will change, so the profile measurement data will also be affected. When the light plane remains perpendicular to the longitudinal direction of the rail, the dynamic profile curve has the same shape as the standard profile curve, only translation and rotation in the same plane; when the two are no longer perpendicular, because the angle at which the light plane "cuts" the rail has changed, the dynamic profile curve will be deformed. How to eliminate the influence of vibration on the measurement data is a key problem to be solved in the dynamic measurement process of the rail profile.

[0060] To solve the above problems, an automatic matching method for rail profile based on line structured light is provided in the embodiments of the present application, which comprises the following steps:

[0061] Step 1: obtaining a set of rail profile collection points obtained by scanning a rail based on line structured light, and obtaining a first feature collection point based on the set of collection points;

[0062] Step 2: obtaining a second feature collection point in the set of rail profile collection points based on the positional relationship between the first feature collection point and a preset second feature collection point in the standard profile, the first feature collection point and the first feature collection point matching, and the second feature collection point and the second feature collection point matching;

[0063] Step 3: obtaining initial affine transformation parameters of the rail profile obtained by scanning the rail based on line structured light and the standard profile based on the first feature collection point and the second feature collection point in the set of rail profile collection points, and the first feature collection point and the second feature collection point in the standard profile;

[0064] Step 4: based on the initial affine transformation parameters, using the ICP algorithm to iteratively search for the optimal affine transformation parameters between the set of rail profile collection points and the set of points of the standard profile, and obtaining a set of matching points of the standard profile under the optimal affine transformation parameters and matched with the set of rail profile collection points.

[0065] In the prior art, rigid body matching based on rail waist double circular arc segmentation is required, but in the actual profile collection process, referring to Figure 1 , Figure 1The feature information of the standard rail of 60 kg / m, the lower half of the rail waist D0, E0, there are shielding conditions such as soil, stones, fallen leaves, etc., in view of the technical problem, the application proposes a method for registering the actual profile collection data under the condition that the lower half of the rail waist cannot collect complete data, specifically, instead of using the rail waist double circular arc for matching, an accurate and stable geometric invariant feature is used, that is, the position relationship invariance based on the first feature collection point and the second feature collection point, that is, the distance between the first feature collection point and the second feature collection point in the rail profile collection point set and the distance between the first feature collection point and the second feature collection point in the standard profile are invariable, and the initial matched point pair is obtained, that is, the initial matched first feature collection point and the first feature collection point, the initial matched second feature collection point and the second feature collection point, and then the initial affine transformation parameter is solved, which effectively simplifies the solving process of the initial affine transformation parameter, and further uses the ICP algorithm (Iterative Closest Point), that is, the nearest point iterative algorithm, to constantly update the affine transformation parameter, realize the solving of the optimal affine transformation parameter, and the matching strategy of first rough and then fine is adopted in the application, first, the geometric feature is used to quickly complete the rough matching, and then the improved affine ICP algorithm is used to realize the fine matching of the rail profile, finally, according to the inherent feature information between the circular arc and the line segment of the standard rail profile, the position matching deviation of the rail feature point is calculated. The method realizes the automatic matching of the rail profile, eliminates the problem of inaccurate matching caused by profile deformation, and improves the robustness of the profile matching.

[0066] In one embodiment, in the above steps 1-3, the first feature collection point and the first feature collection point pair represent the intersection of the rail head and the rail waist, and the second feature collection point and the second feature collection point pair represent the points in the neighborhood of the breakpoint in the middle of the rail waist obtained by tilting scanning the rail based on the line structure light;

[0067] The position relationship in the above step 2 is a distance length relationship;

[0068] Further, the second feature collection point in the above step 2 in the rail profile collection point set comprises:

[0069] Based on the consistency of the first distance between the first feature collection point and the second feature collection point and the second distance between the first feature collection point and the second feature collection point, the first feature point collection point is taken as the starting point to search for the second feature collection point in the rail profile collection point set that satisfies the first distance between the first feature collection point and the second feature collection point is the second distance.

[0070] Referring to Figure 1A standard rail profile can be divided into three parts: rail head, rail web, and rail base. These three parts contain feature points formed by the intersection of straight or curved segments. Point O0 is the rail apex, and points O0 and A30 are located at the rail head and are easily worn. When the scanner is tilted for imaging, it needs to cover as many feature points as possible on one side. In actual tilt imaging, the profile data obtained based on line structured light tilt scanning is as follows: Figure 2 As shown, contour data cannot be collected between point B, the intersection of the rail head and the rail web, and the middle of the rail web, thus forming a breakpoint in the middle of the rail web. In this application, point B, the intersection of the rail head and the rail web, is used as the first feature acquisition point, and the breakpoint in the middle of the rail web is used as the second feature acquisition point. Considering the selection of the second feature acquisition point in the actual acquisition point set, in this embodiment, point C near the breakpoint in the middle of the rail web is used as the second feature acquisition point. Based on the property that the distance between the first feature acquisition point and the second feature acquisition point remains unchanged during the transformation process, a second feature acquisition point that matches the pairing point of the second feature acquisition point in the standard contour is found in the actual rail contour acquisition point set, so as to obtain the initial two pairs of pairing points, and then solve the initial affine transformation parameters based on the two pairs of pairing points.

[0071] For the search of the rail profile acquisition point set starting from the first feature point to find the second feature acquisition point that satisfies the first distance between the first feature acquisition point and the second feature acquisition point being the second distance, the second feature acquisition point can be obtained by drawing a circle with the first feature acquisition point as the starting point and the second distance as the radius, and the intersection of the circle and the profile formed by the rail profile acquisition point set is taken as the second feature acquisition point.

[0072] For step 3 above, in the first embodiment, the method includes the following steps:

[0073] Step a1: Obtain the rigid transformation relationship between the straight line l1 containing the first feature acquisition point and the second feature acquisition point and the straight line l2 containing the paired point of the first feature acquisition point and the paired point of the second feature acquisition point;

[0074] Step a2: Determine the initial affine transformation parameters between the rail profile obtained by tilting the rail based on line structured light and the standard profile based on the rigid transformation relationship.

[0075] In this first embodiment, the rigid transformation relationship between line l1 and line l2 includes:

[0076] The rotation angle θ between lines l1 and l2 satisfies:

[0077]

[0078] Where α is the inclination angle of line l1, and β is the inclination angle of line l2; the coordinates of the first feature acquisition point B are denoted as (x... B yB ), the coordinate of the second feature collection point C is denoted as (x C , y C ), the coordinate of the first feature collection point pairing point B' is denoted as (x B′ , y B′ ), and the coordinate of the second feature collection point pairing point C' is denoted as (x C′ , y C′ );

[0079] The rotation matrix between the straight line l1 and the straight line l2 is as follows:

[0080] The translation matrix between the straight line l1 and the straight line l2 is as follows:

[0081] It can be understood that, in the first implementation, the rigid transformation relationship between the straight line l1 and the straight line l2 is the initial affine transformation parameter between the rail profile obtained based on the line structured light inclined scanning of the rail and the standard profile, that is, the rotation angle θ between the straight line l1 and the straight line l2 is the rotation angle in the initial affine transformation parameter, the rotation matrix between the straight line l1 and the straight line l2 is the rotation matrix in the initial affine transformation parameter, and the translation matrix between the straight line l1 and the straight line l2 is the translation matrix in the initial affine transformation parameter.

[0082] For the above step 3, considering that the actual collection system device is affected by the vibration of the train and the installation precision, there is a large error in the collected first feature collection point and second feature collection point. In the embodiment of the present application, the actual selection process of the first feature collection point, the second feature collection point, the first feature collection point pairing point and the second feature collection point pairing point is optimized. The second implementation of the step 3 is provided. In the second implementation, the step 3 includes the following steps:

[0083] Step b1, the positions of the first feature collection point and the second feature collection point, the first feature collection point pairing point and the second feature collection point pairing point in the standard profile are optimized and corrected to obtain the first feature collection point and the second feature collection point after optimization and the first feature collection point pairing point and the second feature collection point pairing point in the standard profile;

[0084] Step b2, the rigid transformation relationship between the straight line l3 where the first feature collection point and the second feature collection point after optimization are located and the straight line l4 where the first feature collection point pairing point and the second feature collection point pairing point are located is obtained;

[0085] Step b3, the initial affine transformation parameter between the rail profile obtained based on the line structured light inclined scanning of the rail and the standard profile is determined based on the rigid transformation relationship;

[0086] Specifically, the optimization correction method in step b1 includes:

[0087] In step b11, in the rail profile obtained based on the line structured light oblique scanning of the rail, a first straight line segment is formed based on the first feature collection point extending in the rail top direction by a first preset distance, and the centroid position of the first straight line segment is taken as the optimized first feature collection point; a second straight line segment is formed based on the second feature collection point extending in the rail bottom direction by a second preset distance, and the centroid position of the second straight line segment is taken as the optimized second feature collection point.

[0088] In step b12, in the standard profile, a third straight line segment is formed based on the first feature collection point counterpart extending in the rail top direction by a first preset distance, and the centroid position of the third straight line segment is taken as the optimized first feature collection point counterpart; a fourth straight line segment is formed based on the second feature collection point counterpart extending in the rail bottom direction by a second preset distance, and the centroid position of the fourth straight line segment is taken as the optimized second feature collection point counterpart.

[0089] Preferably, the first preset distance in steps b11 and b12 is 10 mm, and the second preset distance is 10 mm.

[0090] In the second implementation of step 3, the rigid transformation relationship between the straight line l3 and the straight line l4 includes:

[0091] The rotation angle θ' between the straight line l3 and the straight line l4 satisfies:

[0092]

[0093] Wherein α' is the inclination angle of the straight line l3, and β' is the inclination angle of the straight line l4.

[0094] The rotation matrix between the straight line l3 and the straight line l4 is:

[0095] The translation matrix between the straight line l3 and the straight line l4 is:

[0096] It can be understood that in the second implementation of step 3, the rigid transformation relationship between the straight line l3 and the straight line l4 is the initial affine transformation parameter between the rail profile obtained based on the line structured light oblique scanning of the rail and the standard profile.

[0097] Based on the second implementation of step 3, the centroid position of the third straight line segment formed by extending the first feature collection point in the rail top direction by a first preset distance is taken as the optimized first feature collection point, and the centroid position of the second straight line segment formed by extending the second feature collection point in the rail bottom direction by a second preset distance is taken as the optimized second feature collection point. Correspondingly, the same optimization processing is performed in the standard contour to realize the optimization of the initial feature points. By taking the centroid of multiple points in a line segment, that is, the midpoint of the line segment, the error can be reduced, and the accuracy of the initial affine transformation parameter can be effectively improved. It can be understood that the ICP algorithm has strong dependence on initial parameters, is prone to local optimization, and has slow convergence speed. In the present application, the optimization of the initial feature points in the coarse matching process and the initial affine transformation parameter solved based on the optimized first feature collection point, the second feature collection point, the first feature collection point pairing point, and the second feature collection point pairing point effectively improve the efficiency of the subsequent ICP algorithm fine matching process.

[0098] The following describes the relationship formula (2) satisfied by the rotation angle θ' between the straight line l3 and the straight line l4:

[0099] Let the first straight line segment, the second straight line segment, the third straight line segment, and the fourth straight line segment be L B , L C , L B0 , and L B0 , respectively. Let the centroids of L B , L C , L B0 , and L B0 be B1, C1, B1', and C1', respectively, that is, the optimized first feature collection point, the second feature collection point, the first feature collection point pairing point, and the second feature collection point pairing point are B1, C1, B1', and C1', respectively. Let the coordinates of B1 be the coordinates of C1 be the coordinates of B1' be and the coordinates of C1' be

[0100] Then, the conversion relationship between B1 and B1', and C1 and C1' is as follows:

[0101]

[0102]

[0103] From formulas (4)-(3), we have

[0104]

[0105] That is:

[0106]

[0107] Solving the above equation (3) can obtain

[0108]

[0109] Using Simplifying the above equation (6), the rotation angle θ' satisfies:

[0110]

[0111] Wherein,

[0112] Based on the above equation (2) to solve θ', can be further obtained:

[0113] The rotation matrix between the straight line l3 and the straight line l4 is:

[0114] Combined with the above formula (3), the translation matrix between the straight line l3 and the straight line l4 can be obtained:

[0115] It can be understood that the acquisition process of the above relationship (1) is similar to the acquisition process of the above relationship (2), which will not be repeated here.

[0116] In the present application, by using the first feature collection point and the second feature collection point in the initial affine transformation parameter solving process, the geometric characteristics that the distance between the first feature collection point and the second feature collection point is invariant in the affine transformation process are used, the calculation of the initial affine transformation parameter solving process is effectively simplified, the efficiency and accuracy of the initial affine transformation parameter solving are improved, a better initial parameter is provided for the next step using ICP algorithm, and local convergence in the next step using ICP algorithm for fine registration process is avoided.

[0117] In one embodiment, in the above step 4, based on the initial affine transformation parameter, the ICP algorithm is used to iteratively search for the optimal affine transformation parameter between the steel rail profile collection point set and the point set of the standard profile, comprising the following steps:

[0118] Let the steel rail profile collection point set be X0={x i ,y i}, and the whole point set of the standard profile be In the registration process, the point set to be matched is In the registration process, the matching point set of the standard profile matched with the point set to be matched is

[0119] (1) Based on the initial affine transformation parameter, the X0 is subjected to affine transformation to obtain the updated point set to be matched

[0120] (2) Obtain the nearest point of each point in the set X a in the set S, forming a matched point set SR a of the standard profile matched with the set X

[0121] (3) Update the affine transformation parameter based on a preset target optimization function, the target optimization function being based on the set X a and the set SR after the affine transformation, and the distance minimization between the set X

[0122] (4) Update the set X a based on the updated affine transformation parameter;

[0123] (5) Repeat steps (2)-(4) until a preset maximum iteration number is reached or a difference between a target optimization function value solved in step (3) and a target optimization function value solved in a last iteration number is less than a preset error threshold, obtain the optimal affine transformation parameter based on the affine transformation parameter in the iteration stop, and obtain a matched point set SR of the standard profile registered with the rail profile point set under the optimal affine transformation parameter.

[0124] It can be understood that in the iteration process, the set X a is constantly updated, the affine transformation parameter is constantly updated, and the matched point set SR of the standard profile matched with the set X a searched in step (2) is constantly changed until the iteration is stopped, the optimal affine transformation parameter is obtained, and the most accurate matched point set SR in the standard profile is obtained, thereby realizing the registration of the rail profile scanning data and the standard profile data.

[0125] It can be understood that the entire point set of the standard profile is S Suppose there are N points in S, then the set SR obtained in each iteration is a subset of the entire point set S of the standard profile, and the points in the set SR are part of the N points in the point set S.

[0126] The ICP algorithm iteration process in steps (1)-(5) is further described.

[0127] In the prior art, rigid transformation is considered for rail profile transformation, the rotation matrix parameter and the translation matrix parameter are considered in the transformation parameter, after the rotation matrix R c and the translation matrix T c are given, the ICP algorithm is used and the following formula (7) is used to constantly iterate to find the optimal rotation matrix Ra and translation matrix T a , so that the objective function meets the exit condition or exceeds the set number of iterations, obtaining the optimal affine transformation parameter, wherein In each iteration update process, the three variables θ, t x , t y are iteratively optimized until convergence.

[0128]

[0129] In the embodiment of the application, based on the initial affine transformation parameter solved above, an improved ICP algorithm is used in the further fine matching process in the ICP algorithm, and the improvement includes two aspects:

[0130] On the one hand, the transformation parameters in the process are considered to be rotation, translation, scaling and shearing four transformation matrix parameters, and in the iterative solving process, not the three variables θ, t x , t y are iteratively optimized, but six variables including rotation, translation, scaling and shearing parameters are iteratively optimized, that is, in the improved ICP algorithm in the embodiment of the application, the transformation matrix solved by each iteration includes R z and T z , wherein R z is a first affine parameter matrix fused based on the scaling matrix S xy , the rotation matrix R and the shearing transformation matrix H, T z solved by each iteration is recorded as a second affine parameter matrix, That is, in each iteration optimization process in the embodiment of the application, six transformation parameters r 11 , r 12 , r 21 , r 22 , t x , t y are iteratively optimized by a nonlinear optimization method, and it can be understood that the in the embodiment of the application is different from the above .

[0131] In another aspect, the present application considers that the actually collected measurement profile data points are often contaminated by noise, and the statistical distribution of the noise is relatively complex. In order to solve this problem and enhance the robustness of outliers in the iterative optimization process, the target optimization function in the ICP iterative algorithm is improved in the embodiments of the present application. A robust kernel function is used for noise reduction in the nonlinear optimization process, and a Cauchy loss function is added to the iterative optimization process to increase the penalty factor c of the noise term, so as to suppress the mixed large noise in the actual data, improve the matching accuracy of the measurement profile, and the improved target optimization function is shown in the following formula (8):

[0132]

[0133] Wherein, n is the number of points in the point set to be matched, R z and T z are the first affine parameter matrix and the second affine parameter matrix in the iterative optimization process, respectively,

[0134] On the basis of the above, the improved ICP algorithm in the embodiments of the present application is used to perform the iterative optimization process of the above steps (1)-(5), wherein step (4) is based on the updated affine transformation parameter, and X a is updated, and the update formula is:

[0135] Wherein, T xy is the transformation translation matrix, S xy is the scaling matrix, R is the rotation matrix, and H is the shear transformation matrix, is the coordinate of the point to be matched before updating, is the coordinate of the point to be matched after updating. It can be understood that R z is the first affine parameter matrix fused based on the scaling matrix S xy , the rotation matrix R and the shear transformation matrix H, and T z is obtained based on the transformation translation matrix T xy .

[0136] The embodiments of the present application also provide an automatic matching device for rail profile based on line structured light, which comprises:

[0137] A rail profile collection data acquisition unit is configured to acquire a rail profile collection point set obtained based on line structured light inclined scanning of a rail, and acquire a first feature collection point based on the collection point set;

[0138] The initial feature point to be matched acquisition unit is configured to acquire second feature collection points in the rail profile collection point set based on the position relationship of the first feature collection point and the preset second feature collection point matching point in the standard profile, the first feature collection point and the first feature collection point matching point are matched, and the second feature collection point and the second feature collection point matching point are matched.

[0139] The initial affine transformation parameter unit is configured to acquire initial affine transformation parameters of the rail profile obtained based on the line structured light inclined scanning rail and the standard profile based on the first feature collection point and the second feature collection point in the rail profile collection point set and the first feature collection point matching point and the second feature collection point matching point in the standard profile.

[0140] The rail profile matching unit is configured to search for optimal affine transformation parameters between the rail profile collection point set and the point set of the standard profile based on the initial affine transformation parameters by using an ICP algorithm, and acquire a matching point set of the standard profile matched with the rail profile collection point set under the optimal affine transformation parameters.

[0141] Specifically, the first feature collection point and the first feature collection point matching point represent the intersection of the rail head and the rail waist, the second feature collection point and the second feature collection point matching point represent points in the neighborhood of the midpoint breakpoint in the rail waist based on the line structured light inclined scanning rail, and the first distance between the first feature collection point and the second feature collection point is consistent with the second distance between the first feature collection point matching point and the second feature collection point matching point.

[0142] It can be understood that the rail profile automatic matching device based on the line structured light provided in the embodiments of the present application and the rail profile automatic matching method based on the line structured light provided in the above embodiments belong to the same concept, and the specific implementation process is described in detail in the method embodiments, which will not be described here.

[0143] The rail profile automatic matching device in the embodiments of the present application, wherein each unit can be realized by software, hardware and combinations thereof, and the above units can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in the form of software, so as to be called and executed by the processor to perform the operations corresponding to the above units.

[0144] In addition, the rail profile automatic matching device provided in the embodiments of the present application only divides the above modules for example when matching the rail profile collection point set and the standard profile, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0145] The present application is not limited to the above-described specific embodiments, and various modifications made by those skilled in the art based on the above-described concept without creative labor fall within the scope of the present application.

Claims

1. A method for automatic matching of rail profiles based on line structured light, characterized in that, include: A set of rail contour acquisition points obtained by tilting the rail with line structured light is acquired, and a first feature acquisition point is obtained based on the acquisition point set. Based on the positional relationship between the first feature acquisition point pairing point and the preset second feature acquisition point pairing point in the standard contour, the second feature acquisition point in the rail contour acquisition point set is obtained. The first feature acquisition point and the first feature acquisition point pairing point are matched, and the second feature acquisition point and the second feature acquisition point pairing point are matched. The initial affine transformation parameters of the rail profile and the standard profile obtained by tilting the rail based on the first and second feature acquisition points in the rail profile acquisition point set, and the pairing points of the first and second feature acquisition points in the standard profile are obtained. Based on the initial affine transformation parameters, the optimal affine transformation parameters between the rail profile acquisition point set and the standard profile point set are iteratively searched using the ICP algorithm, and the pairing point set of the standard profile registered with the rail profile acquisition point set under the optimal affine transformation parameters is obtained. The first feature acquisition point and its pairing point represent the intersection of the rail head and the rail web; the second feature acquisition point and its pairing point represent the points in the neighborhood of the rail web mid-section breakpoint obtained by tilting the rail using line structured light; the positional relationship is a distance-length relationship; obtaining the second feature acquisition point in the rail profile acquisition point set includes: based on the consistency between the first distance between the first feature acquisition point and the second feature acquisition point and the second distance between the pairing point and the pairing point, searching the rail profile acquisition point set for a second feature acquisition point that satisfies the first distance between the first feature acquisition point and the second feature acquisition point being the second distance, starting from the first feature acquisition point; The step of iteratively searching for the optimal affine transformation parameters between the rail profile acquisition point set and the standard profile point set using the ICP algorithm based on the initial affine transformation parameters includes: Let the set of points for collecting the rail profile be X0 = {x i ,y i The complete set of points for the standard profile is} The set of points to be matched during the registration process The pairing point set of the standard contour that matches the set of points to be matched during the registration process is: (1) Based on the initial affine transformation parameters, perform an affine transformation on X0 to obtain the updated set of points to be matched. (2) Obtain the set of points to be matched X a The nearest neighbor of each point in set S forms a set X of points to be matched. a The set of paired points for the matched standard contour is (3) Update the affine transformation parameters based on the preset target optimization function, which is based on the set of points to be matched X. a The distance between the point set after affine transformation and the paired point set SR is minimized to determine the outcome. (4) Based on the updated affine transformation parameters, for X a Update; (5) Repeat steps (2)-(4) until the preset maximum number of iterations is reached or the difference between the target optimization function value obtained in step (3) and the target optimization function value obtained in the previous iteration is less than the preset error threshold. Based on the affine transformation parameters when the iteration stops, obtain the optimal affine transformation parameters and obtain the pairing point set of the standard profile registered with the rail profile acquisition point set under the optimal affine transformation parameters. The preset objective optimization function is: Where c is the penalty factor, n is the number of points in the set of points to be matched, and R z and T z The first affine in the iterative optimization process Parameter matrix and second affine parameter matrix, 2. The method for automatic matching of rail profile based on line structured light according to claim 1, characterized in that, The initial affine transformation parameters of the rail profile obtained by tilting the rail based on line structured light scanning of the rail are obtained from the first and second feature acquisition points in the rail profile acquisition point set, and the paired points of the first and second feature acquisition points in the standard profile. These parameters include: Obtain the rigid transformation relationship between the straight line l1 containing the first feature acquisition point and the second feature acquisition point and the straight line l2 containing the paired points of the first feature acquisition point and the paired points of the second feature acquisition point; Based on the rigid transformation relationship, the initial affine transformation parameters between the rail profile obtained by tilting the rail based on line structured light and the standard profile are determined.

3. The method for automatic matching of rail profile based on line structured light according to claim 2, characterized in that, The rigid transformation relationship between line l1 and line l2 includes: The rotation angle θ satisfies: Where α is the inclination angle of line l1 and β is the inclination angle of line l2; The rotation matrix is: The translation matrix is: Where (x) B′ y B′ (x) represents the coordinates of the paired point of the first feature acquisition point. B y B () represents the coordinates of the first feature acquisition point.

4. The method for automatic matching of rail profiles based on line structured light according to claim 1, characterized in that, The initial affine transformation parameters of the rail profile obtained by tilting the rail based on line structured light scanning of the rail are obtained from the first and second feature acquisition points in the rail profile acquisition point set, and the paired points of the first and second feature acquisition points in the standard profile. These parameters include: The positions of the first feature acquisition point and the second feature acquisition point, as well as the paired points of the first feature acquisition point and the second feature acquisition point in the standard contour, are optimized and corrected to obtain the optimized first feature acquisition point and the second feature acquisition point, as well as the paired points of the first feature acquisition point and the second feature acquisition point in the standard contour. Obtain the rigid transformation relationship between the optimized straight line l3 containing the first and second feature acquisition points and the straight line l4 containing the paired points of the first and second feature acquisition points; Based on the rigid transformation relationship, the initial affine transformation parameters between the rail profile obtained by the line structure light tilt scanning of the rail and the standard profile are determined. The optimization and correction method includes: In the rail profile obtained by tilting the rail based on line structured light, a first straight line segment is obtained by extending a first preset distance along the rail top direction based on a first feature acquisition point, and the centroid position of the first straight line segment is used as the optimized first feature acquisition point; a second straight line segment is obtained by extending a second preset distance along the rail bottom direction based on a second feature acquisition point, and the centroid position of the second straight line segment is used as the optimized second feature acquisition point. In the standard profile, a third straight segment is formed by extending a first preset distance along the rail top direction based on the pairing point of the first feature acquisition point, and the centroid position of the third straight segment is used as the optimized pairing point of the first feature acquisition point; a fourth straight segment is formed by extending a second preset distance along the rail bottom direction based on the pairing point of the second feature acquisition point, and the centroid position of the fourth straight segment is used as the optimized pairing point of the second feature acquisition point. Based on the optimized first feature acquisition point, second feature acquisition point, first feature acquisition point pairing point, and second feature acquisition point pairing point, the initial affine transformation parameters between the rail profile obtained by tilting the rail based on line structured light and the standard profile are obtained.

5. The automatic matching method for the profile of a linear structured light rail according to claim 4, characterized in that, The rigid transformation relationship between line l3 and line l4 includes: The rotation angle θ′ satisfies: Where α′ is the inclination angle of line l3, and β′ is the inclination angle of line l4; The rotation matrix is: The translation matrix is: in, The coordinates of the first feature acquisition point paired with the optimized coordinates. The coordinates of the first feature acquisition point after optimization.

6. The automatic matching method for rail contours based on line structured light according to claim 1, characterized in that, The updated affine transformation parameters are applied to X. a Updates will be made, including: Among them, T xy To transform the translation matrix, S xy Let R be the scaling matrix, R be the rotation matrix, and H be the shearing transformation matrix. The coordinates of the points to be matched before the update. These are the updated coordinates of the points to be matched.

7. An automatic matching device for the profile of a linear structured light rail according to any one of claims 1-6, characterized in that, The device includes: A rail profile acquisition data acquisition unit is used to acquire a set of rail profile acquisition points obtained by tilting the rail based on line structured light scanning, and to acquire a first feature acquisition point based on the acquisition point set. The initial feature point acquisition unit is used to acquire the second feature acquisition point in the rail profile acquisition point set based on the positional relationship between the first feature acquisition point pairing point and the preset second feature acquisition point pairing point in the standard profile. The first feature acquisition point and the first feature acquisition point pairing point are matched, and the second feature acquisition point and the second feature acquisition point pairing point are matched. The initial affine transformation parameter unit is used to obtain the initial affine transformation parameters of the rail profile and the standard profile obtained by tilting the rail based on the first and second feature acquisition points in the rail profile acquisition point set, and the pairing points of the first and second feature acquisition points in the standard profile. The rail profile matching unit is used to iteratively search for the optimal affine transformation parameters between the rail profile acquisition point set and the standard profile point set using the ICP algorithm based on the initial affine transformation parameters, and to obtain the pairing point set of the standard profile registered with the rail profile acquisition point set under the optimal affine transformation parameters.

Citation Information

Patent Citations

  • 3D profile measuring instrument installation and debugging method and device

    CN113465531A

  • Aviation blade cross section molded line contour parameter evaluation method and system

    CN113591236A