Image-based steel rail multi-dimensional light band rapid positioning method and related device

By employing an image-based multi-dimensional light strip rapid positioning method for rails, utilizing a sleeper detection model and gradient value calculation, the problem of low light strip positioning accuracy is solved, achieving high-precision and rapid light strip detection.

CN120852267APending Publication Date: 2025-10-28CHINA ACAD OF RAILWAY SCI (SHENZHEN) RES & DESIGN INST CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510639005.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-19
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

In existing technologies, the accuracy of optical strip positioning is low, traditional manual inspection is slow and lacks systematic data, and existing automated methods are insufficient in terms of positioning accuracy and stability in real-world environments.

Method used

A rapid image-based multi-dimensional light strip localization method for rails is adopted. By acquiring rail images and using a rail sleeper detection model to determine the center point of the sleeper, the method combines pixel column summation and gradient value calculation to fuse gradient information and pixel projection information to accurately locate the light strip position.

Benefits of technology

It achieves high-precision light strip detection and positioning, improves the speed and accuracy of light strip detection, and enhances stability in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120852267A_ABST
    Figure CN120852267A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of light band positioning, and discloses an image-based steel rail multi-dimensional light band rapid positioning method, which comprises the following steps: acquiring a steel rail image; inputting the steel rail image into a steel rail sleeper detection model, and determining the central point position of the steel rail sleeper; the steel rail sleeper detection model is obtained by training according to a steel rail sleeper detection sample; determining a top surface area image of the steel rail according to the central point position of the steel rail sleeper; carrying out pixel column summation on the top surface area image to obtain one-dimensional projection data, and carrying out gradient value calculation on the one-dimensional projection data to obtain gradient value data; and determining the position of the light band on the steel rail according to the one-dimensional projection data and the gradient value data. According to the embodiment of the invention, high-precision light band detection and positioning are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of optical strip positioning technology, specifically to a method, apparatus, computer equipment, and computer-readable storage medium for rapid positioning of multi-dimensional optical strips on rails based on images. Background Art

[0003] Rail light stripe is a bright mark that extends along the direction of train travel on the rail surface due to the rolling of the wheel flanges against the rail and the mutual friction between the flanges and the rail. Normal wheel-rail interaction produces a light stripe of uniform width on the rail surface. However, when the forces or positions of these forces are abnormal, the width and position of the light stripe change. Therefore, the state of the light stripe reflects the wheel-rail interaction, which has a significant impact on the safety and comfort of train operation. Thus, rail light stripe detection and positioning technology is a crucial guarantee for the safety and comfort of railway transportation.

[0004] Traditional light strip detection relies on manual inspection, using rulers to measure on the rails. This method is labor-intensive, slow, and lacks systematic data storage. Zhou Yu et al. used laser displacement sensors to analyze abnormal light strip fluctuations, deploying measuring points in sections with abnormal light strip fluctuations to measure the dynamic lateral displacement of wheelsets, thereby analyzing the causes of light strip anomalies. However, this method can only be used for point measurement in specific sections and cannot achieve automatic and rapid light strip detection. Wang Lijun used deep learning for light strip classification and detection, but it could not effectively quantify and analyze the width and position of the light strip. Zhong Rui used pixel projection values ​​to segment the light strip edge positions to calculate light strip features. The fixed threshold worked well in experimental environments, but it was easily affected by interference in real-world environments, and its positioning accuracy and stability need further verification.

[0005] The current method of locating the edge of the light strip using edge detection methods such as Canny based on images is slow and easily affected by interference. There is an urgent need for a non-contact method that can quickly locate the position of the light strip and its track, thereby more accurately determining the center point of the light strip. Summary of the Invention

[0006] In view of the above problems, embodiments of the present invention provide a method for rapid positioning of multi-dimensional light strips on rails based on images, which is used to solve the problem of low positioning accuracy of light strips in the prior art.

[0007] According to one aspect of the present invention, a method for rapid positioning of multi-dimensional light strips on rails based on images is provided, the method comprising:

[0008] Acquire images of the rails;

[0009] The rail image is input into the rail sleeper detection model to determine the center point position of the rail sleeper; the rail sleeper detection model is trained based on the rail sleeper detection samples;

