Rail vehicle limit detection method and system based on three-dimensional point cloud data, and electronic device
Through the detection method based on three-dimensional point cloud data, a laser camera module is used to generate a three-dimensional point cloud map of rail vehicles, which solves the problem that traditional detection methods are susceptible to human factors and cannot detect the boundaries of different models, and realizes automation, contactless and high Accurate rail vehicle limit detection.
Patent Information
- Application Number
- PCT/CN2024/106572
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-06
- Filing Date
- 2024-07-19
- Publication Date
- 2025-02-06
AI Technical Summary
The traditional rail vehicle limit detection method is susceptible to human factors and cannot effectively detect the limits of different models, resulting in low detection efficiency and low accuracy.
Using the detection method based on three-dimensional point cloud data, by building a boundary detection door and installing a contour collector, multiple laser camera modules are used to generate a three-dimensional point cloud map of rail vehicles, and compare it with built-in standard boundary data to detect vehicles in real time. Whether the limit is exceeded.
It realizes automated, contactless, and high-precision rail vehicle boundary detection, which can adapt to the detection of different models and improves detection efficiency and accuracy.
Smart Images

Figure CN2024106572_06022025_PF_FP_ABST
Abstract
Description
Rail vehicle clearance detection method, system and electronic equipment based on three-dimensional point cloud data Technical Field
[0001] The present invention relates to the field of image information processing, and in particular to a rail vehicle clearance detection method, system and electronic equipment based on three-dimensional point cloud data. Background Art
[0002] With global technological advancements and rapid economic development, urban rail transit, owing to its speed, safety, and environmental friendliness, is becoming increasingly important in the transportation systems of major cities around the world. my country's urban rail transit is also developing rapidly, with its overall technological level leading the world. The safe operation and maintenance of urban rail transit vehicles is a crucial component of the entire urban rail transit operation system.
[0003] Traditional train body spatial dimension inspection uses various inspection tools, inspection templates, tape measures, plug gauges and other tools. When a vehicle passes through a clearance gate, inspectors are required to manually observe the gap between the vehicle body surface and the clearance gauge at multiple locations simultaneously to judge the processing quality of the vehicle's appearance. When the vehicle collides with the clearance plate of the clearance gate, it indicates that the vehicle's external dimensions at the collision point are out of tolerance. This inspection device is easily affected by human factors.
[0004] In addition, traditional limit gauges can only measure a single fixed vehicle model. When new vehicle models are added, the original limit detection device cannot measure them. Adding traditional detection devices for the corresponding vehicle models can only solve temporary needs. Summary of the Invention
[0005] Purpose of the invention: To propose a rail vehicle clearance detection method, system and electronic equipment based on three-dimensional point cloud data to solve the above-mentioned problems existing in the prior art.
[0006] First, a rail vehicle clearance detection method based on three-dimensional point cloud data is proposed, with the following steps:
[0007] S1. Construction: A clearance detection gate is constructed at a predetermined position for a rail vehicle to leave the depot, and a profile collector is installed on the clearance detection gate; the profile collector includes multiple laser camera modules; a proximity switch and a speed measuring unit are also installed on the clearance detection gate or at a predetermined position for the rail vehicle to leave the depot.
[0008] S2. Calibration: Use the calibration structure to perform multi-module calibration on all the laser camera modules that have been assembled; record the current calibration parameters of all laser camera modules and use the current calibration parameters as the basis for subsequent point cloud stitching of real rail vehicle images; the purpose of multi-module calibration is to unify the coordinate systems of multiple laser camera modules, and one by one align the coordinate system of each laser camera module to the coordinate system of the calibration structure. In the same coordinate system, the point cloud data is stitched to obtain point cloud data of the complete contour.
[0009] S3. Detection: The rail vehicle to be inspected passes through the clearance inspection gate, and the speed measuring unit senses the current speed of the rail vehicle in real time and reports it to the processing unit; the processing unit adjusts the measurement frequency of the contour collector according to the current speed, and the contour collector performs a full-section scan of the external contour of the rail vehicle to generate a three-dimensional point cloud map of the current rail vehicle.
[0010] S4. Result comparison: Compare the three-dimensional point cloud image of the current rail vehicle generated in S3 with the built-in standard limit contour data to determine whether the current rail vehicle exceeds the limit.
[0011] S5. Output result: Based on the comparison result of S4, if the current rail vehicle is within the limit, a notification of not exceeding the limit is sent; if the current rail vehicle is exceeding the limit, an over-limit notification is sent and the over-limit parameters of the current rail vehicle (over-limit position, over-limit level, over-limit value) are provided.
[0012] In a further embodiment of the first aspect, before the calibration structure is used to perform multi-module calibration on all assembled laser camera modules, a verification is first performed to determine whether the factory calibration result of each laser camera module is within the expected calibration range. If the factory calibration result is within the expected calibration range, the multi-module calibration process is directly executed.
[0013] If the factory calibration results do not meet the expected calibration range, a single-module calibration is first performed on each laser camera module using a calibration reference. After all laser camera modules have completed single-module calibration, the multi-module calibration process is then performed. The purpose of single-module calibration is to determine the conversion relationship (internal and external parameters) between 3D spatial points and pixel plane points in the sawtooth calibration block coordinate system; it also determines the distortion factor during the camera imaging process for image correction.
[0014] In a further embodiment of the first aspect, the calibration reference object includes a sawtooth calibration block vertically erected on a horizontal plane or a reference object containing a predetermined calibration pattern (such as a checkerboard); the calibration structure is a frame constructed by multiple sawtooth calibration blocks, and the upper part and both sides of the calibration structure are sawtooth calibration blocks connected end to end.
[0015] In a further embodiment of the first aspect, the process of single module calibration includes:
[0016] Calibration correction: adjusting the position of the sawtooth calibration block so that the sawtooth calibration block and the line laser emitted by the laser camera module are located on the same vertical axis;
[0017] Capturing images: adjusting the distance between the laser camera module and the sawtooth calibration block, and capturing N images at positions at N different distances, where N is greater than or equal to 1;
[0018] Start calibration: Calculate the positions of the tooth peak and valley feature points of N images in the image coordinate system based on the straight line fitting and line intersection calculation formulas. Then, based on the known actual dimensions between the tooth peaks and valleys, calculate the transformation relationship from the laser camera module's pixel coordinate system to the sawtooth calibration block coordinate system. Save the transformation relationship data as a single-module calibration file.
[0019] In a further embodiment of the first aspect, multi-module calibration is performed on all the laser camera modules that have been assembled, and the laser camera module coordinate system is converted to the calibration structure coordinate system:
[0020] S2-1, load all 3D cross-sectional images collected by the laser camera module;
[0021] S2-2. Extract the sawtooth's oblique edge data, fit the extracted oblique edge data into a straight line, and then calculate the intersection of the two oblique lines to obtain the 3D coordinates of the sawtooth's vertex in the laser camera module's coordinate system.
[0022] S2-3, obtaining the 3D coordinates of the sawtooth points in the calibration structure coordinate system according to the physical dimensions of the calibration structure;
[0023] S2-4. Calculate the rotation and translation transformation matrix to obtain the transformation relationship from the laser camera module coordinate system to the calibration structure coordinate system, and transform the sawtooth line from the laser camera module coordinate system to the calibration structure coordinate system so that the sawtooth line and the sawtooth point coincide within a predetermined range;
[0024] S2-5. Save the current calibration parameters as a multi-module calibration file for subsequent multi-camera point cloud stitching.
[0025] In a further embodiment of the first aspect, step S3 further comprises:
[0026] S3-1. Load the 3D model of the predetermined image and the multi-module calibration file saved in step S2-5 from the local computer, process the actually collected point cloud data, make the cross section at the fixed position exceed the limit, simulate the over-limit state, and verify whether the limit detection model can detect the over-limit position:
[0027] If the currently constructed limit detection model successfully detects the over-limit position and over-limit amount, the current limit detection model is saved as a basis for subsequent over-limit detection;
[0028] If the currently constructed limit detection model cannot detect the over-limit position or the detected over-limit deviation value is greater than the expected value, return to step S3 to re-calibrate the laser camera module;
[0029] S3-2. The rail vehicle to be subjected to limit detection passes through the limit detection gate, and the speed measuring unit senses the speed of the current rail vehicle in real time and reports it to the processing unit; S3-3. The limit detection model saved in S3-1 is used to generate a three-dimensional point cloud map of the current rail vehicle, displaying the body contour data of the current rail vehicle.
[0030] In a further embodiment of the first aspect, step S4 further comprises:
[0031] S4-1. Based on the three-dimensional point cloud image obtained in step S3-3, calculate the coordinates of the maximum Z value corresponding to each X position to obtain the maximum contour point;
[0032] S4-2, determine whether all maximum contour points exceed the limit:
[0033] If all the maximum contour points are within the limit, then all contours are within the limit;
[0034] If at least one of the maximum contour points exceeds the limit, all sections are checked to see if they exceed the limit through the X range of the current maximum contour point.
[0035] In a further embodiment of the first aspect, the number of intersections between the horizontal ray of the point and the area is odd to determine whether the point is within the closed area; if a horizontal line drawn to the right has an even number of intersections with the edge of the closed area, the current point is outside the closed area; if a horizontal line drawn to the right has an odd number of intersections with the edge of the closed area, the current point is within the closed area.
[0036] In the second aspect, a rail vehicle clearance detection system is proposed, which can be used to drive the rail vehicle clearance detection method proposed in the first aspect. The rail vehicle clearance detection system includes two major parts: trackside detection equipment and trackside machine room equipment.
[0037] The trackside detection equipment includes a clearance detection gate, and a profile collector, a proximity switch, and a speed measuring radar installed on the clearance detection gate; the profile collector includes multiple laser camera modules.
[0038] The trackside machine room equipment is used for real-time communication with the trackside detection equipment. The trackside machine room equipment includes a vehicle clearance image acquisition system communicatively connected to the contour acquisition instrument, and a processing unit communicatively connected to the vehicle clearance image acquisition system.
[0039] The processing unit adjusts the measurement frequency of the profile collector according to the current vehicle speed, and the profile collector performs a full-section scan of the external contour of the rail vehicle to generate a three-dimensional point cloud image of the current rail vehicle. The generated three-dimensional point cloud image of the current rail vehicle is compared with the built-in standard limit contour data to determine whether the current rail vehicle exceeds the limit;
[0040] The processing unit sends a notification of not exceeding the limit if the current rail vehicle is within the limit according to the comparison result;
[0041] If the current rail vehicle exceeds the limit, an over-limit notification will be sent to the staff, and the over-limit parameters of the current rail vehicle (over-limit position, over-limit level, over-limit value) will be provided.
[0042] In a third aspect, an electronic device is proposed, which includes a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the rail vehicle clearance detection method disclosed in the first aspect above.
[0043] The present invention has the following beneficial effects:
[0044] (1) Compared with the traditional rail vehicle inspection tooling, the rail vehicle clearance inspection method and system based on three-dimensional point cloud data proposed in the present invention realizes the measurement requirements of automation, non-contact, high precision and non-destructiveness.
[0045] (2) The rail vehicle clearance detection method and system based on three-dimensional point cloud data proposed in the present invention can realize the detection of different vehicle models. For different vehicle models, it is only necessary to enter the relevant data of the current vehicle model into the background database, which solves the limitations of traditional detection.
[0046] (3) The automatic detection technology of spatial dimensions has the advantages of simultaneous multi-point measurement and real-time display of spatial geometric dimensions. The welding structure of the rail vehicle system can more intuitively reflect the changes in the body size during the welding process by using the automatic detection technology of spatial dimensions, which is of great help in detecting the body and improving the process.
[0047] (4) The maximum profile of a large amount of carriage data is calculated and checked for over-limit. All over-limit sections are retrieved based on the over-limit detection of the maximum profile, which greatly improves the detection efficiency. The use of this targeted algorithm greatly shortens the time of the over-limit detection algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] FIG1 is a schematic diagram of the composition of a rail vehicle clearance detection system based on three-dimensional point cloud data.
[0049] FIG2 is a flow chart of a method for detecting rail vehicle clearance according to the present invention.
[0050] FIG3 is a clearance diagram drawn according to the standard clearance of A1 type vehicles in an embodiment of the present invention.
[0051] FIG4 is a schematic diagram of determining whether the maximum contour exceeds the limit.
[0052] FIG5 is a schematic diagram of a preferred processing method for determining whether the maximum contour exceeds the limit.
[0053] Figure 6 is a diagram of the multi-laser camera module calibration interface.
[0054] FIG. 7 is a front view of the clearance detection door.
[0055] FIG8 is a top view of the clearance detection door.
[0056] The reference numerals in the figure are: foundation pit 1, track 2, rail vehicle 3, first stand 4, second stand 5, laser camera module No. 1 601, laser camera module No. 2 602, laser camera module No. 3 603, laser camera module No. 4 604, laser camera module No. 5 605, laser camera module No. 6 606, proximity switch 7. DETAILED DESCRIPTION
[0057] In the following description, numerous specific details are provided to provide a more thorough understanding of the present invention. However, it will be apparent to those skilled in the art that the present invention may be practiced without one or more of these details. In other instances, certain technical features well known in the art have not been described to avoid confusion with the present invention.
[0058] This embodiment proposes a rail vehicle clearance detection system based on three-dimensional point cloud data, as shown in FIG1 . The rail vehicle clearance detection system consists of two major parts: trackside detection equipment and trackside machine room equipment.
[0059] The trackside detection equipment includes a clearance detection gate, a profile collector, a proximity switch 7, and a speed measuring unit. The profile collector, the proximity switch 7, and the speed measuring unit are installed on the clearance detection gate respectively.
[0060] In this embodiment, the profile collector consists of multiple laser camera modules. The proximity switch 7 can be a photoelectric switch, which detects the proximity of an object. In this case, it is used to detect the proximity of the rail vehicle 3 to the clearance detection gate. When a train triggers the photoelectric switch, the system controller receives the incoming train signal and activates the laser camera, collecting laser profile data as the train passes.
[0061] The trackside machine room equipment is used for real-time communication with the trackside detection equipment. The trackside machine room equipment includes a vehicle clearance image acquisition system connected to multiple laser camera modules, and a processing unit connected to the vehicle clearance image acquisition system.
[0062] The laser camera's role here is to project structured light onto the surface of the object being measured, forming a light streak. This streak is then captured by a camera on the other side. Camera calibration and reconstruction techniques then convert the two-dimensional information from the streak image into three-dimensional spatial information, enabling surface measurement. The laser camera module can generate 3D point cloud data of the outer contour of a train section in a wide field of view (2m) and at varying depths of field.
[0063] In this embodiment, the entire measurement system requires at least six measurement modules. Therefore, the three-dimensional dimensions of the entire cross-section require unifying the data from the six laser camera modules into a single world coordinate system (the calibration structure coordinate system). Once the entire system is calibrated, the spatial dimensions of corresponding points on the vehicle interface can be measured. The measurement results are then compared with the standard vehicle dimensions entered into the measurement system to obtain vehicle clearance information.
[0064] In this embodiment, the calibration structure is a frame constructed by a plurality of sawtooth calibration blocks, and the upper portion and both sides of the calibration structure are sawtooth calibration blocks connected end to end.
[0065] It should be noted that the laser camera module may be calibrated before leaving the factory. If the calibration results are as expected, there is no need to perform individual calibration on each camera module. The multi-module calibration process can be directly executed to convert the laser camera module coordinate system to the calibration structure coordinate system. Here is a feasible process for multi-module calibration:
[0066] First, load the 3D cross-sectional images collected by all laser camera modules. Next, extract the hypotenuse data of the sawtooth, fit a straight line by the least squares method, and then calculate the intersection of the two oblique lines to obtain the 3D coordinates of the sawtooth vertex in the laser camera module coordinate system. According to the physical size of the calibration structure, the 3D coordinates of the sawtooth point in the calibration structure coordinate system are obtained. Then calculate the rotation and translation transformation matrix, and calculate the conversion relationship from the laser camera module coordinate system to the calibration structure coordinate system by the least squares method. Convert the sawtooth line from the laser camera module coordinate system to the calibration structure coordinate system so that the sawtooth line and the sawtooth point coincide within a predetermined range. Save the current calibration parameters as a multi-module calibration file for subsequent multi-camera point cloud stitching.
[0067] If the factory calibration result does not meet the expected calibration range, first use the calibration reference to perform single module calibration on each laser camera module in turn. After all the laser camera modules have completed single module calibration, the multi-module calibration process will be performed. Here is another feasible process for single laser camera module calibration:
[0068] First, build a mobile bracket. The camera module is mounted on the mobile bracket of the single module calibration. The mobile bracket can slide on the guide rail to adjust the distance relative to the calibration block. Adjust the position of the sawtooth calibration block so that the sawtooth calibration block and the line laser emitted by the laser camera module are located on the same vertical axis. Collect pictures at 1800mm, 2000mm, and 2300mm away from the sawtooth calibration block, and obtain at least three sawtooth images in total. According to the straight line fitting and straight line intersection calculation formulas, calculate the positions of the tooth peak and tooth valley feature points of the above at least three sawtooth images in the image coordinate system respectively, and then calculate the transformation relationship from the camera's pixel coordinate system to the sawtooth calibration block coordinate system based on the known actual size between the tooth peaks and tooth valleys, and save the transformation relationship data as a single module calibration file.
[0069] In this embodiment, the structure of the clearance detection door is shown in Figure 7 (front view) and Figure 8 (top view). The clearance detection door includes a foundation pit 1, on which a track 2 is laid. A first stand 4 and a second stand 5 are also fixed to the foundation pit 1. The first stand 4 and the second stand 5 are symmetrically arranged along the centerline of the track 2.
[0070] The first stand 4 and the second stand 5 have the same structure, including a vertical portion fixed to the foundation pit 1, and an arc-shaped portion welded to the upper portion of the vertical portion and bent at a predetermined arc toward the rail vehicle 3. The vertical portion of the first stand 4 is respectively mounted with a number one laser camera module 601 and a number two laser camera module 602 from bottom to top; the end of the arc-shaped portion of the first stand 4 is mounted with a number three laser camera module 603; a speed measuring unit is also mounted between the number one laser camera module 601 and the number two laser camera module 602; the vertical portion of the second stand 5 is respectively mounted with a number six laser camera module 606 and a number five laser camera module 605 from bottom to top; the end of the arc-shaped portion of the second stand 5 is mounted with a number four laser camera module 604; and a proximity switch 7 is also mounted between the number six laser camera module 606 and the number five laser camera module 605.
[0071] Among them, laser camera module No. 1 601, laser camera module No. 2 602, laser camera module No. 5 605, and laser camera module No. 6 606 project line lasers along their respective horizontal directions; laser camera module No. 3 603 and laser camera module No. 4 604 project line lasers obliquely downward along a predetermined angle.
[0072] Based on the rail vehicle clearance detection system proposed in the above embodiment, a process of a rail vehicle clearance detection method based on three-dimensional point cloud data is further proposed below, as shown in Figure 2. The steps of the rail vehicle clearance detection method are as follows:
[0073] S1. Construction: A clearance detection gate is constructed at a predetermined position for the rail vehicle 3 to leave the depot, and a profile collector is installed on the clearance detection gate; the profile collector includes multiple laser camera modules; a proximity switch 7 and a speed measuring unit are also installed on the clearance detection gate or at a predetermined position for the rail vehicle 3 to leave the depot.
[0074] S2. Calibration: Perform multi-module calibration on all the laser camera modules that have been built using the calibration structure; record the current calibration parameters of all laser camera modules, and use the current calibration parameters as a basis for subsequent point cloud stitching of the real rail vehicle 3 image.
[0075] The following is a specific process for multi-module calibration:
[0076] As long as the transformation matrix is calculated, the corresponding coordinates of point P in coordinate system A in coordinate system B can be calculated, that is:
[0077]
[0078] Where T is a 3x3 transformation matrix and t is a 3x1 displacement transformation vector. Theoretically, with only three pairs of points, T and t can be calculated. The more pairs of points there are, the more accurate the calculated transformation will be. represents point P in the B coordinate system, Represents point P in the A coordinate system.
[0079] The coordinate system of each laser camera module is aligned with the coordinate system of the calibration structure one by one. In the same coordinate system, the point cloud data can be simply accumulated to obtain the point cloud data of the completed contour.
[0080] A custom calibration structure was used to unify the coordinate systems of the multiple laser camera modules. The calibration structure consists of a frame constructed from multiple sawtooth calibration blocks, with the blocks connected end to end on the top and sides. The calibration structure was placed in the center of Track 2 and within the camera's field of view. The six laser camera modules and the calibration structure were leveled. Each camera then independently captured and saved a 3D image. After the acquisition was complete, the calibration process began. The calibration interface is shown in Figure 6.
[0081] Load camera profile: Load the 3D profile captured by the camera.
[0082] Extract sawtooth points: Extract the sawtooth hypotenuse data, fit a straight line using the least squares method, and then calculate the intersection of the two oblique lines to obtain the 3D coordinates of the sawtooth vertex in the laser camera module coordinate system.
[0083] Import target point file: Get the 3D coordinates of the sawtooth points in the calibration structure coordinate system (envelope coordinate system) based on the physical dimensions of the calibration structure.
[0084] Calculate the rotation and translation transformation matrix: The conversion relationship from the laser camera module coordinate system to the calibration structure coordinate system is obtained by the least squares method.
[0085] Rotation and translation transformation: Convert the sawtooth line from the laser camera module coordinate system to the calibration structure coordinate system, which basically matches the sawtooth point.
[0086] Save calibration file: Save the calibration file for subsequent multi-camera point cloud stitching.
[0087] Repeat for each camera: Since each camera is calibrated individually, this method reduces the cumulative error of pairwise calibration.
[0088] Figure 7 shows the numbering of the smart 3D cameras. They are numbered from bottom left to top left, then top right to bottom right. They are "Camera 1," "Camera 2," "Camera 3," "Camera 4," "Camera 5," and "Camera 6," respectively.
[0089] The device's IP address is fixed and will not change. The host IP address for each camera has been configured according to the table below. If you need to unplug the network cable, be sure to plug it back into the original network port when plugging it in, otherwise the camera will not be able to connect.
[0090] Table 1: Communication address table of each laser camera module
[0091] Device number or name Host network port IP address Device IP address Camera 1 192.168.1.100 192.168.1.10 1 Camera 2 192.168.2.100 192.168.2.10 1 Camera 3 192.168.3.100 192.168.3.10 1 Camera 4 192.168.4.100 192.168.4.10 1 Camera 5 192.168.5.100 192.168.5.10 1 Camera 6 192.168.6.100 192.168.6.101
[0092] In addition to the above calibration precautions, there are many other things to note during the entire calibration process:
[0093] (1) The sawtooth block of the calibration structure must be clean and level, otherwise it will affect the calibration accuracy. Pay attention to moisture and waterproof.
[0094] (2) The calibration structure needs to be statically mapped to avoid calibration errors.
[0095] (3) During the calibration process, the IP number and module number must correspond one to one. Refer to the table above and do not make mistakes in the numbers or the data will correspond incorrectly.
[0096] Here is a feasible solution for the rotation and translation transformation matrix:
[0097] According to the coordinate values of the tooth peak and tooth valley feature points in the laser camera module coordinate system :
[0098] (-1116.4,0,-1291.93);
[0099] (-968.098,0,-1357.08);
[0100] (-733.922,0,1668.96);
[0101] (-668.07,0,-1364.39);
[0102] (-516.348,0,-1306.55);
[0103] (-368.043,0,-1371.7);
[0104] (-216.32,0,-1313.86);
[0105] (-68.0148,0,-1379.01);
[0106] (83.7075,0,-1321.17);
[0107] (232.013,0,-1386.32);
[0108] (383.735,0,-1328.48);
[0109] (532.041,0,-1393.63);
[0110] Coordinates of tooth peaks and valleys in the calibration structure coordinate system (calibration structure coordinate system) :
[0111] (-1485.1,0,375);
[0112] (-1546.1,0,525);
[0113] (-1484.1,0,675);
[0114] (-1545.1,0,825);
[0115] (-1483.1,0,975);
[0116] (-1544.1,0,1125);
[0117] (-1482.1,0,1275);
[0118] (-1543.1,0,1425);
[0119] (-1481.1,0,1575);
[0120] (-1542.1,0,1725);
[0121] (-1480.1,0,1875);
[0122] (-1541.1,0,2025);
[0123] The R and t matrices are calculated according to the following formula:
[0124]
[0125] in, ; ;
[0126] During detection, the object contour point cloud collected by each camera will be converted from the laser camera module coordinate system to the coordinate system of the calibration structure through the R and t conversion matrices. In the same coordinate system, the point cloud data will be spliced to complete the contour point cloud data.
[0127] As a preferred solution, before using the calibration structure to perform multi-module calibration on all completed laser camera modules, the factory calibration results of each laser camera module are verified to be within the expected calibration range. If the factory calibration results are within the expected calibration range, the multi-module calibration process is directly executed. If the factory calibration results are not within the expected calibration range, a single-module calibration is first performed on each laser camera module in sequence using a calibration reference object. After all laser camera modules have completed single-module calibration, the multi-module calibration process is executed. The purpose of single-module calibration is to determine the conversion relationship (internal and external parameters) between three-dimensional spatial points and pixel plane pixels in the sawtooth calibration block coordinate system; and to determine the distortion coefficient during the camera imaging process for image correction.
[0128] The following is a single module calibration process:
[0129] Adjust the position of the sawtooth calibration block so that it and the line laser emitted by the laser camera module are on the same vertical axis. Adjust the distance between the laser camera module and the sawtooth calibration block, and capture a sawtooth image at distances of 1800 mm, 2000 mm, and 2300 mm from the laser camera module to the sawtooth calibration block.
[0130] A laser light source is projected onto the surface of an object. The camera lens and the laser are angled to generate the contours of the object's surface. The laser is projected onto a sawtooth calibration block, and the camera captures the sawtooth image. Linear fitting (Ransac algorithm and least squares method) and line intersection calculation formulas are used to calculate the positions of the tooth peak and valley feature points in the image coordinate system. Based on the known actual dimensions between the tooth peaks and valleys, the rotational and translational transformation matrix—the conversion matrix between the laser camera module coordinate system and the calibration structure coordinate system—is calculated.
[0131] S3. Detection: A rail vehicle 3 undergoing clearance inspection passes through the clearance inspection gate. The speed measurement unit senses the current speed of the rail vehicle 3 in real time and reports it to the processing unit. The processing unit adjusts the measurement frequency of the profile collector based on the current speed. If the profile collector's measurement frequency is constant, the acquisition interval will change accordingly with changes in vehicle speed. Therefore, the profile collector's measurement frequency can be adjusted in real time to adapt to changes in vehicle speed and ensure consistent sampling resolution and sampling interval. The profile collector performs a full-section scan of the external contour of the rail vehicle 3, generating a three-dimensional point cloud map of the current rail vehicle 3. Based on this three-dimensional point cloud data, the body contour data of the current rail vehicle 3 is drawn.
[0132] S3-1. Draw the standard straight line limit according to the limit standard of the current model of rail vehicle 3, construct a coordinate system, and mark the coordinates of each key control point;
[0133] S3-2. Load the 3D model of the predetermined image and the multi-module calibration file saved in step S2-5 from the local computer, process the actually collected point cloud data, make the cross section at the fixed position exceed the limit, simulate the over-limit state, and verify whether the limit detection model can successfully detect the over-limit position:
[0134] If the currently constructed limit detection model successfully detects the over-limit position and over-limit amount, the current limit detection model is saved as a basis for subsequent over-limit detection;
[0135] If the currently constructed limit detection model cannot detect the over-limit position or the detected over-limit deviation value is greater than the expected value, return to step S3 to re-calibrate the laser camera module;
[0136] S3-3. The rail vehicle 3 to be subjected to clearance detection passes through the clearance detection gate, and the speed measuring unit senses the current speed of the rail vehicle 3 in real time and reports it to the processing unit;
[0137] S3-4, the processing unit adjusts the measurement frequency of the profile collector according to the current vehicle speed, and the profile collector performs a full-section scan of the external contour of the rail vehicle 3;
[0138] S3-5. Generate a three-dimensional point cloud image of the current rail vehicle 3 using the clearance detection model saved in S3-2. The three-dimensional point cloud image is displayed on the coordinate system constructed in step S3-1, showing the body contour data of the current rail vehicle 3.
[0139] The following is a feasible solution for over-limit detection based on actual cases:
[0140] First, draw the straight line limits according to the subway limit standards. Taking the A1 type vehicle as an example, the vehicle limits and equipment limits of the A1 type vehicle are shown in Figure 3:
[0141] Take the side limits and complete the coordinates.
[0142] The vehicle clearance coordinate values of A1 vehicles are shown in Table 2:
[0143] Table 2: Vehicle clearance coordinate values for A1 vehicles (mm)
[0144]
[0145] After drawing the standard straight line limits, the 3D model and calibration file are loaded locally, and the original points are processed to make the cross-section at the fixed position exceed the limit for subsequent inspection.
[0146] The detection principle is as follows: obtain the largest contour, see Figure 4, and determine whether the largest contour exceeds the limit: if the largest contour does not exceed the limit, then all contours do not exceed the limit; if the largest contour exceeds the limit, then all sections are checked to see whether they exceed the limit through the x range of the largest contour exceeding the limit.
[0147] As shown in Figure 4, the outer frame lines represent the limits. The inner frame lines represent the maximum outline of the train currently being checked for overrun. This maximum outline is composed of several point sets. Overrun is determined by comparing the x-value of each point in this point set with the closed region boundary. If fewer than n points are outside the closed region, the train is considered to be within the limit. If at least n points are outside the closed region, the train is considered to be within the limit.
[0148] Since the upper half of the limit range is larger than the lower half, if a rasterized x value corresponds to multiple Y values, it will be inconvenient for subsequent processing. Currently, the number of intersections between the horizontal ray of the point and the area is an odd number to determine whether it is within the closed area, see Figure 5.
[0149] The closed area is the gray shaded area in Figure 5, and the point is any point in Figure 5 (0, 1, 2, 3, 4, 5). The closed area in the algorithm refers to the train limit range, which is the outer frame area in Figure 4. The point is a point in the point set in Figure 4 (the scanned contour line).
[0150] As shown in the figure, point 0, a horizontal line drawn to the right intersects the edge of the gray closed area at 0 points (an even number), indicating that it is outside the closed area;
[0151] As shown in the figure, point 1, if a horizontal line is drawn to the right and there is an intersection (odd number) with the edge of the gray closed area, then point 1 is within the closed area.
[0152] S4. Result comparison: Compare the body contour data of the current rail vehicle 3 generated in S3 with the built-in standard limit contour data to determine whether the current rail vehicle 3 exceeds the limit.
[0153] S5. Output result: Based on the comparison result of S4, if the current rail vehicle 3 is within the limit, the current detection result is saved and a release result is issued; if the current rail vehicle 3 is over the limit, the current detection result is saved and the over-limit position, over-limit level, and over-limit value of the current rail vehicle 3 are provided.
[0154] In summary, the present invention proposes a technical solution for rail vehicle clearance detection, employing laser sensors, proximity switches, and visual sensor technology to quickly and accurately detect vehicle cross-sections / contours. The scanning results are automatically compared with standard clearance data pre-stored in a database. If an object intrudes, the system issues an alarm and saves the detection results. This system collects (optionally includes image acquisition), analyzes, processes, transmits, and prints clearance detection data for various types of subway vehicles, and rapidly presents the corresponding detection results. When a train passes, the system automatically scans the entire exterior contour of the vehicle being tested, generating a three-dimensional point cloud image (vehicle outline). The vehicle model is automatically identified through a vehicle number recognition system, and the system retrieves the pre-stored standard clearance data for the vehicle being tested for comparison. This system automatically detects vehicle overruns in real time and provides information on the location, level, and value of the overrun for any overrun vehicle.
[0155] As described above, although the present invention has been shown and described with reference to specific preferred embodiments, it should not be construed as limiting the present invention itself. Various changes may be made to it in form and detail without departing from the spirit and scope of the present invention as defined in the appended claims.
Claims
1. A rail vehicle clearance detection method based on three-dimensional point cloud data, characterized in that: The steps include: S1. Construction: A clearance detection door is constructed at a predetermined position for a rail vehicle to leave the depot, and a profile collector is installed on the clearance detection door; the profile collector includes a plurality of laser camera modules; a proximity switch and a speed measuring unit are also installed on the clearance detection door or at a predetermined position for the rail vehicle to leave the depot; Verify whether the factory calibration result of each laser camera module is within the expected calibration range. If the factory calibration result is within the expected calibration range, directly execute the multi-module calibration process; If the factory calibration result does not meet the expected calibration range, firstly use the calibration reference to perform single-module calibration on each laser camera module in turn, and after all the laser camera modules complete the single-module calibration, then perform the multi-module calibration process; the calibration reference includes a sawtooth calibration block vertically set up on a horizontal plane; The single module calibration process includes: Calibration correction: adjusting the position of the sawtooth calibration block so that the sawtooth calibration block and the line laser emitted by the laser camera module are located on the same vertical axis; Capturing images: adjusting the distance between the laser camera module and the sawtooth calibration block, and capturing N images at positions of N different distances, where N≥1; Start calibration: Calculate the positions of the tooth peak and tooth valley feature points of N images in the image coordinate system according to the straight line fitting and straight line intersection calculation formulas, and then calculate the transformation relationship from the pixel coordinate system of the laser camera module to the sawtooth calibration block coordinate system according to the known actual size between the tooth peaks and tooth valleys, and save the transformation relationship data as a single module calibration file; S2, calibration: using the calibration structure to perform multi-module calibration on all the laser camera modules that have been built; the calibration structure is a frame constructed by a plurality of sawtooth calibration blocks, and the upper part and both sides of the calibration structure are sawtooth calibration blocks connected end to end; Record the current calibration parameters of all laser camera modules, and use the current calibration parameters as a basis for subsequent point cloud stitching of real rail vehicle images; By performing multi-module calibration on all the laser camera modules that have been built, the laser camera module coordinate system is converted to the calibration structure coordinate system: S2-1, load all 3D cross-sectional images collected by the laser camera module; S2-2, extracting the hypotenuse data of the sawtooth, fitting the extracted hypotenuse data into a straight line, and then calculating the intersection of the two oblique lines, thereby obtaining the 3D coordinates of the sawtooth vertex in the laser camera module coordinate system; S2-3, obtaining the 3D coordinates of the sawtooth point in the calibration structure coordinate system according to the physical dimensions of the calibration structure; S2-4, calculating the rotation and translation transformation matrix, calculating the transformation relationship from the laser camera module coordinate system to the calibration structure coordinate system, and transforming the sawtooth line from the laser camera module coordinate system to the calibration structure coordinate system so that the sawtooth line and the sawtooth point coincide within a predetermined range; S2-5, saving the current calibration parameters as a multi-module calibration file for subsequent multi-camera point cloud stitching; S3, detection: the rail vehicle to be subjected to clearance detection passes through the clearance detection gate, and the speed measuring unit senses the current speed of the rail vehicle in real time and reports it to the processing unit; The contour collector performs a full-section scan of the external contour of the rail vehicle to generate a three-dimensional point cloud map of the current rail vehicle; S4, result comparison: compare the three-dimensional point cloud image of the current rail vehicle generated in S3 with the built-in standard limit contour data to determine whether the current rail vehicle exceeds the limit; S5. Output result: According to the comparison result of S4, if the current rail vehicle is within the limit, a notification of not exceeding the limit is sent; if the current rail vehicle is over the limit, an over limit notification is sent and over limit parameters of the current rail vehicle are provided.
2. The rail vehicle clearance detection method according to claim 1, characterized in that: Step S3 further comprises: S3-1, loading the 3D model of the predetermined image and the multi-module calibration file saved in step S2-5 from the local, processing the actually collected point cloud data, making the section at the fixed position exceed the limit, simulating the over-limit state, and verifying whether the limit detection model can detect the over-limit position: If the currently constructed limit detection model successfully detects the over-limit position and over-limit amount, the current limit detection model is saved as a basis for subsequent over-limit detection; If the limit detection model currently constructed cannot detect the over-limit position or the detected over-limit deviation value is greater than the expected value, return to step S2 to re-perform the calibration procedure on the laser camera module; S3-2, the rail vehicle to be subjected to clearance detection passes through the clearance detection gate, and the speed measuring unit senses the current speed of the rail vehicle in real time and reports it to the processing unit; S3-3. Generate a three-dimensional point cloud image of the current rail vehicle using the clearance detection model saved in S3-1, and display the body contour data of the current rail vehicle.
3. The rail vehicle clearance detection method according to claim 2, characterized in that: Step S4 further comprises: S4-1, based on the three-dimensional point cloud image obtained by step S3-3, calculating the coordinates of the maximum Z value corresponding to each contour point on the X-axis, and obtaining the maximum contour point; S4-2, determine whether all maximum contour points are out of limit: If all the maximum contour points are within the limit, then all contours are within the limit; If at least one of the maximum contour points exceeds the limit, all sections are checked to see whether they exceed the limit through the range of the current maximum contour point exceeding the limit on the X-axis.
4. The rail vehicle clearance detection method according to claim 3, characterized in that: The point is judged to be within the closed area if the number of intersections between the horizontal ray of the point and the area is an odd number; If a horizontal line drawn to the right intersects the edge of the closed region at an even number of points, then the current point is outside the closed region; If a horizontal line drawn to the right intersects the edge of the closed region at an odd number of points, then the current point is within the closed region.
Citation Information
Patent Citations
Wagon limit automatic-measuring method
CN107421502A
Three-dimensional panorama measurement method for precision parts based on linear laser
CN108981604A
Vehicle form and position detection system and method based on contour scanning
CN110095061A
Train clearance detection device and method
CN112432610A
Limit detection system and limit detection method
CN113776454A