Rail profile matching method, system and electronic device

By extracting rail feature points using RDP and an improved Hough transform method, and combining the transform matrix for rail profile matching, the problems of low matching accuracy and slow speed in existing technologies are solved, achieving more efficient rail profile detection.

CN117830240BActive Publication Date: 2026-08-04BEIJING JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING JIAOTONG UNIV
Filing Date
2023-12-25
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

Existing rail profile matching methods are susceptible to interference and noise due to lighting conditions, have low matching accuracy, and are slow to calculate, which cannot meet the needs of modern railway development.

Method used

The RDP method is used to extract feature points of the web feature segments of the rail to be inspected, and the second center is determined by the improved Hough transform method. The transformation matrix is ​​then used for matching, which reduces the number of point sets in the feature segments, reduces the impact of noise, and improves the calculation speed and accuracy.

Benefits of technology

It significantly improves the accuracy and calculation speed of rail profile matching, and can better meet the inspection needs of modern railways.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117830240B_ABST
    Figure CN117830240B_ABST
Patent Text Reader

Abstract

This invention discloses a rail profile matching method, system, and electronic equipment, relating to the field of rail profile detection. The invention employs the RDP method to extract feature points from the web feature segments of the rail to be detected, which reduces the number of point sets in the feature segments, preserves variation features as much as possible, and thus improves computational speed. An improved Hough transform method is used to determine the second center based on the extracted feature points, which reduces the impact of rail wear deformation and detection noise on the search. The matching of the rail profile to be detected is completed based on the transformation matrix determined by the first and second centers, significantly improving the accuracy of rail profile matching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of rail profile inspection, and in particular to a rail profile matching method, system and electronic equipment. Background Technology

[0002] To date, there are two main methods for geometric measurement of rail profile damage: contact measurement and non-contact measurement. Contact measurement mainly uses mechanical contact methods, which are widely used in railway systems, but suffer from low measurement accuracy and high labor intensity, failing to meet the needs of current railway development. Non-contact measurement methods, on the other hand, use laser profile sensors to collect rail surface data, establishing and transforming data point coordinates to form the track profile. This new detection technology boasts high automation, high accuracy, and fast detection speed, better adapting to the needs of modern railway development.

[0003] However, laser profile sensors are often installed at a specific angle to the track centerline to cover more rail features. Therefore, the detected rail profile cannot be directly compared and calculated with a standard rail profile. Profile matching calculations between the detected rail profile and the standard rail profile are required. Accurate profile matching is fundamental to rail wear detection and track geometry parameter calculations.

[0004] Commonly used profile matching methods mainly include the double-circle feature method and the nearest-point iteration method. The double-circle feature method primarily uses the characteristic arcs of the rail web to search for the center using the least squares method and calculates the transformation matrix to achieve profile matching. The nearest-point iteration method generally requires determining the similarity metric between the detected rail profile and the standard rail profile. By setting initial transformation matrix parameters, i.e., the corresponding rotation angles and translations, iteratively searches for the transformation matrix that maximizes the similarity between the detected rail profile and the standard rail profile. However, these two commonly used methods have the following drawbacks:

[0005] 1. Laser profile acquisition is easily affected by lighting conditions, inevitably introducing interference noise into various parts and damaging the inherent characteristics of the rail profile. The matching accuracy of the two methods mentioned above is easily reduced due to this situation.

[0006] 2. Because the sampling intervals for the detected rail profile and the standard rail profile are not the same, the data points of the two are not completely corresponding, and the matching results cannot be fully reflected by similarity, which limits the accuracy of the nearest point iteration method.

[0007] 3. Both the least squares method and the nearest point iteration method involve iterative calculation to find the optimal point, which often reduces the calculation speed. Summary of the Invention

[0008] To address the aforementioned problems in the existing technology, this invention provides a rail profile matching method, system, and electronic device.

[0009] To achieve the above objectives, the present invention provides the following solution:

[0010] A method for matching rail profiles includes:

[0011] The standard rail profile is segmented to obtain rail web feature segments, and the first center is determined; the first center is the center of the rail web feature segments of the standard rail profile.

[0012] Acquire the profile data of the rail to be inspected, and preprocess the profile data;