[0010] Based on the center point position of the rail sleeper, determine the top surface area image of the rail;

[0011] The pixel columns of the top surface region image are summed to obtain one-dimensional projection data, and the gradient value is calculated on the one-dimensional projection data to obtain gradient value data.

[0012] The position of the light strip on the rail is determined by the one-dimensional projection data and the gradient value data.

[0013] In one alternative approach, acquiring the rail image further includes: acquiring rail surface images along the rail direction using a line scan camera at a preset acquisition frequency to obtain at least one rail image.

[0014] In an alternative approach, before inputting the rail image into the rail sleeper detection model to determine the center point position of the rail sleeper, the method further includes:

[0015] Obtain rail sleeper inspection samples, which include rail sleeper image samples and location labels;

[0016] The detected rail sleeper samples are input into a preset neural network model for training to obtain position prediction results;

[0017] Based on the location prediction result and the location label, the loss of the neural network model is calculated, and the parameters of the neural network model are adjusted according to the loss. The steps of inputting the rail sleeper detection samples into the preset neural network model for training to obtain the location prediction result, and calculating the loss of the neural network model based on the location prediction result and the location label, and adjusting the parameters of the neural network model according to the loss, are continued until the loss reaches a preset loss threshold or a preset number of iterations are reached, thus obtaining the rail sleeper detection model.

[0018] In one alternative approach, determining the top surface region image of the rail based on the center point position of the rail sleeper includes:

[0019] The position of the center point of the top surface of the rail is determined based on the average value of the center point positions of the rail sleepers.

[0020] Based on the center point of the top surface of the rail and the preset length and width values, the top surface area image of the rail is determined from the rail image.

[0021] In one alternative approach, determining the position of the light strip on the rail using the one-dimensional projection data and the gradient value data includes:

[0022] The brightest position of the light band is determined based on the projection values ​​in the one-dimensional projection data.

[0023] The position of the light band edge is determined based on the gradient value in the one-dimensional projection data;

[0024] The position of the track bottom is determined based on the brightest position of the light band and the position of the edge of the light band;

[0025] The position of the light strip on the rail is determined based on the brightest position of the light strip, the position of the edge of the light strip, and the position of the bottom of the rail.

[0026] In one alternative approach, determining the position of the light strip on the rail using the one-dimensional projection data and the gradient value data specifically includes:

[0027] The maximum value of the projection is used to determine the brightest position of the light band.

[0028] The first maximum gradient value is determined as the position of the first light band edge;

[0029] The second maximum gradient value is determined as the edge position of the second light band.

[0030] In one alternative approach, determining the position of the light strip on the rail using the one-dimensional projection data and the gradient value data includes:

[0031] Determine whether the distance from the edge of the first light strip to the bottom of the track exceeds a preset distance threshold;

[0032] When the distance exceeds a preset threshold, the rail image is determined to be a turnout image;

[0033] The current rail image is discarded, and the light band positioning of the next rail image is performed.

[0034] According to another aspect of the present invention, an image-based multi-dimensional light strip rapid positioning device for rails is provided, comprising:

[0035] The acquisition module is used to acquire images of the rails;

[0036] The first determining module is used to input the rail image into the rail sleeper detection model to determine the center point position of the rail sleeper; the rail sleeper detection model is trained based on the rail sleeper detection samples;

[0037] The second determining module is used to determine the top surface area image of the rail based on the center point position of the rail sleeper;

[0038] The projection module is used to sum the pixel columns of the top surface region image to obtain one-dimensional projection data, and to calculate the gradient value of the one-dimensional projection data to obtain gradient value data.

[0039] The third determining module is used to determine the position of the light strip on the rail using the one-dimensional projection data and the gradient value data.

[0040] According to another aspect of the present invention, a computer device is provided, including: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus;

[0041] The memory is used to store at least one executable instruction that causes the processor to perform the operation of the image-based multi-dimensional light strip rapid positioning method for rails.

[0042] According to another aspect of the present invention, a computer-readable storage medium is provided, the storage medium storing at least one executable instruction, which, when executed on a computer device, causes the computer device to perform the operation of the image-based multi-dimensional light strip rapid positioning method for rails.

