Distance measurement method and device based on adjacent track train characteristics
By identifying the side images of adjacent rail trains and inverse perspective transformation, the depth value of adjacent rail trains is calculated, and the problem of inaccurate radar scanning positioning in the prior art is solved, and the accuracy and reliability of adjacent rail train detection are improved.
Patent Information
- Application Number
- CN202311100544.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-29
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2043-08-29
AI Technical Summary
In the prior art, the positioning through radar scanning is not accurate enough, and the distance measurement function of the camera sensor cannot be fully utilized, resulting in insufficient accuracy and reliability of adjacent train detection.
By feature recognition of the side images of the adjacent rail train, the depth value of the characteristic corner points is determined using the internal parameter matrix and geometric constraints of the on-board shooting device, and the image is projected into a non-perspective image through inverse perspective transformation, and the depth value of the target position of the adjacent rail train occupying the turnout to the main train.
There is no need to modify the existing active train collision prevention system to provide more accurate depth values, which is a heterogeneous complement to lidar scanning, improving the accuracy and reliability of adjacent train detection.
Smart Images

Figure CN117291964B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of rail transportation technology, and in particular to a distance measurement method and device based on characteristics of trains on adjacent tracks. Background Art
[0002] As the rail transit industry gradually promotes assisted driving systems and unmanned driving systems, clearance detection of the track area in front of the train is a basic prerequisite for ensuring the safe operation of rail transit trains.
[0003] The presence of an adjacent train at the switch intersection ahead of the train is one of the most common and dangerous scenarios in automated train operation. Protecting against this scenario requires the train to fully and accurately identify the adjacent train's body and measure the distance to the adjacent train occupying the switch, providing information for the train's safe distance-based train operation system control.
[0004] The existing active train collision avoidance system uses a "high-precision positioning + lidar scanning" method to detect adjacent track trains in the forward switch intersection area: first, the train's forward scene information and train movement information are obtained through train-mounted sensors such as lidar, cameras, and IMU, and then matched with the existing line map to achieve positioning; then, the lidar is used to scan and measure the distance of key nodes in the area ahead of the train (such as the switch intersection area) to determine whether there is an adjacent track train and determine the distance between the adjacent track train and the current train.
[0005] The existing technology only uses a combination of high-precision positioning and radar scanning for detection, which fails to fully utilize the ranging function of the camera sensor. In addition, only using high-precision positioning and radar scanning is not conducive to ensuring the accuracy and reliability of ranging. Summary of the Invention
[0006] The present invention provides a distance measurement method, device and electronic equipment based on the characteristics of adjacent track trains, which are used to solve the defect of insufficient accuracy of positioning by radar scanning alone in the prior art.
[0007] In a first aspect, the present invention provides a distance measurement method based on characteristics of adjacent track trains, comprising:
[0008] Performing feature recognition on the side image of the adjacent track train acquired by the vehicle's camera device to obtain target features of the adjacent track train; the target features are features with known scales;
[0009] Determine the depth value from each feature corner point to the vehicle based on the intrinsic parameter matrix of the vehicle-mounted camera device, the coordinates of each feature corner point of the target feature in the pixel reference coordinate system of the adjacent track train image, and the geometric constraints of the target feature;
[0010] Projecting the side image into a non-perspective image based on an inverse perspective transformation, and determining a lower edge straight line of the adjacent track train in the non-perspective image;
[0011] Determine the depth value from the target position of the adjacent track train occupying the turnout to the vehicle based on the vertical points of different characteristic corner points on the lower straight line and the depth values from the different characteristic corner points to the vehicle; wherein the target position is located on the lower straight line;
[0012] In one embodiment, determining the depth value from each feature corner point to the vehicle based on the intrinsic parameter matrix of the on-board camera device, the coordinates of each feature corner point of the target feature in the pixel reference coordinate system in the image of the adjacent track train, and the geometric constraints of the target feature includes:
[0013] Based on the intrinsic parameter matrix of the on-board camera device, the coordinates of each feature corner point of the target feature in the pixel reference coordinate system of the adjacent track train image are transformed into a three-dimensional space coordinate expression in the reference coordinate system of the on-board camera device;
[0014] Constructing a target equation group based on the geometric constraints of the target features and the three-dimensional space coordinate expressions;
[0015] Solving the target equations to obtain the depth value from each feature corner point to the vehicle;
[0016] In one embodiment, determining the depth value from the target position of the adjacent track train occupying the switch to the vehicle includes:
[0017] Determining a linear relationship between pixel coordinates and depth values based on pixel coordinates of perpendicular points of different feature corner points on the lower edge straight line in the non-perspective image and depth values from the different feature corner points to the vehicle;
[0018] Determine the depth value from the target position to the vehicle using a fixed-ratio point algorithm based on the pixel coordinates of the target position and the linear relationship;
[0019] In one embodiment, the performing feature recognition on the side image of the adjacent track train acquired by the vehicle's camera device to obtain the target feature of the adjacent track train includes:
[0020] Inputting the side image of the adjacent track train into a feature recognition model to obtain target features of the adjacent track train output by the feature recognition model and their confidence levels;
[0021] The target feature whose confidence level is higher than the confidence threshold is regarded as a valid target feature;
[0022] In one embodiment, the feature recognition model is a YOLO network model or an ERFNet network model;
[0023] In one embodiment, the camera is a monocular camera.
[0024] In one embodiment, the target feature includes at least one of a train head, a train head front window, a train dual headlights, a train passenger compartment window, a train passenger compartment door, a train wheel, and a train track.
[0025] In a second aspect, the present invention further provides a distance measuring device based on characteristics of adjacent track trains, comprising:
[0026] A feature recognition module is used to perform feature recognition on the side image of the adjacent track train obtained by the vehicle's camera device to obtain target features of the adjacent track train; the target features are features with known scales;
[0027] a depth determination module, configured to determine a depth value from each feature corner point to the vehicle based on an intrinsic parameter matrix of the vehicle-mounted camera device, coordinates of each feature corner point of the target feature in a pixel reference coordinate system in the image of the adjacent track train, and geometric constraints of the target feature;
[0028] an image projection module, configured to project the side image into a non-perspective image based on an inverse perspective transformation, and determine a lower edge straight line of the adjacent track train in the non-perspective image;
[0029] The turnout determination module is used to determine the depth value from the target position of the turnout occupied by the adjacent track train to the vehicle based on the vertical points of different characteristic corner points on the lower edge straight line and the depth values from the different characteristic corner points to the vehicle; wherein the target position is located on the lower edge straight line.
[0030] In a third aspect, the present invention further provides an electronic device comprising a memory, a processor and a program stored in the memory, wherein when the processor executes the program, the steps of the ranging method based on the characteristics of adjacent track trains as described in any one of the above-mentioned first aspects are implemented.
[0031] In a fourth aspect, the present invention further provides a processor-readable storage medium having a computer program stored thereon, wherein the computer program is used to enable the processor to implement the steps of the ranging method based on the characteristics of adjacent track trains as described in any one of the above-mentioned first aspects when executed.
[0032] The present invention provides a distance measurement method and device based on adjacent track train features. The method and device determine the depth value of the feature corner points through the internal parameter matrix of the on-board camera device, the feature corner points of the target feature and their pixel reference system coordinates and set constraints, and determine the depth value of the target position by projecting the side image into a non-perspective image. There is no need to modify the existing active train collision avoidance system. It can also serve as a heterogeneous supplement to laser radar scanning ranging, providing more accurate depth values for the train operation control system to control train collision avoidance. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0034] Figure 1 This is a flow chart of a distance measurement method based on adjacent track train characteristics provided by an embodiment of the present invention;
[0035] Figure 2 is a schematic diagram of feature recognition results provided by an embodiment of the present invention;
[0036] Figure 3 is a schematic diagram of a perspective projection of a target feature provided by an embodiment of the present invention;
[0037] Figure 4 is a schematic diagram of inverse perspective transformation provided by an embodiment of the present invention;
[0038] Figure 5 Schematic diagram of a distance measurement device based on characteristics of adjacent track trains provided by an embodiment of the present invention;
[0039] Figure 6 It is a schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0040] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0041] ,like Figure 1 As shown, the distance measurement method based on the characteristics of adjacent track trains provided in an embodiment of the present invention includes:
[0042] Step 110: Perform feature recognition on the side image of the adjacent track train acquired by the vehicle's camera device to obtain target features of the adjacent track train; the target features are features with known scales;
[0043] Step 120: Determine the depth value from each feature corner point to the vehicle based on the intrinsic parameter matrix of the vehicle-mounted camera, the coordinates of each feature corner point of the target feature in the pixel reference coordinate system of the adjacent track train image, and the geometric constraints of the target feature.
[0044] Step 130: Project the side image into a non-perspective image based on inverse perspective transformation, and determine the lower edge straight line of the adjacent track train in the non-perspective image;
[0045] Step 140: Determine the depth value from the target position of the switch occupied by the adjacent track train to the vehicle based on the vertical points of different characteristic corner points on the lower straight line and the depth values from the different characteristic corner points to the vehicle; wherein the target position is located on the lower straight line.
[0046] It should be noted that in step 110, feature recognition of the side image of the adjacent track train obtained by the vehicle's camera device can be processed by the train's onboard GPU computing device, and the depth value from the target position to the vehicle can be determined based on the target features of the adjacent track train and can be processed by the train's onboard CPU computing device.
[0047] It should be noted that after the on-board camera device captures the side image of the adjacent track train, it inputs it into the on-board GPU computing device of this train in the form of an image data stream. The feature recognition network in the GPU computing device recognizes the image data, obtains the target features of the adjacent track train, and sends it to the CPU computing device for calculation.
[0048] In step 120, the CPU computing device determines the depth value from the feature corner point to the vehicle based on the intrinsic parameter matrix of the vehicle-mounted camera device, the coordinates of the corner point of the target feature in the pixel reference coordinate system, and the geometric constraints of the target feature.
[0049] In step 130 , the CPU computing device projects the side image of the adjacent track train into a non-perspective image through inverse perspective transformation, and determines the lower straight line in the non-perspective image.
[0050] In step 140, the depth value from the target position of the switch occupied by the adjacent track train to the own vehicle is calculated based on the vertical points of different characteristic corner points on the lower straight line and the depth value from the characteristic corner point to the own vehicle.
[0051] It should be noted that the onboard camera can be installed at a location at the front of the train with a wide field of view and easy maintenance. The CPU computing device can obtain the pre-calibrated internal parameters of the onboard camera and the position and angle of the onboard camera relative to the train in advance, so that the CPU computing device can determine the depth value from the feature corner point to the train.
[0052] It should be noted that the scale of the target feature can be target size information, target feature shape angle information, etc. For example, information such as the width and height of a train compartment door can be collected using tools such as a tape measure, a laser rangefinder, and a level.
[0053] It should be noted that the geometric constraints of the target features can be parallel, perpendicular and other relationships.
[0054] It should be noted that the characteristic corner points may be points with obvious geometric relationships, such as the four vertices of a quadrilateral. Specifically, in the present invention, they may be the four vertices of a rectangular passenger compartment window.
[0055] It should be noted that the lower edge straight line of the adjacent track train may refer to a straight line of the lower edge of the adjacent track train photographed by the train shooting device, which is on the same horizontal straight line as the target position of the adjacent track train occupying the switch.
[0056] The ranging method based on adjacent track train features provided by an embodiment of the present invention determines the depth value of the feature corner points through the internal parameter matrix of the on-board camera device, the feature corner points of the target features and their pixel reference system coordinates and set constraints, and determines the depth value of the target position by projecting the side image into a non-perspective image. There is no need to change the existing active train collision avoidance system, and it can also serve as a heterogeneous supplement to lidar scanning ranging, providing more accurate depth values for the train operation control system to control train collision avoidance.
[0057] In one embodiment, the target feature includes at least one of a train head, a train head front window, a train dual headlights, a train passenger compartment window, a train passenger compartment door, a train wheel, and a train track.
[0058] It is understandable that when collecting the scale of the target features, for example, the width and height of the train front, the width and height of the train front window, the distance between the two headlights of the train, the width and height of the train passenger compartment door, the wheel diameter of the train, the distance between the two tracks of the train track, etc. can be collected.
[0059] The ranging method based on the adjacent track train characteristics provided by the embodiment of the present invention determines at least one of the train head, the train head front window, etc. as the target feature of the adjacent track train, which facilitates the collection of the scale of the target feature. The collected scale information is more accurate than the features with irregular shapes, and is more conducive to improving the accuracy of subsequent identification of target features.
[0060] In one embodiment, the camera is a monocular camera.
[0061] It can be understood that by using a monocular vision shooting device for ranging, this train can heterogeneously supplement the results of the lidar scanning ranging, so that the depth value of the target position of this train and the adjacent track train at the occupied switch obtained by the train operation control system is more accurate, which is more conducive to the train operation control system to control the train to avoid collision.
[0062] Figure 2 Schematic diagram of feature recognition results provided by an embodiment of the present invention. Figure 2 As shown, the distance measurement method based on the adjacent track train feature provided by the embodiment of the present invention performs feature recognition on the side image of the adjacent track train obtained by the vehicle's camera device to obtain the target feature of the adjacent track train, including:
[0063] Input the side image of the adjacent track train into the feature recognition model, and obtain the target features of the adjacent track train and its confidence level output by the feature recognition model;
[0064] The target features with confidence higher than the confidence threshold are regarded as valid target features.
[0065] It should be noted that after the feature recognition network identifies the side image of the adjacent track train, it will output the target feature and the confidence of the target feature. The CPU computing device compares the confidence of the target feature with the pre-set confidence threshold to determine that the target feature whose confidence is lower than the confidence threshold will not participate in the subsequent depth value calculation.
[0066] The ranging method based on adjacent track train features provided by an embodiment of the present invention outputs target feature confidence through feature recognition network identification, and includes target features with target feature confidence higher than the confidence threshold in subsequent depth value calculation, thereby ensuring the accuracy of subsequent depth value calculation.
[0067] In one embodiment, the feature recognition model is a YOLO network model or an ERFNet network model.
[0068] It is understandable that the features recognized by the feature recognition network vary depending on the usage scenario. For example, if the vehicle's camera frequently captures images of train fronts, the feature recognition network may recognize the train fronts and the front windows of the train fronts. In this case, when training the feature recognition network, a large number of labeled target feature images of train fronts, train front windows, and other target features may be input into the feature recognition network for training, thereby improving the network's accuracy in recognizing target features of the train fronts.
[0069] It should be noted that the YOLO or ERFNet network model is deployed on the train's GPU computing device. Both the YOLO and ERFNet network models require training before use. For example, the captured images of target features must be labeled with rectangular boxes, semantic segmentation annotations, and other types of annotations. A large number of labeled target features are then fed into the YOLO or ERFNet network model for training, resulting in a feature recognition network.
[0070] It is understood that the choice of using the YOLO network model or the ERFNet network model can be determined based on the hardware conditions of the train, the training duration, etc. For example, if the hardware conditions are selected, the YOLO network model can be selected for trains with good hardware conditions and fast GPU computing equipment, while the ERFNet network model can be selected otherwise. If the training market conditions are selected, the ERFNet network model can be selected for trains with short training durations, while the YOLO network model can be selected for trains with long training durations. The present invention is not limited to this.
[0071] The ranging method based on adjacent track train characteristics provided in an embodiment of the present invention selects the use of the YOLO network model or the ERFNet network model according to different train hardware conditions and training durations in different usage scenarios, so that the target feature detection model can be applied to various train types.
[0072] In one embodiment, based on the intrinsic parameter matrix of the vehicle-mounted camera device, the coordinates of each characteristic corner point of the target feature in the pixel reference coordinate system in the image of the adjacent track train, and the geometric constraints of the target feature, the depth value of each characteristic corner point to the vehicle is determined, including:
[0073] Based on the intrinsic parameter matrix of the on-board camera device, the coordinates of each feature corner point of the target feature in the pixel reference coordinate system of the adjacent track train image are transformed into a three-dimensional spatial coordinate expression in the reference coordinate system of the on-board camera device;
[0074] Construct the target equations based on the geometric constraints of the target features and the three-dimensional space coordinate expressions;
[0075] Solve the target equation group to obtain the depth value from each feature corner point to the vehicle.
[0076] It should be noted that after the CPU computing device obtains the target feature of the characteristic adjacent track train, it determines the pixel reference system based on the image of the adjacent track train, and determines the two-dimensional coordinates of each corner point of the target feature in this pixel reference system. Based on the internal parameters of the calibrated on-board camera device, the internal parameter matrix of the on-board camera device is determined, and a reference coordinate system of the on-board camera device is constructed. Based on the internal parameter matrix, the two-dimensional coordinates of each corner point are converted into a three-dimensional spatial coordinate expression in the reference coordinate system of the on-board camera device. Subsequently, the CPU computing device constructs a target equation group based on the pre-determined set constraints of the target feature and combines each three-dimensional spatial coordinate expression, solves this equation group, and obtains the depth value of each characteristic corner point to the vehicle.
[0077] Figure 3 : is a perspective projection diagram of a target feature provided by an embodiment of the present invention. The target feature is a passenger compartment window. Figure 3 As shown, points A', B', C', and D' are the four corner points of the target feature. According to the pixel reference system, the two-dimensional coordinates of the four points A', B', C', and D' are determined as follows:
[0078] [u [i] ,v [i] ] T (i∈{A,B,C,D})
[0079] According to the intrinsic parameter matrix of the vehicle-mounted camera device, the two-dimensional coordinates of each corner point are converted into the three-dimensional space coordinate expression in the reference coordinate system of the vehicle-mounted camera device:
[0080] [X [i] ,Y [i] ,Z [i] ] T (i∈{A,B,C,D}),
[0081]
[0082] Further rewritten as depth information with depth information Z [i] (i∈{A,B,C,D}) is expressed as a variable:
[0083]
[0084] According to the geometric constraints of the target feature: the height H is known, the width L is known, and the vertical relationship is known, the geometric constraint expression is obtained:
[0085]
[0086] Construct the objective equations based on the geometric constraint expressions:
[0087]
[0088] Specifically, (4) can be expanded as:
[0089]
[0090] By solving the target equations, the depth value Z from each feature corner point to the vehicle can be obtained. [i] (i∈{A,B,C,D}).
[0091] The embodiment of the present invention provides a distance measurement method based on the characteristics of adjacent track trains. The depth value from each characteristic corner point to the vehicle is obtained by solving a set of simultaneous equations of the internal parameter matrix of the on-board camera device, the coordinates in the pixel reference coordinate system, and the set constraints of the target characteristics. The depth value from the characteristic corner point of the adjacent track train to the vehicle can be determined without changing the existing active train collision avoidance system, which simplifies the depth measurement process and enables the train operation control system to obtain more accurate depth results, which is conducive to better control of train collision avoidance.
[0092] In one embodiment, determining the depth value from the target position of the adjacent track train occupying the switch to the vehicle includes:
[0093] Based on the pixel coordinates of the perpendicular points of different feature corner points on the lower edge straight line in the non-perspective image and the depth values of different feature corner points to the vehicle, the linear relationship between the pixel coordinates and the depth values is determined;
[0094] Based on the pixel coordinates of the target position and the linear relationship, the fixed-ratio point algorithm is used to determine the depth value from the target position to the vehicle.
[0095] Figure 4 Schematic diagram of the inverse perspective transformation provided by the embodiment of the present invention. Figure 4 As shown, the target feature corner points A and B and the target position C, the line segment A'C is the lower straight line of the adjacent track train, the points A' and B' are the vertical points of the target feature corner points A and B on the lower straight line of the adjacent track train, and the target position C is the position where the adjacent track train occupies the switch, which is located on the lower straight line of the adjacent track train.
[0096] It can be understood that the vertical points A', B' and the target feature corner points A, B have the same depth value.
[0097] By constructing pixel coordinates in the non-perspective image, the pixel coordinates of points A', B', and C are determined, and the pixel distance between points A', B', and C is determined based on their pixel coordinates. Since the pixel distance and its depth value are linearly related, the depth value of point C is calculated using the fixed-ratio point algorithm. For example Figure 4In the figure, the pixel coordinates of point A' are (0,176), the depth value of point A' is 88m, the pixel coordinates of point B' are (0,202), the depth value of point B' is 101m, and the pixel coordinates of point C are (0,278). According to the linear relationship between the pixel coordinates of A' and B' and the depth value, it can be determined that the depth value of point C is 139m.
[0098] The embodiment of the present invention provides a ranging method based on adjacent track train features. The linear relationship between the pixel coordinates of the points on the straight line below the adjacent track train and their depth values is determined by the depth of the target feature corner points in the non-perspective image and the pixel coordinates of the perpendicular points on the straight line below the adjacent track train. The depth value of the target position of the adjacent track train occupying the switch is then determined. The depth value of the target position can be obtained through graphic changes and simple calculations, which greatly improves the efficiency of target position depth detection.
[0099] It should be noted that the above-mentioned distance measurement method based on the characteristics of adjacent track trains can also be applied to the depth value estimation of other common targets, such as pedestrians, cars at level crossings, etc.
[0100] It should be noted that the above-mentioned distance measurement method based on the characteristics of adjacent track trains can also be applied to trackside road test monitoring equipment.
[0101] on the other hand, Figure 5 FIG is a schematic diagram of a distance measuring device based on the characteristics of adjacent track trains provided by an embodiment of the present invention, such as Figure 5 As shown, the distance measuring device based on the characteristics of adjacent track trains includes:
[0102] The feature recognition module 510 is used to perform feature recognition on the side image of the adjacent track train obtained by the vehicle's camera device to obtain target features of the adjacent track train; the target features are features with known scales;
[0103] Depth determination module 520, for determining the depth value from each feature corner point to the vehicle based on the intrinsic parameter matrix of the vehicle-mounted camera device, the coordinates of each feature corner point of the target feature in the pixel reference coordinate system in the image of the adjacent track train, and the geometric constraints of the target feature;
[0104] An image projection module 530 is configured to project the side image into a non-perspective image based on an inverse perspective transformation, and determine a lower edge straight line of the adjacent track train in the non-perspective image;
[0105] The switch determination module 540 is used to determine the depth value from the target position of the switch occupied by the adjacent track train to the vehicle based on the vertical points of different characteristic corner points on the lower edge straight line and the depth values from different characteristic corner points to the vehicle; wherein the target position is located on the said lower edge straight line.
[0106] In one embodiment, the feature recognition module 510 is specifically configured to:
[0107] Input the side image of the adjacent track train into the feature recognition model, and obtain the target features of the adjacent track train and its confidence level output by the feature recognition model;
[0108] The target features with confidence higher than the confidence threshold are regarded as valid target features.
[0109] In one embodiment, the depth determination module 520 is specifically configured to:
[0110] Based on the intrinsic parameter matrix of the on-board camera device, the coordinates of each feature corner point of the target feature in the pixel reference coordinate system of the adjacent track train image are transformed into a three-dimensional spatial coordinate expression in the reference coordinate system of the on-board camera device;
[0111] Construct the target equations based on the geometric constraints of the target features and the three-dimensional space coordinate expressions;
[0112] Solve the target equation group to obtain the depth value from each feature corner point to the vehicle.
[0113] In one embodiment, the turnout determination module 540 is specifically configured to:
[0114] Based on the pixel coordinates of the perpendicular points of different feature corner points on the lower edge straight line in the non-perspective image and the depth values of different feature corner points to the vehicle, the linear relationship between the pixel coordinates and the depth values is determined;
[0115] Based on the pixel coordinates of the target position and the linear relationship, the fixed-ratio point algorithm is used to determine the depth value from the target position to the vehicle.
[0116] In one embodiment, the feature recognition model is a YOLO network model or an ERFNet network model.
[0117] In one embodiment, the camera is a monocular camera.
[0118] In one embodiment, the target feature includes at least one of a train head, a train head front window, a train dual headlights, a train passenger compartment window, a train passenger compartment door, a train wheel, and a train track.
[0119] The distance measuring device based on the characteristics of adjacent track trains provided in the embodiment of the present application and the distance measuring method based on the characteristics of adjacent track trains described above can refer to each other and can achieve the same technical effects, which will not be repeated here.
[0120] The ranging device based on the characteristics of adjacent track trains provided in an embodiment of the present invention determines the depth value of the feature corner points through the internal parameter matrix of the on-board shooting device, the feature corner points of the target features and their pixel reference system coordinates and set constraints, and determines the depth value of the target position by projecting the side image into a non-perspective image. There is no need to change the existing active train collision avoidance system, and it can also serve as a heterogeneous supplement to the laser radar scanning ranging, providing a more accurate depth value for the train operation control system to control train collision avoidance.
[0121] Figure 6 FIG is a schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention, such as Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630, and a communication bus 640, wherein the processor 610, the communication interface 620, and the memory 630 communicate with each other via the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute a ranging method based on the characteristics of adjacent track trains, the method including:
[0122] Perform feature recognition on the side image of the adjacent track train acquired by the vehicle's camera device to obtain target features of the adjacent track train; the target features are features with known scales;
[0123] Determine the depth value from each feature corner point to the vehicle based on the intrinsic parameter matrix of the vehicle-mounted camera, the coordinates of each feature corner point of the target feature in the pixel reference coordinate system of the adjacent track train image, and the geometric constraints of the target feature;
[0124] The side image is projected into a non-perspective image based on inverse perspective transformation, and the lower edge straight line of the adjacent track train in the non-perspective image is determined;
[0125] Based on the vertical points of different characteristic corner points on the lower straight line and the depth values from different characteristic corner points to the vehicle, the depth value from the target position of the adjacent track train occupying the switch to the vehicle is determined; wherein, the target position is located on the lower straight line.
[0126] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0127] In another aspect, the present invention further provides a processor-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for measuring distance based on adjacent track train characteristics provided by the above methods is implemented. The method includes:
[0128] Perform feature recognition on the side image of the adjacent track train acquired by the vehicle's camera device to obtain target features of the adjacent track train; the target features are features with known scales;
[0129] Determine the depth value from each feature corner point to the vehicle based on the intrinsic parameter matrix of the vehicle-mounted camera, the coordinates of each feature corner point of the target feature in the pixel reference coordinate system of the adjacent track train image, and the geometric constraints of the target feature;
[0130] The side image is projected into a non-perspective image based on inverse perspective transformation, and the lower edge straight line of the adjacent track train in the non-perspective image is determined;
[0131] Based on the vertical points of different characteristic corner points on the lower straight line and the depth values from different characteristic corner points to the vehicle, the depth value from the target position of the adjacent track train occupying the switch to the vehicle is determined; wherein, the target position is located on the lower straight line.
[0132] On the other hand, the present application further provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can perform the ranging method based on adjacent track train characteristics provided in the above embodiments, for example, including:
[0133] Perform feature recognition on the side image of the adjacent track train acquired by the vehicle's camera device to obtain target features of the adjacent track train; the target features are features with known scales;
[0134] Determine the depth value from each feature corner point to the vehicle based on the intrinsic parameter matrix of the vehicle-mounted camera, the coordinates of each feature corner point of the target feature in the pixel reference coordinate system of the adjacent track train image, and the geometric constraints of the target feature;
[0135] The side image is projected into a non-perspective image based on inverse perspective transformation, and the lower edge straight line of the adjacent track train in the non-perspective image is determined;
[0136] Based on the vertical points of different characteristic corner points on the lower straight line and the depth values from different characteristic corner points to the vehicle, the depth value from the target position of the adjacent track train occupying the switch to the vehicle is determined; wherein, the target position is located on the lower straight line.
[0137] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0138] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.
[0139] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A distance measurement method based on the characteristics of adjacent track trains, characterized in that: include: Perform feature recognition on the side image of the adjacent track train obtained by the vehicle's camera device to obtain the target features of the adjacent track train; The target feature is a feature with a known scale; Determine the depth value from each feature corner point to the vehicle based on the intrinsic parameter matrix of the vehicle-mounted camera device, the coordinates of each feature corner point of the target feature in the pixel reference coordinate system of the adjacent track train image, and the geometric constraints of the target feature; Projecting the side image into a non-perspective image based on an inverse perspective transformation, and determining a lower edge straight line of the adjacent track train in the non-perspective image; Based on the vertical points of different characteristic corner points on the lower straight line and the depth values from the different characteristic corner points to the vehicle, the depth value from the target position of the adjacent track train occupying the switch to the vehicle is determined; wherein, the target position is located on the lower straight line.
2. The distance measurement method based on adjacent track train characteristics according to claim 1 is characterized in that: The determining of the depth value from each feature corner point to the vehicle based on the intrinsic parameter matrix of the vehicle-mounted camera device, the coordinates of each feature corner point of the target feature in the pixel reference coordinate system in the image of the adjacent track train, and the geometric constraint condition of the target feature includes: Based on the intrinsic parameter matrix of the on-board camera device, the coordinates of each feature corner point of the target feature in the pixel reference coordinate system of the adjacent track train image are transformed into a three-dimensional space coordinate expression in the reference coordinate system of the on-board camera device; Constructing a target equation group based on the geometric constraints of the target features and the three-dimensional space coordinate expressions; The target equation group is solved to obtain the depth value from each characteristic corner point to the vehicle.
3. The distance measurement method based on adjacent track train characteristics according to claim 1, characterized in that: Determining the depth value from the target position of the adjacent track train occupying the turnout to the vehicle includes: Determining a linear relationship between pixel coordinates and depth values based on pixel coordinates of perpendicular points of different feature corner points on the lower edge straight line in the non-perspective image and depth values from the different feature corner points to the vehicle; Based on the pixel coordinates of the target position and the linear relationship, a fixed-ratio point algorithm is used to determine the depth value from the target position to the vehicle.
4. The distance measurement method based on adjacent track train characteristics according to claim 1, characterized in that: The performing feature recognition on the side image of the adjacent track train acquired by the vehicle's camera device to obtain target features of the adjacent track train includes: Inputting the side image of the adjacent track train into a feature recognition model to obtain target features of the adjacent track train output by the feature recognition model and their confidence levels; The target feature whose confidence level is higher than the confidence threshold is regarded as a valid target feature.
5. The distance measurement method based on adjacent track train characteristics according to claim 4 is characterized in that: The feature recognition model is a YOLO network model or an ERFNet network model.
6. The distance measurement method based on adjacent track train characteristics according to claim 1, characterized in that: The shooting device is a monocular vision shooting device.
7. The distance measurement method based on adjacent track train characteristics according to any one of claims 1 to 6, characterized in that: The target features include at least one of a train head, a train head front window, a train dual headlights, a train passenger compartment window, a train passenger compartment door, a train wheel, and a train track.
8. A distance measuring device based on the characteristics of adjacent track trains, characterized in that: include: A feature recognition module is used to perform feature recognition on the side image of the adjacent track train obtained by the vehicle's camera device to obtain the target features of the adjacent track train; The target feature is a feature with a known scale; a depth determination module, configured to determine a depth value from each feature corner point to the vehicle based on an intrinsic parameter matrix of the vehicle-mounted camera device, coordinates of each feature corner point of the target feature in a pixel reference coordinate system in the image of the adjacent track train, and geometric constraints of the target feature; an image projection module, configured to project the side image into a non-perspective image based on an inverse perspective transformation, and determine a lower edge straight line of the adjacent track train in the non-perspective image; The turnout determination module is used to determine the depth value from the target position of the turnout occupied by the adjacent track train to the vehicle based on the vertical points of different characteristic corner points on the lower edge straight line and the depth values from the different characteristic corner points to the vehicle; wherein the target position is located on the lower edge straight line.
9. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, the steps of the ranging method based on adjacent track train characteristics as described in any one of claims 1 to 7 are implemented.
10. A processor-readable storage medium having a computer program stored thereon, characterized in that: The computer program is used to enable a processor to execute the steps of the ranging method based on adjacent track train characteristics as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Data enhancement method and device based on monocular 3D target detection
CN113947768A
Monocular target ranging method and device
CN114332187A