Polar navigation path planning method and device based on radar image and medium
Through the two-way heuristic search algorithm and third-order Bezier curve optimization based on radar images, the problem of low efficiency of the A* algorithm in polar sea path planning and the path being inconsistent with navigation has been solved, and a more stable and safer navigation path has been achieved.
Patent Information
- Application Number
- CN202410764834.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-09-10
AI Technical Summary
The existing A* algorithm is prone to cross paths and zigzag paths when planning paths in complex environments, which affects efficiency, especially in complex weather and difficult navigation conditions in polar waters, resulting in low planning efficiency and paths that do not conform to navigation operations.
The polar navigation path planning method based on radar images is used to optimize the path through a two-way heuristic search algorithm and cost estimation function, combined with the third-order Bezier curve, calculate the slope and the impact of obstacles, optimize the route to reduce detours and reentry, and improve navigation Stability and security.
It effectively reduces the path planning time, transforms the zigzag path into a curved path that is consistent with navigation operations, improves navigation stability and safety, avoids detours to far or dangerous areas, and optimizes route efficiency.
Smart Images

Figure CN118625314A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of ship path planning, and in particular to a method, device and medium for polar navigation path planning based on radar images. Background Art
[0002] In recent decades, global warming has caused the average temperature in the Arctic region to continue to rise, resulting in the gradual melting of Arctic sea ice. Some sea areas have become navigable, and it has become possible for ocean-going fleets to sail in high-latitude ice-covered waters. However, in the polar environment, complex and changeable weather and difficult navigation conditions have brought many challenges to ships sailing in ice areas.
[0003] A* algorithm, a common method for ship path planning, is a heuristic search algorithm. A* algorithm is widely used in the field of path planning due to its high-speed execution capability and excellent real-time performance when finding paths. Its basic principle is to use an evaluation function f(n) to estimate the total cost from the starting point through node n to the end point. This evaluation function consists of two parts: g(n) represents the actual cost from the starting point to node n, and h(n) is a heuristic function used to estimate the minimum cost from node n to the end point.
[0004] However, when the A* algorithm is used for path planning in complex environments, it will produce cross paths and zigzag paths. If the map size is too large or the environment is too complex, the A* algorithm will seriously affect the efficiency of path planning. Summary of the invention
[0005] The purpose of the present invention is to provide a polar navigation path planning method, device and medium based on radar images in order to overcome the defects of the above-mentioned prior art such as low planning efficiency and path not conforming to navigation operations.
[0006] The purpose of the present invention can be achieved by the following technical solutions:
[0007] A polar navigation path planning method based on radar images comprises the following steps:
[0008] Acquire a radar image, and delineate a starting point and a target point from the radar image;
[0009] At the same time, calculate the cost estimation function values of the adjacent pixels from the starting point and the target point to the opposite side, and take the pixels with the smallest cost estimation function values on both sides as the candidate nodes for this time, and use the candidate nodes for the next set of current points on both sides, and repeat until the current points on both sides coincide, and get all the candidate nodes;
[0010] Connect the starting point, all candidate nodes and the target point in sequence, perform path optimization processing, and obtain the path;
[0011] The path is smoothed by a third-order Bezier curve to obtain the navigation path.
[0012] Furthermore, the path optimization process is specifically as follows: calculating the slope between adjacent candidate nodes, and when the slope is less than 0 or equal to infinity, deleting the candidate nodes close to the starting point.
[0013] Furthermore, the radar image also includes pixel positions of obstacles. In the path optimization process, after deleting the candidate nodes close to the starting point, it is calculated whether the path passes through the pixel position of the obstacle. If so, the candidate node is retained.
[0014] Furthermore, the radar image also includes the warning range of the obstacle, which is an area defined within a certain distance around the pixel position of the obstacle. During the path optimization process, after deleting the candidate nodes close to the starting point, it is calculated whether the path passes through the warning range of the obstacle. If so, the candidate node is retained.
[0015] Furthermore, the expression of the cost estimation function is:
[0016] f(n)=g(n)+(w+ρ)*h(n)
[0017] In the formula, f(n) is the cost estimation function, g(n) is the total distance from the starting point to the current point along the candidate nodes obtained each time, h(n) is the heuristic function, ρ is the offset, and w is the optimal path guidance weight. The expression is:
[0018] w=e (cos(θ)*ln(A))
[0019] Where θ is the angle between the vector from the starting point to the target point and the vector from the current point to the target point, and A is a constant.
[0020] Furthermore, the process of path smoothing by the third-order Bezier curve is: select two adjacent points from the starting point, the target point and all candidate nodes at a time, and select the first control point and the second control point on the map. The expression of the third-order Bezier curve is:
[0021] B(t)=P0(1-t) 3 +3P1t(1-t) 2 +3P2t 2 (1-t)+P3t 3 , t∈[0,1]
[0022] Where t is a parameter, B(t) is the coordinate of a point on the curve, and P0, P1, P2, and P3 represent a candidate node, the first control point, the second control point, and another candidate node, respectively.
[0023] Furthermore, the radar image is a pixel matrix obtained according to a certain frame rate, and the pixel matrix includes the RGB color value of each pixel.
[0024] Furthermore, the adjacent pixels include the adjacent pixels in the eight directions of up, down, left, right, upper left, lower left, upper right and lower right. In the calculation process, the adjacent pixels in the directions of up, down, left and right are recorded as 1 times the length, and the adjacent pixels in the directions of upper left, lower left, upper right and lower right are recorded as times the distance.
[0025] A second aspect of the present invention is a polar navigation route planning device based on radar images, comprising a memory, a processor, and a program stored in the memory, wherein when the processor executes the program, it implements any of the above polar navigation route planning methods based on radar images.
[0026] A third aspect of the present invention is a storage medium having a program stored thereon, which, when executed, implements any of the above methods for polar navigation path planning based on radar images.
[0027] Compared with the prior art, the present invention has the following beneficial effects:
[0028] 1) The present invention uses a bidirectional heuristic search algorithm and a cost estimation function to perform path planning, which effectively reduces the time of the path planning algorithm. It uses a third-order Bezier curve to perform path smoothing, converts the broken line path of the pixel image into a curved path that conforms to the actual navigation operation, and increases the stability during navigation.
[0029] 2) The present invention performs path optimization processing by calculating the slope, thereby avoiding planning of long detours or return paths and optimizing the navigation efficiency of the route.
[0030] 3) The present invention further considers the impact of obstacles on the route and the situation where the actual volume of ice in polar waters is larger than the detected volume, thereby preventing the route from entering obstacles or dangerous areas and improving the safety of the route. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 The figure is a flow chart of the method of the present invention.
[0032] Figure 2 This is an obstacle distribution diagram of an embodiment of the present invention.
[0033] Figure 3 It is a schematic diagram of vector angle.
[0034] Figure 4 Schematic diagram of irregular path.
[0035] Figure 5a This is an irregular path analysis diagram.
[0036] Figure 5b Optimize schematics for irregular paths.
[0037] Figure 6 Optimize comparison graph for irregular paths.
[0038] Figure 7 This is a schematic diagram of path smoothing.
[0039] Figure 8a This is a comparison chart of the planning results for the first route.
[0040] Figure 8b This is a comparison chart of the planning results for the second route.
[0041] Figure 8c This is a comparison chart of the planning results for the third route.
[0042] Figure 8d This is a comparison chart of the planning results for the fourth route.
[0043] Fig. 9 This is a comparison chart of ablation experiments. DETAILED DESCRIPTION
[0044] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0045] The present invention is a method, device and medium for polar navigation route planning based on radar images, such as Figure 1 As shown, the method comprises the following steps:
[0046] Acquire a radar image, and delineate a starting point and a target point from the radar image;
[0047] At the same time, calculate the cost estimation function values of the adjacent pixels from the starting point and the target point to the opposite side, and take the pixels with the smallest cost estimation function values on both sides as the candidate nodes for this time, and use the candidate nodes for the next set of current points on both sides, and repeat until the current points on both sides coincide, and get all the candidate nodes;
[0048] Connect the starting point, all candidate nodes and the target point in sequence, perform path optimization processing, and obtain the path;
[0049] The path is smoothed by a third-order Bezier curve to obtain the navigation path.
[0050] Example 1
[0051] In this embodiment, a radar image of a certain polar sea area is taken as an example. Figure 2 As shown, the following is explained.
[0052] First, the key data of the radar image is read: according to the set frame rate (FPS, i.e., frames per second), the radar image at a specific moment can be extracted from the radar video. The resolution of the radar image is 1280x1024 pixels, and it is further converted into a high-dimensional pixel matrix, which contains the RGB color value of each pixel in the image. The information that can be obtained from the radar image includes: display mode (real motion mode and relative motion mode), display direction (north, heading, head-up, own ship position), selected distance scale, range ring interval, heading, water speed, ground heading, ground speed, planned road, etc.
[0053] ROI area extraction: The circular display area in the radar image is the region of interest (ROI), which mainly shows the ice navigation scene.
[0054] Unknown obstacle extraction: When the ship sails to the Arctic region at 60 degrees north latitude or the Antarctic region at 60 degrees south latitude, the unknown obstacles in the ROI area are likely to be sea ice. To extract these unknown obstacle areas, the unknown obstacle areas are set to 255 (displayed as black), so that the obstacle areas can be extracted from all unknown binary images. Next, image filtering technology is applied to eliminate image noise to smooth the unknown obstacle areas. In addition, the scale of the unknown obstacle area can be adjusted through the erosion and dilation techniques in image processing, which helps to alleviate the problem of shrinking the obstacle area that may be caused by image filtering.
[0055] like Figure 3 As shown, the starting point S(x S ,y S ), target point G(x G ,y G ), taking the simplified starting point side as an example, the current point N(x N ,y N ), the first adjacent point of the starting point a(x a ,y a ), the second adjacent point b(x b ,y b ), the black area is the obstacle. The vector from the starting point to the target point can be obtained as The vectors from the starting point to two adjacent points are α and β are vectors With vector The angle between the current point and the target point is vector The calculation formula of the angle θ is:
[0056]
[0057] θ=|θ1-θ2|
[0058] Where θ1 is the vector between the starting point and the end point The angle with the x-axis; θ2 is the vector between the current node and the target point The angle between the starting point and the target point is the angle between the vector from the current point to the target point. The optimal path guidance weight w is introduced, the turning angle between the current node and the target point is considered, the weight of the heuristic function is increased, and the depth of the search is increased:
[0059] w=e (cos(θ)*ln(A))
[0060] Where: w is the optimal path guidance weight; A is a constant
[0061] In addition, another reason for the poor performance of the A* algorithm stems from the problem of the heuristic function when processing nodes. When there are multiple paths with the same f(n) value, the algorithm will search all of these paths, even though only one of them actually needs to be searched. In order to effectively select from these nodes with the same heuristic function value, it is proposed to introduce a small offset ρ. The purpose of this offset ρ is that when the heuristic function values of two nodes are the same, the node closer to the end point will get a smaller estimated function value. By adding this small offset ρ, the weight of the estimated function can be increased in the heuristic function, thereby giving priority to those nodes that are closer to the end point. Therefore, the present invention has made corresponding improvements to the cost estimation function, and the expression is:
[0062] f(n)=g(n)+(w+ρ)*h(n)
[0063] Where f(n) is the cost estimation function, g(n) is the total distance from the starting point to the current point along the candidate nodes obtained each time, h(n) is the heuristic function, and ρ is the offset.
[0064] When the bidirectional A* algorithm performs path planning, since the algorithm searches from both the starting point and the end point at the same time, when the two search trees meet near a certain intersection in the middle, there may be a difference in consistency between the local optimization and the overall path planning. This deviation is usually caused by the difference in heuristic information and search conditions of different search trees, especially in the area near the intersection, which may lead to discontinuity and irregularity of the path, forming non-traditional path planning, such as Figure 4 As shown. Such a path may result in unnecessary extra voyage, increase turning frequency and calculation time. Therefore, it is necessary to process these irregular paths and improve the smoothness of the path. By designing a filter function Z(x, y) to evaluate the generated path nodes and eliminate those nodes that do not meet the conditions, the path length generated by the algorithm of the present invention can be effectively shortened.
[0065] In the planned path, the ship continuously changes direction and moves diagonally, thus forming a zigzag and stepped path. This path feature is as follows: Figure 5a As shown, the planned path example is ABCDE. In this case, node A can directly reach node C, and node C can also directly reach node E, with no obstacles in between. Therefore, the redundant nodes B and D can be removed, and A and C, and C and E can be directly connected to form a new simplified path ACE. Similarly, the same treatment can be performed for path EFI. Such optimization operations help to reduce the total length of the entire planned path.
[0066] Optimization in the grid map requires additional analysis of the coordinates of each point on the irregular path, and the function Z(x, y) needs to be constructed to determine the slope k of two adjacent nodes n and n+1. n,n+1 Is it less than 0 or ∞? n,n+1 When <0 or =∞, delete the nodes with smaller serial numbers, that is, the nodes close to the starting point. Slope k n,n+1 The calculation formula is as follows:
[0067]
[0068] The principle of the function Z(x, y) can be expressed by the following formula:
[0069]
[0070] in Indicates that the coordinates of the point are assigned to empty.
[0071] like Figure 5b As shown, the five nodes in the order of ABCDE form a ladder-like path. According to the function Z(x, y), there are k B,C , k D,E =∞, we can delete nodes B and D, connect nodes A and C, C and E, so the path ABCDE can be optimized to ACE; the five nodes in the order of EFGHI form a zigzag path. According to the function Z(x, y), there are k F,G <0, k G,H =∞, nodes G and H can be deleted, and nodes E and F, F and I can be connected, so the path EFGHI can be optimized to EFI.
[0072] The optimized path can effectively avoid jagged paths and stepped paths. The path comparison before and after optimization is as follows: Figure 6 shown.
[0073] The paths generated by the improved bidirectional A* algorithm are usually non-smooth broken line shapes, which places high demands on the ship's maneuverability. Therefore, it is necessary to optimize these generated paths to improve their smoothness. The third-order Bezier curve is selected for path smoothing. The mathematical expression of the third-order Bezier curve is more effective in the field of ship path planning. Its general form is as follows:
[0074] B(t)=P0(1-t) 3 +3P1t(1-t) 2 +3P2t 2 (1-t)+P3t 3 , t∈[0,1]
[0075] In the formula, t is a parameter, and its value is generally between 0 and 1, which is used to represent a specific point on the curve. B(t) is the coordinate of the point on the curve, and P0, P1, P2, and P3 represent a candidate node, the first control point, the second control point, and another candidate node, respectively. By changing the position of the control point, curves of different shapes can be generated, thereby planning a variety of routes. Figure 7 As shown, this method effectively solves the problem of multiple inflection points in the path and reduces the total length of the path to a certain extent.
[0076] like Figure 8a , 8b 8c and 8d are the planning path result diagrams of the improved two-way A* algorithm of the present invention and the traditional A* algorithm in four routes with different starting points, target points and obstacle distributions. The results show that the improvement effect may not be obvious on simple maps, but in complex maps, the improved two-way A* algorithm can more effectively reduce the appearance of jagged and stepped paths than the traditional A* algorithm, indicating that the improved two-way A* algorithm is more suitable for route planning in ice areas with complex environments.
[0077] In order to verify the effect of the improved two-way A* algorithm, the present invention uses specific parameters to perform a series of algorithms on the path generation in the obstacle distribution map: including the performance comparison of the A* algorithm, the two-way A* algorithm, the breadth-first search algorithm (BFS), the depth-first search algorithm (DFS), the ant algorithm (ACO), the fast random tree algorithm (RRT) and the improved two-way A* algorithm. The results show that the improved two-way A* algorithm has improved performance compared with most of the other algorithms. As shown in Table 1:
[0078] Table 1 Experimental data comparison between different algorithms
[0079]
[0080] Compared with the traditional A* algorithm, the improved bidirectional A* algorithm reduces the path calculation time by at least 43.15%, the number of search nodes by at least 12.65%, the number of inflection points by at least 12.5%, and the total path length by at least 0.09%. Especially in areas with dense obstacles, the algorithm performs better. For example, when the starting node is set to (400, 500) and the target node is (200, 100), the improved bidirectional A* algorithm reduces the path calculation time by 95.71%, the number of search nodes by 52.41%, the number of inflection points by 38.46%, and the total path length by 1.62%. Although the running time is not as good as the fast random tree algorithm, it is worse than the fast random tree algorithm in terms of the number of search nodes, the number of inflection points and the total distance. Therefore, it can be concluded that the improved bidirectional A* algorithm has better performance in all parameters in most cases.
[0081] In addition, in order to prove the effectiveness of the proposed method from multiple perspectives, ablation experiments were also conducted on the proposed method, including the basic A* algorithm (A-star), the basic bidirectional A* algorithm (Bi A-star), the improved cost function Bi A-star (CFBi A-star), the improved search neighborhoods Bi A-star (SNBi A-star) and the irregular path optimization (IPOBi A-star). The experimental results are shown in Figure 2. Fig. 9 As shown in the figure, it can be seen that after improving the cost function, searching the neighborhood and optimizing the irregular path, various parameters have been significantly improved, especially the running time, which has been improved by 92.3% compared with the most basic A* algorithm.
[0082] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0083] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0084] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. A polar navigation path planning method based on radar images, It is characterized in that The following steps are involved: Acquire a radar image, and delineate a starting point and a target point from the radar image; At the same time, calculate the cost estimation function values of the adjacent pixels from the starting point and the target point to the opposite side, and take the pixels with the smallest cost estimation function values on both sides as the candidate nodes for this time, and use the candidate nodes for the next set of current points on both sides, and repeat until the current points on both sides coincide, and get all the candidate nodes; Connect the starting point, all candidate nodes and the target point in sequence, perform path optimization processing, and obtain the path; The path is smoothed by a third-order Bezier curve to obtain the navigation path.
2. A polar navigation path planning method based on radar images according to claim 1, It is characterized in that The path optimization process is specifically as follows: calculating the slope between adjacent candidate nodes, and when the slope is less than 0 or equal to infinity, deleting the candidate nodes close to the starting point.
3. The method for polar navigation path planning based on radar images according to claim 2, It is characterized in that The radar image also includes pixel positions of obstacles. In the path optimization process, after deleting the candidate nodes close to the starting point, it is calculated whether the path passes through the pixel position of the obstacle. If so, the candidate node is retained.
4. The method for polar navigation path planning based on radar images according to claim 3, It is characterized in that The radar image also includes a warning range of the obstacle, which is an area defined within a certain distance around the pixel position of the obstacle. In the path optimization process, after deleting the candidate nodes close to the starting point, it is calculated whether the path passes through the warning range of the obstacle. If so, the candidate node is retained.
5. The method for polar navigation path planning based on radar images according to claim 1, It is characterized in that The expression of the cost estimation function is: f(n)=g(n)+(w+ρ)*h(n) In the formula, f(n) is the cost estimation function, g(n) is the total distance from the starting point to the current point along the candidate nodes obtained each time, h(n) is the heuristic function, ρ is the offset, and w is the optimal path guidance weight. The expression is: w=e (cos(θ)*ln(A)) Where θ is the angle between the vector from the starting point to the target point and the vector from the current point to the target point, and A is a constant.
6. The method for polar navigation path planning based on radar images according to claim 1, It is characterized in that The process of path smoothing by the third-order Bezier curve is: select two adjacent points from the starting point, the target point and all candidate nodes at a time, and select the first control point and the second control point on the map. The expression of the third-order Bezier curve is: B(t)=P 0 (1-t) 3 +3P 1 t(1-t) 2 +3P 2 t 2 (1-t)+P 3 t 3 ,t∈[0,1] In the formula, t is the parameter, B(t) is the coordinate of the point on the curve, P 0 , P 1 , P 2 , P 3 Represent a candidate node, a first control point, a second control point and another candidate node respectively.
7. The method for polar navigation path planning based on radar images according to claim 1, It is characterized in that The radar image is a pixel matrix obtained according to a certain frame rate, and the pixel matrix includes the RGB color value of each pixel.
8. The method for polar navigation route planning based on radar images according to claim 1, It is characterized in that The adjacent pixels include the adjacent pixels in the eight directions of up, down, left, right, upper left, lower left, upper right and lower right. In the calculation process, the adjacent pixels in the directions of up, down, left and right are recorded as 1 times the length, and the adjacent pixels in the directions of upper left, lower left, upper right and lower right are recorded as times the distance.
9. A polar navigation route planning device based on radar images, comprising a memory, a processor, and a program stored in the memory, It is characterized in that When the processor executes the program, the method for polar navigation path planning based on radar images as described in any one of claims 1-8 is implemented.
10. A storage medium having a program stored thereon, It is characterized in that When the program is executed, a polar navigation path planning method based on radar images as described in any one of claims 1-8 is implemented.
Citation Information
Cited By
AGV dynamic path planning and obstacle avoidance implementation method based on improved D star algorithm, AGV trolley and medium
CN119935156A