[0043] This invention acquires a rail image, inputs it into a rail sleeper detection model to determine the center point of the rail sleeper, and then determines the top surface region image of the rail based on the center point position of the rail sleeper. Next, the top surface region image is summed in columns of pixels to obtain one-dimensional projection data, and gradient values ​​are calculated from this one-dimensional projection data to obtain gradient value data. Finally, the one-dimensional projection data and the gradient value data are used to determine the position of the light strip on the rail. This multi-scale positioning method, fusing gradient information and pixel projection information, enhances the edge features of the light strip, enabling high-precision light strip detection and positioning.

[0044] The above description is merely an overview of the technical solutions of the embodiments of the present invention. In order to better understand the technical means of the embodiments of the present invention and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0045] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0046] Figure 1 A flowchart illustrating the image-based multi-dimensional light strip rapid positioning method for rails provided in an embodiment of the present invention is shown.

[0047] Figure 2 This diagram illustrates a rail image in the image-based multi-dimensional light strip rapid positioning method for rails provided in an embodiment of the present invention.

[0048] Figure 3 This diagram illustrates a top surface region image in the image-based multi-dimensional light strip rapid positioning method for rails provided in an embodiment of the present invention.

[0049] Figure 4 This diagram illustrates the correspondence between one-dimensional projection and rail position in the image-based multi-dimensional light strip rapid positioning method for rails provided in an embodiment of the present invention.

[0050] Figure 5 This diagram illustrates the correspondence between gradient data and rail position in the image-based multi-dimensional light strip rapid positioning method for rails provided in an embodiment of the present invention.

[0051] Figure 6 A flowchart illustrating the image-based multi-dimensional light strip rapid positioning method for rails provided in an embodiment of the present invention is shown.

[0052] Figure 7 This diagram illustrates a case of optical strip positioning error in a rail multi-dimensional optical strip rapid positioning method based on image provided in an embodiment of the present invention, where the optical strip is located at a junction.

[0053] Figure 8 This diagram illustrates the structure of the image-based multi-dimensional optical strip rapid positioning device for rails provided in an embodiment of the present invention.

[0054] Figure 9 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention is shown. Detailed Implementation

[0055] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. Although exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be implemented in various forms and should not be limited to the embodiments set forth herein.

[0056] Figure 1 A flowchart illustrating an embodiment of the image-based multi-dimensional light strip rapid positioning method for rails according to the present invention is shown, the method being executed by a computer device. Figure 1 As shown, the method includes the following steps:

[0057] Step 110: Obtain the image of the rail.

[0058] In this embodiment of the invention, a line scan camera is used to acquire images of the rail surface along the direction of the rail at a preset acquisition frequency, thereby obtaining at least one rail image. Figure 2As shown, a line scan camera is positioned directly above the rails to capture images of the track. The track being detected is primarily a slab track, therefore its sleepers are the rail slabs arranged transversely at the bottom of the rails.

[0059] Step 120: Input the rail image into the rail sleeper detection model to determine the center point position of the rail sleeper.

[0060] The rail sleeper detection model was trained based on rail sleeper detection samples. The specific training process is as follows:

[0061] Step 001: Obtain rail sleeper inspection samples. These samples include rail sleeper image samples and location labels. Specifically, the location label can be the center point location of the sleeper.

[0062] Step 002: Input the detected rail sleeper samples into a preset neural network model for training to obtain the position prediction result. The preset neural network model can be an existing image processing model, such as a convolutional neural network.

[0063] Step 003: Based on the location prediction result and the location label, calculate the loss of the neural network model, adjust the parameters of the neural network model according to the loss, and continue to execute the steps of inputting the rail sleeper detection samples into the preset neural network model for training to obtain the location prediction result, and the steps of calculating the loss of the neural network model based on the location prediction result and the location label, and adjusting the parameters of the neural network model according to the loss, until the loss reaches a preset loss threshold or reaches a preset number of iterations, thus obtaining the rail sleeper detection model. The loss function can be the cross-entropy loss function.

