Line laser sensor-based leveling data processing method and system, and storage medium
By using Gaussian smoothing and binary mask segmentation to divide the effective laser area, combined with the light intensity distribution of unsaturated pixel points and confidence-weighted filtering, the problem of noise interference in line laser leveling measurement was solved, and the stability and accuracy of track leveling measurement were improved.
Patent Information
- Application Number
- CN202611645125.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-23
- Publication Date
- 2026-11-27
AI Technical Summary
In existing linear laser leveling measurement schemes, the light intensity grayscale data is easily affected by dark current noise, thermal noise and ambient light sources, resulting in errors in laser center position extraction and affecting the accuracy and stability of track leveling measurement.
Gaussian smoothing preprocessing and binary mask segmentation of the effective laser area are adopted. The center positioning method is selected by combining saturation information. The laser center position is determined by using unsaturated pixel points. Noise interference is suppressed by confidence weighting and low-pass filtering. The real-time track leveling value is calculated.
It significantly improves centering accuracy under strong light and overexposure conditions, enhances the stability and accuracy of track leveling measurements, and suppresses error accumulation caused by noise and vibration.
Smart Images

Figure CN123175218A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of track leveling data processing technology, and more specifically, to a leveling data processing method, system, and storage medium based on a line laser sensor. Background Technology
[0002] Tamping operations require detecting changes in the track's height relative to a measurement reference and adjusting the track accordingly. Traditional chord-based tamping measurements use a physical chord as a reference, which is susceptible to sagging, vibration, wear, and breakage. Using a line laser instead of a physical chord allows for obtaining track tamping data by detecting changes in the line laser's position on an imaging plate.
[0003] In existing linear laser leveling measurement schemes, dynamic threshold segmentation and gray-scale centroid methods are typically used to extract the laser center position, along with fixed-coefficient low-pass filtering to suppress vibration interference. However, in actual operation, one-dimensional light intensity gray-scale data may be superimposed with dark current noise, thermal noise, and shot noise. Ambient light sources or light spots formed by highly reflective objects may also cause multiple local peaks in the light intensity distribution, thus interfering with the determination of the effective laser area and the extraction of the laser center position. Furthermore, when the laser irradiance is too high or the exposure parameters are too large, the acquired gray-scale values reach the quantization limit, resulting in a saturation flat-top clipping phenomenon. Using the gray-scale centroid method to extract the laser center position may then introduce systematic eccentricity errors due to the distortion of the mass distribution in the flat-top region, thereby affecting the measurement accuracy and stability of the real-time track leveling values. Summary of the Invention
[0004] In order to at least overcome the above-mentioned shortcomings in the prior art, the purpose of this application is to provide a method, system and storage medium for flattening data processing based on a line laser sensor.
[0005] In a first aspect, embodiments of this application provide a method for processing leveling data based on a line laser sensor, applied to a tamping machine leveling system. The tamping machine leveling system includes a line laser emitter, a measuring trolley, and a line laser measuring sensor mounted on the measuring trolley. The data processing method includes: acquiring a reference position and acquiring light intensity grayscale data collected by the line laser measuring sensor; performing Gaussian smoothing preprocessing on the light intensity grayscale data to obtain a binary mask based on the smoothed light intensity data after Gaussian smoothing; determining an effective laser region based on the binary mask and determining saturation information within the effective laser region; selecting a corresponding center positioning method according to the saturation information, processing the light intensity grayscale data within the effective laser region to determine the laser center position, wherein, when saturation exists in the effective laser region, the laser center position is determined using the light intensity distribution of unsaturated pixels within the effective laser region; performing confidence weighting and filtering on the current laser center position sequence to obtain a filtered laser center position; and calculating the real-time track leveling value based on the filtered laser center position and the reference position.
[0006] In one possible implementation, the step of selecting the corresponding center positioning method based on the saturation information and processing the light intensity grayscale data within the effective laser area to determine the laser center position includes: when the saturation information indicates that the effective laser area is not saturated, determining the laser center position based on the maximum light intensity point within the effective laser area; or, when the saturation information indicates that the effective laser area is saturated, performing quadratic curve fitting based on the unsaturated pixel points within the effective laser area, and determining the laser center position based on the extreme points of the fitted curve.
[0007] In one possible implementation, the step of performing Gaussian smoothing preprocessing on the light intensity grayscale data and obtaining a binary mask based on the smoothed light intensity data after Gaussian smoothing includes: performing Gaussian smoothing preprocessing on the light intensity grayscale data to obtain smoothed light intensity data; and inputting the smoothed light intensity data into a pre-trained neural network segmentation model to obtain the binary mask.
[0008] In one possible implementation, the saturation information includes the number of saturated pixels. The step of determining the effective laser region based on the binary mask and determining the saturation information within the effective laser region includes: determining the effective laser region based on the binary mask and counting the number of saturated pixels within the effective laser region whose grayscale values reach a preset threshold.
[0009] In one possible implementation, when the saturation information indicates that the effective laser region is not saturated, determining the laser center position based on the maximum light intensity points within the effective laser region includes: when the number of saturated pixels is zero, extracting the maximum light intensity points within the effective laser region as the laser center position; if there are multiple adjacent and equal maximum light intensity points, taking the arithmetic mean of the coordinates corresponding to these maximum light intensity points as the laser center position.
[0010] In one possible implementation, when the saturation information indicates that the effective laser region is saturated, performing quadratic curve fitting based on the unsaturated pixel points within the effective laser region and determining the laser center position based on the extreme points of the fitted curve includes: when the number of saturated pixels is greater than zero, selecting unsaturated pixel points within the effective laser region whose gray values are in a preset high gray-level transition range; performing least-squares quadratic curve fitting based on the selected unsaturated pixel points to obtain a quadratic curve; and using the extreme points of the quadratic curve as the laser center position.
[0011] In one possible implementation, the step of performing confidence-weighted calculation and filtering on the current laser center position sequence to obtain the filtered laser center position includes: calculating the ratio of the number of saturated pixels to the total number of effective pixels in the effective laser region as the saturated pixel ratio, and obtaining a confidence level based on the saturated pixel ratio; performing confidence-weighted mean filtering on the current laser center position sequence based on the confidence level to obtain a weighted center sequence; and performing low-pass filtering on the weighted center sequence to obtain the filtered laser center position.
[0012] In one possible implementation, the step of calculating the real-time track leveling value based on the filtered laser center position and the reference position includes: calculating the height difference between the filtered laser center position and the reference position as the real-time track leveling value.
[0013] Secondly, this application also provides a leveling data processing system based on a line laser sensor, which is applied to a tamping machine leveling system. The tamping machine leveling system includes a line laser emitter, a measuring trolley, and a line laser measuring sensor mounted on the measuring trolley.
[0014] The data processing system includes: an acquisition module for acquiring a reference position and acquiring light intensity grayscale data collected by a line laser measurement sensor; a preprocessing module for performing Gaussian smoothing preprocessing on the light intensity grayscale data and obtaining a binary mask based on the smoothed light intensity data after Gaussian smoothing; a saturation information determination module for determining an effective laser region based on the binary mask and determining the saturation information within the effective laser region; a laser center position determination module for selecting a corresponding center positioning method according to the saturation information, processing the light intensity grayscale data within the effective laser region, and determining the laser center position, wherein, when saturation exists in the effective laser region, the laser center position is determined using the light intensity distribution of unsaturated pixels within the effective laser region; a filtering module for performing confidence weighting and filtering on the current laser center position sequence to obtain the filtered laser center position; and a real-time leveling module for calculating the real-time track leveling value based on the filtered laser center position and the reference position.
[0015] Thirdly, embodiments of this application also provide a computer-readable storage medium, wherein computer-executable instructions are used to cause a computer to perform the data processing method based on a line laser sensor as described in any one of the first aspects.
[0016] Based on any of the above aspects, the leveling data processing method, system, and storage medium based on a line laser sensor provided in this application suppress background dark noise and shot noise through Gaussian smoothing preprocessing, accurately segment the effective laser area using a binary mask, and filter out ambient light spot interference. Furthermore, it selects the corresponding center positioning method using saturation information and determines the center using the light intensity distribution of unsaturated pixels when saturated, avoiding center estimation bias caused by saturated flat-top areas, significantly improving centering accuracy under strong illumination and overexposure conditions. Finally, it suppresses error accumulation caused by high-saturation frames and vibration spikes through confidence-weighted and low-pass cascade filtering, obtaining stable and accurate real-time leveling values of the laser center position and trajectory, thus improving the stability of leveling measurements. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings required in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of the tamping and leveling system provided in this application.
[0019] Figure 2This is a flowchart illustrating a method for processing leveling data based on a line laser sensor provided in this application.
[0020] Figure 3 This is a schematic diagram illustrating the effect of Gaussian smoothing preprocessing.
[0021] Figure 4 This is a schematic diagram showing the light intensity distribution including the ambient light spot.
[0022] Figure 5 This is a schematic diagram of a fully connected neural network structure.
[0023] Figure 6 This is a schematic diagram of the light intensity distribution for unsaturated peaks and saturated clipped peaks.
[0024] Figure 7 A schematic diagram illustrating the principle of calculating the leveling value for the leveling data processing method based on a line laser sensor provided in this application.
[0025] Figure 8 This is a possible structural block diagram of the leveling data processing system based on a line laser sensor provided in this application. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0027] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0028] It should be noted that, where there is no conflict, different features in the embodiments of this application can be combined with each other.
[0029] In order to solve the above-mentioned technical problems in the prior art, this application provides a method for processing leveling data based on a line laser sensor.
[0030] Please refer to Figure 1 The leveling data processing method based on a line laser sensor, as described in this invention, is applied to a tamping machine leveling system. The tamping machine leveling system includes a line laser emitter, a measuring carriage, and a line laser measuring sensor mounted on the measuring carriage. The line laser emitter is fixedly installed at the bottom of the tamping machine, and the measuring carriage is fixedly installed below the bottom of the tamping machine via a vertical telescopic rod. The line laser measuring sensor is positioned along the optical path of the line laser. The line laser emitted by the emitter illuminates the imaging plate of the sensor along the measurement reference direction, forming a bright line on the imaging plate. The corresponding light intensity grayscale data is acquired by a line scan camera, where the light intensity grayscale data is one-dimensional. The line scan camera can be a CCD or CMOS sensor. When the track leveling value changes, the position of the line laser illuminating the sensor's imaging plate changes accordingly. The line laser measuring sensor detects the light intensity grayscale data on the imaging plate in real time and reports the calculated leveling value to the tamping machine system.
[0031] It is not hard to understand that Figure 1 Used to illustrate the connections and optical path relationships of various components, not to represent the actual size proportions of the components.
[0032] The following is combined Figure 2 The flowchart shown illustrates the method for processing leveling data based on a line laser sensor provided in this application, and its detailed steps are described below.
[0033] Step S110: Obtain the reference position and acquire the light intensity grayscale data collected by the line laser measurement sensor.
[0034] In this step, the reference position is used to characterize the position of the horizontal bright line formed by the line laser emitted by the line laser emitter illuminating the imaging plate of the laser measurement sensor. The line laser horizontally illuminates the imaging plate of the laser measurement sensor on a horizontal track, forming a horizontal bright line; the position of this line laser is collected as the reference position.
[0035] Step S120: Perform Gaussian smoothing preprocessing on the light intensity grayscale data, and obtain a binary mask based on the smoothed light intensity data after Gaussian smoothing.
[0036] The inventors discovered that in actual working conditions, imaging systems are often affected by complex environmental background light and stray radiation. This type of noise linearly superimposes with the light intensity signal of the target laser beam in the spatial domain, causing the original light intensity distribution curve to degenerate into a noisy signal accompanied by high-frequency fluctuations.
[0037] To address the aforementioned issues, this step can first perform Gaussian smoothing preprocessing on the one-dimensional light intensity grayscale data. By utilizing the low-pass characteristic of the Gaussian function in the frequency domain, background dark noise can be effectively filtered out, ensuring the accuracy of subsequent center extraction.
[0038] Specifically, let the acquired original discrete light intensity signal be... Smoothed light intensity data is The one-dimensional Gaussian convolution kernel used for:
[0039] In equation (1), σ is the spatial standard deviation of the Gaussian kernel function. Please refer to... Figure 3 Gaussian smoothing preprocessing can effectively suppress random noise (thermal noise, dark current) and shot noise in the photoelectric detection process; at the same time, thanks to its symmetry and monotonically decreasing characteristics, it can maintain the macroscopic geometric shape and edge gradient information of the illumination curve while attenuating high-frequency noise, thus avoiding edge distortion or broadening.
[0040] It should be noted that, Figure 3 This diagram illustrates the Gaussian smoothing preprocessing effect. The parameters and waveforms shown are not intended as test results for actual leveling measurement accuracy.
[0041] The inventors further discovered that, such as Figure 4 In actual working conditions, non-target light spots generated by ambient light sources or reflective objects may enter the camera's field of view along with the target line laser, forming multiple local peaks. If the interference of these ambient background light spots is not removed beforehand, it may lead to misjudgment or even serious offset errors in subsequent center point localization algorithms based on extreme value methods or gray-scale centroid methods.
[0042] Therefore, after obtaining the smoothed light intensity data after Gaussian smoothing, it must be input into a pre-trained neural network segmentation model. The neural network segmentation model is used to intelligently segment and adaptively remove illumination curves containing complex background light, resulting in a binary mask. The binary mask is used to distinguish between the laser core region and non-core regions.
[0043] For example, the neural network segmentation model in this embodiment can be adopted. Figure 5 The fully connected neural network FCNN shown here smooths the light intensity data. As the input feature vector of the network, high-dimensional abstract features of the light intensity distribution are extracted through nonlinear feature transformation of multiple fully connected layers. For the first... layer The forward propagation process is as follows (2):
[0044] in, For input layer; and The first Layer weight matrix and bias vector; This is an activation function (such as the ReLU function) used to introduce nonlinear mapping capabilities. After... After layer feature extraction, the network output layer calculates the feature at each position. Predicted probability of belonging to the laser core region To meet the requirements of the binary classification task, the output layer uses the Sigmoid activation function to map the output to the (0,1) interval, as defined by equation (3):
[0045] in, For the output layer The linear mapping results for each node are obtained. Finally, a binarized prediction result is generated through a threshold decision mechanism. Set classification thresholds. (Usually taken as 0.5), the decision is made according to formula (4):
[0046] In the formula, This indicates that the location is identified as the laser core region. This indicates that the region is classified as a non-core area (i.e., an area with ambient light spots or noise). Therefore, the network output and input... Binarized mask vector of equal dimensions It adaptively learns the illumination curve features under different working conditions, effectively filters ambient light spot interference, and improves the robustness and generalization ability of core illumination region segmentation.
[0047] It should be noted that the neural network segmentation model can also use a one-dimensional convolutional neural network 1D-CNN, or a one-dimensional variant of U-Net.
[0048] Step S130: Determine the effective laser region based on the binary mask, and determine the saturation information within the effective laser region.
[0049] In this step, the effective laser region is determined based on a binary mask. Specifically, the set of pixels identified as the laser core region is selected from the binary mask and used as the effective data domain for subsequent center localization, eliminating interference from ambient light spots and background noise. Simultaneously, saturation information within the effective laser region is determined. This saturation information characterizes whether the light intensity signal within the effective laser region is saturated and the severity of the saturation. For example, the saturation information includes the number of saturated pixels.
[0050] Step S140: Select the corresponding center positioning method according to the saturation information, process the light intensity grayscale data in the effective laser area, and determine the laser center position. When there is saturation in the effective laser area, the laser center position is determined by the light intensity distribution of the unsaturated pixel points in the effective laser area.
[0051] Please refer to Figure 6 The inventors discovered that during actual imaging, when a line laser is projected onto the target surface and diffusely reflected before entering the line scan camera, if the laser irradiance is too high or the camera exposure parameters are too large, the incident light intensity will exceed the dynamic quantization range of the image sensor, causing the light intensity signal to saturate and be truncated near its peak. Under this saturation state, if the traditional gray-scale centroid method is still used to calculate all pixels, a significant systematic eccentricity error will be introduced due to the distortion and expansion of the quality distribution in the flat-top region.
[0052] To avoid systematic bias in center estimation caused by saturated flat-top regions and improve centering accuracy under strong illumination and overexposure conditions, this step adaptively selects the center positioning method based on saturation information. Specifically, when saturation information indicates that the effective laser area is not saturated, the laser center position can be determined based on the maximum intensity point. When saturation information indicates that the effective laser area is saturated, a quadratic curve can be fitted based on the unsaturated pixels within the effective laser area, and the laser center position can be determined based on the extreme points of the fitted curve.
[0053] Step S150: Perform confidence weighting and filtering on the current laser center position sequence to obtain the filtered laser center position.
[0054] In this step, the confidence level is first determined based on the saturation level within the effective laser region. Then, a pre-calculation of the confidence level is performed on the current laser center position sequence to suppress unreliable center data caused by light intensity saturation. Afterward, filtering is applied to attenuate high-frequency trajectory spike noise introduced by mechanical vibration. This approach balances anti-saturation capability and vibration resistance, improving the robustness and smoothness of the laser center position sequence under complex operating conditions.
[0055] Step S160: Calculate the real-time track leveling value based on the filtered laser center position and the reference position.
[0056] In this embodiment, Gaussian smoothing preprocessing suppresses background dark noise and shot noise, and a binary mask accurately segments the effective laser area, filtering out ambient light spot interference. Then, saturation information is used to select the corresponding center positioning method, and the center is determined using the intensity distribution of unsaturated pixels when saturated, avoiding center estimation bias caused by saturated flat-top regions, significantly improving centering accuracy under strong lighting and overexposure conditions. Finally, confidence-weighted and low-pass cascade filtering suppresses error accumulation caused by high-saturation frames and vibration spikes, obtaining stable and accurate laser center position and real-time trajectory leveling values. Furthermore, this invention can be implemented on the hardware structure of existing line laser measurement sensors and can be integrated with existing temperature compensation, adaptive calibration, leveling reporting, and data recording modules, facilitating deployment through software updates.
[0057] Furthermore, in step S130, the core illumination area mask is obtained. Next, the effective laser area needs to be determined based on the pixel positions corresponding to the effective markers in the binary mask, and the number of saturated pixels within this area whose grayscale values reach a preset threshold needs to be counted. In this embodiment, the preset threshold can be the upper limit of the sensor's sampling quantization saturation. For example, for 8-bit quantized data, the preset threshold is 255, and pixels with a grayscale value of 255 are considered saturated pixels.
[0058] The number of saturated pixels can be expressed as When the number of saturated pixels When the value is zero, the saturation information indicates that the effective laser area is not saturated; when the number of saturated pixels is zero... When the value is greater than zero, the saturation information indicates that there is saturation in the effective laser area.
[0059] Furthermore, step S140 can be implemented by the following method.
[0060] When the saturation information indicates that the effective laser region is not saturated, the laser center position is determined based on the maximum intensity point within the effective laser region. Specifically, when At that time, the point with the maximum light intensity within the effective laser region is extracted as the laser center position. In this embodiment, the selected point of maximum light intensity is the pixel point corresponding to the maximum light intensity within the effective laser region. When the maximum light intensity corresponds to only one pixel point, its position coordinates are taken as the laser center position. To reduce computational load and improve real-time performance, if multiple adjacent and equally valuable maximum light intensity points exist, the arithmetic mean of the coordinates corresponding to these maximum light intensity points is taken as the laser center position. This is to suppress center jitter caused by single-point noise, quantization fluctuations, or local platform issues.
[0061] When saturation information indicates that the effective laser area is saturated, a quadratic curve is fitted based on the unsaturated pixels within the effective laser area, and the laser center position is determined based on the extreme points of the fitted curve. Specifically, when Instead of directly using the saturated flat-top region to determine the peak position, non-saturated pixels with gray values in a preset high gray-level transition range are selected within the effective laser area. This range corresponds to the light intensity range close to the peak but not yet reaching the quantization upper limit, and can be specifically expressed as:
[0062] in, This represents the grayscale value of the light intensity at pixel location x. This is the lower threshold value for the preset high grayscale transition range. This is the upper limit threshold for the preset high grayscale transition range.
[0063] For example, for 8-bit quantized data, the preset high grayscale transition range can be [200, 254]. This range can not only effectively exclude invalid data in the saturated flat-top area that lacks gradient information due to quantization truncation, but also filter out edge dark area data that is far from the peak and has a low signal-to-noise ratio.
[0064] A fitting sample set is constructed based on the selected unsaturated pixel points, and its position coordinate vector is: The corresponding light intensity vector is A quadratic curve model is established, as shown in equation (5):
[0065] The optimal coefficient vector is obtained using the least squares method, minimizing the sum of squared residuals between the actual light intensity at each sample point and the fitted light intensity of the quadratic curve at the corresponding coordinates. For example, the optimal coefficient vector could be... .
[0066] Subsequently, the derivative of the fitted quadratic curve is taken and set to zero to obtain the location of the extreme points, and the coordinates of the extreme points on the horizontal axis are plotted. As the laser center location Specifically, as shown in equation (6):
[0067] Where a and b are the coefficients of the quadratic and linear terms of the quadratic curve in equation (5), respectively.
[0068] In this embodiment, the corresponding center positioning method is selected according to the saturation information. When the effective laser area is not saturated, the maximum value point is taken as the laser center position. When the effective laser area is saturated, parabolic fitting is performed on the near peak non-flat apex to obtain the extreme value point. This can avoid the saturated flat top area pulling the center estimation off track, and significantly improve the centering accuracy under complex working conditions such as strong light and overexposure.
[0069] In one embodiment of this application, step S150 can be implemented by the following method.
[0070] First, the ratio of the number of saturated pixels to the total number of effective pixels in the effective laser area is calculated as the saturated pixel ratio, and the confidence level is obtained based on the saturated pixel ratio, as shown in equation (7):
[0071] in, This refers to the total number of saturated pixels with a gray value of 255 within the effective laser area, which corresponds to the number of saturated pixels in this embodiment. This represents the total number of effective pixels within the effective laser area. Indicates the percentage of saturated pixels; This indicates the confidence level of the current frame. When the total number of valid pixels is positive, the higher the proportion of saturated pixels, the lower the confidence level.
[0072] Next, a confidence-weighted mean filter is applied to the current laser center position sequence based on the confidence level to obtain a weighted center sequence, which is obtained from the laser center position. For example, the first stage is a short-time-window weighted mean filter: within a sliding window of length 2, a confidence-weighted mean filter is applied to the current laser center position sequence, as shown in equation (8).
[0073] in, The weighted center value of the current frame. This represents the original laser center position in the current frame. It is the weighted center value of the previous frame.
[0074] When the saturation pixel ratio When the confidence level is high, the current frame confidence level is high. As the saturation percentage decreases, the weight of the current frame's center value decreases accordingly to suppress unreliable center data introduced by saturation clipping from entering the final result. When the confidence level is low, the current frame confidence level is low. The weight of the current frame center value is increased accordingly to accurately preserve the dynamic trajectory change characteristics of the illumination center point.
[0075] The second stage performs a first-order low-pass filter on the weighted center sequence to obtain the filtered laser center position, as shown in equation (9):
[0076] In the formula, The sequence corresponding to the filtered laser center position is used as the recursive state, with the filtered laser center position of the previous moment serving as the recursive state. This is the low-pass smoothing coefficient. The larger the value, the more important it is for the latest weighted mean. The stronger the dynamic tracking ability; the lower the smoothness coefficient. The smaller the value, the more significant the smoothing effect of the filter.
[0077] In this embodiment, the pre-processing confidence-weighted calculation can suppress unreliable center data caused by light intensity saturation, while the post-processing first-order low-pass filtering can attenuate high-frequency trajectory spike noise introduced by mechanical vibration. The synergistic effect of these two processes balances anti-saturation capability and vibration resistance, improving the robustness and smoothness of the laser center position sequence under complex conditions, thereby providing stable and reliable data for the accurate calculation of real-time track leveling values.
[0078] In this embodiment of the application, in step S160, the height difference between the filtered laser center position and the reference position can be calculated as the real-time track leveling value. For example, refer to... Figure 7 A straight line L is formed between the two wheels of the tamping trolley. The vertical height difference H1 between the trolley wheel and line L is measured. A line laser image is formed at point P2 on the sensor imaging plate. P1 is the image point when the trolley wheel is on line L, and H2 is the distance between P1 and P2. Therefore, H1 and H2 are equal. By measuring the distance between the laser imaging positions P2 and P1 on the sensor in real time, the real-time track leveling value can be obtained.
[0079] Based on the same inventive concept, this application also provides a leveling data processing system based on a line laser sensor. This system is applied to the tamping machine leveling system in the above embodiments, and the specific tamping machine leveling system will not be described in detail here. Please refer to... Figure 8 , Figure 8 This is a schematic diagram of a functional module of a line laser sensor-based leveling data processing system 200 provided in an embodiment of this application. This embodiment of the application can divide the line laser sensor-based leveling data processing system 200 into functional modules according to the method embodiments executed by a computer device. That is, the following functional modules corresponding to the system 200 can be used to execute the above-mentioned method embodiments. The functional modules of the line laser sensor-based leveling data processing system 200 and their functions are as follows.
[0080] The acquisition module 210 is used to acquire the reference position and the one-dimensional light intensity grayscale data collected by the line laser measurement sensor.
[0081] The preprocessing module 220 is used to perform Gaussian smoothing preprocessing on the light intensity grayscale data, and obtain a binary mask based on the smoothed light intensity data after Gaussian smoothing.
[0082] The saturation information determination module 230 is used to determine the effective laser region based on the binary mask and to determine the saturation information within the effective laser region.
[0083] The laser center location determination module 240 is used to select the corresponding center positioning method based on saturation information, process the light intensity grayscale data in the effective laser area, and determine the laser center location. In the case of saturation in the effective laser area, the laser center location is determined by the light intensity distribution of the unsaturated pixel points in the effective laser area.
[0084] The filtering module 250 is used to perform confidence weighting and filtering on the current laser center position sequence to obtain the filtered laser center position.
[0085] The real-time leveling module 260 is used to calculate the real-time leveling value of the track based on the filtered laser center position and the reference position.
[0086] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0087] Furthermore, this application embodiment also provides a readable storage medium storing computer-executable instructions. When the processor executes the computer-executable instructions, the above-described method for processing leveling data based on a line laser sensor is implemented.
[0088] In summary, this application provides a method, system, and storage medium for leveling data processing based on a line laser sensor. Gaussian smoothing preprocessing suppresses background dark noise and shot noise, while a binary mask accurately segments the effective laser region, filtering out ambient light spot interference. Furthermore, saturation information is used to select the corresponding center positioning method, and the light intensity distribution of unsaturated pixels is used to determine the center when saturated, avoiding center estimation bias caused by saturated flat-top areas and significantly improving centering accuracy under strong lighting and overexposure conditions. Finally, confidence-weighted and low-pass cascade filtering suppresses error accumulation caused by high-saturation frames and vibration spikes, obtaining stable and accurate real-time leveling values for the laser center position and trajectory, thus improving the stability of the leveling measurement.
[0089] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for processing leveling data based on a line laser sensor, applied to a tamping machine leveling system, the tamping machine leveling system comprising a line laser emitter, a measuring carriage, and a line laser measuring sensor mounted on the measuring carriage, characterized in that, The data processing method includes: Obtain the reference position and acquire the light intensity grayscale data collected by the line laser measurement sensor; The light intensity grayscale data is preprocessed with Gaussian smoothing, and a binary mask is obtained based on the smoothed light intensity data after Gaussian smoothing. The effective laser region is determined based on the binary mask, and the saturation information within the effective laser region is determined. Based on the saturation information, a corresponding center positioning method is selected, and the light intensity grayscale data within the effective laser area is processed to determine the laser center position. Specifically, when there is saturation in the effective laser area, the laser center position is determined by the light intensity distribution of the unsaturated pixels within the effective laser area. The current laser center position sequence is subjected to confidence weighting and filtering to obtain the filtered laser center position. The real-time track leveling value is calculated based on the filtered laser center position and the reference position.
2. The method for processing leveling data based on a line laser sensor according to claim 1, characterized in that, The step of selecting the corresponding center positioning method based on the saturation information, processing the light intensity grayscale data within the effective laser area, and determining the laser center position includes: When the saturation information indicates that the effective laser region is not saturated, the laser center position is determined based on the maximum intensity point within the effective laser region; or... When the saturation information indicates that the effective laser region is saturated, a quadratic curve is fitted based on the unsaturated pixel points within the effective laser region, and the laser center position is determined based on the extreme points of the fitted curve.
3. The method for processing leveling data based on a line laser sensor according to claim 1, characterized in that, The step of performing Gaussian smoothing preprocessing on the light intensity grayscale data, and obtaining a binary mask based on the smoothed light intensity data after Gaussian smoothing, includes: The light intensity grayscale data is preprocessed with Gaussian smoothing to obtain smoothed light intensity data; The smoothed light intensity data is input into a pre-trained neural network segmentation model to obtain the binary mask.
4. The method for processing leveling data based on a line laser sensor according to claim 2, characterized in that, The saturation information includes the number of saturated pixels; The step of determining the effective laser region based on the binary mask and determining the saturation information within the effective laser region includes: The effective laser region is determined based on the binary mask, and the number of saturated pixels whose gray values reach a preset threshold within the effective laser region is counted.
5. The method for processing leveling data based on a line laser sensor according to claim 4, characterized in that, When the saturation information indicates that the effective laser region is not saturated, determining the laser center position based on the maximum intensity point within the effective laser region includes: When the number of saturated pixels is zero, the maximum light intensity point within the effective laser region is extracted as the laser center position; If there are multiple adjacent and equal intensity maxima, the arithmetic mean of the coordinates of these intensity maxima is taken as the laser center position.
6. The method for processing leveling data based on a line laser sensor according to claim 4, characterized in that, When the saturation information indicates that the effective laser region is saturated, the process of performing quadratic curve fitting based on the unsaturated pixels within the effective laser region and determining the laser center position based on the extreme points of the fitted curve includes: When the number of saturated pixels is greater than zero, select non-saturated pixel points in the effective laser area whose gray values are in a preset high gray-level transition range; The quadratic curve is obtained by least-squares quadratic curve fitting based on the selected unsaturated pixel points; The extreme point of the quadratic curve is taken as the laser center position.
7. The method for processing leveling data based on a line laser sensor according to claim 4, characterized in that, The step of performing confidence-weighted calculations and filtering on the current laser center position sequence to obtain the filtered laser center position includes: The ratio of the number of saturated pixels to the total number of effective pixels in the effective laser area is calculated as the saturated pixel ratio, and the confidence level is obtained based on the saturated pixel ratio. Based on the confidence level, the current laser center position sequence is subjected to confidence-weighted mean filtering to obtain a weighted center sequence; The weighted center sequence is low-pass filtered to obtain the filtered laser center position.
8. The method for processing leveling data based on a line laser sensor according to claim 1, characterized in that, The calculation of the real-time track leveling value based on the filtered laser center position and the reference position includes: The height difference between the filtered laser center position and the reference position is calculated and used as the real-time track leveling value.
9. A leveling data processing system based on a line laser sensor, applied to a tamping machine leveling system, the tamping machine leveling system comprising a line laser emitter, a measuring carriage, and a line laser measuring sensor mounted on the measuring carriage, characterized in that, The data processing system for leveling includes: The acquisition module is used to acquire the reference position and the light intensity grayscale data collected by the line laser measurement sensor; The preprocessing module is used to perform Gaussian smoothing preprocessing on the light intensity grayscale data, and obtain a binary mask based on the smoothed light intensity data after Gaussian smoothing. A saturation information determination module is used to determine the effective laser region based on the binary mask, and to determine the saturation information within the effective laser region; The laser center location determination module is used to select the corresponding center positioning method according to the saturation information, process the light intensity grayscale data in the effective laser area, and determine the laser center location. In the case of saturation in the effective laser area, the laser center location is determined by the light intensity distribution of the unsaturated pixel points in the effective laser area. The filtering module is used to perform confidence-weighted calculations and filtering on the current laser center position sequence to obtain the filtered laser center position. The real-time leveling module is used to calculate the real-time leveling value of the track based on the filtered laser center position and the reference position.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the leveling data processing method based on a line laser sensor as described in any one of claims 1 to 8.
