Bridge anti-collision active early warning system and method
By segmenting and feature analysis of the ship's waterway monitoring images, using gradient vectors and the same-direction pixel group methods, the accuracy of the analysis of ship position and navigation direction under visual interference is solved, and the effect of improving the safety of ship navigation is achieved.
Patent Information
- Application Number
- CN202510113799.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-13
AI Technical Summary
The prior art is difficult to accurately analyze the ship's position and navigation direction under visual interference, which affects the safety of ship's navigation.
By collecting monitoring images of the ship's waterway, segmenting them into multiple ship suspicious tiles, using gradient vectors to determine edge candidate points and gradient direction values, extracting the same-direction pixel groups for feature analysis, and obtaining the shape feature index, thereby marking the target ship and analyzing its yaw risk.
Under visual interference, the ship's position and navigation direction can be realized, the ship's navigation safety can be improved, the image analysis errors can be reduced, and the accuracy of the ship's navigation status monitoring and management can be enhanced.
Smart Images

Figure CN119992880A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of ship navigation image analysis, and more specifically, to an active bridge collision avoidance warning system and method. Background Art
[0002] In today's navigation field, ship navigation image analysis plays a vital role. Traditional ship monitoring methods have many limitations and are difficult to meet the needs of accurate and timely monitoring. In this dilemma, ship navigation image analysis technology came into being. It uses advanced camera equipment to obtain image information during ship navigation. Through image processing algorithms, it can accurately identify and analyze the position and posture of the ship. For example, the edge detection algorithm is used to outline the outline of the ship and accurately determine its position. It can also track the movement trajectory of the ship and analyze its navigation status, which promotes the intelligent development of the shipping industry.
[0003] The bridge collision avoidance technology based on ship navigation image analysis uses a high-definition camera to obtain images of ship navigation, accurately captures the position of the ship through an image analysis algorithm, and uses target tracking technology to continuously monitor the ship's heading and motion trajectory. When the ship's navigation status is detected to be poor, it is determined that there is a risk of collision between the ship and the bridge, and the warning system is triggered to send an alarm to the ship and bridge management departments, reminding them to take evasive measures, thereby realizing active warning of bridge collision avoidance. However, in the existing technology, ship navigation image analysis is easily interfered by environmental factors. When the sun shines, the water surface will produce reflections, which may confuse part of the outline of the ship or cause light spots in the image, so that the key features of the ship are blocked. For example, the reflective area may be similar to the color of the hull, making it difficult for the image analysis algorithm to distinguish between the reflective area and the hull area, and thus unable to accurately judge the position and outline of the ship. In addition, floating objects, algae, etc. in the water will also interfere with the image vision, increasing the difficulty of identifying key information such as the bow direction and speed, thereby interfering with the accuracy of ship identification and heading tracking. Therefore, how to achieve accurate analysis of the ship's position and navigation direction under visual interference to improve the safety of ship navigation has become a difficult problem faced by the industry. Summary of the invention
[0004] The present application provides a bridge collision avoidance active warning system and method, which can realize accurate analysis of the ship's position and navigation direction under visual interference, so as to improve the safety of ship navigation.
[0005] In a first aspect, the present application provides a bridge collision avoidance active warning method, comprising the following steps:
[0006] Collecting monitoring images of the ship channel, and then dividing the monitoring images into a plurality of suspicious ship blocks;
[0007] A suspicious ship block is selected as a selected suspicious ship block, and a plurality of candidate edge points are determined according to the gradient vector of each pixel point in the selected suspicious ship block, and then the gradient direction value of each candidate edge point is determined;
[0008] Based on the gradient direction value of each edge candidate point, multiple pixel groups with the same gradient direction are extracted from all edge candidate points, and then the feature analysis of the selected suspicious ship block is performed based on all the pixel groups with the same direction to obtain the shape feature index of the selected suspicious ship block, and the shape feature index of the remaining suspicious ship blocks is further determined;
[0009] Marking the target ship from the monitoring image based on the shape feature index of each suspicious ship block, and then analyzing the deviation risk of the target ship in the driving state according to the navigation images of the target ship at different navigation times;
[0010] Based on the deviation risk, an early warning is given to the driving state of the target ship when it is heading towards the bridge.
[0011] In some embodiments, segmenting the monitoring image into a plurality of suspicious ship blocks specifically includes:
[0012] Obtain various ship reference images and calculate the grayscale mean of all ship reference images;
[0013] The monitoring image is segmented based on the grayscale mean to obtain a plurality of suspicious ship blocks.
[0014] In some embodiments, determining a plurality of candidate edge points according to the gradient vector of each pixel point in the selected suspicious ship image block specifically includes:
[0015] Determine the gradient vector of each pixel in the suspected block of the selected ship;
[0016] Multiple edge candidate points are extracted based on the gradient vector of each pixel.
[0017] In some embodiments, extracting multiple pixel groups with the same direction and consistent gradient directions from all edge candidate points based on the gradient direction values of each edge candidate point specifically includes:
[0018] Quantize the gradient direction value of each edge candidate point to obtain the direction code corresponding to each edge candidate point;
[0019] Based on all the directional codes, multiple pixel groups with the same gradient direction are extracted.
[0020] In some embodiments, marking the target ship from the monitoring image based on the shape feature index of each suspicious ship block specifically includes:
[0021] Acquiring the monitoring image;
[0022] A target ship block is extracted from the monitoring image according to the shape feature index of each suspicious ship block, and then the target ship in the target ship block is marked.
[0023] In some embodiments, the warning of the target ship's driving state when it is heading towards the bridge based on the deviation risk specifically includes:
[0024] Obtain the coordinate position and navigation speed of the target ship;
[0025] Determine the deviation distance of the target ship when traveling by combining the coordinate position with the center line equation of the waterway;
[0026] determining a warning level according to the deviation distance, the navigation speed and the deviation risk;
[0027] Based on the warning level, a warning is issued for the driving state of the target ship when it is heading towards the bridge.
[0028] In some embodiments, the channel is monitored by a high-resolution surveillance camera next to the ship channel, and monitoring images of the ship channel are automatically collected.
[0029] In a second aspect, the present application provides a bridge anti-collision active warning system, comprising:
[0030] An acquisition module is used to acquire monitoring images of the ship channel and then segment the monitoring images into a plurality of suspicious ship blocks;
[0031] A processing module, used for selecting a suspicious ship block as a selected suspicious ship block, determining a plurality of edge candidate points according to a gradient vector of each pixel point in the selected suspicious ship block, and further determining a gradient direction value of each edge candidate point;
[0032] The processing module is further used to extract multiple same-direction pixel groups with consistent gradient directions from all edge candidate points based on the gradient direction values of each edge candidate point, and then perform feature analysis on the selected suspicious ship image block according to all the same-direction pixel groups to obtain the shape feature index of the selected suspicious ship image block, and continue to determine the shape feature index of the remaining suspicious ship image blocks;
[0033] The processing module is further used to mark the target ship from the monitoring image based on the shape feature index of each suspicious ship block, and then analyze the deviation risk of the target ship in the driving state according to the navigation images of the target ship at different navigation times;
[0034] The execution module is used to issue an early warning of the driving state of the target ship when it is heading towards the bridge based on the deviation risk.
[0035] In a third aspect, the present application provides a computer device, comprising a memory and a processor, wherein the memory stores codes, and the processor is configured to obtain the codes and execute the above-mentioned bridge collision avoidance active warning method.
[0036] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned bridge collision avoidance active warning method is implemented.
[0037] The technical solution provided by the embodiments disclosed in this application has the following beneficial effects:
[0038] In the bridge collision avoidance active warning system and method provided by the present application, first, a monitoring image of a ship channel is collected, and then the monitoring image is divided into a plurality of suspicious ship blocks; secondly, a suspicious ship block is selected as a selected suspicious ship block, and a plurality of edge candidate points are determined according to the gradient vector of each pixel point in the selected suspicious ship block, and then the gradient direction value of each edge candidate point is determined; further, based on the gradient direction value of each edge candidate point, a plurality of same-direction pixel groups with consistent gradient directions are extracted from all edge candidate points, and then a feature analysis is performed on the selected suspicious ship block according to all the same-direction pixel groups to obtain a shape feature index of the selected suspicious ship block, and the shape feature index of the remaining suspicious ship blocks is further determined; then, based on the shape feature index of each suspicious ship block, a target ship is marked from the monitoring image, and then the deviation risk of the target ship in the driving state is analyzed according to the navigation image of the target ship at different navigation times; finally, based on the deviation risk, a warning is issued for the driving state of the target ship when it approaches the bridge.
[0039] It can be seen that the present application can realize accurate analysis of the ship's position and navigation direction under visual interference to improve the safety of ship navigation; first, the monitoring image is divided into multiple suspicious ship blocks, and the image area that is judged to be likely to contain the ship can be preliminarily extracted for further subsequent analysis, so as to determine the accurate ship area; secondly, the edge candidate points in the suspicious ship blocks are extracted and the gradient direction values of the edge candidate points are determined, which can be conducive to accurately analyzing the external geometric structure characteristics of the ship to increase the safety and reliability of navigation analysis; further, the suspicious ship blocks are feature analyzed according to all the same-direction pixel groups to obtain the shape feature index of the suspicious ship blocks, which is helpful to distinguish between ships and non-ship objects to reduce the image. visual interference, thereby improving the accuracy of image analysis; then, marking the target ship from the monitoring image according to the shape feature index, so as to track the course of the target ship, thereby improving the accuracy and timeliness of controlling the navigation safety of the ship; in addition, analyzing the deviation risk of the target ship in the driving state can reflect the risk degree of the navigation direction of the ship deviating from the established trajectory during navigation, so as to provide a digital basis for the decision-making of ship navigation monitoring and management; finally, based on the deviation risk, an early warning is given to the driving state of the target ship when it is heading towards the bridge, so as to reduce the losses caused by navigation risks; in summary, the technical solution provided in the present application can realize accurate analysis of the ship's position and navigation direction under visual interference, so as to improve the safety of ship navigation. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 is an exemplary flow chart of a bridge anti-collision active warning method according to some embodiments of the present application;
[0041] Figure 2 is an exemplary flow chart of determining a shape feature index of a selected ship suspicious image block according to some embodiments of the present application;
[0042] Figure 3 is an exemplary flow chart of determining the deviation risk of a target ship in a driving state according to some embodiments of the present application;
[0043] Figure 4 is a schematic diagram of the structure of a bridge anti-collision active warning system according to some embodiments of the present application;
[0044] Figure 5 It is a structural schematic diagram of a computer device for implementing a bridge collision avoidance active warning method according to some embodiments of the present application. DETAILED DESCRIPTION
[0045] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0046] refer to Figure 1 , which is an exemplary flow chart of a bridge anti-collision active warning method according to some embodiments of the present application. The bridge anti-collision active warning method 100 mainly includes the following steps:
[0047] In step 101, a monitoring image of a ship channel is collected, and then the monitoring image is segmented into a plurality of suspicious ship blocks.
[0048] In specific implementation, the channel is monitored by a high-resolution surveillance camera next to the ship channel, and monitoring images of the ship channel are automatically collected. The monitoring images are grayscale images. Collecting monitoring images can help analyze the navigation safety of ships in the channel, and then timely identify potential driving and collision risks.
[0049] In some embodiments, the monitoring image may be divided into a plurality of suspicious ship blocks in the following manner, namely:
[0050] Obtain various ship reference images and calculate the grayscale mean of all ship reference images;
[0051] The monitoring image is segmented based on the grayscale mean to obtain a plurality of suspicious ship blocks.
[0052] In the specific implementation, various ship reference images are obtained, and the grayscale mean of all the ship reference images is calculated, that is, various ship reference images are searched and obtained from the Internet, and the grayscale mean of all the ship reference images is calculated through the image processing software Python. In addition, in other embodiments, other image processing software can also be used to calculate the grayscale mean, for example, Photoshop, etc., which is not limited here.
[0053] In a specific implementation, the monitoring image is segmented based on the grayscale mean to obtain a plurality of suspicious ship blocks, that is, the grayscale mean is used as the segmentation threshold, and the monitoring image is segmented by the threshold method to obtain a plurality of suspicious ship blocks. The threshold method is an existing technology for image segmentation, and the specific segmentation process will not be repeated here.
[0054] It should be noted that the suspicious ship blocks in this application represent image areas that are preliminarily judged to contain ships but have not yet been finally confirmed. Because of the influence of water surface reflections, floating objects and reflections, these interference factors may have a grayscale distribution similar to that of ships, resulting in the image area segmented by the threshold not necessarily containing ships. Therefore, it is necessary to conduct further subsequent analysis of the suspicious ship blocks to determine the accurate ship area.
[0055] In step 102, a suspicious ship image block is selected as a selected suspicious ship image block, and a plurality of candidate edge points are determined according to the gradient vector of each pixel point in the selected suspicious ship image block, and then the gradient direction value of each candidate edge point is determined.
[0056] In some embodiments, the following method may be used to determine multiple edge candidate points based on the gradient vector of each pixel point in the selected ship suspicious image block, namely:
[0057] Determine the gradient vector of each pixel in the suspected block of the selected ship;
[0058] Multiple edge candidate points are extracted based on the gradient vector of each pixel.
[0059] In the specific implementation, the gradient vector of each pixel in the selected ship suspicious block is determined by the Scharr operator. Specifically, the horizontal convolution kernel Sch of the Scharr operator is obtained. x And the vertical convolution kernel Sch y , select a pixel point in the suspicious block of the selected ship, and pass Sch x The horizontal gradient of the pixel is obtained by convolving the 8 pixels around the pixel. y The vertical gradient of the pixel is obtained by convolving with the 8-area pixels around the pixel, and the horizontal gradient and the vertical gradient are vector-combined to obtain the gradient vector of the pixel. The gradient vectors of the remaining pixels are further determined to obtain the gradient vector of each pixel in the selected suspicious ship block.
[0060] It should be noted that the Scharr operator in this embodiment represents a gradient calculation method, which is suitable for situations where high edge accuracy is required. x And the vertical convolution kernel Sch y It represents two 3*3 matrices set based on the calculation method. The specific set values are not repeated here.
[0061] In some embodiments, the following method may be used to extract multiple edge candidate points based on the gradient vector of each pixel point, namely:
[0062] Determine the gradient magnitude corresponding to each pixel point based on the gradient vector of each pixel point;
[0063] Preset a gradient amplitude threshold;
[0064] All gradient amplitudes are compared with the gradient amplitude threshold respectively, all gradient amplitudes greater than the gradient amplitude threshold are extracted, and pixel points corresponding to all the extracted gradient amplitudes are used as edge candidate points to obtain multiple edge candidate points.
[0065] In specific implementation, the gradient amplitude corresponding to each pixel point is determined based on the gradient vector of each pixel point, that is: a pixel point is selected, the horizontal gradient square value and the vertical gradient square value in the gradient vector of the pixel point are added, and the square root of the addition result is used as the gradient amplitude corresponding to the pixel point, and the gradient amplitudes of the remaining pixel points are continued to be determined, so as to obtain the gradient amplitude corresponding to each pixel point.
[0066] It should be noted that the gradient amplitude threshold in this embodiment represents a pre-set judgment threshold. The specific value can be set according to the actual application requirements and is not limited here. In addition, the edge candidate point in this application represents the pixel point on the edge line in the suspicious block of the ship. Extracting the edge candidate point is helpful to accurately analyze the appearance shape, size and other characteristics of the ship.
[0067] Specifically, the gradient direction value of each edge candidate point is determined, that is: an edge candidate point is selected, the vertical gradient and the horizontal gradient in the gradient vector of the edge candidate point are divided, the division result is used as a calculation parameter, the calculation parameter is calculated by the inverse tangent function, and the calculation result is used as the gradient direction value of the edge candidate point, and the gradient direction values of the remaining edge candidate points are continued to be determined, so as to obtain the gradient direction values corresponding to each edge candidate point.
[0068] It should be noted that the gradient direction value in the present application represents the edge direction of the edge candidate point. Determining the gradient direction value can help better describe the characteristics of the ship, thereby increasing the safety and reliability of navigation analysis.
[0069] In step 103, multiple groups of pixels in the same direction with the same gradient direction are extracted from all edge candidate points based on the gradient direction value of each edge candidate point, and then feature analysis is performed on the selected suspicious ship block based on all the groups of pixels in the same direction to obtain the shape feature index of the selected suspicious ship block, and then the shape feature index of the remaining suspicious ship blocks is further determined.
[0070] In some embodiments, based on the gradient direction value of each edge candidate point, multiple pixel groups with the same direction and consistent gradient direction are extracted from all edge candidate points in the following manner, namely:
[0071] Quantize the gradient direction value of each edge candidate point to obtain the direction code corresponding to each edge candidate point;
[0072] Based on all the directional codes, multiple pixel groups with the same gradient direction are extracted.
[0073] In specific implementation, the gradient direction value of each edge candidate point is quantized to obtain the direction code corresponding to each edge candidate point, that is, the overall value range of the gradient direction value is evenly divided to obtain multiple gradient direction intervals (naturally sorted in the order of interval values from small to large), an edge candidate point is selected, the gradient direction interval in which its corresponding gradient direction value is located is determined, and the gradient direction value is quantized according to the natural sorting sequence number corresponding to the gradient direction interval, and the quantization result is used as the direction code corresponding to the edge candidate point, and the direction codes corresponding to the remaining edge candidate points are further determined, thereby obtaining the direction code corresponding to each edge candidate point.
[0074] It should be noted that the direction code in this embodiment represents the normalized digital representation of the gradient direction information of the edge candidate point. By determining the direction code, the gradient direction information can be concisely represented, thereby increasing the efficiency and accuracy of ship recognition.
[0075] In some embodiments, the following method can be used to extract multiple pixel groups with the same direction and the same gradient direction based on all the direction codes, namely:
[0076] Obtain the coordinate information of each edge candidate point, and determine the traversal starting point based on all the coordinate information;
[0077] Starting from the traversal starting point, traverse all edge candidate points in a clockwise direction;
[0078] The direction code of each edge candidate point in the traversal process is recorded in sequence, and all edge candidate points corresponding to the direction codes with the same element values appearing continuously are divided into a group of same-direction pixel groups, thereby obtaining multiple same-direction pixel groups with consistent gradient directions.
[0079] In the specific implementation, the coordinate information of each edge candidate point is obtained, and the traversal starting point is determined based on all the coordinate information, that is, the coordinate information of each edge candidate point is obtained through the image processing software Open CV, the coordinate information includes the horizontal coordinate and the vertical coordinate, the coordinate information with the smallest horizontal coordinate and vertical coordinate is extracted, and the edge candidate point corresponding to the coordinate information is used as the encoding starting point.
[0080] It should be noted that in the present application, the same-direction pixel group represents a set consisting of multiple consecutive edge candidate points with consistent direction codes. The pixel points in the set are the same-direction pixels. All the same-direction pixels in the group can be considered to have a consistent gradient direction. By determining the same-direction pixel group, it is helpful to distinguish the ship area more finely.
[0081] In some embodiments, reference Figure 2As shown in FIG. 1 , this figure is an exemplary flow chart of determining the shape feature index of a selected ship suspicious block according to some embodiments of the present application. In this embodiment, feature analysis is performed on the selected ship suspicious block according to all the same-direction pixel groups, and the shape feature index of the selected ship suspicious block can be obtained by the following steps:
[0082] First, in step 1031, for each same-direction pixel group, all the same-direction pixel points in the group are connected to obtain a same-direction edge, and then obtain multiple same-direction edges;
[0083] Then, in step 1032, the same-direction edge lengths of the respective same-direction edges are determined;
[0084] Then, in step 1033, the same-direction edge angle between every two adjacent same-direction edges is determined;
[0085] Finally, in step 1034, the shape characteristic index of the selected ship suspicious image block is determined based on all the same-direction edge lengths and all the same-direction edge angles.
[0086] In the specific implementation, all the same-direction pixel points in the group are connected to obtain the same-direction edges, that is, the coordinate information of each same-direction pixel point in the group is obtained, the coordinate information with the smallest horizontal and vertical coordinates in all the coordinate information is extracted, and the same-direction pixel point corresponding to the coordinate information is used as the connection starting point. Starting from the connection starting point, all the same-direction pixel points are connected according to the adjacency of the coordinate information to obtain the same-direction edges.
[0087] It should be noted that, in this embodiment, the same-direction edge represents a continuous edge portion formed by connecting pixel points with the same gradient direction in the selected ship suspicious block in sequence. By determining the same-direction edge, the characteristics of the ship can be characterized, thereby increasing the accuracy of identifying the ship area.
[0088] In the specific implementation, the same-direction edge length of each same-direction edge is determined, that is: a same-direction edge is selected, the coordinate information of all the same-direction pixel points on the same-direction edge is obtained, the coordinate information of adjacent same-direction pixel points is substituted into the distance formula between two points to obtain the distance length between adjacent same-direction pixel points, and then multiple distance lengths are obtained, and the sum of all distance lengths is used as the same-direction edge length of the same-direction edge, and then the same-direction edge length of each same-direction edge is obtained. In addition, in other embodiments, other methods can also be used to calculate the same-direction edge length of the same-direction edge, which is not limited here.
[0089] In some embodiments, the angle between each two adjacent edges in the same direction may be determined in the following manner, namely:
[0090] Determine the direction vector of each same-direction edge;
[0091] The same-direction edge angle between every two adjacent same-direction edges is determined based on all direction vectors.
[0092] In the specific implementation, the direction vector of each same-direction edge is determined, that is: a same-direction edge is selected, the coordinate information of the starting same-direction pixel point and the coordinate information of the ending same-direction pixel point of the same-direction edge are obtained, the two coordinate information are vector-converted to obtain the direction vector of the same-direction edge, and then the direction vector of each same-direction edge is obtained.
[0093] It should be noted that in this embodiment, the coordinate information is converted into a vector through the numpy library in Python, and the specific conversion process is not repeated here. In addition, in other embodiments, other calculation methods can also be used to convert the coordinate information into a vector, which is not limited here.
[0094] In specific implementation, the angle between every two adjacent same-direction edges is determined based on all direction vectors, that is: a pair of adjacent same-direction edges are selected, and the direction vectors corresponding to the two same-direction edges are substituted into the cosine angle formula to obtain the cosine value of the angle between the adjacent same-direction edges, and then the angle of the adjacent same-direction edges can be obtained, and the angle is used as the same-direction edge angle of the adjacent same-direction edges, and then the same-direction edge angle between every two adjacent same-direction edges is obtained. In addition, in other embodiments, other methods can be used to calculate the same-direction edge angle between adjacent same-direction edges, which are not limited here.
[0095] In specific implementation, the shape feature index of the selected suspicious ship block is determined based on all the same-direction edge lengths and all the same-direction edge angles, that is, the cumulative sum of the lengths of all the same-direction edge lengths and the cumulative sum of the angles of the absolute values of all the same-direction edge angles are calculated, the cumulative sum of the lengths is divided by the cumulative sum of the angles, and the division result is used as the shape feature index of the selected suspicious ship block. In addition, in other embodiments, other methods can also be used to calculate the shape feature index of the selected suspicious ship block, which is not limited here.
[0096] It should be noted that the shape feature index in the present application represents the regularity of the geometric shape of the suspicious ship block area. The higher the shape feature index, the higher the regularity of the geometric shape of the suspicious ship block area; the lower the shape feature index, the lower the regularity of the geometric shape of the suspicious ship block area. By determining the shape feature index of the block, it can be helpful to distinguish between the ship area in the image and the non-ship objects and areas with irregular shape contours. The ship area often has a relatively regular and regular distribution of geometric shapes, while the geometry of the non-ship area (such as water surface reflections, floating objects, etc.) is messy and has no obvious rules. Therefore, determining the shape feature index can help reduce visual interference and thereby improve the accuracy of image recognition.
[0097] It should be noted that the shape feature index of the remaining suspicious ship blocks is further determined by the implementation step of "performing feature analysis on the selected suspicious ship block based on all the same-direction pixel groups to obtain the shape feature index of the selected suspicious ship block", which will not be repeated here.
[0098] In step 104, the target ship is marked from the monitoring image based on the shape feature index of each suspicious ship block, and then the deviation risk of the target ship in the driving state is analyzed according to the navigation images of the target ship at different navigation times.
[0099] In some embodiments, the target ship may be marked from the monitoring image based on the shape feature index of each suspicious ship block in the following manner, namely:
[0100] Acquiring the monitoring image;
[0101] A target ship block is extracted from the monitoring image according to the shape feature index of each suspicious ship block, and then the target ship in the target ship block is marked.
[0102] In specific implementation, the target ship block is extracted from the monitoring image according to the shape feature index of each suspicious ship block, that is: a recognition threshold is preset, the shape feature indexes of all suspicious ship blocks are compared, and the largest shape feature index is extracted. If the shape feature index is greater than the recognition threshold, the suspicious ship block corresponding to the shape feature index is used as the target ship block, otherwise it is not processed.
[0103] It should be noted that suspicious ship blocks do not necessarily contain ships, so a recognition threshold preset by a large amount of historical experience data is needed to judge whether there are ships. In addition, the contour edges and geometric shapes of larger ships are more continuous in the image. For example, the hull contours of large ships are all long and regular lines, and the wide deck also makes the shape more regular, so large ships have a higher shape feature index. Secondly, large ships pose a greater threat to bridges during navigation, and are an object that deserves more specific analysis and attention from the collision warning system.
[0104] It should also be noted that the target ship block in the present application represents a specific image area that contains the target object of the ship, and the ship contained is a large ship. Extracting the target ship block can facilitate subsequent more detailed analysis of the ship, thereby improving the accuracy and timeliness of controlling the navigation safety of the ship.
[0105] In the specific implementation, the target ship in the target ship block is marked, that is, the target ship in the target ship block is marked by a polygon-based marking algorithm. The polygon-based marking algorithm is an existing marking algorithm in image analysis, and the specific implementation process is no longer repeated here. In addition, in other embodiments, other marking algorithms can also be used to mark the target ship, for example, a bounding box-based marking algorithm, a mask-based marking algorithm, etc., which are not limited here.
[0106] In some embodiments, reference Figure 3 As shown in the figure, this figure is an exemplary flow chart of determining the deviation risk of the target ship in the driving state according to some embodiments of the present application. In this embodiment, the deviation risk of the target ship in the driving state is analyzed according to the navigation images of the target ship at different navigation times, which can be implemented by the following steps:
[0107] First, in step 1041, the navigation images of the target ship at different navigation times are obtained;
[0108] Next, in step 1042, a navigation image is selected as a selected navigation image, and then the edge contour of the target ship in the selected navigation image is determined;
[0109] Then, in step 1043, the bow position of the target ship in the selected navigation image is determined based on the curvature change and the length of the edge profile;
[0110] Then, in step 1044, the bow position of the target ship in the remaining navigation images is continuously determined;
[0111] Finally, in step 1045, the deviation risk of the target ship in the driving state is determined according to the local grayscale distribution of each bow position.
[0112] In specific implementation, a high-definition optical camera is used to obtain navigation images of the target ship at different navigation times. Specifically, a high-definition optical camera is installed at key positions of the bridge (such as both sides of the pier, the middle section of the bridge, etc.). When the target ship enters the monitoring area, the movement of the target ship is automatically tracked to obtain the navigation images of the target ship at different navigation times. In addition, in other embodiments, other methods can also be used to obtain navigation images, such as radar monitoring systems, drone systems, etc., which are not limited here.
[0113] In some embodiments, the edge contour of the target ship in the selected navigation image may be determined in the following manner, namely:
[0114] The gradient magnitude and gradient direction value of each pixel in the selected navigation image are calculated by edge detection operator;
[0115] Extract multiple pending edge points based on all gradient magnitudes and all gradient direction values;
[0116] All pending edge points are connected to obtain the edge contour of the target ship in the selected navigation image.
[0117] In the specific implementation, the gradient amplitude and gradient direction value of each pixel point in the selected navigation image are calculated through the edge detection operator, that is, the gradient amplitude and gradient direction value of each pixel point in the selected navigation image are calculated using the Sobel operator. The calculation method of the gradient amplitude and gradient direction value has been explained in the above process and will not be repeated here.
[0118] In the specific implementation, multiple pending edge points are extracted based on all gradient amplitudes and all gradient direction values, that is: a pixel point is selected, two adjacent pixel points are traversed based on the gradient direction value of the pixel point, the gradient amplitude of the pixel point is compared with the gradient amplitudes of the other two adjacent pixel points, the maximum gradient amplitude is extracted, and the pixel point corresponding to the gradient amplitude is used as the pending edge point, thereby obtaining multiple pending edge points.
[0119] It should be noted that, in this embodiment, the undetermined edge points represent suspected edge pixel points that need to be subsequently specifically analyzed during the process of ship identification.
[0120] In specific implementation, all pending edge points are connected to obtain the edge contour of the target ship in the selected navigation image, that is, all pending edge points are connected using the double threshold method, and the connection result is used as the edge contour of the target ship in the selected navigation image. In addition, in other embodiments, other connection algorithms can also be used to connect the pending edge points, which are not limited here.
[0121] In some embodiments, the bow position of the target ship in the selected navigation image may be determined based on the curvature change and length of the edge contour in the following manner, namely:
[0122] Determining the curvature of each pixel on the edge contour;
[0123] The bow of the edge contour is positioned in combination with all the curvatures to determine the bow position of the target ship in the selected navigation image.
[0124] In specific implementation, the curvature of each pixel on the edge contour is determined using a discrete point curvature calculation formula. The specific calculation process is not repeated here. In addition, in other embodiments, other calculation methods can also be used to determine the curvature of each pixel.
[0125] In specific implementation, the bow of the edge contour is positioned in combination with all curvatures to determine the bow position of the target ship in the selected navigation image, that is, a length threshold and a curvature change threshold are preset respectively, and traversal recording is performed starting from one end of the edge contour. When the change in curvature of several consecutive pixel points exceeds the curvature change threshold, and the length of this sub-edge contour that has completed the traversal record exceeds the length threshold, this sub-edge contour is used as the bow position of the target ship.
[0126] It should be noted that the length threshold and the curvature change threshold in this embodiment are set based on historical monitoring data combined with actual application requirements, and their numerical values can be taken according to actual scenarios and are not limited here.
[0127] It should also be noted that the bow position in this embodiment represents the frontmost position of the target ship. During navigation, the bow position points to the current heading of the ship, that is, the direction in which the target ship is moving. One navigation moment corresponds to one bow position. In bridge collision avoidance and safe navigation, the relative position and potential collision risk of the target ship can be evaluated by determining the bow position, thereby increasing the accuracy and reliability of collision avoidance warnings.
[0128] In some embodiments, the following method may be used to determine the deviation risk of the target ship in the driving state according to the local grayscale distribution of each bow position, namely:
[0129] Determine the distribution characteristics corresponding to the local grayscale distribution of each bow position;
[0130] Determine the difference index of the navigation status between every two adjacent navigation times based on all the distribution characteristics;
[0131] The deviation risk of the target ship in the driving state is determined based on all the difference indices.
[0132] In the specific implementation, the distribution characteristics corresponding to the local grayscale distribution of each bow position are determined, that is: a bow position is selected as the selected bow position, all grayscale values within 30*30 pixels around the selected bow position are used as the local grayscale distribution of the selected bow position, the frequency of occurrence of each grayscale value in the local grayscale distribution is counted, and a grayscale histogram is calculated based on all the frequencies, and the grayscale histogram is used as the distribution characteristic corresponding to the local grayscale distribution of the selected bow position, thereby obtaining multiple distribution characteristics.
[0133] It should be noted that the distribution feature in this embodiment represents the statistic of the grayscale value distribution of pixels in the area around the bow position. One distribution feature corresponds to one bow position. By determining the distribution feature, it is helpful to discover the changes in the grayscale distribution, thereby increasing the accuracy of risk judgment on the navigation status.
[0134] In specific implementation, the difference index of the navigation status between every two adjacent navigation times is determined based on all the distribution characteristics, that is, the distribution characteristics under two adjacent navigation times are selected, and the Bhattacharyya distance between the two distribution characteristics is calculated, and the calculation result is used as the difference index of the navigation status between the two adjacent navigation times, and then multiple difference indices are obtained. The specific calculation process will not be repeated here. In addition, in other embodiments, other methods can also be used to determine the difference index of the navigation status, for example, the chi-square test method, etc., which is not limited here.
[0135] It should be noted that, in this embodiment, the difference index represents the difference in grayscale distribution around the bow position at two sailing times. These grayscale differences may be due to the appearance of new objects or the color difference of the water surface caused by drastic climate changes. The larger the difference index, the greater the difference in grayscale distribution around the bow position at the two sailing times, and the higher the possibility of the target ship deviation. The smaller the difference index, the smaller the difference in grayscale distribution around the bow position at the two sailing times, and the smaller the possibility of the target ship deviation. By determining the difference index, the navigation status of the target ship in continuous time can be reflected, thereby increasing the accuracy of risk identification.
[0136] In specific implementation, the yaw risk of the target ship in the driving state is determined based on all the difference indices, that is, a difference threshold is set, all difference indices greater than the difference threshold are extracted and their mean is calculated, and the mean calculation result is used as the yaw risk of the target ship. In addition, in other embodiments, other calculation methods can also be used to determine the yaw risk, which is not limited here.
[0137] It should be noted that the deviation risk in the present application indicates the risk degree of the target ship's navigation direction deviating from the established trajectory during navigation. By determining the deviation risk, a numerical basis can be provided for decision-making in ship navigation monitoring and management, thereby increasing the reliability of ship navigation risk control.
[0138] In step 105, based on the deviation risk, an early warning is issued for the driving state of the target ship when it is heading towards the bridge.
[0139] In some embodiments, the following methods may be used to warn the target ship of its driving state when it is heading towards the bridge based on the deviation risk, namely:
[0140] Obtain the coordinate position and navigation speed of the target ship;
[0141] Determine the deviation distance of the target ship when traveling by combining the coordinate position with the center line equation of the waterway;
[0142] determining a warning level according to the deviation distance, the navigation speed and the deviation risk;
[0143] Based on the warning level, a warning is issued for the driving state of the target ship when it is heading towards the bridge.
[0144] In specific implementation, the coordinate position and navigation speed of the target ship are obtained through the Automatic Identification System (AIS). The specific acquisition process is not repeated here. The Automatic Identification System is a navigation aid system used for maritime safety and communication between ships and bridges.
[0145] In specific implementation, the deviation distance of the target ship when it is traveling is determined by combining the coordinate position with the centerline equation of the channel, that is: first, the centerline position and direction of the channel are determined using the electronic nautical chart system, and then the centerline equation of the channel is obtained, and then the coordinate position is substituted into the distance formula from the point to the straight line to obtain the deviation distance of the target ship when it is traveling.
[0146] In specific implementation, the warning level is determined according to the deviation distance, the navigation speed and the deviation risk, that is: first, the deviation distance, the navigation speed and the deviation risk are weighted and summed to obtain a navigation warning value. The specific weight distribution can be set according to the actual application situation. For example, the weights of the deviation distance, the navigation speed and the deviation risk can be set to 0.3, 0.3, and 0.4 respectively. Then, a first warning threshold and a second warning threshold are set (the first warning threshold is less than the second warning threshold). When the navigation warning value is less than the first warning threshold, the corresponding warning level is a low risk level. When the navigation warning value is between the first warning threshold and the second warning threshold, the corresponding warning level is a medium risk level. When the navigation warning value is greater than the second warning threshold, the corresponding risk level is a high risk level.
[0147] It should be noted that the navigation warning value in this embodiment represents a key indicator for measuring the navigation safety status of a ship. It is a status threshold obtained based on a series of parameters. By determining the navigation warning value, the warning status of the ship's navigation can be controlled, thereby increasing the safety of navigation. It should also be noted that the first warning threshold and the second warning threshold in this embodiment are adjusted and set based on a large amount of actual navigation data and simulation experiments.
[0148] In specific implementation, the driving status of the target ship when it approaches the bridge is warned based on the warning level, that is: when the warning level reaches the corresponding level, a warning message pops up on the target ship's bridge display system. Specifically, a yellow warning sign and prompt message are displayed at a low risk level; an orange warning sign and prompt message are displayed at a medium risk level; a red warning sign and emergency prompt message are displayed at a high risk level. At the same time, the corresponding warning information can also be displayed in the shore-based monitoring system, which is convenient for supervisors to detect risks in time and take emergency measures, thereby minimizing the losses caused by navigation risks.
[0149] In addition, in another aspect of the present application, in some embodiments, the present application provides a bridge anti-collision active warning system, referring to Figure 4 , which is a schematic diagram of the structure of a bridge anti-collision active warning system according to some embodiments of the present application. The bridge anti-collision active warning system 200 includes: a collection module 201, a processing module 202 and an execution module 203, which are described as follows:
[0150] The acquisition module 201 in the present application is mainly used to acquire monitoring images of the ship channel, and then divide the monitoring images into multiple suspicious ship blocks;
[0151] Processing module 202, in the present application, the processing module 202 is mainly used to select a suspicious ship block as a selected suspicious ship block, determine multiple edge candidate points according to the gradient vector of each pixel point in the selected suspicious ship block, and then determine the gradient direction value of each edge candidate point;
[0152] The processing module 202 is further used to extract multiple same-direction pixel groups with consistent gradient directions from all edge candidate points based on the gradient direction values of each edge candidate point, and then perform feature analysis on the selected suspicious ship image block according to all the same-direction pixel groups to obtain the shape feature index of the selected suspicious ship image block, and continue to determine the shape feature indexes of the remaining suspicious ship image blocks;
[0153] In addition, the processing module 202 is further used to mark the target ship from the monitoring image based on the shape feature index of each suspicious ship block, and then analyze the deviation risk of the target ship in the driving state according to the navigation image of the target ship at different navigation times;
[0154] The execution module 203 in the present application is mainly used to warn the target ship of its driving state when it is heading towards the bridge based on the deviation risk.
[0155] In addition, the present application also provides a computer device, which includes a memory and a processor, wherein the memory stores codes, and the processor is configured to obtain the codes and execute the above-mentioned bridge collision avoidance active warning method.
[0156] In some embodiments, reference Figure 5 , which is a schematic diagram of the structure of a computer device for implementing a bridge anti-collision active warning method according to some embodiments of the present application. The bridge anti-collision active warning method in the above embodiment can be Figure 5 The computer device 300 shown in the figure is implemented, and the computer device 300 includes at least one processor 301, a communication bus 302, a memory 303 and at least one communication interface 304.
[0157] The processor 301 may be a general-purpose central processing unit (CPU), or an application-specific integrated circuit (ASIC) or one or more processors for controlling the execution of the bridge collision avoidance active warning method in the present application.
[0158] The communication bus 302 may be used to transmit information between the above-mentioned components.
[0159] The memory 303 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, an optical disc storage (including a compressed optical disc, a laser disc, an optical disc, a digital versatile disc, a Blu-ray disc, etc.), a magnetic disk or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 303 may exist independently and be connected to the processor 301 via the communication bus 302. The memory 303 may also be integrated with the processor 301.
[0160] The memory 303 is used to store the program code for executing the solution of the present application, and the execution is controlled by the processor 301. The processor 301 is used to execute the program code stored in the memory 303. The program code may include one or more software modules. The determination of the bridge anti-collision active warning method in the above embodiment can be implemented by the processor 301 and one or more software modules in the program code in the memory 303.
[0161] The communication interface 304 uses any transceiver or other device for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc.
[0162] In a specific implementation, as an embodiment, a computer device may include multiple processors, each of which may be a single-CPU processor or a multi-CPU processor. The processor here may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0163] The above-mentioned computer device can be a general-purpose computer device or a special-purpose computer device. In a specific implementation, the computer device can be a desktop computer, a portable computer, a network server, a personal digital assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, a communication device or an embedded device. The embodiment of the present application does not limit the type of computer device.
[0164] In addition, the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned bridge collision avoidance active warning method is implemented.
[0165] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0166] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A bridge anti-collision active warning method, characterized in that: The steps include: Collecting monitoring images of the ship channel, and then dividing the monitoring images into a plurality of suspicious ship blocks; A suspicious ship block is selected as a selected suspicious ship block, and a plurality of candidate edge points are determined according to the gradient vector of each pixel point in the selected suspicious ship block, and then the gradient direction value of each candidate edge point is determined; Based on the gradient direction value of each edge candidate point, multiple pixel groups with the same gradient direction are extracted from all edge candidate points, and then the feature analysis of the selected suspicious ship block is performed based on all the pixel groups with the same direction to obtain the shape feature index of the selected suspicious ship block, and the shape feature index of the remaining suspicious ship blocks is further determined; Marking the target ship from the monitoring image based on the shape feature index of each suspicious ship block, and then analyzing the deviation risk of the target ship in the driving state according to the navigation images of the target ship at different navigation times; Based on the deviation risk, an early warning is given to the driving state of the target ship when it is heading towards the bridge.
2. The method according to claim 1, characterized in that Segmenting the monitoring image into a plurality of suspicious ship blocks specifically includes: Obtain various ship reference images and calculate the grayscale mean of all ship reference images; The monitoring image is segmented based on the grayscale mean to obtain a plurality of suspicious ship blocks.
3. The method according to claim 1, characterized in that Determining multiple edge candidate points based on the gradient vector of each pixel point in the selected ship suspicious block specifically includes: Determine the gradient vector of each pixel in the suspected block of the selected ship; Multiple edge candidate points are extracted based on the gradient vector of each pixel.
4. The method according to claim 1, characterized in that Extracting multiple pixel groups with the same direction and consistent gradient directions from all edge candidate points based on the gradient direction values of each edge candidate point specifically includes: Quantize the gradient direction value of each edge candidate point to obtain the direction code corresponding to each edge candidate point; Based on all the directional codes, multiple pixel groups with the same gradient direction are extracted.
5. The method according to claim 1, characterized in that Marking the target ship from the monitoring image based on the shape feature index of each suspicious ship block specifically includes: Acquiring the monitoring image; A target ship block is extracted from the monitoring image according to the shape feature index of each suspicious ship block, and then the target ship in the target ship block is marked.
6. The method according to claim 1, characterized in that The warning of the target ship's driving state when it is heading towards the bridge based on the deviation risk specifically includes: Obtain the coordinate position and navigation speed of the target ship; Determine the deviation distance of the target ship when traveling by combining the coordinate position with the center line equation of the waterway; determining a warning level according to the deviation distance, the navigation speed and the deviation risk; Based on the warning level, a warning is issued for the driving state of the target ship when it is heading towards the bridge.
7. The method according to claim 1, characterized in that The waterway is monitored by high-resolution surveillance cameras beside the ship channel, and monitoring images of the ship channel are automatically collected.
8. A bridge anti-collision active warning system, characterized in that: include: An acquisition module is used to acquire monitoring images of the ship channel and then segment the monitoring images into a plurality of suspicious ship blocks; A processing module, used for selecting a suspicious ship block as a selected suspicious ship block, determining a plurality of edge candidate points according to a gradient vector of each pixel point in the selected suspicious ship block, and further determining a gradient direction value of each edge candidate point; The processing module is further used to extract multiple same-direction pixel groups with consistent gradient directions from all edge candidate points based on the gradient direction values of each edge candidate point, and then perform feature analysis on the selected suspicious ship image block according to all the same-direction pixel groups to obtain the shape feature index of the selected suspicious ship image block, and continue to determine the shape feature index of the remaining suspicious ship image blocks; The processing module is further used to mark the target ship from the monitoring image based on the shape feature index of each suspicious ship block, and then analyze the deviation risk of the target ship in the driving state according to the navigation images of the target ship at different navigation times; The execution module is used to issue an early warning of the driving state of the target ship when it is heading towards the bridge based on the deviation risk.
9. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores codes, and the processor is configured to obtain the codes and execute the bridge collision avoidance active warning method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the bridge collision avoidance active warning method as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method and device for analyzing the navigation situation of ship in bridge area based on image recognition
CN109063669A
Bridge active anti-collision early warning method, device and equipment and storage medium
CN111951609A
Industrial robot health monitoring method and system
CN115496931A
False alarm rejection for boat detection candidates
US20150243032A1