[0064] After training the rail sleeper detection model, the rail image is input into the rail sleeper detection model to identify the center point of the rail sleeper from the rail image.

[0065] Step 130: Determine the top surface area image of the rail based on the center point position of the rail sleeper.

[0066] Specifically, the center point of the rail top surface is determined based on the average value of the center point positions of the rail sleepers. Then, based on the center point position of the rail top surface and preset length and width values, the top surface region image of the rail is determined from the rail image. Specifically, since the rail image is acquired by a linear camera and the rail is too short in the acquired image to be considered continuous, the average value of the sleeper center point positions is calculated to determine the center point position of the rail top surface. Since the size of the rail image is fixed, the width of the sleeper top surface can be determined based on the camera's intrinsic and extrinsic parameter transformation relationship. Therefore, the width of the rail top surface is fixed, as in this embodiment of the invention. Figure 3 As shown, the top surface width is 72mm. Due to the camera's shooting distance, the top surface width D has a pixel value of 200, and the length L is the image length with a pixel value of 500. Based on the located center point of the rail's top surface and the top surface width, the top surface area image is determined. The top surface width D is greater than the rail width, and the image height is greater than the height of a sleeper. The purpose is to reduce the rail image to the image area containing a sleeper, thereby improving computational efficiency.

[0067] Step 140: Sum the pixel columns of the top surface region image to obtain one-dimensional projection data, and calculate the gradient value of the one-dimensional projection data to obtain gradient value data.

[0068] Based on the located image of the top surface of the rail, the columns of pixels in the top surface image are first summed. Let the input image of the top surface of the rail be f(x,y), x∈(0,D), y∈(0,L), and the summation formula is: Where i(x,y) is the pixel value in the x-th row and y-th column of the rail top surface image, with a size of (0,255); f(x) is the sum of the pixel grayscale values ​​in the x-th column of the rail top surface image. This method effectively reflects the overall transformation of the light band, and by summing the columns of pixels, the two-dimensional pixels of the rail surface image are projected into one-dimensional data, which can effectively enhance the edge information of the light band.

[0069] Calculate the gradient values ​​of the horizontal projection: g(x)=f(x+Δx)-f(x),x∈(0,D); the horizontal gradient can effectively reflect the edge information of the light band.

[0070] Step 150: Use the one-dimensional projection data and the gradient value data to determine the position of the light strip on the rail.

[0071] In this embodiment of the invention, the brightest position of the light band is determined based on the projection values ​​in the one-dimensional projection data: wherein the maximum value of the projection values ​​is used to determine the brightest position of the light band. The edge positions of the light band are determined based on the gradient values ​​in the one-dimensional projection data. Specifically, the first maximum gradient value is determined as the first edge position of the light band; the second maximum gradient value is determined as the second edge position of the light band. Figure 4 The diagram shows a one-dimensional projection data waveform. The rail bottom position is determined based on the brightest position and the edge position of the light band. The position of the light band on the rail is then determined based on the brightest position, the edge position, and the rail bottom position.

[0072] Specifically, if Figure 5 and Figure 6 As shown, based on the current shooting angle and the imaging position of the light source, it can be roughly determined that the area of ​​the light strip is the brightest in the image of the top surface of the rail, while the edges of the rail head and bottom are the darkest. Therefore, the maximum value of the projection in the one-dimensional projection data is first calculated, i.e., fm = max(f(x)), to locate the brightest position of the light strip. The minimum values ​​at both sides of the brightest value are then calculated, namely fm1 and fm2. The purpose is to find the approximate positions of the light strip and the rail head, to determine the approximate range for gradient optimization, and to use gradient information to accurately locate the positions of the light strip edge and the rail bottom edge. Since the lowest brightness value of the light strip projection reflects the position of the rail head edge, but the feature is not particularly obvious and is easily affected by other factors. Furthermore, the gradient information of the rail bottom is obvious, so the rail bottom gradient information is needed to determine the precise position.

