Water traffic collision avoidance prediction and evaluation method based on ship model
Patent Information
- Application Number
- CN202510634845.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2025-07-22
AI Technical Summary
The existing water traffic collision avoidance methods rely on driver experience and intuition, and lack accurate mathematical models and scientific prediction and evaluation methods, which makes it difficult to evaluate the risk of ship collisions in real time and accurately in complex canal environments, which can easily lead to delays or errors in collision avoidance decisions.
The ship contour model is obtained based on the image recognition method, the ship contour is extracted through high-altitude remote sensing images, the navigation direction angle and velocity are calculated, the ship trajectory is predicted, and the collision avoidance risk is evaluated in the two-dimensional coordinate system, and an early warning is issued.
It realizes accurate prediction and early warning of ship collisions in complex canals, provides scientific and effective decision-making support, and simplifies the complexity of ship collision prediction.
Smart Images

Figure CN120356363A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of ship navigation safety management, and particularly to a method for predicting and evaluating collision avoidance in water traffic based on a ship model. Background Art
[0002] With the booming development of the global shipping industry, water traffic has become increasingly busy, and ship collision accidents occur frequently, seriously threatening life, property safety and the marine environment. The existing methods for collision avoidance in water traffic mainly rely on the experience and intuition of the driver, as well as simple rule judgments, lacking accurate mathematical models and scientific prediction and evaluation means. Traditional methods are difficult to evaluate the collision risk between ships in real time and accurately. Especially in the busy and complex canal traffic environment of ship traffic, it is easy to cause delays or mistakes in collision avoidance decisions. Summary of the Invention
[0003] In view of the above deficiencies of the prior art, the present invention provides a method for predicting and evaluating collision avoidance in water traffic based on a ship model, which obtains a ship contour model based on an image recognition method, predicts the movement trajectory of the ship in a two-dimensional coordinate system, and predicts the collision avoidance risk of the ship in real time.
[0004] To achieve the above invention purpose, the technical solution adopted by the present invention is as follows:
[0005] Provide a method for predicting and evaluating collision avoidance in water traffic based on a ship model, which includes the following steps:
[0006] S1: Determine the collision avoidance safety management area of ship water traffic, obtain the real-time high-altitude remote sensing image of the collision avoidance safety management area, and extract the ship contour in the high-altitude remote sensing image;
[0007] S2: Calculate the navigation direction angle of the ship according to the coordinates of the two contour boundary points with the largest distance on the ship contour, and based on the ship contours in the high-altitude remote sensing images collected at two adjacent times, screen the ship contours of the same ship at two adjacent times according to the similarity between the ship contours to obtain the trajectory positions of the same ship at two adjacent times;
[0008] S3: Calculate the trajectory point coordinates according to the coordinates of the contour boundary points on the ship contour, use the continuously collected high-altitude remote sensing images to obtain the continuous trajectory points of the same ship in the two-dimensional coordinate system, and calculate the change rate of the navigation direction angle and the navigation speed;
[0009] S4: Use the change rate of the navigation direction angle and the navigation speed to predict the trajectory point coordinates of the next trajectory point, and predict the navigation direction angle of the ship at the next trajectory point. Evaluate whether a ship collision will occur according to whether there is encroachment between the ship contour areas corresponding to the predicted next trajectory point, and issue a collision avoidance warning.
[0010] Furthermore, the specific method for extracting the ship contour from the high-altitude remote sensing image in step S1 is as follows:
[0011] S11: Grayscale the high-altitude remote sensing image to obtain a grayscale image. Utilize the difference between the grayscale values of the pixels in the grayscale image to screen the contour boundary points, form a contour line, and remove the unclosed contour lines;
[0012] S12: Obtain all the closed contour lines in the grayscale image. Use the maximum distance between the contour boundary points on each closed contour line and the minimum distance between the contour boundary points on two closed contour lines to determine whether two closed contour lines are adjacent, and screen out two adjacent closed contour lines;
[0013] S13: Based on two adjacent closed contour lines A and B, judge whether the regions enclosed by the two adjacent closed contour lines A and B overlap. Delete the closed contour lines located within one of the closed contour lines, and retain the outermost closed contour line, which is output as the ship contour in the high-altitude remote sensing image.
[0014] Furthermore, step S11 includes:
[0015] S111: Grayscale the high-altitude remote sensing image to obtain a grayscale image. Obtain the grayscale value of each pixel in the grayscale image, and calculate the grayscale difference Δh between two adjacent pixels in the grayscale image i~u ;
[0016] Δh i~u =|h i -h u |;
[0017] where i and u are the numbers of two adjacent pixels, and h i 、h u are the grayscale values of two adjacent pixels respectively;
[0018] S112: Set the grayscale difference threshold Δh0 between the water surface pixels and the ship edge pixels. If Δh i~u ≥Δh0, it is determined that two adjacent pixels i and u are located on the contour boundary; otherwise, two adjacent pixels i and u are not located on the contour boundary;
[0019] S113: Establish a two-dimensional coordinate system on the grayscale image. Take the midpoint between pixels i and u as the contour boundary point, and calculate the coordinates (x n ,y n ) of the contour boundary point in the two-dimensional coordinate system;
[0020]
[0021] where, (x i, y i ), (x u , y u ) are the coordinates of pixels i and u in the two-dimensional coordinate system respectively, and n is the number of the contour boundary points;
[0022] S114: In the two-dimensional coordinate system, connect the continuous contour boundary points to obtain several contour lines with continuous contour boundary points, and remove the unclosed contour lines;
[0023] The constraint conditions for the continuous contour boundary points are:
[0024] The method for judging whether the contour line is closed is: Take any contour boundary point on the contour line as the starting point for traversal, traverse each contour boundary point in turn, and judge whether the end point of traversal is the same contour boundary point. If so, it is determined that the contour line is closed; otherwise, the contour line is unclosed; The end point of traversal is the end point of the contour line during the traversal process or the starting point of traversal that is traversed for the second time.
[0025] Further, step S12 includes:
[0026] S121: Obtain all the closed contour lines in the grayscale image, traverse the contour boundary points on each closed contour line, and calculate the maximum value l of the distances between the contour boundary points max ;
[0027]
[0028] where f(.) is the screening function for the two contour boundary points with the farthest distance on the closed contour line, a1 and a2 are the numbers of the two contour boundary points with the closest distance on the closed contour line, and A is the set of contour boundary points on the closed contour line, are the coordinates of the two contour boundary points with the farthest distance respectively;
[0029] S122: Traverse the contour boundary points on any two closed contour lines, and calculate the minimum value l of the distances between the contour boundary points on the two closed contour lines min ;
[0030]
[0031] where f′(.) is the screening function for the two contour boundary points with the closest distance on the two closed contour lines, a and b are the numbers of the contour boundary points on the two closed contour lines respectively, A and B are the sets of contour boundary points on the two closed contour lines, (x a , y a ), (x b , y b ) are the coordinates of the two contour boundary points with the closest distance on the two closed contour lines respectively;
[0032] S123: Compare the maximum value l max with the minimum value l min If l max > l min , it is determined that the two closed contour lines A and B are adjacent; otherwise, it is determined that the two closed contour lines A and B are not adjacent.
[0033] Further, step S13 includes:
[0034] S131: Based on the two adjacent closed contour lines A and B, taking the contour boundary points on one of the closed contour lines as the base points, draw several straight lines passing through the base points, and obtain the number of intersection points between the straight lines and the other closed contour line;
[0035] If the number of intersection points between each straight line and the other closed contour line is greater than or equal to 2, it is determined that one of the closed contour lines is located inside the other closed contour line, and the closed contour line located inside the other closed contour line is deleted; otherwise, it is determined that one of the closed contour lines is not located inside the other closed contour line, and the two closed contour lines are retained;
[0036] S132: Repeat step S131 to delete all the closed contour lines located inside the closed contour line, and retain the outermost closed contour line, which is output as the ship contour in the high-altitude remote sensing image.
[0037] Further, step S2 includes:
[0038] S21: According to the two contour boundary points a1 and a2 with the largest distance values on the ship contour, calculate the navigation direction angle θ of the current ship according to the coordinates of the contour boundary points a1 and a2 Calculate the navigation direction angle θ of the current ship;
[0039]
[0040] S22: According to the high-altitude remote sensing images of the collision avoidance safety management area collected at two adjacent moments, calculate the similarity coefficient S between the ship contours in the high-altitude remote sensing images at two adjacent moments;
[0041]
[0042] where e is the contour boundary point of the ship contour A1 on the high-altitude remote sensing image at the previous moment, h e is the shape context of the contour boundary point e, c is the contour boundary point of the ship contour A2 on the high-altitude remote sensing image at the later moment, h c is the shape context of the contour boundary point c, d min (h c , h e) is the minimum value of the difference in shape context between the contour boundary point c and the contour boundary point e, and C is the number of contour boundary points of the ship contour A2;
[0043] S23: Calculate the similarity coefficient S between all ship contours on the high-altitude remote sensing image at the previous moment and the ship contour A2, match the ship contour A1 corresponding to the minimum value of the similarity coefficient with the ship contour A2, and use the positions where the ship contours A1 and A2 are located as the trajectory positions of the same ship at two adjacent moments.
[0044] Further, step S3 includes:
[0045] S31: Calculate the trajectory point coordinates (x n , y n ) according to the coordinates of the contour boundary points on the ship contour, where n is the trajectory point number, and one trajectory position corresponds to one trajectory point;
[0046]
[0047] S32: Utilize the continuously acquired high-altitude remote sensing images of the collision avoidance safety management area to obtain m consecutive trajectory points of the same ship in the two-dimensional coordinate system and the navigation direction angle θ of the ship at different trajectory positions, and calculate the change rate Δθ of the navigation direction angle of the ship at the m trajectory points and the navigation speed v in the two-dimensional coordinate system;
[0048]
[0049] Among them, is the navigation direction angle corresponding to the nth trajectory point, t n is the moment when the high-altitude remote sensing image of the nth trajectory point is acquired, is the navigation direction angle corresponding to the (n - 1)th trajectory point, t n-1 is the moment when the high-altitude remote sensing image of the (n - 1)th trajectory point is acquired.
[0050] Further, step S4 includes:
[0051] S41: Utilize the trajectory point coordinates (x m , y m ) at the mth trajectory point, take the navigation direction angle at the mth trajectory point as the ship's traveling direction, predict the (m + 1)th trajectory point, and calculate the coordinates (x m+1 , y m+1 ) of the predicted (m + 1)th trajectory point;
[0052]
[0053] S42: Calculate the predicted navigation direction angle of the ship when it reaches the trajectory point m + 1 And plot the predicted trajectory point m+1 in the two-dimensional coordinate system, copy the ship contour on the trajectory point m to the predicted trajectory point m+1, and adjust the sailing direction angle of the ship contour on the predicted trajectory point m+1 to
[0054]
[0055] S43: Obtain the moment t m+1 The positions and sailing direction angles of all predicted ship contours, through the moment t m+1 Whether there is encroachment between ship contour areas to evaluate the moment t m+1 Whether ship collisions will occur. If there is encroachment, issue a collision avoidance warning to the ships within the collision avoidance safety management area; otherwise, do not issue a collision avoidance warning.
[0056] The beneficial effects of the present invention are as follows: The present invention uses an image recognition method to identify ship contours from continuous high-altitude remote sensing images, and takes the ship contours as ship models in the two-dimensional coordinate system to predict the movement trajectories and sailing postures of ships. By establishing an accurate ship model in the two-dimensional space, it can effectively simplify the complexity of ship collision prediction in complex canals, and use the prediction of movement trajectories and sailing postures to accurately identify the collision risks between ships, providing scientific and effective decision-making support for ship collision prediction and early warning between ships in complex canals. Brief Description of the Drawings
[0057] Figure 1 Is a method for predicting and evaluating collision avoidance in water traffic based on a ship model.
[0058] Figure 2 Is the ship contour image in the high-altitude remote sensing image after binarization processing.
[0059] Figure 3 Is a schematic diagram of ship trajectory point prediction in the two-dimensional space. Specific Embodiments
[0060] The following describes the specific embodiments of the present invention to facilitate those skilled in the art of the present technology to understand the present invention, but it should be clear that the present invention is not limited to the scope of the specific embodiments. For those of ordinary skill in the art of the present technology, as long as various changes are within the spirit and scope of the present invention defined and determined by the appended claims, these changes are obvious, and all inventions and creations using the concept of the present invention are within the scope of protection.
[0061] As Figure 1 shown, a method for predicting and evaluating collision avoidance in water traffic based on a ship model includes the following steps:
[0062] S1: Determine the collision avoidance safety management area of ship water traffic, obtain the real-time high-altitude remote sensing image of the collision avoidance safety management area, and extract the ship outline in the high-altitude remote sensing image. The specific method for extracting the ship outline in the high-altitude remote sensing image in step S1 is as follows:
[0063] S11: Gray-scale process the high-altitude remote sensing image to obtain a grayscale image, and use the difference between the gray values of the pixels in the grayscale image to screen the contour boundary points and form a contour line, and remove the unclosed contour lines. Step S11 specifically includes:
[0064] S111: Gray-scale process the high-altitude remote sensing image to obtain a grayscale image, obtain the gray value of each pixel in the grayscale image, and calculate the gray difference Δh between two adjacent pixels in the grayscale image i~u ;
[0065] Δh i~u =|h i -h u |;
[0066] where i and u are the numbers of two adjacent pixels respectively, and h i , h u are the gray values of two adjacent pixels respectively;
[0067] S112: Set the gray difference threshold Δh0 between the water surface pixels and the ship edge pixels. If Δh i~u ≥Δh0, it is determined that two adjacent pixels i and u are located on the contour boundary; otherwise, two adjacent pixels i and u are not located on the contour boundary;
[0068] During the process of the ship sailing in the river channel, the high-altitude remote sensing image obtains the high-altitude overhead image at a fixed frequency. The color consistency of the river channel water surface is good, and the gray value difference between the water surface pixels is small. There will be an obvious dividing line between the ship's contour and the water surface. By setting a suitable gray value difference standard, the pixels on both sides of the dividing line between the ship's contour and the water surface can be screened out, and the midpoint between the pixels on both sides of the dividing line can be used as the boundary point on the ship's contour. As Figure 2 shown, the contour of the ship in the high-altitude remote sensing image after binarization processing, where the white area in the figure is the ship and the black area is the water surface.
[0069] S113: Establish a two-dimensional coordinate system on the grayscale image, take the midpoint between pixels i and u as the contour boundary point, and calculate the coordinates (x n , y n ) of the contour boundary point in the two-dimensional coordinate system;
[0070]
[0071] where, (x i , yi ), (x u , y u ) are the coordinates of pixels i and u in the two-dimensional coordinate system respectively, and n is the number of the contour boundary points;
[0072] S114: In the two-dimensional coordinate system, connect the continuous contour boundary points to obtain several contour lines formed by continuous contour boundary points, and remove the unclosed contour lines;
[0073] The constraint conditions for the continuous contour boundary points are:
[0074] The method for judging whether the contour line is closed is as follows: Take any contour boundary point on the contour line as the starting point of traversal, traverse each contour boundary point in turn, and judge whether the end point of traversal is the same contour boundary point. If so, it is determined that the contour line is closed; otherwise, the contour line is unclosed. The end point of traversal is the end point of the contour line during the traversal process or the starting point of traversal that is traversed for the second time.
[0075] At this time, the obtained contour lines include the ship contour boundary line, the bank lines on both sides of the river, and the contour lines of the internal contours of the ship. By judging whether the contour lines in the image are closed, the bank lines and some unclosed contour lines inside the ship can be effectively deleted, reducing the interference in extracting the real ship contour boundary line.
[0076] However, some closed curves inside the ship need to be further deleted.
[0077] S12: Obtain all the closed contour lines in the grayscale image, and use the maximum distance between the contour boundary points on each closed contour line and the minimum distance between the contour boundary points on two closed contour lines to judge whether two closed contour lines are adjacent, and screen out two adjacent closed contour lines. Step S12 specifically includes:
[0078] S121: Obtain all the closed contour lines in the grayscale image, traverse the contour boundary points on each closed contour line, and calculate the maximum value l of the distances between the contour boundary points max ;
[0079]
[0080] where f(.) is the screening function for the two contour boundary points with the farthest distance on the closed contour line, a1 and a2 are the numbers of the two contour boundary points with the closest distance on the closed contour line, and A is the set of contour boundary points on the closed contour line, are the coordinates of the two farthest contour boundary points respectively;
[0081] S122: Traverse the contour boundary points on any two closed contours, and calculate the minimum value l of the distances between the contour boundary points on the two closed contours. min ;
[0082]
[0083] where f′(.) is the screening function for the two contour boundary points with the shortest distance on the two closed contours, a and b are the numbers of the contour boundary points on the two closed contours respectively, A and B are the sets of contour boundary points on the two closed contours, (x a , y a ) and (x b , y b ) are the coordinates of the two contour boundary points with the shortest distance on the two closed contours respectively;
[0084] S123: Compare the magnitudes of the maximum value l max and the minimum value l min . If l max > l min , it is determined that the two closed contours A and B are adjacent; otherwise, it is determined that the two closed contours A and B are not adjacent. The adjacent relationships include cross-overlap, complete overlap, and separation between the closed contours.
[0085] S13: Based on the two adjacent closed contours A and B, determine whether the regions enclosed by the two adjacent closed contours A and B overlap. Delete the closed contour located within one of the closed contours, and retain the outermost closed contour, which is output as the ship contour in the high-altitude remote sensing image.
[0086] Step S13 specifically includes:
[0087] S131: Based on the two adjacent closed contours A and B, taking the contour boundary points on one of the closed contours as the base points, draw several straight lines passing through the base points, and obtain the number of intersection points between the straight lines and the other closed contour;
[0088] If the number of intersection points between each straight line and the other closed contour is greater than or equal to 2, it is determined that one of the closed contours is located within the other closed contour, and the closed contour located within the other closed contour is deleted; otherwise, it is determined that one of the closed contours is not located within the other closed contour, and the two closed contours are retained;
[0089] S132: Repeat step S131 to delete all the closed contours located within the closed contour, and retain the outermost closed contour, which is output as the ship contour in the high-altitude remote sensing image.
[0090] During this process, the closed contour lines form closed regions. During the screening process of adjacent closed regions, there are two adjacent situations; one is that the closed regions coincide and the contour line is inside another contour line. At this time, it can be determined that the outermost contour line is the true contour line of the ship, and the inner contour line is other interference regions on the ship, and the inner contour needs to be deleted to remove the interference; the other is that the closed regions do not coincide and the contour line is outside another contour line, then it is determined that both are the true contour lines of the ship.
[0091] S2: Calculate the navigation direction angle of the ship according to the coordinates of the two contour boundary points with the largest distance on the ship's contour, and based on the ship's contours in the high-altitude remote sensing images collected at two adjacent times, screen the ship's contours of the same ship at two adjacent times according to the similarity between the ship's contours, and obtain the trajectory positions of the same ship at two adjacent times. Step S2 specifically includes:
[0092] S21: According to the two contour boundary points a1 and a2 with the largest distance value on the ship's contour, according to the coordinates of the contour boundary points a1 and a2 Calculate the navigation direction angle θ of the current ship;
[0093]
[0094] Since the length of the ship is much larger than the width in terms of shape and size, and the front end has a pointed shape, the line connecting the two farthest contour boundary points must be the center line of the ship. Based on this, the navigation direction angle of the ship can be determined.
[0095] S22: According to the high-altitude remote sensing images of the collision avoidance safety management area collected at two adjacent times, calculate the similarity coefficient S between the ship's contours in the high-altitude remote sensing images at two adjacent times;
[0096]
[0097] where e is the contour boundary point of the ship's contour A1 on the high-altitude remote sensing image at the previous time, h e is the shape context of the contour boundary point e, measured using the chi-square distance, describing the histogram of the contour distribution around the contour boundary point, c is the contour boundary point of the ship's contour A2 on the high-altitude remote sensing image at the next time, h c is the shape context of the contour boundary point c, d min (h c , h e ) is the minimum difference value of the shape context between the contour boundary point c and the contour boundary point e, and C is the number of contour boundary points of the ship's contour A2;
[0098] S23: Calculate the similarity coefficient S between all ship contours on the high-altitude remote sensing image at the previous moment and the ship contour A2. Match the ship contour A1 corresponding to the minimum value of the similarity coefficient with the ship contour A2, and use the positions where the ship contours A1 and A2 are located as the trajectory positions of the same ship at two adjacent moments.
[0099] S3: Calculate the trajectory point coordinates based on the coordinates of the contour boundary points on the ship contour. Using the continuously acquired high-altitude remote sensing images, obtain the continuous trajectory points of the same ship in the two-dimensional coordinate system, and calculate the change rate of the navigation direction angle and the navigation speed. Step S3 specifically includes:
[0100] S31: Calculate the trajectory point coordinates (x n , y n ) according to the coordinates of the contour boundary points on the ship contour, where n is the trajectory point number, and one trajectory position corresponds to one trajectory point;
[0101]
[0102] S32: Using the continuously acquired high-altitude remote sensing images of the collision avoidance safety management area, obtain m continuous trajectory points of the same ship in the two-dimensional coordinate system, as well as the navigation direction angle θ of the ship at different trajectory positions. Calculate the change rate Δθ of the navigation direction angle of the ship at m trajectory points, and the navigation speed v in the two-dimensional coordinate system;
[0103]
[0104] Among them, is the navigation direction angle corresponding to the nth trajectory point, t n is the moment when the high-altitude remote sensing image of the nth trajectory point is acquired, is the navigation direction angle corresponding to the (n - 1)th trajectory point, t n-1 is the moment when the high-altitude remote sensing image of the (n - 1)th trajectory point is acquired.
[0105] The change rate Δθ includes the angle change rate and the change direction. The time required for the ship to change its direction during navigation is relatively long. Combining the change rate Δθ of the navigation direction angle and the navigation speed v can predict the navigation trajectory in the short term in the future.
[0106] S4: Use the change rate of the navigation direction angle and the navigation speed to predict the trajectory point coordinates of the next trajectory point, and predict the navigation direction angle of the ship at the next trajectory point. Evaluate whether a ship collision will occur based on whether there is an encroachment between the ship contour areas corresponding to the predicted next trajectory point at the corresponding moment, and issue a collision avoidance warning. Step S4 specifically includes:
[0107] S41: Use the trajectory point coordinates (x at the mth trajectory point m, y m ), the navigation direction angle at the m-th trajectory point is used as the ship's traveling direction to predict the (m + 1)-th trajectory point, and calculate the coordinates (x m+1 , y m+1 ) of the predicted (m + 1)-th trajectory point;
[0108]
[0109] S42: Calculate the predicted ship navigation direction angle when the ship reaches the trajectory point m + 1 and draw the predicted trajectory point m + 1 in the two-dimensional coordinate system. Copy the ship's contour at the trajectory point m to the predicted trajectory point m + 1, and adjust the navigation direction angle of the ship's contour at the predicted trajectory point m + 1 to
[0110]
[0111] As Figure 3 shown, the distribution density of the trajectory points during the ship's navigation is magnified. During the actual acquisition of high-altitude remote sensing images, the trajectory points will be denser. Using this method, the ship's navigation trajectory and attitude can be accurately predicted within a short time.
[0112] S43: Obtain the positions and navigation direction angles of all ship contours predicted at time t m+1 , and evaluate whether there will be a ship collision at time t m+1 by whether there is encroachment between the ship contour areas. If there is encroachment, issue a collision avoidance warning to the ships within the collision avoidance safety management area; otherwise, do not issue a collision avoidance warning. The judgment of whether there is encroachment is achieved by whether there is an intersection and overlap between the areas of two adjacent ship contours at time t m+1 . m+1
[0113] The present invention uses an image recognition method to identify ship contours from continuous high-altitude remote sensing images, and takes the ship contours in the two-dimensional coordinate system as ship models to predict the moving trajectories and navigation postures of ships. By establishing an accurate ship model in the two-dimensional space, the complexity of ship collision prediction in complex canals can be effectively simplified, and the collision risks between ships can be accurately identified by predicting the motion trajectories and navigation postures, providing scientific and effective decision-making support for ship collision prediction and early warning in complex canals.
Claims
1. A method for predicting and evaluating collision avoidance in water traffic based on a ship model, characterized in that, It includes the following steps: S1: Determine the collision avoidance safety management area of ship water traffic, obtain the real-time high-altitude remote sensing image of the collision avoidance safety management area, and extract the ship contour in the high-altitude remote sensing image; S2: Calculate the navigation direction angle of the ship according to the coordinates of the two contour boundary points with the largest distance on the ship contour, and based on the ship contours in the high-altitude remote sensing images collected at two adjacent moments, screen the ship contours of the same ship at two adjacent moments according to the similarity between the ship contours, and obtain the trajectory positions of the same ship at two adjacent moments; S3: Calculate the trajectory point coordinates according to the coordinates of the contour boundary points on the ship contour, use the continuously collected high-altitude remote sensing images to obtain the continuous trajectory points of the same ship in the two-dimensional coordinate system, and calculate the change rate of the navigation direction angle and the navigation speed; S4: Use the change rate of the navigation direction angle and the navigation speed to predict the trajectory point coordinates of the next trajectory point, and predict the navigation direction angle of the ship at the next trajectory point. Evaluate whether a ship collision will occur according to whether there is an encroachment between the ship contour areas corresponding to the predicted next trajectory point, and issue a collision avoidance warning.
2. The method for predicting and evaluating collision avoidance of waterborne traffic based on a ship model according to claim 1, wherein The specific method for extracting the ship contour in the high-altitude remote sensing image in step S1 is as follows: S11: Gray-scale process the high-altitude remote sensing image to obtain a gray-scale image, and use the difference between the gray-scale values of the pixels in the gray-scale image to screen the contour boundary points and form a contour line, and remove the unclosed contour lines; S12: Obtain all the closed contour lines in the gray-scale image, and determine whether two closed contour lines are adjacent by using the maximum distance between the contour boundary points on each closed contour line and the minimum distance between the contour boundary points on two closed contour lines, and screen out two adjacent closed contour lines; S13: Based on two adjacent closed contour lines A and B, judge whether the areas enclosed by the two adjacent closed contour lines A and B overlap, delete the closed contour line located inside one of the closed contour lines, and retain the outermost closed contour line, and output it as the ship contour in the high-altitude remote sensing image.
3. The method for predicting and evaluating collision avoidance of waterborne traffic based on a ship model according to claim 2, characterized in that, The step S11 includes: S111: Gray-scale the high-altitude remote sensing image to obtain a grayscale image, acquire the grayscale value of each pixel in the grayscale image, and calculate the grayscale difference Δh between two adjacent pixels in the grayscale image i~u ; Δh i~u = |h i - h u |; where i and u are the numbers of two adjacent pixels, and h i , h u are the gray values of two adjacent pixels respectively; S112: Set the gray - level difference threshold Δh0 between the water - surface pixels and the ship - edge pixels. If Δh i~u ≥Δh0, it is determined that two adjacent pixels i and u are located on the contour boundary; otherwise, the two adjacent pixels i and u are not located on the contour boundary. S113: Establish a two-dimensional coordinate system on the grayscale image, take the midpoint between pixels i and u as the contour boundary point, and calculate the coordinates (x n , y n ) of the contour boundary point in the two-dimensional coordinate system; Among them, (x i , y i ), (x u , y u ) are the coordinates of pixels i and u in the two-dimensional coordinate system respectively, and n is the number of the contour boundary points; S114: In the two-dimensional coordinate system, connect the continuous contour boundary points to obtain a contour line of several continuous contour boundary points, and remove the unclosed contour lines; The constraint conditions for consecutive contour boundary points are as follows: The method for judging whether the contour line is closed is: Take any contour boundary point on the contour line as the starting point of traversal, traverse each contour boundary point in turn, and judge whether the end point of traversal is the same contour boundary point. If so, determine that the contour line is closed, otherwise, the contour line is not closed; The end point of traversal is the end point of the contour line during the traversal process or the starting point of traversal traversed for the second time.
4. The method for predicting and evaluating collision avoidance of waterborne traffic based on a ship model according to claim 3, wherein The step S12 includes: S121: Obtain all the closed contour lines in the grayscale image, traverse the contour boundary points on each closed contour line, and calculate the maximum value l of the distances between the contour boundary points max ; Among them, f(.) is a screening function for the two contour boundary points with the farthest distance on the closed contour line, a1 and a2 are the numbers of the two contour boundary points with the closest distance on the closed contour line, and A is the set of contour boundary points on the closed contour line. They are the coordinates of the two contour boundary points with the farthest distance respectively. S122: Traverse the contour boundary points on any two closed contour lines and calculate the minimum value l of the distances between the contour boundary points on the two closed contour lines min ; Among them, f′(.) is a screening function for the two contour boundary points with the shortest distance on two closed contours. a and b are the contour boundary point numbers on the two closed contours respectively, A and B are the sets of contour boundary points on the two closed contours, (x a , y a ), (x b , y b ) are the coordinates of the two contour boundary points with the shortest distance on the two closed contours respectively; S123: Compare the maximum value l max with the minimum value l min to determine their magnitudes. If l max > l min , it is determined that the two closed contour lines A and B are adjacent; otherwise, it is determined that the two closed contour lines A and B are not adjacent.
5. The method for predicting and evaluating collision avoidance of waterborne traffic based on a ship model according to claim 4, wherein The step S13 includes: S131: Based on two adjacent closed contour lines A and B, take the contour boundary points on one of the closed contour lines as the base points, make several straight lines passing through the base points, and obtain the number of intersection points between the straight lines and the other closed contour line; If the number of intersection points between each straight line and another closed contour line is greater than or equal to 2, it is determined that one of the closed contour lines is inside the other closed contour line, and the closed contour line inside the other closed contour line is deleted; otherwise, it is determined that one of the closed contour lines is not inside the other closed contour line, and both closed contour lines are retained; S132: Repeat step S131 to delete all the closed contour lines inside the closed contour line, and retain the outermost closed contour line, which is output as the ship contour in the high-altitude remote sensing image.
6. The method for predicting and evaluating collision avoidance of water traffic based on a ship model according to claim 5, wherein The said step S2 includes: S21: According to two contour boundary points a1 and a2 with the largest distance values on the ship's contour, based on the coordinates of the contour boundary points a1 and a2 Calculate the navigation direction angle θ of the current ship; S22: According to the high-altitude remote sensing images of the collision avoidance safety management area collected at two adjacent moments, calculate the similarity coefficient S between the ship contours in the high-altitude remote sensing images at two adjacent moments; Among them, e is the contour boundary point of the ship contour A1 on the high-altitude remote sensing image at the previous moment, and h e is the shape context of the contour boundary point e, c is the contour boundary point of the ship contour A2 on the high-altitude remote sensing image at the next moment, and h c is the shape context of the contour boundary point c, and d min (h c , h e ) is the minimum value of the difference in the shape context between the contour boundary point c and the contour boundary point e, and C is the number of contour boundary points of the ship contour A2; S23: Calculate the similarity coefficient S between all the ship contours on the high-altitude remote sensing image at the previous moment and the ship contour A2, match the ship contour A1 corresponding to the minimum value of the similarity coefficient with the ship contour A2, and the positions where the ship contours A1 and A2 are located are used as the trajectory positions of the same ship at two adjacent moments.
7. The method for predicting and evaluating collision avoidance of water traffic based on a ship model according to claim 6, characterized in that The said step S3 includes: S31: Calculate the coordinates of the trajectory points (x n , y n ) according to the coordinates of the contour boundary points on the ship's contour. Here, n is the trajectory point number, and one trajectory position corresponds to one trajectory point; S32: Using the continuously collected high-altitude remote sensing images of the collision avoidance safety management area, obtain m consecutive trajectory points of the same ship in the two-dimensional coordinate system, as well as the navigation direction angle θ of the ship at different trajectory positions, calculate the change rate Δθ of the navigation direction angle of the ship at the m trajectory points, and the navigation speed v in the two-dimensional coordinate system; Among them, is the navigation direction angle corresponding to the nth trajectory point, and t n is the moment when the high-altitude remote sensing image collected at the nth trajectory point is obtained. is the navigation direction angle corresponding to the (n - 1)th trajectory point, and t n-1 is the moment when the high-altitude remote sensing image collected at the (n - 1)th trajectory point is obtained.
8. The method for predicting and evaluating collision avoidance of water traffic based on a ship model according to claim 7, wherein The said step S4 includes: S41: Using the trajectory point coordinates (x m , y m ) at the m-th trajectory point, take the sailing direction angle at the m-th trajectory point as the ship's traveling direction, predict the (m + 1)-th trajectory point, and calculate the coordinates (x m+1 , y m+1 ) of the predicted (m + 1)-th trajectory point; S42: Calculate the predicted ship navigation direction angle when the ship reaches the trajectory point m+1 And plot the predicted trajectory point m+1 in the two-dimensional coordinate system, copy the ship contour at the trajectory point m to the predicted trajectory point m+1, and adjust the navigation direction angle of the ship contour at the predicted trajectory point m+1 to S43: Obtain the moment t m+1 The positions and navigation direction angles of all predicted ship outlines, through the moment t m+1 Evaluate the moment t by whether there is encroachment between ship outline areas m+1 Whether ship collisions will occur. If there is encroachment, issue a collision avoidance warning to the ships within the collision avoidance safety management area; otherwise, do not issue a collision avoidance warning.