[0013] The curvature value of each data point is determined based on the preprocessed profile data.

[0014] Based on the curvature value, the rail web feature segment is obtained by segmenting the profile of the rail to be detected;

[0015] The RDP method is used to extract feature points of the web feature segment of the rail to be inspected;

[0016] An improved Hough transform method is used to determine the second circle center based on the extracted feature points; the second circle center is the center of the web feature segment of the rail profile to be detected;

[0017] Determine the transformation matrix based on the first circle center and the second circle center;

[0018] The profile of the rail to be detected is matched based on the transformation matrix.

[0019] Optionally, the standard rail profile is segmented to obtain rail web feature segments, and the first circle center is determined, specifically including:

[0020] The rail web feature segment is obtained by segmenting the standard rail profile based on the curvature threshold.

[0021] The center of the web feature segment of the standard rail profile is determined using the least squares method, thus obtaining the first center.

[0022] Optionally, the profile data is preprocessed, specifically including:

[0023] Outliers in the profile data are filtered out using a point cloud radius filter.

[0024] Density clustering was used to separate the rail head and rail web based on the profile data after outlier removal;

[0025] The Loess algorithm is used to smooth the profile data after outlier removal based on the separated rail head and rail web, and cubic spline interpolation is performed on the profile data after outlier removal to obtain the preprocessed profile data.

[0026] Optionally, the formula for determining the curvature value is:

[0027]

[0028] In the formula, C is the curvature value, α is the angle between vectors A1A2 and A2A3, ||A1-A2|| is the Euclidean distance between data point A1 and data point A2, and ||A2-A3|| is the Euclidean distance between data point A2 and data point A3.

[0029] Optionally, the rail web feature segment is obtained by segmenting the rail profile to be detected based on the curvature value, specifically including:

[0030] The curvature curve of the rail profile to be tested is determined based on the curvature value;

[0031] The curvature threshold is determined by the design curvature of the web feature segment based on the standard rail profile and the curvature curve.

[0032] Based on the curvature threshold, the rail web feature segment is obtained by segmenting the profile of the rail to be detected.

[0033] Optionally, an improved Hough transform method is used to determine the second circle center based on the extracted feature points, specifically including:

[0034] The feature points are transformed into Hough space according to the curvature of the arc in which they are located;

[0035] Search for the set of points with the highest density in the Hough space;

[0036] The average value of the set of points with the highest density in the Hough space is taken as the second center.

[0037] Optionally, searching the set of points with the highest density in the Hough space specifically includes:

[0038] Determine the normalized distance of the point in the Hough space;

[0039] Obtain the number of points in the Hough space whose normalized distance is less than a set distance threshold, and the total number of points in the Hough space;

[0040] The density of points in the Hough space is determined by the number of points whose normalized distance is less than a set distance threshold and the total number of points in the Hough space.

[0041] Obtain the point with the highest density and the set of neighboring points of the point with the highest density to obtain the set of points with the highest density.

[0042] Optionally, determining the transformation matrix based on the first circle center and the second circle center specifically includes:

[0043] The rotation angle and translation amount are determined based on the first center and the second center;

[0044] The angle value of the rotation angle is determined based on the direction of rotation;

[0045] The transformation matrix is ​​obtained based on the angle value and the translation amount.

[0046] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0047] This invention uses the RDP method to extract feature points from the web feature segments of the rail to be detected, which can reduce the number of point sets in the feature segments, preserve the changing features as much as possible, and thus improve the calculation speed. The improved Hough transform method is used to determine the second circle center based on the extracted feature points, which can reduce the impact of rail wear deformation and detection noise on the search, and thus significantly improve the matching accuracy.

[0048] Furthermore, the present invention provides a rail profile matching system, the system being used to implement the rail profile matching method provided above; the system includes:

[0049] The first center determination module is used to segment the standard rail profile to obtain rail web feature segments and determine the first center; the first center is the center of the rail web feature segment of the standard rail profile.

[0050] The data preprocessing module is used to acquire the profile data of the rail to be inspected and to preprocess the profile data.

[0051] The curvature value determination module is used to determine the curvature value of each data point based on the preprocessed profile data;