[0073] The first maximum gradient value at the left side of the rail light strip is denoted as: g1 = max(abs(g(x)), x ∈ (fm1, fm), and the maximum gradient value at the right side of the rail light strip is denoted as: g2 = max(abs(g(x))), x ∈ (fm, fm2). The rail bottom position is g3 = max(abs(g(x))), x ∈ (fm2, D). By fusing the projection values ​​and gradient values, a method from coarse to fine-grained positioning is used to accurately locate the light strip position and the rail bottom position. Furthermore, the accuracy of the positioning is determined by the distance threshold from the left and right edges of the light strip to the rail bottom. That is, the located light strip edge position and rail bottom position should be within a certain range. If they exceed the threshold, it indicates that the area is within the turnout range and needs to be discarded. Specifically, α = (g3 - g1) * (g3 - g2), where α ∈ θ, indicates accurate positioning. Otherwise, the area is discarded, and this area is designated as the turnout area.

[0074] Because the rails have branch tracks, such as Figure 6 and Figure 7 , Figure 6 A graphic illustration to accurately locate the position of the light band. Figure 7This is a schematic diagram illustrating an error in the optical band positioning at a junction. Therefore, in this embodiment of the invention, it is determined whether the distance from the edge of the first optical band to the bottom of the rail exceeds a preset distance threshold; when it exceeds the preset distance threshold, the rail image is determined to be a junction image; the current rail image is discarded, and the optical band positioning of the next rail image continues.

[0075] This invention acquires a rail image, inputs it into a rail sleeper detection model to determine the center point of the rail sleeper, and then determines the top surface region image of the rail based on the center point position of the rail sleeper. Next, the top surface region image is summed in columns of pixels to obtain one-dimensional projection data, and gradient values ​​are calculated from this one-dimensional projection data to obtain gradient value data. Finally, the one-dimensional projection data and the gradient value data are used to determine the position of the light strip on the rail. This multi-scale positioning method, fusing gradient information and pixel projection information, enhances the edge features of the light strip, enabling high-precision light strip detection and positioning.

[0076] Figure 8 A schematic diagram of an embodiment of the image-based multi-dimensional optical strip rapid positioning device for rails according to the present invention is shown. Figure 8 As shown, the device 300 includes:

[0077] Module 310 is used to acquire images of the rails;

[0078] The first determining module 320 is used to input the rail image into the rail sleeper detection model to determine the center point position of the rail sleeper; the rail sleeper detection model is obtained by training based on the rail sleeper detection samples.

[0079] The second determining module 330 is used to determine the top surface area image of the rail based on the center point position of the rail sleeper.

[0080] The projection module 340 is used to sum the pixel columns of the top surface region image to obtain one-dimensional projection data, and to calculate the gradient value of the one-dimensional projection data to obtain gradient value data.

[0081] The third determining module 350 is used to determine the position of the light strip on the rail using the one-dimensional projection data and the gradient value data.

[0082] The specific working process of the embodiments of the present invention is largely the same as that of the above method embodiments, and will not be repeated here.

[0083] This invention acquires a rail image, inputs it into a rail sleeper detection model to determine the center point of the rail sleeper, and then determines the top surface region image of the rail based on the center point position of the rail sleeper. Next, the top surface region image is summed in columns of pixels to obtain one-dimensional projection data, and gradient values ​​are calculated from this one-dimensional projection data to obtain gradient value data. Finally, the one-dimensional projection data and the gradient value data are used to determine the position of the light strip on the rail. This multi-scale positioning method, fusing gradient information and pixel projection information, enhances the edge features of the light strip, enabling high-precision light strip detection and positioning.

[0084] Figure 9 The diagram shows a structural schematic of an embodiment of the computer device of the present invention. The specific embodiments of the present invention do not limit the specific implementation of the computer device.

[0085] like Figure 9 As shown, the computer device may include: a processor 402, a communications interface 404, a memory 406, and a communications bus 408.

[0086] The processor 402, communication interface 404, and memory 406 communicate with each other via communication bus 408. Communication interface 404 is used to communicate with other network elements such as clients or other servers. The processor 402 executes program 410, specifically performing the relevant steps described in the embodiment of the image-based multi-dimensional light strip rapid positioning method for rails.

[0087] Specifically, program 410 may include program code, which includes computer-executable instructions.

[0088] Processor 402 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The computer device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or they may be processors of different types, such as one or more CPUs and one or more ASICs.

[0089] Memory 406 is used to store program 410. Memory 406 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0090] Specifically, program 410 can be called by processor 402 to cause the computer device to perform the following operations:

