A precise positioning method based on port container edge feature recognition and extraction
By using lidar to identify and calculate the edge features of containers, the problem of inaccurate container positioning in traditional ports has been solved, enabling precise parking and efficient loading and unloading of unmanned trucks.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-18
- Publication Date
- 2026-04-03
AI Technical Summary
Traditional port container positioning methods cannot achieve precise positioning, resulting in low loading and unloading efficiency and the presence of human error.
The system uses LiDAR to identify the edge features of containers, separates corner points and planar points using curvature calculation formulas, extracts the vertical edge features of containers, selects the optimal edge line through confidence scoring, and calculates precise parking by combining the relative pose of unmanned trucks.
It achieves precise container positioning, improves system stability and output accuracy, avoids incorrect edge line extraction, and enhances the loading and unloading efficiency of unmanned container trucks at ports.
Smart Images

Figure CN115909102B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of navigation and positioning technology, specifically relating to a precise positioning method based on the identification and extraction of port container edge features. Background Technology
[0002] As the container throughput of domestic ports increases year by year, operational efficiency has become an important indicator for measuring port loading and unloading efficiency. Traditional manned truck guidance uses an LED screen to display the error distance, and then the truck driver moves forward or backward to achieve the alignment process. This method cannot achieve precise positioning at a precise distance, and human error can lead to large deviations in the movement distance, resulting in very low loading and unloading efficiency.
[0003] When unmanned container trucks in ports are performing automated container loading and unloading operations, the deviation between the center of the container on the truck and the destination must be within 10cm for the crane to successfully grab the container and accurately place it in the target position. Therefore, it is necessary to find a more accurate positioning method to meet the automated container loading and unloading tasks of unmanned container trucks in ports. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention provides a precise positioning method based on the feature recognition and extraction of port container edges, aiming to accurately extract the two vertical edges of the target container, thereby improving the stability and output accuracy of the system.
[0005] To achieve the aforementioned objectives, a precise positioning method based on port container edge feature recognition and extraction is provided, comprising the following steps:
[0006] Step 1: Obtain the platform task and the current global location of the unmanned truck, and allow the unmanned truck to automatically drive to the vicinity of the destination container;
[0007] Step 2: Based on the container target yard information in the platform task, select to use the left or right lidar to scan the container and obtain the lidar point cloud of the container, which includes the destination container and containers near the destination container.
[0008] Step 3: Calculate the curvature based on the laser point cloud using the curvature calculation formula. Divide the laser point cloud into corner points and planar points according to the magnitude of the curvature. The curvature calculation formula is as follows:
[0009]
[0010] Where S is the point cloud dataset, ri is the current point depth, and rj is the depth of a point in S that is not equal to i;
[0011] Step 4: Extract the vertical edge features of the container;
[0012] Step 5: Select the two vertical lines of the target container from the vertical line features extracted in Step 4.
[0013] Step 6: Calculate the distance from the unmanned truck to the target container;
[0014] Step 7: Send the distance to the control module, and the control module controls the unmanned truck to stop precisely.
[0015] Specifically, step 4 involves extracting the vertical edge features of the container, including:
[0016] Traverse the horizontal 0° laser line, determine whether the point on it is a corner point. If it is a corner point, traverse the laser lines at other angles and add all corner points within the preset range to the left and right of the current corner point to the current vertical line point set.
[0017] Returning to the horizontal 0° laser line, the system traverses other corner points, continuously building a set of vertical line points until all vertical edge features within the laser radar scanning range are extracted.
[0018] Specifically, before step 5, the confidence level of the container's vertical edges is calculated, including:
[0019] The vertical edge is a vertical edge. The comparison value between the Z-axis feature value in the Z-axis direction and the preset vector length is taken as the initial confidence level, set as conf.
[0020] If the length of the perpendicular line is less than or equal to 1, then the confidence level of the vertical line is the length of the perpendicular line * conf;
[0021] If the length of the vertical line is greater than 1, then the confidence level of the vertical line is 1*conf;
[0022] If the number of perpendicular points is less than or equal to n, then the confidence level of the vertical line is x / n*conf.
[0023] If the number of perpendicular points is greater than n, then the confidence level of the vertical line is 1*conf;
[0024] Where n is the number of lines of the lidar and x is the number of scattered points on the vertical line.
[0025] Specifically, step 5 involves selecting the two vertical lines of the target container, which includes the following steps:
[0026] Step 51: Calculate the relative pose of the unmanned truck body with respect to the target container by comparing the actual pose of the unmanned truck with the pose of the target container.
[0027] Step 52: Determine the area where the front and rear edges of the target container are located based on the relative pose, and extract the vertical edges of the area;
[0028] Step 53: Divide the set of vertical lines obtained in step 52 into two sets, namely the front line set and the back line set;
[0029] Step 54: Traverse all vertical lines in the front and back line sets, pair them up, and score them.
[0030] Step 55: Select the set of vertical lines with the highest score as the front and back lines of the target container.
[0031] Specifically, in step 54, the criteria for scoring any combination include:
[0032] Standard 1: The closer the distance between the two sides of the combination is to the length of the target container, the higher the score;
[0033] Standard 2: The higher the confidence level of the two sidelines in the combination, the higher the score;
[0034] Standard 3: The smaller the deviation between the distance from the two edges of the combination to the global positioning value of the unmanned truck center and the actual distance from the two edges of the target container to the global positioning value of the unmanned truck center, the higher the score.
[0035] The final score is the sum of the scores for Standard 1, Standard 2, and Standard 3.
[0036] Specifically, step 6 involves calculating the distance from the unmanned truck to the target container, which includes:
[0037] If only the back line is detected:
[0038] If only the front edge is detected:
[0039] When both the front and back lines are detected simultaneously: d = k1 × d3 + k2 × d4;
[0040] in,
[0041] Where d is the distance from the unmanned truck to the target container, L is the length of the target container, d1 is the horizontal distance from the lidar to the rear edge line as measured by the lidar, d2 is the distance from the lidar to the front edge line as measured by the lidar, d3 and d4 are the estimated distances from the unmanned truck to the front and rear edges of the target container, respectively, k1 is the confidence level of the front edge line, and k2 is the confidence level of the rear edge line.
[0042] Specifically, the distance is smoothed and filtered before being sent to the control module.
[0043] Specifically, the lidar is installed at the front and rear of the unmanned truck.
[0044] Specifically, the positive direction of the lidar is directly behind the rear of the unmanned truck.
[0045] Specifically, when the lidar is scanning, the speed of the unmanned truck is controlled in advance based on the lidar's performance.
[0046] This invention discloses a precise positioning method based on the feature recognition and extraction of port container edges. It uses existing vehicle-mounted LiDAR to identify and extract container corner points and planar points, performs semantic extraction to find the container outline edges, and selects the two vertical edge lines that best match the target container body from all vertical edge line features using an optimal line selection strategy. Based on these edges, the relative pose of the current unmanned truck and the target container is calculated, and then output to the control module for precise parking. This method can accurately extract the two vertical edge lines of the target container, avoiding the problem of incorrect edge line extraction, and also improves the stability and output accuracy of the system. Attached Figure Description
[0047] Figure 1 This is a flowchart of a precise positioning method based on port container edge feature recognition and extraction according to the present invention;
[0048] Figure 2 This is a schematic diagram illustrating the distance calculation from the unmanned truck to the target container according to the present invention. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. Obviously, the specific embodiments described herein are merely illustrative of the invention and represent only a portion, not all, of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention.
[0050] Figure 1 The diagram shows a flowchart of an embodiment of a precise positioning method based on port container edge feature recognition and extraction provided by the present invention. The flowchart specifically includes:
[0051] Step 1: Obtain the platform task and the current global location of the unmanned truck, and allow the unmanned truck to automatically drive to the vicinity of the destination container.
[0052] Specifically, the lidar is installed at the front and rear of the unmanned truck.
[0053] LiDAR sensors are installed on the left side of the front and rear of the vehicle, and on the right side of the front and rear of the vehicle.
[0054] Specifically, the positive direction of the lidar is directly behind the rear of the unmanned truck.
[0055] The positive direction of a lidar is the X-axis, the direction perpendicular to the X-axis in the same plane is the Y-axis, and the direction perpendicular to both the X-axis and the Y-axis is the Z-axis.
[0056] Specifically, when the lidar is scanning, the speed of the unmanned truck is controlled in advance based on the lidar's performance.
[0057] Step 2: Based on the container target yard information in the platform task, select to use the left or right LiDAR to scan the container and obtain the LiDAR point cloud of the container, which includes the destination container and containers near the destination container.
[0058] When the target container is to the left of the unmanned truck, the left-side LiDAR is selected to scan the container; when the target container is to the right of the unmanned truck, the right-side LiDAR is selected to scan the container.
[0059] Step 3: Calculate the curvature based on the laser point cloud using the curvature calculation formula. Divide the laser point cloud into corner points and planar points according to the magnitude of the curvature. The curvature calculation formula is as follows:
[0060]
[0061] Where S is the point cloud dataset, ri is the current point depth, and rj is the depth of a point in S that is not equal to i.
[0062] The current point is the i-th point. The curvature is calculated by the depths of the j points adjacent to the i-th point on the left and the j points adjacent to the i-th point on the right.
[0063] For example, a point with a curvature greater than 0.1 is a corner point, and a point with a curvature less than 0.1 is a plane point.
[0064] Step 4: Extract the vertical edge features of the container.
[0065] Specifically, step 4 involves extracting the vertical edge features of the container, including:
[0066] Traverse the horizontal 0° laser line, determine whether the point on it is a corner point. If it is a corner point, traverse the laser lines at other angles and add all corner points within the preset range to the left and right of the current corner point to the current vertical line point set.
[0067] Returning to the horizontal 0° laser line, the system traverses other corner points, continuously building a set of vertical line points until all vertical edge features within the laser radar scanning range are extracted.
[0068] For example, the preset range is 0.1 meters. The size of the preset range can be set based on the experience of those skilled in the art or according to the actual application scenario, and this application embodiment does not limit this.
[0069] Specifically, before step 5, the confidence level of the container's vertical edges is calculated, including:
[0070] The vertical edge is a vertical edge. The comparison value between the Z-axis feature value in the Z-axis direction and the preset vector length is taken as the initial confidence level, set as conf.
[0071] If the length of the perpendicular line is less than or equal to 1, then the confidence level of the vertical line is the length of the perpendicular line * conf;
[0072] If the length of the vertical line is greater than 1, then the confidence level of the vertical line is 1*conf;
[0073] If the number of perpendicular points is less than or equal to n, then the confidence level of the vertical line is x / n*conf.
[0074] If the number of perpendicular points is greater than n, then the confidence level of the vertical line is 1*conf;
[0075] Where n is the number of lines of the lidar and x is the number of scattered points on the vertical line.
[0076] Preferably, the Z-axis feature value is obtained through the feature value of the vertical edge line. The first feature value (i.e. the largest feature value) of the vertical edge line is the default Z-axis feature value. The Z-axis feature value of the vertical edge line is significantly greater than the X-axis feature value and the Y-axis feature value.
[0077] The length of the perpendicular line is the distance between the highest and lowest points of the extracted perpendicular line feature.
[0078] The confidence level is calculated by taking into account both the length of the vertical line and the number of vertical points. For example, in sparse areas, the length of two feature points reaches 1, but this line is not actually reliable. In dense areas, 32 lidar lines are squeezed together, with 32 vertical points, but the length of the vertical line may only be a few centimeters, which is also partially unreliable.
[0079] For example, the preset vector length is 1.
[0080] The closer the confidence value of the vertical line is to 1, the more closely the extracted vertical line feature matches the spatial vertical line representation. This confidence value can be used to remove interference points later.
[0081] Step 5: Select the two vertical lines of the target container from the vertical line features extracted in Step 4.
[0082] Specifically, step 5 involves selecting the two vertical lines of the target container, which includes the following steps:
[0083] Step 51: Calculate the relative pose of the unmanned truck body with respect to the target container by comparing the actual pose of the unmanned truck with the pose of the target container.
[0084] Step 52: Determine the area where the front and rear edges of the target container are located based on the relative pose, and extract the vertical edges of the area;
[0085] Step 53: Divide the set of vertical lines obtained in step 52 into two sets, namely the front line set and the back line set;
[0086] Step 54: Traverse all vertical lines in the front and back line sets, pair them up, and score them.
[0087] Step 55: Select the set of vertical lines with the highest score as the front and back lines of the target container.
[0088] Specifically, in step 54, the criteria for scoring any combination include:
[0089] Standard 1: The closer the distance between the two sides of the combination is to the length of the target container, the higher the score;
[0090] Standard 2: The higher the confidence level of the two sidelines in the combination, the higher the score;
[0091] Standard 3: The smaller the deviation between the distances from the front and rear edge lines of the combination to the global positioning value of the unmanned truck center and the actual distances from the two edge lines of the target container to the global positioning value of the unmanned truck center, the higher the score.
[0092] The final score is the sum of the scores for Standard 1, Standard 2, and Standard 3.
[0093] For example, if the distance between the two sides in the combination is L1 and the length of the target container is L2, then the score is: score1 = δ1 / (L1-L2);
[0094] Standard 2: If the confidence levels of the two edges in the combination are conf1 and conf2 respectively, then the score is: score2 = δ2*(conf1+conf2) / 2;
[0095] Standard 3: The deviations between the distances from the front and rear edge lines of the combined container to the global positioning value of the unmanned container center and the actual distances from the front and rear edge lines of the target container to the global positioning value of the unmanned container center are L3 and L4, respectively. The score is: score3=δ2*(L3+L4).
[0096] The final score is: score = score1 + score2 + score3.
[0097] Among them, the coefficients δ1, δ2, and δ3 are set by those skilled in the art as needed.
[0098] Preferably, the positioning system outputs the global location of the vehicle center in real time.
[0099] Step 6: Calculate the distance from the unmanned truck to the target container.
[0100] Figure 2 The diagram shown is a schematic diagram of the distance calculation from the unmanned truck to the target container according to the present invention.
[0101] Specifically, step 6 involves calculating the distance from the unmanned truck to the target container, which includes:
[0102] If only the back line is detected:
[0103] If only the front edge is detected:
[0104] When both the front and back lines are detected simultaneously: d = k1 × d3 + k2 × d4;
[0105] in,
[0106] Where d is the distance from the unmanned truck to the target container, L is the length of the target container, d1 is the horizontal distance from the lidar to the rear edge line as measured by the lidar, d2 is the distance from the lidar to the front edge line as measured by the lidar, d3 and d4 are the estimated distances from the unmanned truck to the front and rear edges of the target container, respectively, k1 is the confidence level of the front edge line, and k2 is the confidence level of the rear edge line.
[0107] When the front and rear edge lines are detected, a weighted fusion is used to obtain the final distance d, with weights k1 and k2, representing the horizontal distances from the two edge lines to the center of the vehicle body, respectively. The smaller the distance, the closer the edge line is to the radar. In this case, due to the larger field of view, the measured value is theoretically closer to the true value. The larger the distance, the farther the edge line is from the radar. In this case, due to the smaller field of view, there may be (drift points), which may increase the measurement error.
[0108] Step 7: Send the distance to the control module, and the control module controls the unmanned truck to stop precisely.
[0109] Specifically, the distance is smoothed and filtered before being sent to the control module.
[0110] The above-described embodiments merely illustrate preferred embodiments of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. A precise positioning method based on port container edge feature recognition and extraction, characterized in that, The steps include the following: Step 1: Obtain the platform task and the current global location of the unmanned truck, and allow the unmanned truck to automatically drive to the vicinity of the target container; Step 2: Based on the container target yard information in the platform task, select to use the left or right lidar to scan the container and obtain the lidar point cloud of the container, wherein the container includes the target container and the containers near the target container. Step 3: Calculate the curvature based on the laser point cloud using the curvature calculation formula. Divide the laser point cloud into corner points and planar points according to the magnitude of the curvature. The curvature calculation formula is as follows: , Where S is the point cloud dataset, r i For the current point depth, r j Let i be the depth of the point in S that is not equal to i. Step 4: Extract the vertical edge features of the container; Step 5: From the vertical edge features extracted in Step 4, select two vertical edge lines of the target container, including the front edge line and the rear edge line. Step 6: Calculate the distance from the unmanned truck to the target container; Step 7: Send the distance to the control module, and the control module controls the unmanned truck to stop precisely; Step 4 involves extracting the vertical edge features of the container, specifically including: Traverse the horizontal 0° laser line, determine whether the point on it is a corner point. If it is a corner point, traverse the laser lines at other angles and add all corner points within the preset range to the left and right of the current corner point to the current vertical line point set. Returning to the horizontal 0° laser line, the system traverses other corner points, continuously building a set of vertical line points until all vertical edge features within the laser radar scanning range are extracted. Step 6, calculating the distance from the unmanned truck to the target container, specifically includes: If only the following line is detected: ; If only the front edge is detected: ; When both the front edge and the rear edge are detected simultaneously: ; in, , ; Wherein, d is the distance from the unmanned truck to the target container, L is the length of the target container, d1 is the horizontal distance from the lidar to the rear edge line as measured by the lidar, d2 is the distance from the lidar to the front edge line as measured by the lidar, d3 and d4 are the estimated distances from the unmanned truck to the front edge line and the rear edge line of the target container, respectively, k1 is the confidence level of the front edge line, and k2 is the confidence level of the rear edge line.
2. The precise positioning method based on port container edge feature recognition and extraction according to claim 1, characterized in that, Before step 5, the confidence level of the vertical edge line of the container is calculated, specifically including: The vertical edge is a vertical edge. The comparison value between the Z-axis eigenvalue in the Z-axis direction and the preset vector length is taken as the initial confidence level, set as conf. If the length of the perpendicular line is less than or equal to 1, then the confidence level of the vertical line is the length of the perpendicular line * conf; If the length of the vertical line is greater than 1, then the confidence level of the vertical line is 1*conf; If the number of perpendicular points is less than or equal to n, then the confidence level of the vertical line is x / n*conf. If the number of perpendicular points is greater than n, then the confidence level of the vertical line is 1*conf; Where n is the number of lines of the lidar, and x is the number of scattered points of the vertical line.
3. The precise positioning method based on port container edge feature recognition and extraction according to claim 2, characterized in that, Step 5 involves selecting the two vertical lines of the target container, specifically including the following steps: Step 51: Calculate the relative pose of the unmanned truck body with respect to the target container by using the actual pose of the unmanned truck and the pose of the target container. Step 52: Based on the relative pose, determine the regions where the front and rear edges of the target container are located, and extract the vertical edges of the regions; Step 53: Divide the set of vertical lines obtained in step 52 into two sets, namely the front line set and the back line set; Step 54: Traverse all vertical lines in the front and back line sets, combine them in pairs, and score them. Step 55: Select the set of vertical lines with the highest score as the front and rear lines of the target container.
4. The precise positioning method based on port container edge feature recognition and extraction according to claim 3, characterized in that, In step 54, the criteria for scoring any combination include: Standard 1: The closer the distance between the two sides of the combination is to the length of the target container, the higher the score; Standard 2: The higher the confidence level of the two sidelines in the combination, the higher the score; Standard 3: The smaller the deviation between the distance from the two edges of the combination to the global positioning value of the unmanned truck center and the actual distance from the two edges of the target container to the global positioning value of the unmanned truck center, the higher the score. The final score is the sum of the scores from Standard 1, Standard 2, and Standard 3.
5. The precise positioning method based on port container edge feature recognition and extraction according to claim 1, characterized in that, The distance is smoothed and filtered before being sent to the control module.
6. The precise positioning method based on port container edge feature recognition and extraction according to claim 1, characterized in that, The lidar is installed at the front and rear of the unmanned truck.
7. The precise positioning method based on port container edge feature recognition and extraction according to claim 6, characterized in that, The positive direction of the lidar is directly behind the rear of the unmanned truck.
8. The precise positioning method based on port container edge feature recognition and extraction according to claim 7, characterized in that, When the lidar performs a scan, the speed of the unmanned truck is controlled in advance based on the performance of the lidar.
Citation Information
Patent Citations
Laser radar based indoor unmanned aerial vehicle (UAV) positioning system and method
CN109709801A
Laser radar auxiliary container alignment method for port unmanned container truck
CN111508023A