[0052] The rail profile segmentation module is used to segment the rail profile to be detected based on the curvature value to obtain rail web feature segments.

[0053] The feature point extraction module is used to extract feature points of the web feature segments of the rail to be inspected using the RDP method;

[0054] The second circle center determination module is used to determine the second circle center based on the extracted feature points using an improved Hough transform method; the second circle center is the center of the web feature segment of the rail profile to be detected;

[0055] A transformation matrix determination module is used to determine a transformation matrix based on the first circle center and the second circle center;

[0056] The profile matching module is used to match the profile of the rail to be detected based on the transformation matrix.

[0057] Furthermore, the present invention also provides an electronic device comprising:

[0058] Memory, used to store computer programs;

[0059] A processor, connected to the memory, is used to retrieve and execute the computer program to implement the rail profile matching method provided above.

[0060] Since the technical effects achieved by the system and electronic equipment provided by the present invention are the same as those achieved by the rail profile matching method provided by the present invention, they will not be described again here. Attached Figure Description

[0061] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0062] Figure 1 This is a flowchart of the rail profile matching method provided in Embodiment 1 of the present invention;

[0063] Figure 2 This is a flowchart of the rail profile matching method provided in Embodiment 2 of the present invention;

[0064] Figure 3 A cross-sectional view of a 60kg / m rail provided for an embodiment of the present invention;

[0065] Figure 4 A standard 60kg / m rail profile diagram provided for embodiments of the present invention;

[0066] Figure 5 A diagram showing the relative position of the laser profile sensor and the rail provided in an embodiment of the present invention;

[0067] Figure 6 The detection profile diagram provided in the embodiments of the present invention;

[0068] Figure 7 The rail waist curvature curve diagram provided for embodiments of the present invention;

[0069] Figure 8 A feature segment and feature point diagram of the rail web with a radius of 200mm provided for an embodiment of the present invention;

[0070] Figure 9A feature segment and feature point diagram of the rail web with a radius of 400 mm provided for embodiments of the present invention;

[0071] Figure 10 This is a graph of Hough space intersections and the set of points with maximum density provided in an embodiment of the present invention;

[0072] Figure 11 The matching profile of the rail to be detected and the standard rail profile are provided for embodiments of the present invention. Detailed Implementation

[0073] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0074] The purpose of this invention is to provide a rail profile matching method, system, and electronic device that can significantly improve matching accuracy while increasing calculation speed.

[0075] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0076] Example 1

[0077] like Figure 1 As shown, the rail profile matching method provided in this embodiment includes:

[0078] Step 100: Segment the standard rail profile to obtain the rail web feature segment and determine the first circle center. The first circle center is the center of the rail web feature segment of the standard rail profile.

[0079] In practical applications, the rail web portion of a standard rail profile consists of two arcs with fixed curvature, while the rest is line segments. These two arcs with fixed curvature are considered characteristic arcs and are called rail web characteristic segments. The rail web characteristic segments referred to below are the two characteristic arc segments obtained by dividing the rail web portion of the standard profile using a curvature threshold. Based on this, the first center can be obtained by calculating and recording the centers of these two rail web characteristic segments in the standard rail profile using the least squares method.

[0080] Step 101: Obtain the profile data of the rail to be inspected and preprocess the profile data.

[0081] In practical applications, this step can be implemented as follows:

[0082] (1) Use a point cloud radius filter to filter out outliers in the profile data.

[0083] (2) The density clustering method is used to separate the rail head and rail waist based on the profile data after filtering out outliers.

[0084] (3) The Loess algorithm is used to smooth the profile data after filtering out outliers based on the separated rail head and rail waist, and cubic spline interpolation is performed on the profile data after filtering out outliers to obtain the preprocessed profile data.

[0085] Step 102: Determine the curvature value of each data point based on the preprocessed profile data.

[0086] In practical applications, curvature estimation methods can be used to calculate the curvature value of each point in the rail profile data to be inspected, thus forming the curvature curve of the rail profile data. Assuming three adjacent points are A1(x1, y1), A2(x2, y2), and A3(x3, y3), the formula for estimating the curvature value of point A2 is:

[0087]