[0091] Acquire images of the rails;

[0092] The rail image is input into the rail sleeper detection model to determine the center point position of the rail sleeper; the rail sleeper detection model is trained based on the rail sleeper detection samples;

[0093] Based on the center point position of the rail sleeper, determine the top surface area image of the rail;

[0094] The pixel columns of the top surface region image are summed to obtain one-dimensional projection data, and the gradient value is calculated on the one-dimensional projection data to obtain gradient value data.

[0095] The position of the light strip on the rail is determined by the one-dimensional projection data and the gradient value data.

[0096] In one alternative approach, acquiring the rail image further includes: acquiring rail surface images along the rail direction using a line scan camera at a preset acquisition frequency to obtain at least one rail image.

[0097] In an alternative approach, before inputting the rail image into the rail sleeper detection model to determine the center point position of the rail sleeper, the method further includes:

[0098] Obtain rail sleeper inspection samples, which include rail sleeper image samples and location labels;

[0099] The detected rail sleeper samples are input into a preset neural network model for training to obtain position prediction results;

[0100] Based on the location prediction result and the location label, the loss of the neural network model is calculated, and the parameters of the neural network model are adjusted according to the loss. The steps of inputting the rail sleeper detection samples into the preset neural network model for training to obtain the location prediction result, and calculating the loss of the neural network model based on the location prediction result and the location label, and adjusting the parameters of the neural network model according to the loss, are continued until the loss reaches a preset loss threshold or a preset number of iterations are reached, thus obtaining the rail sleeper detection model.

[0101] In one alternative approach, determining the top surface region image of the rail based on the center point position of the rail sleeper includes:

[0102] The position of the center point of the top surface of the rail is determined based on the average value of the center point positions of the rail sleepers.

[0103] Based on the center point of the top surface of the rail and the preset length and width values, the top surface area image of the rail is determined from the rail image.

[0104] In one alternative approach, determining the position of the light strip on the rail using the one-dimensional projection data and the gradient value data includes:

[0105] The brightest position of the light band is determined based on the projection values ​​in the one-dimensional projection data.

[0106] The position of the light band edge is determined based on the gradient value in the one-dimensional projection data;

[0107] The position of the track bottom is determined based on the brightest position of the light band and the position of the edge of the light band;

[0108] The position of the light strip on the rail is determined based on the brightest position of the light strip, the position of the edge of the light strip, and the position of the bottom of the rail.

[0109] In one alternative approach, determining the position of the light strip on the rail using the one-dimensional projection data and the gradient value data specifically includes:

[0110] The maximum value of the projection is used to determine the brightest position of the light band.

[0111] The first maximum gradient value is determined as the position of the first light band edge;

[0112] The second maximum gradient value is determined as the edge position of the second light band.

[0113] In one alternative approach, determining the position of the light strip on the rail using the one-dimensional projection data and the gradient value data includes:

[0114] Determine whether the distance from the edge of the first light strip to the bottom of the track exceeds a preset distance threshold;

[0115] When the distance exceeds a preset threshold, the rail image is determined to be a turnout image;

[0116] The current rail image is discarded, and the light band positioning of the next rail image is performed.

[0117] This invention acquires a rail image, inputs it into a rail sleeper detection model to determine the center point of the rail sleeper, and then determines the top surface region image of the rail based on the center point position of the rail sleeper. Next, the top surface region image is summed in columns of pixels to obtain one-dimensional projection data, and gradient values ​​are calculated from this one-dimensional projection data to obtain gradient value data. Finally, the one-dimensional projection data and the gradient value data are used to determine the position of the light strip on the rail. This multi-scale positioning method, fusing gradient information and pixel projection information, enhances the edge features of the light strip, enabling high-precision light strip detection and positioning.

[0118] This invention provides a computer-readable storage medium storing at least one executable instruction that, when executed on a computer device, causes the computer device to perform the image-based multi-dimensional light strip rapid positioning method for rails in any of the above method embodiments.

