Track measurement method and device based on line structured light and storage medium
By combining depth thresholding and bilateral filtering, along with track geometry features and template registration, the accuracy and continuity issues of track detection under high-speed conditions with line structured light were resolved, achieving efficient and stable track point cloud extraction and attitude recognition.
Patent Information
- Application Number
- CN202511936257.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-22
- Publication Date
- 2026-01-20
- Estimated Expiration
- 2045-12-22
AI Technical Summary
Existing track detection technologies based on line structured light suffer from low track area recognition accuracy, poor point cloud continuity, and insufficient algorithm stability under high-speed dynamic acquisition conditions, failing to meet the needs of real-time track detection and high-precision data extraction for railways.
Point cloud data is processed using depth threshold filtering and bilateral filtering methods. Filtering is performed by combining spatial distance and reflection intensity differences. Candidate orbit regions are obtained by filtering through orbital height continuity constraints and normal information. Clustering and interpolation correction are performed using the geometric features of the orbit. Finally, the data is registered with a standard orbital template to obtain the orbital attitude angles.
It achieves accurate extraction of point clouds in the track area under high-speed conditions, reduces environmental interference, improves extraction efficiency and accuracy, and enhances the system's anti-interference ability and track recognition stability.
Smart Images

Figure CN121363916A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of track posture detection, in particular to a track measurement method and device based on line structured light and a storage medium. BACKGROUND
[0002] At present, the detection and analysis of railway tracks mainly rely on non-contact three-dimensional acquisition technologies such as laser scanning, stereo vision and structured light measurement. Among them, the laser scanning system can obtain high-precision track geometric data in static or low-speed environment, but when the train is running at high speed, due to the limited scanning frequency, the point cloud density is significantly reduced, and the track surface details are seriously lost, especially in the small-scale component area such as fasteners and sleepers, the contour is discontinuous or the structure is blurred, which is difficult to meet the real-time and precision requirements of high-speed detection. Although the stereo vision method can recover the spatial form of the track through binocular imaging, it is affected by environmental light, track surface reflection and vehicle vibration, etc., and its imaging quality is unstable, and it is easy to miss and miss in complex lighting scenes such as tunnels and subways.
[0003] In recent years, line structured light technology has gradually been applied to railway track detection due to its high measurement accuracy and data acquisition speed. For example, Chinese patent CN119197374A discloses a method and system for comprehensive analysis of existing line state based on a three-dimensional mobile scanning system. This method projects a line laser onto the track surface and recovers the three-dimensional point cloud information of the track according to the deformation characteristics of the stripes in space. However, in the actual high-speed detection environment, the existing track point cloud processing methods based on structured light still have the following main defects: (1) The accuracy of track area segmentation is insufficient. Traditional track extraction methods are mostly based on gray level, light intensity or texture features for region recognition. However, line structured light may cause stripe drift, distortion and local spot loss under high-speed motion, resulting in blurred boundaries between track and non-track areas in the point cloud, and unstable segmentation results.
[0004] (2) The cross-section point cloud is discontinuous. In the high-speed acquisition process, the interval of structured light scanning lines is affected by the train speed and sampling frequency, resulting in data gaps or overlaps between cross-sections, poor spatial continuity of track point cloud, and affecting subsequent overall extraction and reconstruction.
[0005] In summary, the existing track detection technology based on line structured light still has problems such as low track area recognition accuracy, poor point cloud continuity and insufficient algorithm stability under high-speed dynamic acquisition conditions, which cannot meet the needs of real-time detection and high-precision data extraction of railway tracks. Therefore, how to fully utilize the geometric characteristics of line structured light data while ensuring computational efficiency to achieve accurate extraction and stable identification of track point cloud is a technical problem to be solved in the field. SUMMARY
[0006] The present application aims to solve the defects of the prior art and provides a track measurement method and device based on line structured light and a storage medium, which can fully utilize the geometric characteristics of line structured light data under high-speed running conditions, quickly and stably realize accurate extraction of track area point clouds through geometric constraints of point cloud sections, reduce environmental interference, and improve extraction efficiency and accuracy.
[0007] The object of the present application can be achieved by the following technical solutions: A track measurement method based on line structured light, comprising: Step S1: obtaining original point cloud data obtained by structured light scanning, and filtering by using a depth threshold filtering method and a bilateral filtering method based on spatial distance and reflection intensity difference; Step S2: dividing all the filtered point clouds into multiple sections according to the scanning direction, and screening and obtaining track candidate areas in each section based on track height continuity constraints and combined with normal information; Step S3: in the track candidate area of each section, the transverse coordinate distribution of the point cloud is counted and the density peak value is identified, and the density peak value is taken as the center to perform clustering extraction within a first preconfigured transverse distance range to obtain track point clouds of each section; Step S4: if the number of track point clouds in any section is greater than a first preconfigured lower limit, and the difference between the maximum height of the track point clouds in the section and the maximum height of the track point clouds in the adjacent section, and the difference between the minimum height of the track point clouds in the section and the minimum height of the track point clouds in the adjacent section are all less than a preconfigured second difference threshold, then the section is taken as a valid section, otherwise, the section is taken as an invalid section; Step S5: for all invalid sections, the track point clouds of the adjacent valid sections are interpolated and corrected to obtain the track point clouds of each invalid section; Step S6: by registering the track point clouds of each section with a standard track template, the track roll angle and pitch angle of each section are obtained.
[0008] The step S1 comprises: Step S1-1: obtaining original point cloud data obtained by structured light scanning; Step S1-2: filtering out point clouds located outside a first depth threshold range; Step S1-3: calculating the spatial distance weight of each point cloud and other point clouds in its neighborhood according to the spatial distance based on a spatial distance threshold, and calculating the reflection intensity weight of each point cloud and other point clouds in its neighborhood according to the reflection intensity difference based on a reflection intensity difference threshold; Step S1-4: fuse the spatial distance weight and the reflection intensity weight to obtain a fusion weight of each point cloud and other point clouds in its neighborhood, and superimpose the position information of other point clouds in its neighborhood to the position of each point cloud based on the fusion weight, to complete the position update of all point clouds; Step S1-5: determine whether there are reflection intensity abnormal points or spatial position abnormal isolated noise points in all updated point clouds, if yes, execute step S1-6, otherwise execute step S2; Step S1-6: adjust the spatial distance threshold and / or the reflection intensity difference threshold, and return to step S1-3.
[0009] The step S1-5 includes: Step S1-5-1: calculate the distance between each point cloud and its nearest neighbor point cloud as the nearest neighbor distance of each point cloud, and calculate the mean and standard deviation of the nearest neighbor distance of the global point cloud, and take the point cloud satisfying the following conditions as the spatial position abnormal isolated noise point:
[0010] Wherein: is the nearest neighbor distance of the point cloud, is the mean of the nearest neighbor distance of the global point cloud, is the standard deviation of the nearest neighbor distance of the global point cloud; Step S1-5-2: calculate the reflection intensity of each point cloud, compare the difference between the reflection intensity of each point cloud and the mean of the reflection intensity of all point clouds in its neighborhood, and if it is greater than the first difference threshold configured in advance, the point cloud is taken as a reflection intensity abnormal point; Step S1-5-3: determine whether there are reflection intensity abnormal points or spatial position abnormal isolated noise points in all updated point clouds, if yes, execute step S1-6, otherwise execute step S2.
[0011] The step S2 includes: Step S2-1: divide all filtered point clouds into multiple sections according to the scanning direction; Step S2-2: perform height statistics on the point clouds in all sections, and filter the track preliminary candidate area in the point clouds in each section based on the track height continuity constraint, wherein the track height continuity constraint is that the absolute value of the difference between the height of the lowest part of the track in any section and the height of the lowest part of the track in the adjacent section is less than 15 millimeters; Step S2-3: sort all point clouds in the track preliminary candidate area of the section according to the transverse coordinates from small to large, and calculate the unit normal vector of all point clouds in the track preliminary candidate area of each section to form a normal sequence; Step S2-4: the normal sequence is processed by using a sliding window with a length of L and a step of 1, the average change amplitude of the elements in each sliding window of the normal sequence is calculated, and if the average change amplitude is less than a preconfigured amplitude threshold, the point cloud corresponding to the elements of the normal sequence in the step sliding window is included in the track candidate area of the section.
[0012] The step S2-2 includes: Step S2-2-1: the height statistics of the point cloud in all sections are performed, and the average height of the lowest point cloud in the point cloud in each section is calculated as the first effective height of the section. Step S2-2-2: the first state value of all sections is initialized as state one. Step S2-2-3: a section with a first state value of state one is selected, and it is judged whether the absolute value of the difference between the first effective height of the section and the first effective height of the adjacent section is less than 15 mm, if yes, step S2-2-4 is executed, otherwise, step S2-2-5 is executed. Step S2-2-4: the first state value of the selected section is set as state two, it is judged whether there is a section with a first state value of state one, if yes, step S2-2-3 is returned, otherwise, the remaining point cloud of all sections is taken as the track preliminary candidate area of the section, and step S2-3 is executed. Step S2-2-5: the point cloud of the selected section and the adjacent section is deleted, so that the absolute value of the difference between the first effective height of the selected section and the first effective height of the adjacent section is less than 15 mm, the first effective height of the selected section and the adjacent section is updated, the first state value of the selected section is state two, the first state value of all other sections is initialized as state one, and step S2-2-3 is returned.
[0013] The average change amplitude is:
[0014] Wherein: is the average change amplitude, is the length of the sliding window, is the first element of the normal sequence in the sliding window, i is the first element of the normal sequence in the sliding window. i
[0015] The interpolation correction mode in step S5 is linear interpolation.
[0016] The process of obtaining the track roll angle and pitch angle of a single section in step S6 includes: Step S6-1: set the initial roll angle and pitch angle of the standard track template as 0, and align the center of the standard track template and the track point cloud of the section; Step S6-2: transform the roll angle and pitch angle, and combine the fixed step translation of the standard track template, respectively calculate the sum of distances from each track point cloud in the section to the standard track template, and take the roll angle and pitch angle of the standard track template when the sum of distances is the smallest as the track roll angle and pitch angle of the section.
[0017] A track measurement device based on line structured light, comprising a memory, a processor, and a program stored in the memory, wherein the processor implements the method as described above when executing the program.
[0018] A storage medium having a program stored thereon, wherein the program implements the method as described above when executed.
[0019] Compared with the prior art, the present application has the following beneficial effects: 1. Under high-speed running conditions, the geometric characteristics of line structured light data can be fully utilized, the accurate extraction of track area point cloud can be quickly and stably realized through geometric constraints of point cloud section, environmental interference can be reduced, and extraction efficiency and accuracy can be improved.
[0020] 2. Single-frame point cloud is taken as a basic processing unit, and the methods of depth threshold filtering and bilateral filtering are sequentially used to remove noise and smooth data. The depth threshold filtering is used to preliminarily remove invalid points and abnormal reflection points outside the projection range of structured light, and the threshold value can be estimated according to the depth range of the measured object and the internal and external parameters of the camera. The bilateral filtering is used to smooth the point cloud in the local area while retaining the boundary features. The basic idea is to combine the spatial distance and the reflection intensity difference to weight average the weight of the point, so as to effectively suppress high-frequency noise.
[0021] 3. A specific abnormal point detection algorithm is introduced, including threshold judgment based on nearest neighbor distance and reflection intensity difference, which can accurately identify and isolate reflection intensity abnormal points and spatial position abnormal isolated noise points. This detection mechanism prevents the interference of abnormal points on subsequent track screening, improves the cleanliness and consistency of point cloud data. By statistically analyzing the characteristics of the global point cloud, this method has strong adaptability and can effectively deal with the problems of missing spots or stripe distortion in high-speed acquisition, thereby enhancing the anti-interference ability and reliability of the overall system.
[0022] 4、Full use of the height characteristics, parallel characteristics and longitudinal continuation characteristics of the track in the spatial form, through the screening, clustering and continuity determination of each section, the accurate recognition and extraction of the track point cloud are realized, and the smooth geometric characteristics of the track surface can be captured by using the sliding window processing of the normal sequence, and the false detection of the non-track area is reduced. This method improves the accuracy of the track point cloud extraction, especially when the point cloud is discontinuous under high speed conditions, the continuity of the section can be effectively maintained, and the stability and efficiency of the track recognition are improved.
[0023] 5、Through the iterative height statistics and state management mechanism, the point cloud screening in the section is dynamically adjusted to ensure that the track height continuity constraint (such as the height difference between adjacent sections is less than 15mm) is met, and this adaptive processing can effectively handle local data loss or abnormality, and improve the reliability of the preliminary track candidate area. By gradually deleting the inconsistent point cloud and updating the effective height, the adaptability of the algorithm to the geometric change of the track is enhanced, the error accumulation is reduced, and the continuity and accuracy of the track extraction are ensured.
[0024] 6、The calculation formula of the average change amplitude is defined, and a quantitative and objective normal sequence smoothness evaluation standard is provided. The formula can effectively identify the uniform area of the track surface by calculating the average change of the normal point product, avoid false judgment caused by noise or irregular shape, and this mathematical processing makes the normal information screening more consistent and repeatable, improves the accuracy of the track candidate area screening, and optimizes the effect of subsequent clustering extraction. BRIEF DESCRIPTION OF DRAWINGS
[0025] Figure 1 The schematic diagram of the hardware infrastructure relied on by the method of the present application; Figure 2 The schematic diagram of the track separation result; Figure 3 The schematic diagram of the track section; Figure 4 The schematic diagram of the principle of template registration; Figure 5 The track matching error diagram; Figure 6 The schematic diagram of the detection result; Figure 7 The schematic diagram of the main step flow of the method of the present application; 1、Structured light sensor, 2、mounting bracket, 3、adapter plate, 4、measured track. DETAILED DESCRIPTION
[0026] The present application will be described in detail below in combination with the drawings and specific embodiments. The present embodiment is implemented on the premise of the technical solution of the present application, and detailed implementation modes and specific operation processes are given, but the protection scope of the present application is not limited to the following embodiments.
[0027] A track measurement method based on line structured light acquires real-time 3D point cloud data of the track surface by installing a structured light 3D imaging device on the lower side of the train body while the train is running at approximately 50 km / h. To address noise and outliers in the point cloud, a combination of depth threshold filtering and bilateral filtering is used to improve the accuracy and continuity of track geometry information. Based on the spatial geometric constraints and cross-sectional coherence of the point cloud, an automatic track point cloud extraction method is proposed. Through cross-sectional grouping, geometric filtering, and coherence determination, accurate extraction and cross-sectional identification of the track area point cloud are achieved. Using a standard track template and applying fixed rotation and translation optimization constraints, attitude correction and error calculation are performed on the track cross-section, thereby obtaining high-precision reconstruction results of the track geometry. This invention enables non-contact, high-precision measurement of track morphology under high-speed operating conditions, providing reliable technical support for track condition detection and geometric deformation assessment.
[0028] like Figure 1 As shown, the hardware structure upon which the method of this application relies includes a structured light sensor 1, a mounting bracket 2, and an adapter plate 3, which are installed as a whole at the front of the track inspection vehicle for non-contact, high-precision measurement of the geometric state of the track 4 being measured.
[0029] Mounting bracket 2 is a crucial load-bearing structure connecting the structured light sensor 1 to the vehicle body, providing both rigid support and angle adjustment. The bracket is secured to the adapter plate with four M10 bolts and is constructed entirely of high-strength metal, ensuring high structural stability. The bracket can be adjusted ±10° left and right in the horizontal plane for rapid calibration based on track conditions, vehicle posture, or sensor viewing angle requirements.
[0030] The adapter plate 3 is located between the mounting bracket 2 and the rail vehicle platform, serving as a vibration damping buffer and structural transition. The bottom of the adapter plate 3 has three plates that can be adjusted laterally or longitudinally according to pre-drilled holes to accommodate different vehicle models and the range of structured light scanning. A 10 mm thick shock-absorbing rubber pad is installed between the adapter plate 3 and the rail vehicle platform to effectively absorb high-frequency vibrations generated during track operation.
[0031] like Figure 7 As shown, it includes: Step S1: Acquire the raw point cloud data obtained from structured light scanning, and filter it using depth threshold filtering and bilateral filtering methods based on spatial distance and reflection intensity differences, including: Step S1-1: Obtain the raw point cloud data acquired by structured light scanning; Step S1-2: Filter out point clouds located outside the first depth threshold range. Generally, the first depth threshold range is [z min ,z max ]; Step S1-3: calculating the spatial distance weight of each point cloud and other point clouds in its neighborhood according to the spatial distance based on a spatial distance threshold, and calculating the reflection intensity weight of each point cloud and other point clouds in its neighborhood according to the reflection intensity difference based on a reflection intensity difference threshold, wherein the radius of the neighborhood is r, the spatial distance weight is: , wherein: is the spatial distance weight of the point cloud and the point cloud , is the spatial distance threshold; the reflection intensity weight is: , wherein: is the reflection intensity weight of the point cloud and the point cloud , is the reflection intensity of the point cloud , is the reflection intensity of the point cloud , is the reflection intensity difference threshold.
[0032] Step S1-4: fusing the spatial distance weight and the reflection intensity weight to obtain the fusion weight of each point cloud and other point clouds in its neighborhood, and superimposing the position information of other point clouds in its neighborhood to the position of each point cloud based on the fusion weight, completing the position update of all point clouds, wherein in this embodiment, the fusion method adopts multiplication.
[0033] Step S1-5: judging whether there is a reflection intensity abnormal point or a spatial position abnormal isolated noise point in all updated point clouds, if yes, executing step S1-6, otherwise executing step S2, specifically, including: Step S1-5-1: calculating the distance between each point cloud and its nearest neighbor point cloud as the nearest neighbor distance of each point cloud, and calculating the mean and standard deviation of the nearest neighbor distance of the global point cloud, and taking the point cloud satisfying the following condition as the spatial position abnormal isolated noise point:
[0034] wherein: is the nearest neighbor distance of the point cloud, is the mean of the nearest neighbor distance of the global point cloud, is the standard deviation of the nearest neighbor distance of the global point cloud; Step S1-5-2: calculating the reflection intensity of each point cloud, comparing the difference between the reflection intensity of each point cloud and the mean of the reflection intensity of all point clouds in its neighborhood, and if the difference is greater than a preconfigured first difference threshold, taking this point cloud as a reflection intensity abnormal point. Step S1-5-3: Determine whether there are abnormal reflection intensity points or spatial position abnormal isolated noise points in all updated point clouds, if yes, execute step S1-6, otherwise execute step S2.
[0035] Step S1-6: Adjust the spatial distance threshold and / or the reflection intensity difference threshold, and return to step S1-3, which can generally be enlarged or reduced, and in this embodiment, the spatial distance threshold and the reflection intensity difference threshold are adjusted at the same time.
[0036] In the process of structured light scanning, due to the influence of factors such as surface reflectivity difference, lighting conditions, sensor noise, and complexity of target surface geometric characteristics, the obtained original point cloud data often contains outliers, isolated points and measurement error points. In order to improve the accuracy of subsequent reconstruction and analysis, the present application takes a single frame of point cloud as the basic processing unit when filtering the structured light point cloud, and uses depth threshold filtering and bilateral filtering methods in turn to remove noise and smooth data.
[0037] Among them, the depth threshold filtering is used to preliminarily remove invalid points and reflection abnormal points outside the structured light projection range, and the threshold can be estimated according to the depth range of the measured object and the camera internal and external parameters; the bilateral filtering is used to smooth the point cloud in the local area while retaining the boundary features, and the basic idea is to combine the spatial distance and the reflection intensity difference to weight average the point weight, thereby effectively suppressing high-frequency noise.
[0038] Step S2: Divide all filtered point clouds into multiple sections according to the scanning direction, and based on the track height continuity constraint and combined with the normal information, screen and obtain the track candidate area in each section, including: Step S2-1: Divide all filtered point clouds into multiple sections according to the scanning direction, and the scanning direction is the longitudinal reference, and the point clouds are divided into continuous sections at a fixed interval. Each section represents the local cross-sectional structure of the track at that position, providing basic data for subsequent analysis, and each section is displayed in different colors, as shown in Figure 3 Step S2-2: Perform height statistics on the point clouds in all sections, and based on the track height continuity constraint, screen and obtain the track preliminary candidate area in the point clouds in each section, wherein the track height continuity constraint is that the absolute value of the difference between the lowest height of the track in any section and the lowest height of the track in the adjacent section is less than 15 mm, and specifically, including: Step S2-2-1: Perform height statistics on the point clouds in all sections, and calculate the average height of the lowest multiple point clouds in the point clouds in each section as the first effective height of the section; Step S2-2-2: Initialize the first state value of all sections to state one; Step S2-2-3: selecting a section with the first state value as state one, judging whether the absolute value of the difference between the first effective height of the section and the first effective height of the adjacent section is less than 15 mm, if yes, executing step S2-2-4, otherwise, executing step S2-2-5; Step S2-2-4: setting the first state value of the currently selected section as state two, judging whether there is a section with the first state value as state one, if yes, returning to step S2-2-3, otherwise, taking the remaining point cloud of all sections as the track preliminary candidate region of the section, and executing step S2-3; Step S2-2-5: deleting the point cloud of the currently selected section and the adjacent section, so that the absolute value of the difference between the first effective height of the currently selected section and the first effective height of the adjacent section is less than 15 mm, updating the first effective height of the currently selected section and the adjacent section, setting the first state value of the currently selected section as state two, initializing the first state value of all other sections as state one, and returning to step S2-2-3.
[0039] Step S2-3: sorting all point clouds in the track preliminary candidate region of the section according to the horizontal coordinates from small to large, and calculating the unit normal vector of all point clouds in the track preliminary candidate region of each section to form a normal sequence; Step S2-4: processing the normal sequence by using a sliding window with a length of L and a step of 1, calculating the average change amplitude of the elements in each step sliding window of the normal sequence, and if the average change amplitude is less than a preconfigured amplitude threshold, the point cloud corresponding to the elements in the step sliding window of the normal sequence is included in the track candidate region of the section.
[0040] In the embodiment, the average change amplitude is:
[0041] Wherein: the average change amplitude, the length of the sliding window, the first element of the normal sequence in the sliding window, i the first element of the normal sequence in the sliding window. i
[0042] In order to accurately separate the track area point cloud from the original point cloud obtained by the structured light scanning, the application provides a track point cloud separation algorithm based on spatial geometric constraints and section continuity. The algorithm fully utilizes the high features, parallel features and longitudinal continuation features of the track in the spatial form, realizes the accurate identification and extraction of the track point cloud through the section-by-section screening, clustering and continuity determination. The track separation result is shown in Figure 2 .
[0043] Step S3: In the track candidate area of each section, the lateral coordinate distribution of the point cloud is counted and the density peak value is identified. The first pre-configured lateral distance range is used for clustering extraction, and the track point cloud of each section is obtained. In this embodiment, the first pre-configured lateral distance range is ±80 mm.
[0044] Step S4: If the number of track point clouds in any section is greater than the first pre-configured lower limit, and the difference between the maximum height of the track point cloud in the section and the maximum height of the track point cloud in the adjacent section, and the difference between the minimum height of the track point cloud in the section and the minimum height of the track point cloud in the adjacent section are all less than the pre-configured second difference threshold, the section is regarded as a valid section, otherwise, the section is regarded as an invalid section. In this embodiment, the first pre-configured lower limit is 150, and the pre-configured second difference threshold is 15 mm.
[0045] Step S5: For all invalid sections, the track point cloud of each invalid section is obtained by interpolation correction based on the track point cloud of its adjacent valid section, to ensure the continuity and integrity of the track point cloud in the longitudinal direction. In this embodiment, the interpolation correction method is linear interpolation.
[0046] Step S6: The track roll angle and pitch angle of each section are obtained by registering the track point cloud of each section with the standard track template.
[0047] The process of obtaining the track roll angle and pitch angle of a single section in step S6 includes: Step S6-1: Set the initial roll angle and pitch angle of the standard track template to 0, and align the centers of the standard track template and the track point cloud of the section. The standard track template is specifically constructed according to the design parameters and standard geometric characteristics of the track section. The template is represented in the form of a two-dimensional discrete point cloud, which is generated by pre-imported standard section data and serves as a geometric reference for track matching.
[0048] Each section contains the feature point distribution of the top, waist and bottom of the track, which can completely reflect the geometric shape of the track at that position.
[0049] Step S6-2: Transform the roll angle and pitch angle, and combine the fixed step translation of the standard track template to calculate the sum of distances from each track point cloud in the section to the standard track template, respectively. The roll angle and pitch angle of the standard track template at the time of the smallest sum of distances are taken as the track roll angle and pitch angle of the section, wherein the distance from the track point cloud to the standard track template can be selected as the distance of the nearest point to the standard track template.
[0050] Specifically, after the track point cloud is separated, in order to realize high-precision identification and matching of the track section, the separated track point cloud is automatically matched with a standard track template, the posture of the track section is corrected and error analysis is performed, so as to ensure the geometric precision of the structured light measurement. The posture optimization results of multiple track sections are as shown in Figure 4 .
[0051] After the best matching posture is determined, the distances from all track points in the section to the corresponding points of the template are calculated, and an error distribution in millimeters is obtained. The present application performs error coloring processing on all track points without cutting or limiting the amplitude, so as to completely reflect the overall deviation of the track section. The error distribution diagram generated can intuitively display the geometric deviation and wear characteristics of the track surface, as shown in Figure 5 .
[0052] Finally, the posture angle, translation parameter and corresponding error statistical index of each section are output, and the changes of each section in the longitudinal direction are continuously analyzed to form a complete description of the geometric state of the track, as shown in Figure 6 .
[0053] The present application introduces template matching and posture optimization technology on the basis of the track point cloud extraction result, realizes accurate registration and error visualization of the track section, and can effectively improve the geometric consistency and detection precision of the structured light measurement, thereby providing a reliable data basis for track three-dimensional deformation monitoring and health assessment.
[0054] If the above functions are realized in the form of a software function unit and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application or the parts that essentially contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various program code storage media.
Claims
1. A line structured light based track measurement method, characterized in that, The method comprises the following steps: Step S1: obtaining original point cloud data acquired by structured light scanning, and filtering the original point cloud data by using a depth threshold filtering method and a bilateral filtering method based on spatial distance and reflection intensity difference; Step S2: dividing all the filtered point clouds into multiple sections according to a scanning direction, and screening a track candidate area in each section based on track height continuity constraint and in combination with normal information; Step S3: in the track candidate area of each section, calculating a transverse coordinate distribution of the point clouds and identifying a density peak value, and performing clustering extraction in a first preconfigured transverse distance range with the density peak value as a center to obtain track point clouds of each section; Step S4: if the number of track point clouds in any section is greater than a first preconfigured lower limit, and the difference between the maximum height of the track point clouds in the section and the maximum height of the track point clouds in an adjacent section, and the difference between the minimum height of the track point clouds in the section and the minimum height of the track point clouds in the adjacent section are all less than a second preconfigured difference threshold, the section is regarded as a valid section, otherwise, the section is regarded as an invalid section; Step S5: for all invalid sections, track point clouds of each invalid section are obtained by interpolating and correcting the track point clouds of the adjacent valid sections; Step S6: track roll angle and pitch angle of each section are obtained by registering the track point clouds of each section with a standard track template.
2. The track measurement method based on line structured light according to claim 1, characterized in that, The step S1 comprises: Step S1-1: obtaining original point cloud data acquired by structured light scanning; Step S1-2: filtering out point clouds located outside a first depth threshold range; Step S1-3: calculating a spatial distance weight of each point cloud and other point clouds in its neighborhood according to a spatial distance threshold, and calculating a reflection intensity weight of each point cloud and other point clouds in its neighborhood according to a reflection intensity difference threshold; Step S1-4: fusing the spatial distance weight and the reflection intensity weight to obtain a fusion weight of each point cloud and other point clouds in its neighborhood, and superimposing position information of other point clouds in its neighborhood to the position of each point cloud based on the fusion weight to complete position updating of all point clouds; Step S1-5: judging whether there are reflection intensity abnormal points or spatial position abnormal isolated noise points in all updated point clouds, if yes, executing step S1-6, otherwise, executing step S2; Step S1-6: adjusting the spatial distance threshold and / or the reflection intensity difference threshold, and returning to step S1-3.
3. The track measurement method based on line structured light according to claim 2, characterized in that, The step S1-5 comprises: Step S1-5-1: calculating a distance between each point cloud and its nearest neighbor point cloud as a nearest neighbor distance of each point cloud, and calculating a mean value and a standard deviation of the nearest neighbor distances of all point clouds, and regarding point clouds satisfying the following conditions as spatial position abnormal isolated noise points: wherein: is the nearest neighbor distance of the point cloud, is the mean of the nearest neighbor distances of the global point cloud, is the standard deviation of the nearest neighbor distances of the global point cloud; Step S1-5-2: calculating reflection intensity of each point cloud, comparing a difference between the reflection intensity of each point cloud and a mean value of reflection intensities of all point clouds in its neighborhood, and regarding the point cloud as a reflection intensity abnormal point if the difference is greater than a first preconfigured difference threshold. Step S1-5-3: judging whether there are abnormal reflection intensity points or spatial position abnormal isolated noise points in all updated point clouds, if yes, performing step S1-6, otherwise performing step S2.
4. The track measurement method based on line structured light according to claim 1, characterized in that, The step S2 comprises: Step S2-1: dividing all filtered point clouds into multiple sections according to the scanning direction; Step S2-2: performing height statistics on the point clouds in all sections, and screening the track preliminary candidate region from the point clouds in each section based on the track height continuity constraint, wherein the track height continuity constraint is that the absolute value of the height difference between the lowest part of the track in any section and the lowest part of the track in the adjacent section is less than 15 mm; Step S2-3: sorting all point clouds in the track preliminary candidate region of the section according to the transverse coordinates from small to large, and calculating the unit normal vector of all point clouds in the track preliminary candidate region of each section to form a normal sequence; Step S2-4: processing the normal sequence by using a sliding window with a length of L and a step of 1, calculating the average change amplitude of the elements in each step sliding window of the normal sequence, and if the average change amplitude is less than a preconfigured amplitude threshold, the point cloud corresponding to the elements in the step sliding window of the normal sequence is included in the track candidate region of the section.
5. The track measurement method based on line structured light according to claim 4, characterized in that, The step S2-2 comprises: Step S2-2-1: performing height statistics on the point clouds in all sections, and calculating the average height of the lowest multiple point clouds in the point clouds in each section as the first effective height of the section; Step S2-2-2: initializing the first state value of all sections as state one; Step S2-2-3: selecting a section with a first state value of state one, judging whether the absolute value of the height difference between the first effective height of the section and the first effective height of the adjacent section is less than 15 mm, if yes, performing step S2-2-4, otherwise, performing step S2-2-5; Step S2-2-4: setting the first state value of the currently selected section as state two, judging whether there is a section with a first state value of state one, if yes, returning to step S2-2-3, otherwise, taking the remaining point clouds of all sections as the track preliminary candidate region of the section, and performing step S2-3; Step S2-2-5: deleting the point clouds of the currently selected section and its adjacent sections, so that the absolute value of the height difference between the first effective height of the currently selected section and the first effective height of the adjacent section is less than 15 mm, updating the first effective height of the currently selected section and its adjacent sections, updating the first state value of the currently selected section as state two, initializing the first state value of all other sections as state one, and returning to step S2-2-3.
6. The track measurement method based on line structured light according to claim 4, characterized in that, The average change amplitude is: wherein: is the average variation amplitude, is the length of the sliding window, is the element of the normal sequence within the sliding window at position i is the element of the normal sequence within the sliding window at position is the element of the normal sequence within the sliding window at position i +1.
7. The track measurement method based on line structured light according to claim 1, wherein, The interpolation correction method in the step S5 is linear interpolation.
8. The track measurement method based on line structured light according to claim 1, wherein, The process of obtaining the track roll angle and pitch angle of a single section in the step S6 comprises: Step S6-1: setting the initial roll angle and pitch angle of the standard track template as 0, and aligning the centers of the standard track template and the track point cloud of the section; Step S6-2: transform the roll angle and the pitch angle, and combine the fixed step translation standard rail template, respectively calculate the sum of distances from each rail point cloud in the section to the standard rail template, and take the roll angle and the pitch angle of the standard rail template when the sum of distances is the smallest as the rail roll angle and the pitch angle of the section. 9.A track measuring device based on line structured light, comprising a memory, a processor, and a program stored in the memory, characterized in that, The program, when executed by the processor, implements the method of any one of claims 1-8.
10. A storage medium having stored thereon a program, characterized by The program, when executed, implements the method of any one of claims 1-8.
Citation Information
Patent Citations
Existing line state comprehensive analysis method and system based on three-dimensional mobile scanning system
CN119197374A
Mileage correction method and device based on track fastener feature automatic identification and storage medium
CN118274880A
High-speed rail tunnel no-survey mark section deformation resolving method
CN120726002A
Fire-fighting robot control method based on three-dimensional point cloud
CN120860537A
Method and device for measuring three-dimensional size of large-size part based on machine vision
CN121067715A