[0088] In the formula, C is the curvature value, α is the angle between vectors A1A2 and A2A3, ||A1-A2|| is the Euclidean distance between data point A1 and data point A2, and ||A2-A3|| is the Euclidean distance between data point A2 and data point A3.

[0089] Step 103: Segment the profile of the rail to be detected based on the curvature value to obtain the rail web feature segment.

[0090] In practical applications, this step can be implemented as follows:

[0091] (1) Determine the curvature curve of the rail profile to be tested based on the curvature value.

[0092] (2) The curvature threshold is determined by designing the curvature of the web feature segment based on the standard rail profile and the curvature curve.

[0093] (3) Obtain rail web feature segments based on curvature threshold segmentation of the rail profile to be detected. Specifically, the curvature curve of the rail web is compared with the curvature threshold, and the part of the rail web that meets the curvature threshold is segmented to obtain the rail web feature segments of the rail profile to be detected that correspond to the rail web feature segments in the standard rail profile.

[0094] Step 104: Use the RDP method to extract feature points of the web feature segment of the rail to be inspected.

[0095] Step 105: Determine the second center of the circle based on the extracted feature points using an improved Hough transform method. The second center of the circle is the center of the web feature segment of the rail profile to be detected.

[0096] In practical applications, this step can be implemented as follows:

[0097] (1) Transform the feature points to Hough space according to the curvature of the arc in which they are located.

[0098] (2) Search for the set of points with the highest density in the Hough space, specifically:

[0099] (2-1) Determine the normalized distance of a point in Hough space.

[0100] (2-2) Obtain the number of points in the Hough space whose normalized distance is less than the set distance threshold and the total number of points in the Hough space.

[0101] (2-3) The density of points in the Hough space is determined by the number of points whose normalized distance is less than a set distance threshold and the total number of points in the Hough space. The density of points in the Hough space is D:

[0102]

[0103] In the formula, N is the number of points in the Hough space. d<threshold Let d be the number of points in the Hough space whose normalized distance d is less than a set distance threshold. max This represents the maximum distance from a point to a set of neighboring points.

[0104] (2-4) Obtain the point with the highest density and the set of neighboring points of the point with the highest density to obtain the set of points with the highest density.

[0105] (3) The average value of the point set with the highest density in the Hough space is used as the second center.

[0106] Step 106: Determine the transformation matrix based on the first and second circle centers.

[0107] In practical applications, this step can be implemented as follows:

[0108] (1) Determine the rotation angle and translation amount based on the first and second circle centers. Assume that the centers of the two rail web feature segments of the standard rail profile are SC1 and SC2, and the centers of the two rail web feature segments of the rail profile to be tested are C1 and C2. Since center SC1 corresponds to the same feature circle on the rail profile as center C1, and center SC2 corresponds to the same feature circle as center C2, the rotation angle and translation amount are respectively:

[0109]

[0110]

[0111] In the formula, θ is the rotation angle, (Tx ,T y ) represents the translation amount.

[0112] (2) Determine the rotation angle value based on the rotation direction. Specifically, the profile data of the rail to be inspected obtained by the profile inspection camera installed on the left side of the train's direction of motion should be rotated clockwise, while the profile data obtained by the profile inspection camera on the right side should be rotated counterclockwise. The different rotation directions of the rail profile data obtained by the left and right profile inspection cameras result in different positive and negative values ​​for the rotation angle θ. Therefore, the rotation angle θ value is determined based on the rotation direction; clockwise rotation results in a negative value, and counterclockwise rotation results in a positive value.

[0113] (3) Obtain the transformation matrix based on the angle values ​​and translation amounts. Assuming there are points (x', y') and (x, y) in the standard rail profile coordinate system and the rail profile coordinate system to be tested, respectively, the coordinate transformation formula is as follows:

[0114]

[0115]

[0116] In the formula, R is the transformation matrix, θ is the rotation angle, and T x T y These represent the translation amounts along the horizontal and vertical axes, respectively.

[0117] Step 107: Match the profile of the rail to be detected based on the transformation matrix. Specifically, the profile of the rail to be detected can be transformed to the standard profile coordinate system according to the coordinate transformation formula.