[0119] Executable instructions can be used to cause computer devices to perform the following operations:

[0120] Acquire images of the rails;

[0121] The rail image is input into the rail sleeper detection model to determine the center point position of the rail sleeper; the rail sleeper detection model is trained based on the rail sleeper detection samples;

[0122] Based on the center point position of the rail sleeper, determine the top surface area image of the rail;

[0123] The pixel columns of the top surface region image are summed to obtain one-dimensional projection data, and the gradient value is calculated on the one-dimensional projection data to obtain gradient value data.

[0124] The position of the light strip on the rail is determined by the one-dimensional projection data and the gradient value data.

[0125] In one alternative approach, acquiring the rail image further includes: acquiring rail surface images along the rail direction using a line scan camera at a preset acquisition frequency to obtain at least one rail image.

[0126] In an alternative approach, before inputting the rail image into the rail sleeper detection model to determine the center point position of the rail sleeper, the method further includes:

[0127] Obtain rail sleeper inspection samples, which include rail sleeper image samples and location labels;

[0128] The detected rail sleeper samples are input into a preset neural network model for training to obtain position prediction results;

[0129] Based on the location prediction result and the location label, the loss of the neural network model is calculated, and the parameters of the neural network model are adjusted according to the loss. The steps of inputting the rail sleeper detection samples into the preset neural network model for training to obtain the location prediction result, and calculating the loss of the neural network model based on the location prediction result and the location label, and adjusting the parameters of the neural network model according to the loss, are continued until the loss reaches a preset loss threshold or a preset number of iterations are reached, thus obtaining the rail sleeper detection model.

[0130] In one alternative approach, determining the top surface region image of the rail based on the center point position of the rail sleeper includes:

[0131] The position of the center point of the top surface of the rail is determined based on the average value of the center point positions of the rail sleepers.

[0132] Based on the center point of the top surface of the rail and the preset length and width values, the top surface area image of the rail is determined from the rail image.

[0133] In one alternative approach, determining the position of the light strip on the rail using the one-dimensional projection data and the gradient value data includes:

[0134] The brightest position of the light band is determined based on the projection values ​​in the one-dimensional projection data.

[0135] The position of the light band edge is determined based on the gradient value in the one-dimensional projection data;

[0136] The position of the track bottom is determined based on the brightest position of the light band and the position of the edge of the light band;

[0137] The position of the light strip on the rail is determined based on the brightest position of the light strip, the position of the edge of the light strip, and the position of the bottom of the rail.

[0138] In one alternative approach, determining the position of the light strip on the rail using the one-dimensional projection data and the gradient value data specifically includes:

[0139] The maximum value of the projection is used to determine the brightest position of the light band.

[0140] The first maximum gradient value is determined as the position of the first light band edge;

[0141] The second maximum gradient value is determined as the edge position of the second light band.

[0142] In one alternative approach, determining the position of the light strip on the rail using the one-dimensional projection data and the gradient value data includes:

[0143] Determine whether the distance from the edge of the first light strip to the bottom of the track exceeds a preset distance threshold;

[0144] When the distance exceeds a preset threshold, the rail image is determined to be a turnout image;

[0145] The current rail image is discarded, and the light band positioning of the next rail image is performed.

[0146] This invention acquires a rail image, inputs it into a rail sleeper detection model to determine the center point of the rail sleeper, and then determines the top surface region image of the rail based on the center point position of the rail sleeper. Next, the top surface region image is summed in columns of pixels to obtain one-dimensional projection data, and gradient values ​​are calculated from this one-dimensional projection data to obtain gradient value data. Finally, the one-dimensional projection data and the gradient value data are used to determine the position of the light strip on the rail. This multi-scale positioning method, fusing gradient information and pixel projection information, enhances the edge features of the light strip, enabling high-precision light strip detection and positioning.

[0147] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, the embodiments of the present invention are not directed to any particular programming language. It should be understood that the content of the invention described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of the invention.

[0148] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0149] Similarly, it should be understood that, in order to streamline the invention and aid in understanding one or more of the various aspects of the invention, features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the above description of exemplary embodiments of the invention. However, this disclosure should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim.

[0150] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.

