Method, device and equipment for determining travelable area of train and medium
By semantic segmentation and orbit point classification of two-dimensional images, and determining orbit point pairs based on the changes of adjacent rows' horizontal coordinates, the problem of insufficient robustness of orbit line detection in the prior art is solved, and high accuracy is achieved in different scenarios Sexual track recognition.
Patent Information
- Application Number
- CN202411276540.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2024-12-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the existing train autonomous driving technology, the track line detection algorithm is not robust enough in different operating scenarios, especially the imaging blind spots at curves and switches, resulting in a decrease in detection accuracy.
By semantic segmentation of the two-dimensional image, the classification track points are left track, middle track and right track, and track search is performed based on the changes in the horizontal coordinates of adjacent rows, the initial search area is determined, and the left and right track point pairs are determined and the train is drawn Able to drive area.
It improves the robustness and accuracy of the train's track recognition in different operating scenarios, is suitable for various operating scenarios, and enhances detection accuracy.
Smart Images

Figure CN119152473A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automatic driving technology, and in particular to a method, device, equipment and medium for determining a train drivable area. Background Art
[0002] With the increasing demand for passenger and freight rail transportation, both domestic and foreign countries have begun to study and apply train automatic driving technology in recent years to improve train transportation efficiency. On high-level train automatic operation lines, effective detection of obstacles in the direction of train travel is the key to ensuring the safe operation of the line. Therefore, it is very important to install an active on-board obstacle detection system that can detect obstacles that threaten train driving safety and provide early warnings.
[0003] In active vehicle-mounted obstacle detection systems, commonly used sensors include cameras and lidar. Camera sensors can provide rich semantic information to detect various obstacles in front of the train, and according to the specified limits, they will warn obstacles that invade the specified limits. Most of the current track line detection algorithms have the assumption of the region of interest (ROI) of the image, that is, it is assumed that the track on which the train is running is located in the middle of the image. However, due to the installation height of the road condition camera, there is an imaging blind spot. When the train passes through a curve or a switch, the track on which the train is running is not necessarily presented in the middle of the image, which will affect the robustness of the detection algorithm. The current track line detection algorithms are mostly aimed at single-track or single-turnout scenarios, but in actual application scenarios, in addition to single-track and single-turnout, they still include common operating scenarios such as symmetrical turnouts and crossovers.
[0004] It can be seen that how to improve the robustness of track identification of each train in different operating scenarios is a problem that technical personnel in this field need to solve. Summary of the invention
[0005] The purpose of the embodiments of the present invention is to provide a method, device, equipment and medium for determining a train drivable area, which can improve the robustness of track identification of each train in different operating scenarios.
[0006] In order to solve the above technical problems, an embodiment of the present invention provides a method for determining a train drivable area, comprising:
[0007] Performing semantic segmentation on the acquired two-dimensional image to determine the category area to which each pixel point in the two-dimensional image belongs; wherein the category area includes a track point area, an intra-track area, and a background area;
[0008] According to the positional relationship between each pixel point in different category areas, the track points contained in the track point area are classified to obtain a track point set; wherein the track point set includes a left track point, a middle track point and a right track point;
[0009] Performing a track search starting from a starting row of the two-dimensional image according to a change in the horizontal coordinates of adjacent rows to determine an initial search area of the two-dimensional image;
[0010] Based on the state of the track point pairs and the changes in the horizontal coordinates of adjacent rows, iteratively searching the track points included in the track point set to determine the left and right track point pairs corresponding to each row in the initial search area;
[0011] The train drivable area is drawn in the two-dimensional image using the left and right track point pairs corresponding to each row.
[0012] On the one hand, according to the positional relationship between each pixel point in different category areas, the track points contained in the track point area are classified to obtain a track point set including:
[0013] In the case where the left side of the track point is the background area and the right side is the track inner area, the track point is divided into a left track point;
[0014] In the case where the left side of the track point is the intra-track area and the right side is the intra-track area, the track point is divided into an intermediate track point;
[0015] When the left side of the track point is the in-track area and the right side is the background area, the track point is classified as a right track point.
[0016] On the one hand, performing track search from the starting row of the two-dimensional image according to the change of the horizontal coordinates of adjacent rows to determine that the initial search area of the two-dimensional image includes:
[0017] Determining whether the two-dimensional image is a first frame image;
[0018] In the case where the two-dimensional image is the first frame image, determining the initial search area of the two-dimensional image according to the change characteristics of the horizontal coordinates of the starting row of the track on which the train is currently traveling in the two-dimensional image;
[0019] When the two-dimensional image is not the first frame image, the initial search area of the two-dimensional image is determined according to the historical track state information; wherein the historical track state information includes the horizontal coordinates of the left and right track points of the starting row of the two-dimensional image, the horizontal coordinates of the center point of the starting row, and the change amount.
[0020] On the one hand, according to the change characteristics of the horizontal coordinates of the starting row of the track on which the train is currently traveling in the two-dimensional image, determining the initial search area of the two-dimensional image includes:
[0021] Filtering out the first N tracks with the smallest change in the horizontal coordinates of the left and right track points between adjacent rows from the bottom area of the two-dimensional image; wherein N is a positive integer greater than or equal to 2;
[0022] Performing a weighted operation on the horizontal coordinates of the left track points corresponding to the first N tracks to determine the left boundary of the initial search area;
[0023] A weighted operation is performed on the horizontal coordinates of the right track points corresponding to the first N tracks to determine the right boundary of the initial search area.
[0024] On the one hand, determining the initial search area of the two-dimensional image according to the historical track state information includes:
[0025] Determine the left and right track boundary extension values according to the horizontal coordinate of the right track point of the starting row, the horizontal coordinate of the left track point of the starting row, and the selected scale factor;
[0026] The sum of the horizontal coordinate of the right track point of the starting row and the extended value of the left and right track boundaries is used as the right boundary of the initial search area;
[0027] The difference between the horizontal coordinate of the left track point of the starting row and the extension value of the left and right track boundaries is used as the left boundary of the initial search area;
[0028] The sum of the horizontal coordinate of the center point of the starting row and the change amount is used as the center point position of the initial search area.
[0029] On the one hand, based on the state of the track point pair and the change of the horizontal coordinates of adjacent rows, the track points included in the track point set are iteratively searched to determine that the left and right track point pairs corresponding to each row in the initial search area include:
[0030] Determine whether the track point pair state of the starting row is a turnout state; wherein, in the initial state, the starting row is the track row in the bottom area of the two-dimensional image;
[0031] When the track point pair state of the starting row is a non-turnout state, the left and right track point pairs corresponding to the current row are determined according to the principle of minimum change in the horizontal coordinates of adjacent rows;
[0032] When the track point pair state of the starting row is a turnout state, the left and right track point pairs corresponding to the current row are determined according to the turnout direction and the change of the horizontal coordinates of the adjacent rows; wherein the current row is a pixel row adjacent to the starting row;
[0033] Determine the track point pair status of the current row according to the change of the horizontal coordinates of the adjacent rows, the number of track points contained in the current row and the corresponding track point types;
[0034] The current row is taken as a new starting row, and the step of determining whether the track point pair state of the starting row is a turnout state is returned to, until the iterative search of all track points included in the track point set is completed.
[0035] On the one hand, according to the change of the turnout direction and the horizontal coordinates of the adjacent rows, the left and right track point pairs corresponding to the current row are determined to include:
[0036] When the turnout is opened for straight-line passage, the left and right track point pairs corresponding to the current row are determined according to the principle of minimum change in the horizontal coordinates of adjacent rows;
[0037] When the turnout is opened in a non-straight direction, the left and right track point pairs corresponding to the current row are determined based on the principle of the second smallest change in the horizontal coordinates of adjacent rows.
[0038] On the one hand, the track point pair state includes a state without a turnout and a state with a turnout; wherein the state without a turnout includes a straight track and a curved track;
[0039] According to the change of the horizontal coordinates of the adjacent rows, the number of track points contained in the current row and their corresponding track point types, the track point pair status of the current row is determined to include:
[0040] When the number of track points included in the current row is equal to two, the track point types include left track points and right track points, and the horizontal coordinates of the left track points in the adjacent rows are not decreasing, and the horizontal coordinates of the right track points are not increasing, it is determined that the state of the track point pair in the current row is a straight track state;
[0041] When the number of track points included in the current row is equal to two, the track point types include left track points and right track points, and the horizontal coordinates of the track points in adjacent rows change in the same direction, determine that the state of the track point pair in the current row is a curve state;
[0042] When the number of track points included in the current row is greater than two, the state of the track point pair of the current row is determined to be a turnout state.
[0043] On the one hand, using the left and right track point pairs corresponding to each row, drawing the train drivable area in the two-dimensional image includes:
[0044] According to the state change of the track point pair and the change of the track pixel width, the left and right track point pairs corresponding to each row are filtered to obtain the filtered left and right track point pairs;
[0045] Linear fitting is performed on the filtered left and right track point pairs to determine the train drivable area in the two-dimensional image.
[0046] On the one hand, according to the state change of the track point pair and the change of the track pixel width, the left and right track point pairs corresponding to each row are filtered to obtain the filtered left and right track point pairs including:
[0047] When the change between the track point pair state corresponding to the target row and the track point pair state corresponding to the previous adjacent row does not meet the state transition condition, the left and right track point pairs corresponding to the target row are deleted; wherein the target row is any one of all pixel rows included in the initial left and right track points;
[0048] When the pixel width of the track point corresponding to the current row is greater than the pixel width of the track point corresponding to the previous adjacent row, the left and right track point pairs corresponding to the target row are deleted.
[0049] On the one hand, linear fitting is performed on the filtered left and right track point pairs to determine that the train drivable area in the two-dimensional image includes:
[0050] In the case where there is a target row without a left and right track point pair, querying a track point pair adjacent to the target row from the filtered left and right track point pairs; performing linear fitting on the track point pairs adjacent to the target row to obtain the left and right track point pairs corresponding to the target row;
[0051] Linear fitting is performed on the left and right track point pairs corresponding to the target row and the filtered left and right track point pairs to determine the train drivable area in the two-dimensional image.
[0052] On the one hand, before classifying the track points contained in the track point area according to the positional relationship between the pixels in different category areas to obtain the track point set, it also includes:
[0053] Morphological processing is performed on the pixels contained in each category area to filter out the misclassified pixels in each category area.
[0054] The embodiment of the present invention also provides a device for determining a train drivable area, comprising a segmentation unit, a classification unit, a search unit, an analysis unit and a drawing unit;
[0055] The segmentation unit is used to perform semantic segmentation on the acquired two-dimensional image to determine the category area to which each pixel point in the two-dimensional image belongs; wherein the category area includes a track point area, an intra-track area, and a background area;
[0056] The classification unit is used to classify the track points contained in the track point area according to the positional relationship between the pixels in different category areas to obtain a track point set; wherein the track point set includes a left track point, a middle track point and a right track point;
[0057] The search unit is used to perform track search starting from the starting row of the two-dimensional image according to the change of the horizontal coordinates of adjacent rows, so as to determine the initial search area of the two-dimensional image;
[0058] The analysis unit is used to iteratively search the track points included in the track point set based on the state of the track point pair and the change of the horizontal coordinates of adjacent rows, so as to determine the left and right track point pairs corresponding to each row in the initial search area;
[0059] The drawing unit is used to draw the train drivable area in the two-dimensional image using the left and right track point pairs corresponding to each row.
[0060] On the one hand, the classification unit is used to classify the track point as a left track point when the left side of the track point is the background area and the right side is the intra-track area; to classify the track point as a middle track point when the left side of the track point is the intra-track area and the right side is the intra-track area; and to classify the track point as a right track point when the left side of the track point is the intra-track area and the right side is the background area.
[0061] In one aspect, the search unit includes a judgment subunit, a first determination subunit, and a second determination subunit;
[0062] The judging subunit is used to judge whether the two-dimensional image is a first frame image;
[0063] The first determining subunit is used to determine the initial search area of the two-dimensional image according to the change characteristics of the horizontal coordinates of the starting row of the track on which the train is currently traveling in the two-dimensional image when the two-dimensional image is the first frame image;
[0064] The second determination subunit is used to determine the initial search area of the two-dimensional image according to the historical track state information when the two-dimensional image is not the first frame image; wherein the historical track state information includes the horizontal coordinates of the left and right track points of the starting row of the two-dimensional image, the horizontal coordinates of the center point of the starting row, and the change amount.
[0065] On the one hand, the first determination subunit is used to screen out the first N tracks with the smallest change in the horizontal coordinates of the left and right track points between adjacent rows from the bottom area of the two-dimensional image; wherein N is a positive integer greater than or equal to 2; a weighted operation is performed on the horizontal coordinates of the left track points corresponding to the first N tracks to determine the left boundary of the initial search area; a weighted operation is performed on the horizontal coordinates of the right track points corresponding to the first N tracks to determine the right boundary of the initial search area.
[0066] On the one hand, the second determination subunit is used to determine the left and right track boundary extension values based on the horizontal coordinates of the right track point of the starting row, the horizontal coordinates of the left track point of the starting row, and the selected scaling factor; the sum of the horizontal coordinates of the right track point of the starting row and the left and right track boundary extension values is used as the right boundary of the initial search area; the difference between the horizontal coordinates of the left track point of the starting row and the left and right track boundary extension values is used as the left boundary of the initial search area; and the sum of the horizontal coordinates of the center point of the starting row and the change amount is used as the center point position of the initial search area.
[0067] In one aspect, the analysis unit includes a state determination subunit, a third determination subunit, a fourth determination subunit, a fifth determination subunit, and an as subunit;
[0068] The state judgment subunit is used to judge whether the state of the track point pair of the starting row is a turnout state; wherein, in the initial state, the starting row is the track row in the bottom area of the two-dimensional image;
[0069] The third determination subunit is used to determine the left and right track point pairs corresponding to the current row according to the principle of minimum change in the horizontal coordinates of adjacent rows when the track point pair state of the starting row is a non-turnout state;
[0070] The fourth determination subunit is used to determine the left and right track point pairs corresponding to the current row according to the direction of the turnout and the change of the horizontal coordinates of the adjacent rows when the track point pair state of the starting row is a turnout state; wherein the current row is a pixel row adjacent to the starting row;
[0071] The fifth determining subunit is used to determine the track point pair status of the current row according to the change of the horizontal coordinates of the adjacent rows, the number of track points included in the current row and the corresponding track point types;
[0072] The subunit is used to take the current row as a new starting row and return to the step of determining whether the track point pair state of the starting row is a switch state until the iterative search of all track points included in the track point set is completed.
[0073] On the one hand, the fourth determination subunit is used to determine the left and right track point pairs corresponding to the current row according to the principle of minimum change in the horizontal coordinates of adjacent rows when the turnout is opened in a straight line;
[0074] When the turnout is opened in a non-straight direction, the left and right track point pairs corresponding to the current row are determined based on the principle of the second smallest change in the horizontal coordinates of adjacent rows.
[0075] On the one hand, the track point pair state includes a state without a turnout and a state with a turnout; wherein the state without a turnout includes a straight track and a curved track;
[0076] The fifth determining subunit is used to determine that the state of the track point pair of the current row is a straight track state when the number of track points included in the current row is equal to two, the track point types include left track points and right track points, and the horizontal coordinates of the left track points of the adjacent rows are not decreasing, and the horizontal coordinates of the right track points are not increasing;
[0077] When the number of track points included in the current row is equal to two, the track point types include left track points and right track points, and the horizontal coordinates of the track points in adjacent rows change in the same direction, determine that the state of the track point pair in the current row is a curve state;
[0078] When the number of track points included in the current row is greater than two, the state of the track point pair of the current row is determined to be a turnout state.
[0079] In one aspect, the rendering unit includes a filtering subunit and a fitting subunit;
[0080] The filtering subunit is used to filter the left and right track point pairs corresponding to each row according to the state change of the track point pair and the track pixel width change, so as to obtain the filtered left and right track point pairs;
[0081] The fitting subunit is used to perform linear fitting on the filtered left and right track point pairs to determine the train drivable area in the two-dimensional image.
[0082] On the one hand, the filtering subunit is used to delete the left and right track point pairs corresponding to the target row when the change between the track point pair state corresponding to the target row and the track point pair state corresponding to the previous adjacent row does not meet the state transition condition; wherein the target row is any one of all pixel rows included in the initial left and right track points;
[0083] When the pixel width of the track point corresponding to the current row is greater than the pixel width of the track point corresponding to the previous adjacent row, the left and right track point pairs corresponding to the target row are deleted.
[0084] On the one hand, the fitting subunit is used for, when there is a target row without a left and right track point pair, querying a track point pair adjacent to the target row from the filtered left and right track point pairs; performing linear fitting on the track point pairs adjacent to the target row to obtain the left and right track point pairs corresponding to the target row;
[0085] Linear fitting is performed on the left and right track point pairs corresponding to the target row and the filtered left and right track point pairs to determine the train drivable area in the two-dimensional image.
[0086] On the one hand, it also includes a filtration unit;
[0087] The filtering unit is used to perform morphological processing on the pixels contained in each category area to filter out the misclassified pixels in each category area.
[0088] The embodiment of the present invention further provides a device for determining a train drivable area, comprising:
[0089] Memory for storing computer programs;
[0090] A processor is used to execute the computer program to implement the steps of the method for determining the train drivable area as described above.
[0091] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for determining a train drivable area as described above are implemented.
[0092] It can be seen from the above technical solution that the acquired two-dimensional image is semantically segmented to determine the category area to which each pixel point in the two-dimensional image belongs; wherein the category area includes the track point area, the track area and the background area; according to the positional relationship between each pixel point in different category areas, the track points contained in the track point area are classified to obtain a track point set; wherein the track point set includes left track points, middle track points and right track points. Track search is performed from the starting row of the two-dimensional image according to the change of the horizontal coordinates of adjacent rows to determine the initial search area of the two-dimensional image. Based on the state of the track point pair and the change of the horizontal coordinates of the adjacent rows, the track points contained in the track point set are iteratively searched to determine the left and right track point pairs corresponding to each row in the initial search area. Using the left and right track point pairs corresponding to each row, the train drivable area is drawn in the two-dimensional image. In this technical solution, it does not rely on the position assumption of the track in the image. By determining the initial search area and combining the change of the horizontal coordinates of the adjacent rows and the state of the track point pair, the left and right track point pairs can be accurately identified, thereby drawing a reliable train drivable area. This implementation method can be applied to various train operation scenarios, improving the robustness and accuracy of track identification in different train operation scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0093] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0094] Figure 1 A flow chart of a method for determining a train drivable area provided by an embodiment of the present invention;
[0095] Figure 2 A schematic diagram of track point classification provided by an embodiment of the present invention;
[0096] Figure 3 A flowchart of a method for determining left and right track point pairs provided by an embodiment of the present invention;
[0097] Figure 4 A schematic diagram of trains passing through a single turnout in opposite directions provided by an embodiment of the present invention;
[0098] Figure 5 A method provided by an embodiment of the present invention Figure 4 A schematic diagram of the next adjacent frame image;
[0099] Figure 6 A schematic diagram of a track point pair state change provided by an embodiment of the present invention;
[0100] Figure 7 A schematic diagram of the structure of a device for determining a train drivable area provided by an embodiment of the present invention;
[0101] Figure 8 A structural diagram of a device for determining a train drivable area provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0102] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0103] The terms "including" and "having" in the specification of the present invention and the above-mentioned drawings, as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.
[0104] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0105] Next, a method for determining a train drivable area provided by an embodiment of the present invention is described in detail. Figure 1 A flow chart of a method for determining a train drivable area provided in an embodiment of the present invention, the method comprising:
[0106] S101: performing semantic segmentation on the acquired two-dimensional image to determine the category area to which each pixel point in the two-dimensional image belongs.
[0107] The category areas may include track point areas, track in-areas and background areas.
[0108] In an embodiment of the present invention, a semantic segmentation deep neural network can be used to perform semantic segmentation on a two-dimensional image. There are three parts in a two-dimensional image: a track, an area between two tracks, and other areas. The three areas can be marked as different categories, namely, a track point area, an area within the track, and a background area. Based on these three types of areas, training data can be constructed, and the semantic segmentation deep neural network can be trained using the training data. After completing the training of the semantic segmentation deep neural network, the trained semantic segmentation deep neural network can be used to perform semantic segmentation on the acquired two-dimensional image.
[0109] Considering that in actual applications, there may be pixels with incorrect regional classification. For example, at the boundary of the track point area, there may be incorrect classification situations such as dividing the pixels in the background area into the track area, or dividing the pixels in the track area into the background area. Therefore, in an embodiment of the present invention, after determining the category area to which each pixel in the two-dimensional image belongs, before classifying the track points contained in the track point area, the pixels contained in each category area may be morphologically processed to filter out the incorrectly classified pixels in each category area. Morphological processing is a relatively mature technology at present and will not be elaborated here.
[0110] S102: Classifying the track points contained in the track point area according to the positional relationship between the pixels in different category areas to obtain a track point set.
[0111] The track point set may include a left track point, a middle track point, and a right track point.
[0112] In practical applications, according to the positional relationship between pixels in different categories of areas such as track point area, track area, background area, etc. in the semantic segmentation results, the track points contained in the track point area can be divided into left track points, middle track points and right track points.
[0113] When the left side of the track point is the background area and the right side is the track area, the track point can be divided into a left track point. When the left side of the track point is the track area and the right side is the track area, the track point can be divided into a middle track point. When the left side of the track point is the track area and the right side is the background area, the track point can be divided into a right track point. Figure 2 A schematic diagram of track point classification provided in an embodiment of the present invention, ① represents a left track point, ② represents a middle track point, and ③ represents a right track point.
[0114] S103: performing a track search starting from a starting row of the two-dimensional image according to changes in the horizontal coordinates of adjacent rows, so as to determine an initial search area of the two-dimensional image.
[0115] In the embodiment of the present invention, when determining the initial search area, it may be determined whether the two-dimensional image is the first frame image.
[0116] When the two-dimensional image is the first frame, the track search process is directly entered, and the initial search area of the two-dimensional image can be determined according to the change characteristics of the horizontal coordinates of the starting row of the track on which the train is currently traveling in the two-dimensional image.
[0117] For the first frame image, the first N tracks with the smallest change in horizontal coordinates of left and right track points between adjacent rows can be screened out from the bottom area of the two-dimensional image, where N is a positive integer greater than or equal to 2. The bottom area of the two-dimensional image refers to the position close to the train.
[0118] A weighted operation is performed on the horizontal coordinates of the left track points corresponding to the first N tracks to determine the left boundary of the initial search area; a weighted operation is performed on the horizontal coordinates of the right track points corresponding to the first N tracks to determine the right boundary of the initial search area.
[0119] The value of N can be adjusted flexibly. In practical applications, the value of N is often set to 2.
[0120] Considering the existence of camera imaging blind spots under common road conditions in actual applications, when the two-dimensional image is not the first frame image, the initial search area of the two-dimensional image can be determined according to the historical track state information.
[0121] The historical track state information may include the horizontal coordinates of the left and right track points of the starting line of the two-dimensional image, the horizontal coordinates of the center point of the starting line, and the change amount.
[0122] In the embodiment of the present invention, the left and right track boundary extension values can be determined according to the horizontal coordinate of the right track point of the starting line, the horizontal coordinate of the left track point of the starting line, and the selected scale factor. The sum of the horizontal coordinate of the right track point of the starting line and the left and right track boundary extension values is used as the right boundary of the initial search area; the difference between the horizontal coordinate of the left track point of the starting line and the left and right track boundary extension values is used as the left boundary of the initial search area; the sum of the horizontal coordinate of the center point of the starting line and the change amount is used as the center point position of the initial search area.
[0123] In a specific implementation, the center point position of the initial search area, the left boundary of the initial search area, and the right boundary of the initial search area may be determined according to the following formula:
[0124] ;
[0125] ;
[0126] ;
[0127] in, represents the scale factor, Indicates the center point of the initial search area. Indicates the horizontal coordinate of the center point of the starting row, Indicates the change in the horizontal coordinate of the center point of the starting row. represents the left boundary of the initial search area, Indicates the horizontal coordinate of the left track point of the starting line, Indicates the horizontal coordinate of the right track point of the starting line, Indicates the right boundary of the initial search area.
[0128] It is a decimal between 0 and 1. In practical applications, its value can be set to 0.15.
[0129] S104: Based on the state of the track point pair and the change of the horizontal coordinates of adjacent rows, an iterative search is performed on the track points included in the track point set to determine the left and right track point pairs corresponding to each row in the initial search area.
[0130] The track point pair status is used to characterize the track type to which the track point pair belongs. Common track point pair status include straight (Straight), left curve (LeftCurve), right curve (RightCurve), left turnout for opposite traffic (LeftSeperate), right turnout for opposite traffic (RightSeperate), left turnout for forward traffic (LeftMerge), right turnout for forward traffic (RightMerge), and turnouts (Middle) for no less than 4 candidate track points. Among them, straight, left curve and right curve belong to the state of no turnout. Left turnout for opposite traffic, right turnout for opposite traffic, left turnout for forward traffic, right turnout for forward traffic, and turnouts for no less than 4 candidate track points belong to the state of having turnouts.
[0131] In the absence of a turnout, searching upward from the bottom of the two-dimensional image, the track with the smallest change in the horizontal coordinates of adjacent rows is often the track where the train is traveling. In the presence of a turnout, the left and right track point pairs of the train's traveling track can be determined in combination with the turnout direction.
[0132] S105: Using the left and right track point pairs corresponding to each row, draw a train drivable area in the two-dimensional image.
[0133] The left and right track point pairs include left track points and right track points. After determining the left and right track point pairs corresponding to each row, the track point areas corresponding to the left and right track point pairs can be drawn by performing linear fitting on these left and right track point pairs, and the track point areas can be used as the drivable area of the train.
[0134] It can be seen from the above technical solution that the acquired two-dimensional image is semantically segmented to determine the category area to which each pixel point in the two-dimensional image belongs; wherein the category area includes the track point area, the track area and the background area; according to the positional relationship between each pixel point in different category areas, the track points contained in the track point area are classified to obtain a track point set; wherein the track point set includes left track points, middle track points and right track points. Track search is performed from the starting row of the two-dimensional image according to the change of the horizontal coordinates of adjacent rows to determine the initial search area of the two-dimensional image. Based on the state of the track point pair and the change of the horizontal coordinates of the adjacent rows, the track points contained in the track point set are iteratively searched to determine the left and right track point pairs corresponding to each row in the initial search area. Using the left and right track point pairs corresponding to each row, the train drivable area is drawn in the two-dimensional image. In this technical solution, it does not rely on the position assumption of the track in the image. By determining the initial search area and combining the change of the horizontal coordinates of the adjacent rows and the state of the track point pair, the left and right track point pairs can be accurately identified, thereby drawing a reliable train drivable area. This implementation method can be applied to various train operation scenarios, improving the robustness and accuracy of track identification in different train operation scenarios.
[0135] Figure 3 A flowchart of a method for determining left and right track point pairs provided by an embodiment of the present invention, the method comprising:
[0136] S301: Determine whether the track point pair state of the starting row is a turnout state.
[0137] In the initial state, the starting row is the track row in the bottom area of the two-dimensional image.
[0138] When the track point pair status of the starting row is a state without a switch, it means that the train can travel along the current track, and S302 can be executed at this time; when the track point pair status of the starting row is a state with a switch, it means that the train may have a change in the travel track, and S303 can be executed at this time.
[0139] S302: According to the principle of minimum change in horizontal coordinates of adjacent rows, determine the left and right track point pairs corresponding to the current row.
[0140] When the current row contains multiple track point pairs, the change between the horizontal coordinate of the current row and the horizontal coordinate of the starting row can be compared, and the track point pair with the smallest horizontal coordinate change can be selected as the left and right track point pair corresponding to the current row.
[0141] S303: Determine the left and right track point pair corresponding to the current row according to the direction of the turnout and the change of the horizontal coordinates of the adjacent rows.
[0142] The current row is a row of pixels adjacent to the start row. In the embodiment of the present invention, a row-by-row search method can be used to determine the left and right track point pairs corresponding to each row. When searching row by row, the current row is the first row of pixels adjacent to the start row in the backward direction.
[0143] For positions without switches, in order to save calculation, a skip search method can be used. Assuming that n rows are skipped each time during the skip search, the current row is the nth pixel row adjacent to the starting row in the backward direction. In the embodiment of the present invention, there is no limitation on the value of n, for example, n can be set to 3.
[0144] When the turnout is opened for straight-line passage, the left and right track point pairs corresponding to the current row can be determined according to the principle of the smallest change in the horizontal coordinates of the adjacent rows. When the turnout is opened for non-straight-line passage, the left and right track point pairs corresponding to the current row can be determined according to the principle of the second smallest change in the horizontal coordinates of the adjacent rows. Among them, the second smallest change in the horizontal coordinate means comparing the horizontal coordinates corresponding to all track points in adjacent rows and determining the horizontal coordinate with the second smallest change.
[0145] S304: Determine the track point pair status of the current row according to the change of the horizontal coordinates of the adjacent rows, the number of track points included in the current row and the corresponding track point types.
[0146] In the embodiment of the present invention, the track point pair state can be divided into a state without a switch and a state with a switch; wherein the state without a switch can include a straight track and a curved track.
[0147] In practical applications, when the number of track points contained in the current row is equal to two, the track point types include left track points and right track points, and the horizontal coordinates of the left track points in adjacent rows are not decreasing, and the horizontal coordinates of the right track points are not increasing, it can be determined that the state of the track point pair in the current row is a straight track state.
[0148] The Straight state has the following characteristics: 2 candidate track points, the coordinates of the left track point in the X direction are non-decreasing, and the coordinates of the right track point in the X direction are non-increasing.
[0149] When the number of track points included in the current row is equal to two, the track point types include left track points and right track points, and the horizontal coordinates of the track points in adjacent rows change in the same direction, it can be determined that the state of the track point pair in the current row is a curve state.
[0150] The LeftCurve state has the following characteristics: for two candidate track points, the coordinates of the left and right track points change in the same direction in the X direction, and both are non-increasing.
[0151] The RightCurve state has the following characteristics: for two candidate track points, the coordinates of the left and right track points change in the same direction in the X direction, and both are non-decreasing.
[0152] When the number of track points included in the current row is greater than two, it can be determined that the state of the track point pair of the current row is a turnout state.
[0153] In the turnout state, the number of track points is generally not less than 3. The turnout state can be subdivided into the left turnout for opposite traffic (Left Seperate), the right turnout for opposite traffic (Right Seperate), the left turnout for forward traffic (Left Merge), the right turnout for forward traffic (Right Merge), and the turnout with no less than 4 candidate track points (Middle).
[0154] The LeftSeperate state has the following characteristics: there are 3 candidate track points at the start position of the turnout, there is an intermediate track point between the left track point and the right track point in the candidate point set, and the intermediate track point is closer to the left track point. The track point finally selected should satisfy the non-increasing X coordinates between adjacent rows (from the bottom to the top of the image) for the right track point.
[0155] The RightSeperate state has the following characteristics: there are 3 candidate track points at the start position of the turnout, there is an intermediate track point between the left track point and the right track point in the candidate point set, and the intermediate track point is closer to the right track point. The left track point in the final selected track point pair should satisfy the non-decreasing X coordinates between adjacent rows (from the bottom to the top of the image).
[0156] The RightMerge state has the following characteristics: there are 3 candidate track points at the start position of the turnout, there is no intermediate track point between the left track point and the right track point in the candidate point set, and there is a track point on the right side of the right track point.
[0157] The LeftMerge state has the following characteristics: there are 3 candidate track points at the start position of the turnout, there is no middle track point between the left track point and the right track point in the candidate point set, and there is a right track point to the left of the left track point.
[0158] The Middle state has the following characteristics: it has no less than 4 candidate orbital points.
[0159] S305: The current row is taken as a new starting row, and the process returns to the step of determining whether the track point pair state of the starting row is a turnout state, until the iterative search of all track points included in the track point set is completed.
[0160] In the embodiment of the present invention, the track point pairs corresponding to each row may be determined by searching row by row. After completing the search for the track point pairs corresponding to the current row, the current row may be used as a new starting row, and the process returns to S301 to perform a new round of track point pair search.
[0161] Figure 4 A schematic diagram of trains passing a single turnout in opposite directions provided by an embodiment of the present invention, Figure 4 In the example of right-turn main line traffic, the candidate track points of the starting line are 3 (the front end of the turnout point rail) and 4 (the subsequent part of the turnout). Assume that the track point pair status of the starting line in the historical track status information is LeftSeparate. When the number of candidate points is 3, the left track point of the starting line is selected Figure 4 Middle track point 1, start line right track point selection Figure 4 Middle track point 3.
[0162] Figure 5 A method provided by an embodiment of the present invention Figure 4 Schematic diagram of the adjacent next frame image. Figure 5 When the number of candidate points is 4, the left track point of the starting line can be selected Figure 5 Middle track point 2, start line right track point selection Figure 5 Middle track point 4; the left track point of the starting line can also be selected Figure 5 Middle track point 1, start line right track point selection Figure 5 Middle track point 3. Figure 5 situation, due to Figure 4 is the previous frame image, and can be combined with Figure 4 The selection of the left and right track points of the starting row determines the Figure 5 Middle start line left track point selection Figure 5 Middle track point 1, start line right track point selection Figure 5 Middle track point 3.
[0163] In an embodiment of the present invention, after determining the left and right track point pairs corresponding to each row, the left and right track point pairs corresponding to each row can be filtered according to the state changes of the track point pairs and the changes in the track pixel width to obtain filtered left and right track point pairs; the filtered left and right track point pairs are linearly fitted to determine the train drivable area in the two-dimensional image.
[0164] After completing the search of a row of left and right track point pairs, you can perform a filter. There are two filtering methods: one is to confirm whether the track point pair status change is compliant. The other is to confirm whether the track pixel width change is compliant.
[0165] For compliance with the track point pair state change, it can be determined whether the change in the track point pair state corresponding to the target row and the track point pair state corresponding to the previous adjacent row meets the state transition condition. If the change in the track point pair state corresponding to the target row and the track point pair state corresponding to the previous adjacent row does not meet the state transition condition, the left and right track point pairs corresponding to the target row are deleted; wherein the target row is any one of all pixel rows contained in the initial left and right track points.
[0166] The state transition conditions include that Straight, LeftCurve and RightCurve can be directly converted, and LeftSeperate, RightSeperate, LeftMerge, RightMerge and Middle cannot be directly converted.
[0167] Figure 6 A schematic diagram of a track point pair state change provided by an embodiment of the present invention, Figure 6 In the figure, 8 track point pair states are taken as an example. Straight, LeftCurve and RightCurve are states 1 to 3 respectively; LeftSeperate, RightSeperate, LeftMerge, RightMerge and Middle are states 4 to 8 respectively. Except for track point pair states 1 to 3, track point pair states 4 to 8 cannot be directly converted and must pass through track point pair states 1 to 3.
[0168] Based on the image perspective projection rule, the closer the pixel row is to the bottom of the image, the more pixels should be covered between its left and right track points, and vice versa. Therefore, to determine whether the track pixel width change is compliant, we can determine whether the track point pixel width corresponding to the current row is less than or equal to the track point pixel width corresponding to the previous adjacent row. If the track point pixel width corresponding to the current row is greater than the track point pixel width corresponding to the previous adjacent row, delete the left and right track point pair corresponding to the target row.
[0169] During the search process, not every row has a pair of left and right track points that meet the conditions. In order to obtain a more complete train drivable area, linear compensation can be performed on the track point pairs.
[0170] In a specific implementation, when there is a target row without a left and right track point pair, the track point pair adjacent to the target row can be queried from the filtered left and right track point pairs; linear fitting is performed on the track point pairs adjacent to the target row to obtain the left and right track point pairs corresponding to the target row; linear fitting is performed on the left and right track point pairs corresponding to the target row and the filtered left and right track point pairs to determine the drivable area of the train in the two-dimensional image.
[0171] The present invention proposes different track point pair states and their transfer relationships to be applicable to various train operation scenarios, thereby improving the robustness, accuracy and completeness of track identification in various train operation scenarios.
[0172] Figure 7 A schematic diagram of the structure of a device for determining a train drivable area provided in an embodiment of the present invention, comprising a segmentation unit 71, a classification unit 72, a search unit 73, an analysis unit 74 and a drawing unit 75;
[0173] The segmentation unit 71 is used to perform semantic segmentation on the acquired two-dimensional image to determine the category area to which each pixel point in the two-dimensional image belongs; wherein the category area includes a track point area, an intra-track area, and a background area;
[0174] The classification unit 72 is used to classify the track points contained in the track point area according to the positional relationship between the pixels in different category areas to obtain a track point set; wherein the track point set includes a left track point, a middle track point and a right track point;
[0175] A search unit 73, configured to perform a track search starting from a starting row of the two-dimensional image according to a change in the horizontal coordinates of adjacent rows, so as to determine an initial search area of the two-dimensional image;
[0176] An analysis unit 74 is used to iteratively search the track points included in the track point set based on the state of the track point pair and the change of the horizontal coordinates of adjacent rows, so as to determine the left and right track point pairs corresponding to each row in the initial search area;
[0177] The drawing unit 75 is used to draw the train drivable area in the two-dimensional image using the left and right track point pairs corresponding to each row.
[0178] In some embodiments, the classification unit is used to classify the track point as a left track point when the left side of the track point is the background area and the right side is the intra-track area; to classify the track point as a middle track point when the left side of the track point is the intra-track area and the right side is the intra-track area; and to classify the track point as a right track point when the left side of the track point is the intra-track area and the right side is the background area.
[0179] In some embodiments, the search unit includes a determination subunit, a first determination subunit, and a second determination subunit;
[0180] A judging subunit, used for judging whether the two-dimensional image is a first frame image;
[0181] The first determination subunit is used to determine the initial search area of the two-dimensional image according to the change characteristics of the horizontal coordinate of the starting line of the track on which the train is currently traveling in the two-dimensional image when the two-dimensional image is the first frame image;
[0182] The second determination subunit is used to determine the initial search area of the two-dimensional image according to the historical track state information when the two-dimensional image is not the first frame image; wherein the historical track state information includes the horizontal coordinates of the left and right track points of the starting row of the two-dimensional image, the horizontal coordinates of the center point of the starting row, and the change amount.
[0183] In some embodiments, the first determination subunit is used to screen out the first N tracks with the smallest change in horizontal coordinates of left and right track points between adjacent rows from the bottom area of the two-dimensional image; wherein N is a positive integer greater than or equal to 2; a weighted operation is performed on the horizontal coordinates of the left track points corresponding to the first N tracks to determine the left boundary of the initial search area; a weighted operation is performed on the horizontal coordinates of the right track points corresponding to the first N tracks to determine the right boundary of the initial search area.
[0184] In some embodiments, the second determination subunit is used to determine the left and right track boundary extension values based on the horizontal coordinate of the right track point of the starting row, the horizontal coordinate of the left track point of the starting row, and the selected scaling factor; the sum of the horizontal coordinate of the right track point of the starting row and the left and right track boundary extension values is used as the right boundary of the initial search area; the difference between the horizontal coordinate of the left track point of the starting row and the left and right track boundary extension values is used as the left boundary of the initial search area; and the sum of the horizontal coordinate of the center point of the starting row and the change amount is used as the center point position of the initial search area.
[0185] In some embodiments, the analyzing unit includes a state determining subunit, a third determining subunit, a fourth determining subunit, a fifth determining subunit, and an acting subunit;
[0186] A state judgment subunit is used to judge whether the state of the track point pair of the starting line is a turnout state; wherein, in the initial state, the starting line is the track line in the bottom area of the two-dimensional image;
[0187] The third determination subunit is used to determine the left and right track point pairs corresponding to the current row according to the principle of minimum change in the horizontal coordinates of adjacent rows when the track point pair state of the starting row is a non-turnout state;
[0188] The fourth determination subunit is used to determine the left and right track point pairs corresponding to the current row according to the direction of the turnout and the change of the horizontal coordinates of the adjacent rows when the track point pair state of the starting row is a turnout state; wherein the current row is a pixel row adjacent to the starting row;
[0189] A fifth determining subunit, configured to determine the track point pair status of the current row according to the change of the horizontal coordinates of the adjacent rows, the number of track points included in the current row and the corresponding track point types;
[0190] As a subunit, it is used to take the current row as the new starting row and return to the step of determining whether the track point pair state of the starting row is a turnout state until the iterative search of all track points contained in the track point set is completed.
[0191] In some embodiments, the fourth determination subunit is used to determine the left and right track point pairs corresponding to the current row according to the principle of minimum change in the horizontal coordinates of adjacent rows when the turnout is opened in a straight line;
[0192] When the turnout is opened in a non-straight direction, the left and right track point pairs corresponding to the current row are determined based on the principle of the second smallest change in the horizontal coordinates of adjacent rows.
[0193] In some embodiments, the track point pair state includes a state without a switch and a state with a switch; wherein the state without a switch includes a straight track and a curved track;
[0194] The fifth determining subunit is used to determine that the state of the track point pair of the current row is a straight track state when the number of track points included in the current row is equal to two, the track point types include left track points and right track points, and the horizontal coordinates of the left track points of the adjacent rows are not decreasing, and the horizontal coordinates of the right track points are not increasing;
[0195] When the number of track points included in the current row is equal to two, the track point types include left track points and right track points, and the horizontal coordinates of the track points in adjacent rows change in the same direction, determine that the state of the track point pair in the current row is a curve state;
[0196] When the number of track points included in the current row is greater than two, the state of the track point pair of the current row is determined to be a turnout state.
[0197] In some embodiments, the rendering unit includes a filtering subunit and a fitting subunit;
[0198] A filtering subunit, used to filter the left and right track point pairs corresponding to each row according to the state change of the track point pair and the track pixel width change, so as to obtain the filtered left and right track point pairs;
[0199] The fitting subunit is used to perform linear fitting on the filtered left and right track point pairs to determine the train drivable area in the two-dimensional image.
[0200] In some embodiments, the filtering subunit is used to delete the left and right track point pairs corresponding to the target row when the change between the track point pair state corresponding to the target row and the track point pair state corresponding to the previous adjacent row does not meet the state transition condition; wherein the target row is any one of all pixel rows included in the initial left and right track points;
[0201] When the pixel width of the track point corresponding to the current row is greater than the pixel width of the track point corresponding to the previous adjacent row, the left and right track point pairs corresponding to the target row are deleted.
[0202] In some embodiments, the fitting subunit is used to query the track point pairs adjacent to the target row from the filtered left and right track point pairs when there is a target row without left and right track point pairs; perform linear fitting on the track point pairs adjacent to the target row to obtain the left and right track point pairs corresponding to the target row;
[0203] Linear fitting is performed on the left and right track point pairs corresponding to the target row and the filtered left and right track point pairs to determine the train drivable area in the two-dimensional image.
[0204] In some embodiments, a filtering unit is also included;
[0205] The filtering unit is used to perform morphological processing on the pixels contained in each category area to filter out the wrongly classified pixels in each category area.
[0206] Figure 7 The description of the features in the corresponding embodiments can be found in Figure 1 The relevant descriptions of the corresponding embodiments will not be repeated here one by one.
[0207] It can be seen from the above technical solution that the acquired two-dimensional image is semantically segmented to determine the category area to which each pixel point in the two-dimensional image belongs; wherein the category area includes the track point area, the track area and the background area; according to the positional relationship between each pixel point in different category areas, the track points contained in the track point area are classified to obtain a track point set; wherein the track point set includes left track points, middle track points and right track points. Track search is performed from the starting row of the two-dimensional image according to the change of the horizontal coordinates of adjacent rows to determine the initial search area of the two-dimensional image. Based on the state of the track point pair and the change of the horizontal coordinates of the adjacent rows, the track points contained in the track point set are iteratively searched to determine the left and right track point pairs corresponding to each row in the initial search area. Using the left and right track point pairs corresponding to each row, the train drivable area is drawn in the two-dimensional image. In this technical solution, it does not rely on the position assumption of the track in the image. By determining the initial search area and combining the change of the horizontal coordinates of the adjacent rows and the state of the track point pair, the left and right track point pairs can be accurately identified, thereby drawing a reliable train drivable area. This implementation method can be applied to various train operation scenarios, improving the robustness and accuracy of track identification in different train operation scenarios.
[0208] Figure 8 A structural diagram of a device for determining a train drivable area provided in an embodiment of the present invention, such as Figure 8 As shown, the device for determining the train travelable area includes: a memory 80 for storing a computer program;
[0209] The processor 81 is used to implement the steps of the method for determining the train drivable area in the above embodiment when executing the computer program.
[0210] The device for determining the train drivable area provided in this embodiment may include, but is not limited to, a smart phone, a tablet computer, a laptop computer, or a desktop computer.
[0211] Among them, the processor 81 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 81 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 81 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 81 may be integrated with a graphics processing unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 81 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0212] The memory 80 may include one or more computer-readable storage media, which may be non-transitory. The memory 80 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 80 is at least used to store the following computer program 801, wherein, after the computer program is loaded and executed by the processor 81, it can implement the relevant steps of the method for determining the train drivable area disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 80 may also include an operating system 802 and data 803, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 802 may include Windows, Unix, Linux, etc. Data 803 may include but is not limited to two-dimensional images, track point sets, etc.
[0213] In some embodiments, the device for determining the train drivable area may also include a display screen 82 , an input / output interface 83 , a communication interface 84 , a power supply 85 , and a communication bus 86 .
[0214] Those skilled in the art will understand that Figure 8 The structure shown in the figure does not constitute a limitation on the device for determining the train drivable area, and may include more or fewer components than those shown in the figure.
[0215] It is understandable that if the method for determining the train drivable area in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the current technology, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, magnetic disk or optical disk, etc. Various media that can store program codes.
[0216] Based on this, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for determining a train drivable area as described above are implemented.
[0217] The above is a detailed introduction to a method, device, equipment and computer-readable storage medium for determining a train drivable area provided by an embodiment of the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0218] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0219] The above is a detailed introduction to a method, device, equipment and computer-readable storage medium for determining a train drivable area provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, the present invention can also be improved and modified, and these improvements and modifications also fall within the scope of protection of the present invention.
Claims
1. A method for determining a train drivable area, characterized in that: include: Performing semantic segmentation on the acquired two-dimensional image to determine the category area to which each pixel point in the two-dimensional image belongs; wherein the category area includes a track point area, an intra-track area, and a background area; According to the positional relationship between each pixel point in different category areas, the track points contained in the track point area are classified to obtain a track point set; wherein the track point set includes a left track point, a middle track point and a right track point; Performing a track search starting from a starting row of the two-dimensional image according to a change in the horizontal coordinates of adjacent rows to determine an initial search area of the two-dimensional image; Based on the state of the track point pairs and the changes in the horizontal coordinates of adjacent rows, iteratively searching the track points included in the track point set to determine the left and right track point pairs corresponding to each row in the initial search area; The train drivable area is drawn in the two-dimensional image using the left and right track point pairs corresponding to each row.
2. The method for determining a train drivable area according to claim 1, characterized in that: According to the positional relationship between the pixels in different category areas, the track points contained in the track point area are classified to obtain a track point set including: In the case where the left side of the track point is the background area and the right side is the track inner area, the track point is divided into a left track point; In the case where the left side of the track point is the intra-track area and the right side is the intra-track area, the track point is divided into an intermediate track point; When the left side of the track point is the in-track area and the right side is the background area, the track point is classified as a right track point.
3. The method for determining a train drivable area according to claim 1, characterized in that: Performing a track search from the starting row of the two-dimensional image according to the change of the horizontal coordinates of adjacent rows to determine that the initial search area of the two-dimensional image includes: Determining whether the two-dimensional image is a first frame image; In the case where the two-dimensional image is the first frame image, determining the initial search area of the two-dimensional image according to the change characteristics of the horizontal coordinates of the starting row of the track on which the train is currently traveling in the two-dimensional image; When the two-dimensional image is not the first frame image, the initial search area of the two-dimensional image is determined according to the historical track state information; wherein the historical track state information includes the horizontal coordinates of the left and right track points of the starting row of the two-dimensional image, the horizontal coordinates of the center point of the starting row, and the change amount.
4. The method for determining a train drivable area according to claim 3, characterized in that: According to the change characteristics of the horizontal coordinates of the starting row of the track on which the train is currently traveling in the two-dimensional image, determining the initial search area of the two-dimensional image includes: Filtering out the first N tracks with the smallest change in the horizontal coordinates of the left and right track points between adjacent rows from the bottom area of the two-dimensional image; wherein N is a positive integer greater than or equal to 2; Performing a weighted operation on the horizontal coordinates of the left track points corresponding to the first N tracks to determine the left boundary of the initial search area; A weighted operation is performed on the horizontal coordinates of the right track points corresponding to the first N tracks to determine the right boundary of the initial search area.
5. The method for determining a train drivable area according to claim 3, characterized in that: Determining the initial search area of the two-dimensional image according to the historical track state information includes: Determine the left and right track boundary extension values according to the horizontal coordinate of the right track point of the starting row, the horizontal coordinate of the left track point of the starting row, and the selected scale factor; The sum of the horizontal coordinate of the right track point of the starting row and the extended value of the left and right track boundaries is used as the right boundary of the initial search area; The difference between the horizontal coordinate of the left track point of the starting row and the extension value of the left and right track boundaries is used as the left boundary of the initial search area; The sum of the horizontal coordinate of the center point of the starting row and the change amount is used as the center point position of the initial search area.
6. The method for determining a train drivable area according to claim 1, characterized in that: Based on the state of the track point pair and the change of the horizontal coordinates of adjacent rows, the track points included in the track point set are iteratively searched to determine that the left and right track point pairs corresponding to each row in the initial search area include: Determine whether the track point pair state of the starting row is a turnout state; wherein, in the initial state, the starting row is the track row in the bottom area of the two-dimensional image; When the track point pair state of the starting row is a non-turnout state, the left and right track point pairs corresponding to the current row are determined according to the principle of minimum change in the horizontal coordinates of adjacent rows; When the track point pair state of the starting row is a turnout state, the left and right track point pairs corresponding to the current row are determined according to the turnout direction and the change of the horizontal coordinates of the adjacent rows; wherein the current row is a pixel row adjacent to the starting row; Determine the track point pair status of the current row according to the change of the horizontal coordinates of the adjacent rows, the number of track points contained in the current row and the corresponding track point types; The current row is taken as a new starting row, and the step of determining whether the track point pair state of the starting row is a turnout state is returned to, until the iterative search of all track points included in the track point set is completed.
7. The method for determining a train drivable area according to claim 6, characterized in that: According to the change of the turnout direction and the horizontal coordinates of the adjacent rows, the left and right track point pairs corresponding to the current row are determined to include: When the turnout is opened for straight-line passage, the left and right track point pairs corresponding to the current row are determined according to the principle of minimum change in the horizontal coordinates of adjacent rows; When the turnout is opened in a non-straight direction, the left and right track point pairs corresponding to the current row are determined based on the principle of the second smallest change in the horizontal coordinates of adjacent rows.
8. The method for determining a train drivable area according to claim 6, characterized in that: The track point pair state includes a state without a turnout and a state with a turnout; wherein the state without a turnout includes a straight track and a curved track; According to the change of the horizontal coordinates of the adjacent rows, the number of track points contained in the current row and their corresponding track point types, the track point pair status of the current row is determined to include: When the number of track points included in the current row is equal to two, the track point types include left track points and right track points, and the horizontal coordinates of the left track points in the adjacent rows are not decreasing, and the horizontal coordinates of the right track points are not increasing, it is determined that the state of the track point pair in the current row is a straight track state; When the number of track points included in the current row is equal to two, the track point types include left track points and right track points, and the horizontal coordinates of the track points in adjacent rows change in the same direction, determine that the state of the track point pair in the current row is a curve state; When the number of track points included in the current row is greater than two, the state of the track point pair of the current row is determined to be a turnout state.
9. The method for determining a train drivable area according to claim 1, characterized in that: Using the left and right track point pairs corresponding to each row, the train drivable area is drawn in the two-dimensional image, including: According to the state change of the track point pair and the change of the track pixel width, the left and right track point pairs corresponding to each row are filtered to obtain the filtered left and right track point pairs; Linear fitting is performed on the filtered left and right track point pairs to determine the train drivable area in the two-dimensional image.
10. The method for determining a train drivable area according to claim 9, characterized in that: According to the state change of the track point pair and the track pixel width change, the left and right track point pairs corresponding to each row are filtered to obtain the filtered left and right track point pairs including: When the change between the track point pair state corresponding to the target row and the track point pair state corresponding to the previous adjacent row does not meet the state transition condition, the left and right track point pairs corresponding to the target row are deleted; wherein the target row is any one of all pixel rows included in the initial left and right track points; When the pixel width of the track point corresponding to the current row is greater than the pixel width of the track point corresponding to the previous adjacent row, the left and right track point pairs corresponding to the target row are deleted.
11. The method for determining a train drivable area according to claim 10, characterized in that: Linear fitting is performed on the filtered left and right track point pairs to determine that the train drivable area in the two-dimensional image includes: In the case where there is a target row without a left and right track point pair, querying a track point pair adjacent to the target row from the filtered left and right track point pairs; performing linear fitting on the track point pairs adjacent to the target row to obtain the left and right track point pairs corresponding to the target row; Linear fitting is performed on the left and right track point pairs corresponding to the target row and the filtered left and right track point pairs to determine the train drivable area in the two-dimensional image.
12. The method for determining a train drivable area according to claim 1, characterized in that: Before classifying the track points contained in the track point area according to the positional relationship between the pixels in different category areas to obtain the track point set, the method further includes: Morphological processing is performed on the pixels contained in each category area to filter out the misclassified pixels in each category area.
13. A device for determining a train drivable area, characterized in that: It includes segmentation unit, classification unit, search unit, analysis unit and drawing unit; The segmentation unit is used to perform semantic segmentation on the acquired two-dimensional image to determine the category area to which each pixel point in the two-dimensional image belongs; wherein the category area includes a track point area, an intra-track area, and a background area; The classification unit is used to classify the track points contained in the track point area according to the positional relationship between the pixels in different category areas to obtain a track point set; wherein the track point set includes a left track point, a middle track point and a right track point; The search unit is used to perform track search starting from the starting row of the two-dimensional image according to the change of the horizontal coordinates of adjacent rows, so as to determine the initial search area of the two-dimensional image; The analysis unit is used to iteratively search the track points included in the track point set based on the state of the track point pair and the change of the horizontal coordinates of adjacent rows, so as to determine the left and right track point pairs corresponding to each row in the initial search area; The drawing unit is used to draw the train drivable area in the two-dimensional image using the left and right track point pairs corresponding to each row.
14. A device for determining a train drivable area, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the method for determining a train drivable area as claimed in any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for determining the train drivable area as claimed in any one of claims 1 to 12 are implemented.
Citation Information
Patent Citations
Vision-based track turnout identification method
CN111860137A
Railway turnout opening judgment method and system based on visual detection
CN116468790A
On-road train actual operation area detection method based on geometric feature mining
CN116994048A
Track route detection method and device
CN118366112A