[0118] Example 2

[0119] like Figure 2 As shown, the rail profile matching method provided in this embodiment includes:

[0120] Step A: Calculate the feature center of the standard rail profile: The standard rail profile data is a 25257×2 two-dimensional point cloud. Since the rail is symmetrical along the central axis, the standard rail profile data is generally the left half of the central axis of the rail profile. The standard rail is a rail formed according to relevant standards.

[0121] Taking a 60kg / m steel rail as an example, its rail cross-section diagram is as follows: Figure 3 As shown, its standard rail profile diagram is as follows: Figure 4 As shown. The calculation process of the feature circle center is divided into steps A1 and A2.

[0122] Step A1: Sample the standard rail profile at equal intervals of 10 points to form a 2525×2 sampling sequence. Record the characteristic points of the characteristic arcs with radii of 400mm and 20mm on the rail web in the sampling sequence, with serial numbers 730-1510 and 500-710, respectively.

[0123] Step A2: Solve for the center of each feature arc segment using an iterative optimization method. Specifically:

[0124] Suppose there is a circle with center (a, b) and radius r. The equation of this circle can be expressed as:

[0125]

[0126] In the formula, (x1, y1) is a point on a circle with center (a, b) and radius r.

[0127] The optimization function is designed based on the equation of the circle as follows:

[0128] minf(a, b) = ∑ i=1…n (x i -a) 2 +(y i -b) 2 -r 2 .