[0151] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.

Claims

1. A method for rapid positioning of multi-dimensional light strips on rails based on images, characterized in that, The method includes: Acquire images of the rails; The rail image is input into the rail sleeper detection model to determine the center point position of the rail sleeper; the rail sleeper detection model is trained based on the rail sleeper detection samples; Based on the center point position of the rail sleeper, determine the top surface area image of the rail; The pixel columns of the top surface region image are summed to obtain one-dimensional projection data, and the gradient value is calculated on the one-dimensional projection data to obtain gradient value data. The position of the light strip on the rail is determined by the one-dimensional projection data and the gradient value data.

2. The method according to claim 1, characterized in that, The acquisition of rail images further includes: acquiring rail surface images along the direction of the rail using a line scan camera at a preset acquisition frequency, thereby obtaining at least one rail image.

3. The method according to claim 2, characterized in that, Before inputting the rail image into the rail sleeper detection model to determine the center point position of the rail sleeper, the method further includes: Obtain rail sleeper inspection samples, which include rail sleeper image samples and location labels; The detected rail sleeper samples are input into a preset neural network model for training to obtain position prediction results; Based on the location prediction result and the location label, the loss of the neural network model is calculated, and the parameters of the neural network model are adjusted according to the loss. The steps of inputting the rail sleeper detection samples into the preset neural network model for training to obtain the location prediction result, and calculating the loss of the neural network model based on the location prediction result and the location label, and adjusting the parameters of the neural network model according to the loss, are continued until the loss reaches a preset loss threshold or a preset number of iterations are reached, thus obtaining the rail sleeper detection model.

4. The method according to any one of claims 1-3, characterized in that, Determining the image of the top surface region of the rail based on the center point position of the rail sleeper includes: The position of the center point of the top surface of the rail is determined based on the average value of the center point positions of the rail sleepers. Based on the center point of the top surface of the rail and the preset length and width values, the top surface area image of the rail is determined from the rail image.

5. The method according to any one of claims 1-3, characterized in that, Determining the position of the light strip on the rail using the one-dimensional projection data and the gradient value data includes: The brightest position of the light band is determined based on the projection values ​​in the one-dimensional projection data. The position of the light band edge is determined based on the gradient value in the one-dimensional projection data; The position of the track bottom is determined based on the brightest position of the light band and the position of the edge of the light band; The position of the light strip on the rail is determined based on the brightest position of the light strip, the position of the edge of the light strip, and the position of the bottom of the rail.

6. The method according to claim 5, characterized in that, The step of determining the position of the light strip on the rail using the one-dimensional projection data and the gradient value data specifically includes: The maximum value of the projection is used to determine the brightest position of the light band. The first maximum gradient value is determined as the position of the first light band edge; The second maximum gradient value is determined as the edge position of the second light band.

7. The method according to claim 6, characterized in that, Determining the position of the light strip on the rail using the one-dimensional projection data and the gradient value data includes: Determine whether the distance from the edge of the first light strip to the bottom of the track exceeds a preset distance threshold; When the distance exceeds a preset threshold, the rail image is determined to be a turnout image; The current rail image is discarded, and the light band positioning of the next rail image is performed.

8. A rapid positioning device for multi-dimensional optical strips on rails based on images, characterized in that, The device includes: The acquisition module is used to acquire images of the rails; The first determining module is used to input the rail image into the rail sleeper detection model to determine the center point position of the rail sleeper; the rail sleeper detection model is trained based on the rail sleeper detection samples; The second determining module is used to determine the top surface area image of the rail based on the center point position of the rail sleeper; The projection module is used to sum the pixel columns of the top surface region image to obtain one-dimensional projection data, and to calculate the gradient value of the one-dimensional projection data to obtain gradient value data. The third determining module is used to determine the position of the light strip on the rail using the one-dimensional projection data and the gradient value data.

9. A computer device, characterized in that, include: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform the operation of the image-based multi-dimensional light strip rapid positioning method for rails as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The storage medium stores at least one executable instruction, which, when executed on a computer device, causes the computer device to perform the operation of the image-based multi-dimensional light strip rapid positioning method for rails as described in any one of claims 1-7.