[0129] In the formula, minf(a, b) is the optimization function, (x i y i Let (a, b) be a point on one of the characteristic arcs, and (a, b) be the center of the characteristic arc. Using a pattern search algorithm, with the initial point set to (0, 0), the minimum value of the optimization function is solved and recorded. The minimum value of the optimization function is solved and recorded for characteristic arcs with radii of 400 mm and 20 mm, respectively. 400 SC 20 .

[0130] Step B: Preprocess the profile data of the rail to be inspected. Specifically: the profile data of the rail to be inspected is acquired by a laser profile sensor, and its position relative to the installation position of the rail is as follows: Figure 5 As shown. The shape of the rail profile to be inspected is drawn from the data. Figure 6 As shown, the preprocessing process for the rail profile data to be inspected is as follows:

[0131] Step B1: Use a point cloud radius filter to filter out outliers. Specifically, starting from the initial point, calculate the number of points within the radius corresponding to the midpoint of the rail profile to be detected, and remove points with a number less than a threshold. Preferably, the radius can be set to 0.5, and the number threshold can be set to 1.

[0132] Step B2: Distinguish the rail head point set and the rail web point set. Specifically: Use the dbscan density clustering method, set the neighborhood range, and the number of points within the neighborhood. Divide the data of the to-be-detected rail profile into two categories, and distinguish the rail head and the rail web according to the relative magnitudes of their coordinates. For example, if the rail web is located to the left of the rail head in the to-be-detected rail profile diagram, set the condition that the abscissa of the rail web is less than that of the rail head to distinguish the two point sets. Preferably, the neighborhood range can be selected as 20, and the number of points within the neighborhood is 50.

[0133] Step B3: Smooth and interpolate the rail web point set. Specifically: Set the local linear regression smoothing algorithm with the window length to smooth the data, and perform cubic spline interpolation on the rail web point set at equal intervals. Preferably, the interval can be selected as 0.1, and the window length can be selected as 15.

[0134] Step C: Calculate and generate the curvature curve of the to-be-detected rail profile. Specifically: Calculate the curvature of the rail web point set generated in Step B respectively. Since all the points in the point set are discrete points and the distance between points is very small, the curvature is estimated. The formula for curvature estimation can be referred to the content disclosed in Embodiment 1.

[0135] Use the formula for curvature estimation to calculate the curvature of the rail web point set point by point starting from the second point of the rail web point set, and draw the curvature curve. The shape of the drawn curvature curve is as Figure 7 shown.

[0136] Step D: Segment the feature segments. Specifically: Determine the curvature threshold according to the characteristic arc of the rail web in the detected profile, compare the curvature curve of the rail web with the curvature threshold, and segment the parts of the rail head and the rail web that meet the curvature threshold. Taking the 60 kg / m rail as an example, for the rail web arc with a radius of 20 mm, if the rail web curvature curv of the to-be-detected rail profile satisfies curv > 0.045, it is considered to belong to the 20-mm arc segment. For the rail web arc with a radius of 400 mm, if the rail web curvature curv of the to-be-detected rail profile satisfies 0 < curv < 0.003, it is considered to belong to the 400-mm arc segment.

[0137] Step E: Extract RDP feature points. Specifically: The segmented feature segments come from Step D. Use the RDP method to reduce the number of points in the three feature segments, thereby generating the feature points corresponding to the feature segments.

[0138] The main steps of the RDP algorithm are to virtually connect a straight line between the start and end points of the curve, calculate the distances from all points on the curve to the straight line, and find the maximum distance value d max and compare the maximum distance value d max with the pre-given threshold D′.

[0139] If d maxIf < D′, then all midpoints on this curve are discarded, retaining only the first and last points. This straight line segment is used as an approximation of the curve, and the processing of this curve segment is complete. If d max If the distance is greater than or equal to D′, then the maximum distance value d is retained. max The corresponding coordinate point is used as the boundary to divide the curve into two parts. This method is repeated for both parts until all maximum distance values ​​d are found. max Both are less than D′.

[0140] The advantage of the RDP algorithm lies in its ability to effectively reduce the number of points on a curve while preserving the curve's shape and features. Furthermore, this algorithm exhibits translation and rotation invariance, meaning that the sampling results remain consistent regardless of curve translation or rotation. The number of feature points in a feature segment is controlled by adjusting the threshold D′ in the RDP method; preferably, the threshold D′ is set to 0.01. Taking a 60kg / m steel rail as an example, feature segments with radii of 400mm and 20mm and their collected feature points are plotted as follows: Figure 8 and Figure 9 As shown, Figure 8 and Figure 9 The black dots in the middle are feature points calculated by the RDP method.

[0141] Step F: Calculate the center of the circle of the rail profile feature segment to be detected using Hough transform. Specifically, the improved Hough transform method transforms the set of rail web feature points generated in step E to Hough space according to the curvature of the arc they belong to. Since the set of rail web feature points all come from the rail web feature circle segment, assume that one of the points is (x... i y i If the point is such that the characteristic circle equation is:

[0142] (x i -a) 2 +(y i -b) 2 =r 2 .

[0143] Where (a, b) are the coordinates of the center of the circular segment containing the point, and r is the radius of the circular segment containing the point. The equation of the circle drawn with this point as the center and r as the radius is:

[0144] (xx i ) 2 +(yy i ) 2 =r 2 .

[0145] It can be seen that the center (a, b) also satisfies this equation. Similarly, other points can also be assigned similar equations that (a, b) satisfies. When all the circles are drawn in the same coordinate system, (a, b) is the unique intersection point of all the circles. However, due to the influence of detection noise, the intersection point will become a set of points with the highest density.

[0146] Therefore, to search for the set of points with the highest density in Hough space, it is necessary to first determine the density formula for a specific point in the set. The density formula is described in Example 1 above.

[0147] Set a threshold, calculate the density of each point in the point set according to the density formula, and find the corresponding point with the maximum density and its neighborhood point set. Use the average value of the point set with the maximum density as the center of the circle for the desired feature point.

[0148] For example, taking the profile of a 60kg / m rail to be inspected as an example, the feature point set extracted on the arc with radius r = 20mm is selected to calculate the center of the circle. First, the intersection point of all circles with the feature point as the center and radius 20mm is calculated. Let the two feature points be A and B. i (x i y i A j (x j y j ), where y i <y j Let the Euclidean distance between two points be dist. Then the intersection points p1(x1, y1) and p2(x2, y2), where y1 < y2, are:

[0149]

[0150]

[0151]

[0152] y1=y i +rsin(β+t).

[0153] x1=x i +rcos(β+t).

[0154] y2=y i +rsin(t+β2).

[0155] x2=x i +rcos(t+β2).

[0156] In the formula, t is vector A j A i The angle between the vector A and the x-axis, β1 is the vector A. j A i With vector p2Ai The angle between the vectors, β2 and β2, is the angle between the vectors A and B. j A i With vector p1A i The included angle, ||(A) i -A j ()|| is point A i and point A j Euclidean distance.

[0157] Calculate the Euclidean distance between any two points in the intersection point set, generate a distance matrix, and find the value d in the i-th row and j-th column of the distance matrix. ij This represents the Euclidean distance between the i-th point and the j-th point in the feature point set. The values ​​in the matrix are then column-normalized using the following formula.

[0158]

[0159] Where, d ij Let d be the value in the i-th row and j-th column of the distance matrix. jmin d is the minimum value in the j-th column. jmax Let N be the maximum value in the j-th column. Set a distance threshold of 0.01 and record the number of rows N in each column whose values ​​are less than this threshold. j And the largest normalized distance d′ jmax Filter N j For rows >0.15N, calculate their density according to the density definition, find the point with the highest density, and then find the indices of the neighboring points whose distance to this point is less than a threshold in the normalized distance matrix. Calculate the mean of these neighboring points, which is the center of the circle for this point. The found center, the set of intersection points, and the set of points with the highest density are as follows: Figure 10 As shown, Figure 10 The black dot at the top is the center of the circle, and the gray line is the set of points with the highest density.

[0160] Step G: Calculate the transformation matrix and complete the matching. Specifically: the center of the standard profile comes from step A, and the center of the rail profile data to be detected comes from step F. Calculate the transformation matrix and complete the matching. The matching process is as follows:

[0161] Step G1: Calculate the transformation matrix. Specifically, calculate the rotation angle and translation amount based on the center of the standard rail profile and the center of the rail profile to be tested. For the detailed calculation process, please refer to the content disclosed in Example 1 above.

[0162] Step G2: Complete profile matching. This step mainly involves transforming the rail inspection profile to a standard profile coordinate system based on coordinate transformation formulas. For example, taking a 60kg / m rail as an example, the transformed rail diagram is as follows: Figure 11 As shown.

[0163] Based on the above description, the present invention has the following advantages compared to the prior art:

[0164] 1. This invention uses an improved Hough transform to search for the feature circle center and introduces a set of points with maximum density to reduce the impact of rail wear deformation and detection noise on the search.

[0165] 2. This invention uses the RDP feature extraction method to reduce the number of point sets in the feature fragment, preserve the changing features as much as possible, and improve the calculation speed.

[0166] 3. This invention combines an improved Hough transform with the RDP feature extraction method, which significantly improves matching accuracy compared to traditional algorithms.

[0167] Furthermore, the present invention provides a rail profile matching system for implementing the rail profile matching method described above. The system includes: a first circle center determination module, a data preprocessing module, a curvature value determination module, a rail profile segmentation module, a feature point extraction module, a second circle center determination module, a transformation matrix determination module, and a profile matching module.

[0168] The first center determination module is used to segment the standard rail profile to obtain rail web feature segments and determine the first center. The first center is the center of the rail web feature segment of the standard rail profile.

[0169] The data preprocessing module is used to acquire the profile data of the rail to be inspected and to preprocess the profile data.

[0170] The curvature value determination module is used to determine the curvature value of each data point based on the preprocessed profile data.

[0171] The rail profile segmentation module is used to segment the rail profile to be detected based on the curvature value to obtain the rail web feature segment.

[0172] The feature point extraction module is used to extract feature points of the web feature segments of the rail to be inspected using the RDP method.

[0173] The second circle center determination module is used to determine the second circle center based on the extracted feature points using an improved Hough transform method. The second circle center is the center of the web feature segment of the rail profile to be detected.

[0174] The transformation matrix determination module is used to determine the transformation matrix based on the first circle center and the second circle center.

[0175] The profile matching module is used to match the profile of the rail to be detected based on the transformation matrix.

[0176] Furthermore, the present invention also provides an electronic device comprising: a memory and a processor.

[0177] The memory is used to store computer programs. The processor is connected to the memory and is mainly used to retrieve and execute the computer programs to implement the rail profile matching method provided above.

[0178] Furthermore, when the computer program in the aforementioned memory is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory, random access memory, magnetic disks, or optical disks.

[0179] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.

[0180] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method of matching the profile of a steel rail, characterised by, include: The standard rail profile is segmented to obtain rail web feature segments, and the first center is determined; the first center is the center of the rail web feature segments of the standard rail profile. Acquire the profile data of the rail to be inspected, and preprocess the profile data; The curvature value of each data point is determined based on the preprocessed profile data. The method of segmenting the rail profile to be detected based on the curvature value to obtain rail web feature segments includes: determining the curvature curve of the rail profile to be detected based on the curvature value; determining the curvature threshold based on the design curvature of the rail web feature segments of the standard rail profile and the curvature curve; and segmenting the rail profile to be detected based on the curvature threshold to obtain rail web feature segments. The RDP method is used to extract feature points of the web feature segment of the rail to be inspected; The improved Hough transform method is used to determine the second center of the circle based on the extracted feature points, including: transforming the feature points to Hough space according to the curvature of the arc in which they are located; searching for the set of points with the highest density in the Hough space; using the average value of the set of points with the highest density in the Hough space as the second center of the circle; the second center of the circle is the center of the web feature segment of the rail profile to be detected. Determine the transformation matrix based on the first circle center and the second circle center; The profile of the rail to be detected is matched based on the transformation matrix. The process of searching for the set of points with the highest density in the Hough space includes: determining the normalized distance of points in the Hough space; obtaining the number of points in the Hough space whose normalized distance is less than a set distance threshold and the total number of points in the Hough space; determining the density of points in the Hough space based on the number of points in the Hough space whose normalized distance is less than the set distance threshold and the total number of points in the Hough space; and obtaining the point with the highest density and the set of neighboring points of the point with the highest density to obtain the set of points with the highest density.

2. The rail profile matching method according to claim 1, characterized in that, The standard rail profile is segmented to obtain the rail web feature segment, and the first circle center is determined, specifically including: The rail web feature segment is obtained by segmenting the standard rail profile based on the curvature threshold. The center of the web feature segment of the standard rail profile is determined using the least squares method, thus obtaining the first center.

3. The rail profile matching method of claim 1, wherein The preprocessing of the profile data specifically includes: Outliers in the profile data are filtered out using a point cloud radius filter. Density clustering was used to separate the rail head and rail web based on the profile data after outlier removal; The Loess algorithm is used to smooth the profile data after outlier removal based on the separated rail head and rail web, and cubic spline interpolation is performed on the profile data after outlier removal to obtain the preprocessed profile data.

4. The rail profile matching method of claim 1, wherein, The formula for determining the curvature value is: ; wherein is a curvature value, is a vector is the angle between the vector and the vector is the Euclidean distance between the data point and the data point is the Euclidean distance between the data point and the data point .

5. The rail profile matching method of claim 1, wherein, Determining the transformation matrix based on the first circle center and the second circle center specifically includes: The rotation angle and translation amount are determined based on the first center and the second center; The angle value of the rotation angle is determined based on the direction of rotation; The transformation matrix is ​​obtained based on the angle value and the translation amount.

6. A rail profile matching system, characterized in that, The system is used to implement the rail profile matching method as described in any one of claims 1-5; the system includes: The first center determination module is used to segment the standard rail profile to obtain rail web feature segments and determine the first center; the first center is the center of the rail web feature segment of the standard rail profile. The data preprocessing module is used to acquire the profile data of the rail to be inspected and to preprocess the profile data. The curvature value determination module is used to determine the curvature value of each data point based on the preprocessed profile data; The rail profile segmentation module is used to segment the rail profile to be detected based on the curvature value to obtain rail web feature segments. The feature point extraction module is used to extract feature points of the web feature segments of the rail to be inspected using the RDP method; The second circle center determination module is used to determine the second circle center based on the extracted feature points using an improved Hough transform method; the second circle center is the center of the web feature segment of the rail profile to be detected; A transformation matrix determination module is used to determine a transformation matrix based on the first circle center and the second circle center; The profile matching module is used to match the profile of the rail to be detected based on the transformation matrix.

7. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, connected to the memory, is configured to retrieve and execute the computer program to implement the rail profile matching method as described in any one of claims 1-5.