A ship yaw auxiliary navigation method and device
Through the multi-source information fusion of the ship's automatic identification system and radar system and OpenCV machine vision technology, visual navigation environment information is generated, which solves the problem of single information source and poor reliability of the ship route warning system in the existing technology, and achieves more accurate And intuitive yaw warning improves navigation safety.
Patent Information
- Application Number
- CN202211436929.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-16
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-11-16
AI Technical Summary
Existing ship route warning systems rely on a single source of information, such as navigation systems or lidar, resulting in large errors, poor reliability, and insufficient intuitiveness, making it difficult to achieve effective yaw warning.
Collect navigation environment information through the ship's automatic identification system and radar system, use multi-source information fusion technology to generate virtual routes, and combine OpenCV machine vision to generate visual virtual routes and actual course mark images, judge route deviation based on the decision-making model, and issue yaw warnings information.
It improves the visualization of navigation environment information and the accuracy of early warning, reduces navigation errors, enhances the standardization and safety of ship routes, and ensures the safety of crew members' lives and property.
Smart Images

Figure CN115723919B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of ship navigation technology, and in particular to a ship yaw auxiliary navigation method and device. Background Art
[0002] At present, lane departure systems have been widely used in the automotive industry. The practicality of the system has been widely recognized by people and has reduced the occurrence of accidents. However, the corresponding route departure system on the ship side has not been widely used. The existing ship-side route warning solutions only rely on navigation systems or laser radar positioning as information sources, which have large errors, poor reliability and poor intuitiveness, poor practicality, and it is difficult to achieve a reliable warning effect. Summary of the invention
[0003] In order to solve the above problems, an embodiment of the present application provides a method and device for assisting navigation of a ship's deviation.
[0004] In a first aspect, the present application provides a method for assisting navigation of a ship's deviation, comprising the following steps:
[0005] S1: collecting navigation environment information from the ship route information through the ship automatic identification system and the radar system, and calculating the navigation environment information through the multi-source information fusion system to obtain a virtual route, wherein the navigation environment information includes the ship identification information and the radar information;
[0006] S2: Obtaining navigation status information from the control system and predicting the actual heading based on the navigation status information;
[0007] S3: Generate a logo image including a visible virtual route and an actual heading logo through OpenCV machine vision based on the virtual route and the actual heading.
[0008] Preferably, after step S3, the following steps are further included:
[0009] S4: Constructing a route deviation decision model based on the identification image;
[0010] S5: Obtain an offset value between the actual heading mark and the visible virtual route based on the decision model. If the offset value is greater than a warning threshold, issue a deviation warning message.
[0011] Preferably, step S4 includes:
[0012] S41: performing image grayscale processing on the logo image to obtain a grayscale image;
[0013] S42: performing image edge detection on the grayscale image to obtain an edge image, wherein the edge image includes a route straight line for representing a visible virtual route and a heading straight line for representing an actual heading mark;
[0014] S43: performing Hough transform on the route straight line and the heading straight line in the edge image to extract a straight line endpoint array; performing least squares straight line detection fitting on the straight line endpoint array to obtain a route deviation detection image, wherein the route deviation detection image includes a transformed actual heading mark and a transformed visible virtual route;
[0015] S44: Constructing a route deviation decision model based on the route deviation detection image.
[0016] Preferably, step S1 specifically includes:
[0017] S11: Convert the route identification information and the radar information into the same coordinate system to form route identification target coordinates and radar target coordinates, and calibrate the time of the route identification target coordinates and the time of the radar target coordinates to the same time;
[0018] S12: calculating the track correlation of the route identification target coordinates and the radar target coordinates at the preset time by using the Euclidean distance formula to obtain the ship distance correlation;
[0019] S13: respectively obtaining the ship distance correlations at n moments, and merging the points of the ship distance correlations at n moments to form a similarity matrix;
[0020] S14: Select the ship with the largest distance correlation value from the similarity matrix as the virtual route.
[0021] Preferably, step S5 specifically includes:
[0022] S51: obtaining position information of the actual heading centerline in the decision model;
[0023] S52: Obtain the position information of the left and right virtual routes in the decision model respectively, and obtain the distance between the position information of the left and right virtual route lines and the position information of the actual heading center line respectively. and ;
[0024] S53: Set the course deviation threshold ,judge and threshold Size relationship, if It means the ship is sailing normally. or It means that the ship has deviated from the route and a deviation warning message is issued when the ship deviates.
[0025] Preferably, step S3 specifically includes: respectively obtaining coordinate information of the virtual route and the actual heading; and drawing straight lines representing the visible virtual route and the actual heading mark with different lines through OpenCV machine vision according to the coordinate information to form a mark image.
[0026] In a second aspect, an embodiment of the present application provides a navigation auxiliary device for ship yaw, comprising:
[0027] A route acquisition module is used to collect navigation environment information through the ship automatic identification system and the radar system, and calculate the navigation environment information through information fusion technology to obtain a virtual route, wherein the navigation environment information includes ship identification information and radar information;
[0028] A heading acquisition module is used to obtain navigation status information in the control system and predict the actual heading based on the navigation status information;
[0029] The visualization acquisition module is used to generate a logo image including a visible virtual route and an actual heading logo based on the virtual route and the actual heading through OpenCV machine vision.
[0030] Preferably, a model building module is used to build a route deviation decision model based on the identification image;
[0031] The early warning module is used to obtain the offset value between the actual heading mark and the visible virtual route based on the decision model. If the offset value is greater than the early warning threshold, a deviation early warning message is issued.
[0032] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method provided in the first aspect or any possible implementation of the first aspect are implemented.
[0033] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method provided in the first aspect or any possible implementation of the first aspect.
[0034] The beneficial effects of the present invention are as follows: 1) firstly, the navigation environment information is collected through the ship automatic identification system and the radar system, and the navigation environment information is calculated through the information fusion technology to obtain the virtual route, then the navigation status information in the control system is obtained, and the actual heading is predicted according to the navigation status information, and finally, based on the virtual route and the actual heading, the OpenCV machine vision is used to generate a logo image including a visible virtual route and an actual heading logo, so that the virtual route and the actual heading logo are visualized, which is convenient for giving the crew members visualized heading information, allowing the crew members to observe the ship heading and route information more intuitively, standardizing the ship route navigation, with small errors and good practicality;
[0035] 2) Based on the decision model, the offset value between the actual heading mark and the visible virtual route is obtained. If the offset value is greater than the warning threshold, a deviation warning message is issued, which can serve to remind the crew, regulate the ship's route navigation and deviation warning, thereby protecting the safety of the crew's life and property. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0037] Figure 1 A schematic diagram of a flow chart of a method for assisting ship deviation navigation provided in an embodiment of the present application;
[0038] Figure 2 A schematic diagram of the structure of a ship yaw auxiliary navigation device provided in an embodiment of the present application;
[0039] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0040] Figure 4 It is a schematic diagram of a process flow of a deviation warning in a method for assisting navigation of a ship deviation provided in an embodiment of the present application;
[0041] Figure 5 It is a schematic diagram of a process of multi-source information fusion between a ship identification system and a radar system in a method for assisting navigation of a ship deviation provided in an embodiment of the present application;
[0042] Figure 6 It is a schematic diagram of a flow chart of route visualization in a method for assisting navigation of a ship's deviation provided in an embodiment of the present application;
[0043] Figure 7It is a schematic diagram of a process of acquiring a route deviation detection image in a method for assisting navigation of a ship's deviation provided in an embodiment of the present application;
[0044] Figure 8 It is a schematic diagram of the working process of a decision model in a method for assisting navigation of a ship's deviation provided in an embodiment of the present application;
[0045] Fig. 9 It is a schematic diagram of a route and heading based on OpenCV in a method for assisting navigation of a ship deviation provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0047] In the following introduction, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. The following introduction provides multiple embodiments of the present application, and different embodiments can be replaced or combined, so the present application can also be considered to include all possible combinations of the same and / or different embodiments recorded. Therefore, if one embodiment includes features A, B, and C, and another embodiment includes features B and D, then the present application should also be considered to include embodiments containing one or more of all other possible combinations of A, B, C, and D, although the embodiment may not be clearly recorded in the following text.
[0048] The following description provides examples and does not limit the scope, applicability or examples set forth in the claims. Changes may be made to the functions and arrangements of the elements described without departing from the scope of the present application. Various processes or components may be appropriately omitted, substituted or added to each example. For example, the described method may be performed in an order different from the order described, and various steps may be added, omitted or combined. In addition, features described in some examples may be combined in other examples.
[0049] See also Figure 1 , Figure 4 , Fig. 9 . Figure 1 is a flow chart of a method for assisting navigation of a ship's deviation provided in an embodiment of the present application. Figure 4 This is a schematic diagram of a process flow of a deviation warning in a method for assisting navigation of a ship deviation provided in an embodiment of the present application. Fig. 9 This is a schematic diagram of the route and heading based on OpenCV in a method for assisting navigation of a ship's deviation provided in an embodiment of the present application. In an embodiment of the present application, the method comprises the following steps:
[0050] S1: collecting navigation environment information from the ship route information through the ship automatic identification system and the radar system, and calculating the navigation environment information through the multi-source information fusion system to obtain a virtual route, wherein the navigation environment information includes the ship identification information and the radar information;
[0051] S2: Obtaining navigation status information from the control system and predicting the actual heading based on the navigation status information;
[0052] S3: Generate a logo image including a visible virtual route and an actual heading logo through OpenCV machine vision based on the virtual route and the actual heading.
[0053] In an embodiment of the present application, firstly, preset ship route information is obtained, and the ship route information is input into an AIS system and a radar system respectively, ship identification information is collected from the ship route information through the AIS system, and radar information is collected from the ship route information through the radar system, that is, navigation-related environmental information is collected from the ship route information through the AIS system and the radar system, and the navigation-related environmental information is input into a multi-source information fusion system, and the multi-source information fusion system calculates the corresponding position of the ship through multi-source information fusion technology, thereby generating a virtual route; a control system for controlling the operation of the ship is included in the ship, and navigation status information in the control system is obtained, that is, relevant ship navigation status information such as the ship's speed and the ship's driving angle in the control system is obtained, the actual navigation parameters of the ship are calculated, and the actual heading is predicted through a machine learning convolutional neural network according to the navigation status information; finally, an identification image is generated based on the virtual route and the actual heading through OpenCV machine vision, and the identification image includes a visible virtual route and an actual heading identification, so that the identification is visualized, allowing the crew to observe the ship's heading and route information more intuitively.
[0054] Specifically, the English full name of OpenCV is Open Source Computer Vision Library, which is an open source cross-platform computer vision and machine learning software library. It consists of a series of C functions and a small number of C++ classes. It also provides interfaces for languages such as Python, Ruby, and MATLAB, and implements many general algorithms in image processing and computer vision. It has maintained more than 2,500 image processing functions so far and is widely used in the field of digital images. The Chinese name of AIS is Automatic Identification System for Ships, and the English full name is Automatic Identification System for Ships. It refers to a new navigation aid system used for maritime safety and communication between ships and shores, and between ships and ships. It is often composed of a VHF communicator, a GPS locator, and a communication controller connected to a shipboard display and sensor, etc., which can automatically exchange important information such as ship position, speed, heading, ship name, call sign, etc. While the AIS installed on the ship sends this information outward, it also receives information from other ships within the VHF coverage range, thereby realizing automatic response. In addition, as an open data transmission system, it can be connected to terminal equipment such as radar, ARPA, ECDIS, VTS and the INTERNET to form a maritime traffic control and surveillance network. It is an effective means of obtaining traffic information without radar detection and can effectively reduce ship collision accidents.
[0055] In one possible implementation, step S3 further includes:
[0056] S4: Constructing a route deviation decision model based on the identification image;
[0057] S5: Obtain an offset value between the actual heading mark and the visible virtual route based on the decision model. If the offset value is greater than a warning threshold, issue a deviation warning message.
[0058] In an embodiment of the present application, a decision model based on a CCP model can be constructed based on the identification image, and then the offset value between the actual heading mark and the visible virtual route is obtained based on the decision model, that is, the offset value of the visible virtual route and the actual heading mark is used as the judgment basis of the decision model, and the decision model sets a reasonable deviation threshold, that is, sets an early warning threshold. If the offset value is greater than the early warning threshold, a deviation warning message is issued, that is, it is determined whether the navigation conditions of the ship meet the deviation warning; when the deviation distance reaches the early warning threshold, a route deviation warning is given to the crew, and if the crew is still in a deviation state, a warning will continue to be given. When the crew intervenes in the operation, the warning will be released. The system can play a role in standardizing routes and deviation warnings, thereby protecting the lives and property of the crew. The offset value can be an offset and an offset angle, that is, the offset between the visible virtual route and the actual heading mark, and the offset angle between the visible virtual route and the actual heading mark.
[0059] Specifically, there is currently no deviation warning system on the ship side that generates an intuitive and visual virtual route and uses it as a basis for judging the deviation of the ship. This application fills the current gap in this field. The existing route deviation warning methods only rely unilaterally on navigation systems or laser radar positioning as information sources, which are unreliable and less intuitive. The traditional on-board lane departure system has complex lane conditions, and the lane route deviation system has high requirements for the camera perception equipment and algorithm for lane image noise reduction. When encountering complex road conditions or damaged lane lines, the warning system is prone to failure and misjudgment. The existing route deviation warning methods unilaterally rely on navigation systems or laser radar positioning as information sources, and use data analysis and processing as the basis for judging deviation. This application proposes a ship deviation auxiliary system and safety warning method. This application improves the shortcomings of traditional ship route warning systems. This application is based on the AIS system, radar system, and ship motion status information as multi-source information input, and obtains the ship's position, ship route information, and ship heading information after calculation and processing using multi-source information fusion technology. In order to solve the problem of poor intuitiveness of traditional ship route warnings, this application uses OpenCV machine vision processing to visualize the signs, allowing the crew to more intuitively observe the ship's actual heading signs and visual virtual routes, and at the same time, conduct route deviation warnings on this basis, thereby playing a role in reminding the crew, regulating the navigation of the ship's route, and protecting the safety of the crew's life and property.
[0060] Specifically, the full English name of the CCP model is Car , s Current Position. CCP determines whether the vehicle deviates from the lane based on the actual position relationship between the vehicle and the boundary line. Since it does not need to predict the future driving state of the vehicle, the model has a low false alarm rate and missed alarm rate. Since its characteristics are more practical on the ship side, it is used in the route deviation warning deviation model in this patent.
[0061] In one possible implementation, step S4 includes:
[0062] S41: performing image grayscale processing on the logo image to obtain a grayscale image;
[0063] S42: performing image edge detection on the grayscale image to obtain an edge image, wherein the edge image includes a route straight line for representing a visible virtual route and a heading straight line for representing an actual heading mark;
[0064] S43: performing Hough transform on the route straight line and the heading straight line in the edge image to extract a straight line endpoint array; performing least squares straight line detection fitting on the straight line endpoint array to obtain a route deviation detection image, wherein the route deviation detection image includes a transformed actual heading mark and a transformed visible virtual route;
[0065] S44: Constructing a route deviation decision model based on the route deviation detection image.
[0066] In the examples of this application, see Figure 7 , Figure 7 The figure is a flow chart of the acquisition of the route deviation detection image in the auxiliary navigation method for ship deviation provided in the embodiment of the present application. The picture is collected. Since the image generated by the collected picture is an image of three color channels of R, G, and B, the color image data volume is too large and is not suitable for complex image processing. In step S41, based on The color image is converted to grayscale image by represents a grayscale image, , , It represents the grayscale values of the three channels of red, green and blue of the color image, that is, grayscale processing of the logo image is performed to obtain a grayscale image;
[0067] Specifically, since the grayscale gradient of the channel line image generated by machine vision is relatively obvious, the complex filtering operation of the traditional visual camera is not required. Only simple image edge detection is required, and filtering is performed through the Laplace Gaussian (Log) operator. The Log formula is: ,in Represents the Gaussian standard deviation. After Gaussian filtering, the gradient values in the x and y directions of the pixel points are used to calculate the gradient amplitude and gradient direction. The formula for calculating the gradient amplitude and gradient direction is: , In the edge detection image, the edges of the course line and the heading line in the image present obvious straight line features. Through some target extraction algorithms based on geometric features, such straight line features are extracted to form a course line for representing the visible virtual route and a heading line for representing the actual heading mark, that is, the edge image is obtained by performing image edge detection on the grayscale image, wherein the edge image includes the course line of the visible virtual route and the heading line of the actual heading mark;
[0068] Specifically, the route line and the heading line are converted to the Hough space, and the points on the binary edge image are brought into the formula by setting the detection step of the distance and angle. The straight lines in the image are determined by threshold detection. By extracting the corresponding features through the standard Hough line transform, a series of points can be obtained, which form the point ( )exist The corresponding curve in the plane is is the distance from the upper left vertex of the image to the straight line, is the angle between the straight line and the x-axis. The extraction formula is: , after edge processing, we get a shorter array of straight line endpoints, assuming: , that is, the path line and heading line in the edge image are subjected to Hough transform to extract the line endpoint array. The array is fitted by the least squares method, assuming that the line equation is: , where k and b are constants, Substitute into The least squares method is used to calculate the square error , after summing up the square of the error, we can get ,in is the sum of squared errors of the least squares method, When the partial derivative is 0, it is the optimal parameter estimation model. Simplified to and , the simultaneous equations can be used to find the parameters k and b of the line, thereby determining the optimal estimate of the line equation, that is, the least squares straight line detection fitting of the line endpoint array is realized to obtain the route deviation detection image, and the route deviation detection image includes the transformation of the actual heading mark and the transformation of the visible virtual route. The fitted image is the route deviation detection image, and the CCP model is used to perform the route deviation detection on the fitted image, that is, firstly, a route deviation decision model based on the CCP model is constructed based on the route deviation image, and then the route deviation detection is performed through the route deviation decision model, and the offset value between the actual heading mark and the visible virtual route is obtained based on the decision model. If the offset value is greater than the warning threshold, a deviation warning message is issued.
[0069] In one possible implementation, step S1 specifically includes:
[0070] S11: Convert the route identification information and the radar information into the same coordinate system to form route identification target coordinates and radar target coordinates, and calibrate the time of the route identification target coordinates and the time of the radar target coordinates to the same time;
[0071] S12: calculating the track correlation of the route identification target coordinates and the radar target coordinates at the preset time by using the Euclidean distance formula to obtain the ship distance correlation;
[0072] S13: respectively obtaining the ship distance correlations at n moments, and merging the points of the ship distance correlations at n moments to form a similarity matrix;
[0073] S14: Select the ship with the largest distance correlation value from the similarity matrix as the virtual route.
[0074] In the examples of this application, see Figure 5 , Figure 5It is a flow chart of multi-source information fusion between a ship identification system and a radar system in an auxiliary navigation method for ship deviation provided in an embodiment of the present application. First, the preset ship route information is obtained, and the ship route information is input into the AIS system and the radar system respectively. The ship identification information is collected from the ship route information through the AIS system, and the radar information is collected from the ship route information through the radar system. The AIS information and the radar information are used as input, that is, the radar data is tracked and classified to obtain the radar information, and the AIS data is tracked and classified to obtain the AIS information. The key fields are queried from the databases corresponding to the AIS system and the radar system respectively using the key field fuzzy query method and the key field loop filtering query method, and the key fields are tracked and classified in the database. The database realizes the sharing of complaint information, and the key fields are queried using the key field fuzzy query method and the key field loop filtering query method, so as to accurately and quickly find the existing complaint information, and track and classify the key fields. First, the radar information and the AIS information are coordinate-converted to the same coordinate system. The AIS information uses Gauss-Kruger projection to realize the coordinate system conversion, and the formula is: , , , ,in is the horizontal coordinate of the target coordinates of the route identification in the rectangular coordinate system, is the ordinate of the target coordinates of route identification in the rectangular coordinate system, M is the longitude in the geographic coordinate system, B is the geodetic latitude, S is the arc length of the meridian, and N is the radius of curvature of the meridian circle. is the east-west component of the vertical deviation, is the first eccentricity, and its value is approximately equal to 0.00669, is the second eccentricity, and its value is approximately equal to 0.00674; the coordinates of the radar information are polar coordinates, so the distance L and the angle are used. Indicates that is the horizontal coordinate of the radar target coordinate in the rectangular coordinate system, is the ordinate of the radar target coordinate in the rectangular coordinate system. The formula for converting polar coordinates into rectangular coordinates is: , then the route identification target coordinates and radar target coordinates are unified in time through the heuristic method of the nearest neighbor rule, and the navigation environment information is transformed to a unified time, that is, the route identification information and radar information are respectively transformed into the same coordinate system to form the route identification target coordinates and radar target coordinates, and the time of the route identification target coordinates and the time of the radar target coordinates are respectively calibrated to a unified time;
[0075] Specifically, initialize multiple data sets of radar target coordinates and route identification target coordinates. Within n time points, assume that at the i-th data point, the route identification target coordinates are , …, , assuming that at j data points, the radar target coordinates are , …, , the ship distance correlation is calculated by the Euclidean distance formula, and the formula is: , , , thus realizing the ship distance correlation degree by calculating the track correlation degree of the route identification target coordinates and radar target coordinates at the preset time through the Euclidean distance formula;
[0076] Specifically, the navigation environment information is then normalized, and the correlation between the AIS data and the radar data at a certain moment is calculated. The correlation between the ship distances corresponding to n moments is calculated, and the similarity matrix within n moments is constructed. The matrix is expressed as , thus achieving the acquisition of ship distance correlation at n moments respectively, and merging the point traces of ship distance correlation at n moments to form a similarity matrix;
[0077] Specifically, take the largest value in the similarity matrix , the As a related trajectory, The weight values are selected, and the fused distance, azimuth, ground speed, and ground heading are calculated. Finally, multiple AIS data and radar simulation data are sampled to select a group of data with the highest track correlation. That is, the ship with the largest distance correlation value is selected from the similarity matrix as the virtual route, the virtual route is used as the target position, and the target position is output.
[0078] In one possible implementation, step S5 specifically includes:
[0079] S51: obtaining position information of the actual heading centerline in the decision model;
[0080] S52: Obtain the position information of the left and right virtual routes in the decision model respectively, and obtain the distance between the position information of the left and right virtual route lines and the position information of the actual heading center line respectively. and ;
[0081] S53: Set the course deviation threshold ,judge and threshold Size relationship, if It means the ship is sailing normally. or It means that the ship has deviated from the route and a deviation warning message is issued when the ship deviates.
[0082] In the examples of this application, see Figure 8 , Figure 8 It is a flowchart of the decision model work in a method for assisting navigation of ship deviation provided in an embodiment of the present application. The route deviation decision model of the present application adopts the CCP model. The CCP model is relatively simple compared to other detection models. Its advantages lie in its small amount of calculation and high reliability. Therefore, it has a good yaw warning effect in simple environmental conditions where ships are sailing on open waters. During the navigation of a ship, if the ship is in a normal navigation process, the offset of the centerline of the hull relative to the virtual channel lines on both sides is approximately equal. If the ship deviates from the route, there will be a certain difference in the distance between the two sides of the hull. The mathematical model of this process is expressed as follows: corresponding to the centerline of the hull, based on the formula obtained above Get the coordinates of the channel line and calculate the distance between the left and right virtual channel lines and the actual course center line and , set the course deviation threshold ,judge and threshold Substitute the coordinates of the hull centerline into the CCP model with the threshold set and calculate, such as The ship deviates to the right direction, such as The ship deviated to the left. When the ship deviates from the channel, a warning will be given.
[0083] In one possible implementation, step S3 specifically includes: respectively obtaining coordinate information of the virtual route and the actual heading; and drawing straight lines representing the visible virtual route and the actual heading with different lines through OpenCV machine vision according to the coordinate information to form a marking image.
[0084] In the examples of this application, see Figure 6 , Fig. 9 , Figure 6 is a schematic diagram of a flow chart of route visualization in a method for assisting navigation of a ship's deviation provided in an embodiment of the present application. Fig. 9It is a schematic diagram of the route and heading based on OpenCV in a method for assisting navigation of a ship's deviation provided by an embodiment of the present application. By obtaining AIS system information and radar system information, the ship's position and route information are determined through multi-source information fusion technology, and a virtual route is simulated. At the same time, the ship's motion information in the ship control system is obtained to predict the actual sailing direction of the ship. Further, based on OpenCV machine vision, point coordinate information is given according to the predicted heading information, and the OpenCV function is called to draw a straight line in the image according to the starting point and end point coordinates, and different lines are used to distinguish the virtual route and the actual heading mark, so that the ship-side visual perception display end generates a logo image including a visible virtual route and an actual heading mark, so that the visible virtual route and the actual heading mark are both visualized. First, the navigation environment information of the ship is obtained, and the ship environment information is processed to obtain a virtual route, then the navigation status information is obtained, and the navigation status information is processed to obtain the actual heading, and then the logo image including the visible virtual route and the actual heading mark is drawn based on OpenCV, and finally the logo image is displayed in real time.
[0085] The following will be combined with the attached Figure 2 , the auxiliary navigation device for ship deviation provided in the embodiment of the present application is introduced in detail. It should be noted that the attached Figure 2 The auxiliary navigation device for ship deviation shown is used to implement the present application Figure 1 For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application. Figure 1 The embodiment shown.
[0086] See also Figure 2 , Figure 2 Schematic diagram of the structure of a ship yaw auxiliary navigation device provided in an embodiment of the present application. Figure 2 As shown, the device comprises
[0087] The route acquisition module 201 is used to collect navigation environment information through the ship automatic identification system and the radar system, and calculate the navigation environment information through the information fusion technology to obtain a virtual route, wherein the navigation environment information includes the ship identification information and the radar information;
[0088] A heading acquisition module 202 is used to acquire navigation status information in the control system and predict the actual heading based on the navigation status information;
[0089] The visualization acquisition module 203 is used to generate a marking image including a visible virtual route and an actual heading mark based on the virtual route and the actual heading through OpenCV machine vision.
[0090] In the embodiment of the present application, in the route acquisition module 201, a corresponding virtual route is generated through a series of calculation processes based on the ship automatic identification system and the radar system and combined with the diversified information data fusion technology. After calculation and processing; in the heading acquisition module 202, the navigation status information in the control system is obtained, and the actual heading is predicted based on the navigation status information; in the visualization acquisition module 203, the identification image is generated relying on OpenCV machine vision, and the identification image includes an intuitive and visible visual virtual route and actual heading identification. The noise existing on the collected video screen only needs to be simply processed. At the same time, it is only necessary to determine whether there is a deviation by calculating the virtualized parameter information of the calculation mark. Through OpenCV machine vision processing, the actual heading identification and the virtual route are both intuitive and visible, allowing the crew to observe the ship's heading and route information more intuitively.
[0091] In one possible implementation, it also includes
[0092] A model building module 204, used to build a route deviation decision model based on the identification image;
[0093] The warning module 205 is used to obtain the offset value between the actual heading mark and the visible virtual route based on the decision model, and if the offset value is greater than the warning threshold, a deviation warning message is issued.
[0094] In the real-time example of the present application, the model building module 204 constructs a route deviation decision model based on the generated identification image, and the early warning module 205 predicts the route deviation direction, providing the crew with visual virtual identification information, allowing the ship driver to clearly observe the navigation direction identification information, thereby reminding the crew of the deviation of the ship's driving position, thereby regulating the navigation of the ship and protecting the safety of the crew's life and property.
[0095] Specifically, the device of the present application adopts OpenCV computer vision technology to simulate and generate corresponding virtual routes and actual heading signs through information processing technology, and can provide them intuitively to the ship's drivers. The ship's drivers can easily observe the actual sailing direction of the ship and the preset route of the virtual ship through the virtual signs provided by computer vision, and make corresponding operations on the ship accordingly. The information data source of the device avoids the errors caused by a single information source. The safety assistance system provided by the present application uses a variety of equipment carried by the ship itself as an information medium, and obtains more accurate information input without adding additional multiple shipborne equipment. The information input is calculated by the information fusion technology on the ship's ship's aircraft and processed by OpenCV machine vision to obtain the preset virtualized route of the ship that can be intuitively observed by the ship's drivers, so that the analysis and calculation results are reliable and can give the crew a corresponding warning effect. While the ship is sailing, the present application further provides a safety assistance system to ensure that the ship's drivers keep the ship within the preset channel throughout the entire process. If the crew deviates from the operation during the driving process, the system will warn the driver, and the driver can correct his operation through the signs, so that the ship is in a reasonable position range, thereby allowing surface ships to travel in a standardized manner, greatly reducing the rate of safety accidents, and thus protecting the life and property safety of people involved in the shipping industry.
[0096] In one embodiment, the model building module 204 includes
[0097] A grayscale processing unit, used for performing grayscale processing on the logo image to obtain a grayscale image;
[0098] An edge detection unit, used for performing image edge detection on the grayscale image to obtain an edge image, wherein the edge image includes a route straight line used to represent a visible virtual route and a heading straight line used to represent an actual heading mark;
[0099] A feature extraction unit is used to perform Hough transform on the route straight line and the heading straight line in the edge image to extract the straight line endpoint array; perform least squares straight line detection fitting on the straight line endpoint array to obtain a route deviation detection image, and the route deviation detection image includes a transformed actual heading mark and a transformed visible virtual route;
[0100] A construction unit is used to construct a route deviation decision model based on the route deviation detection image.
[0101] In one possible implementation, the route acquisition module 201 includes
[0102] A conversion unit, used to convert the route identification information and the radar information into the same coordinate system to form the route identification target coordinates and the radar target coordinates, and to calibrate the time of the route identification target coordinates and the time of the radar target coordinates to a unified time;
[0103] A correlation calculation unit is used to calculate the track correlation of the route identification target coordinates and the radar target coordinates at a preset time by using the Euclidean distance formula to obtain the ship distance correlation;
[0104] A point trace merging unit is used to obtain the ship distance correlation at n moments respectively, and to merge the ship distance correlation at n moments to form a similarity matrix;
[0105] The screening unit is used to select the ship with the largest distance correlation value from the similarity matrix as the virtual route.
[0106] In one possible implementation, the early warning module 205 includes
[0107] A centerline acquisition unit, used to obtain the position information of the actual heading centerline in the decision model;
[0108] The distance calculation unit is used to obtain the position information of the left and right virtual routes in the decision model, and obtain the distance between the position information of the left and right virtual route lines and the position information of the actual heading center line. and ;
[0109] Comparison unit, used to set the course deviation threshold ,judge and threshold Size relationship, if It means the ship is sailing normally. or It means that the ship has deviated from the route and a deviation warning message is issued when the ship deviates.
[0110] Those skilled in the art can clearly understand that the technical solutions of the embodiments of the present application can be implemented with the help of software and / or hardware. The "unit", "module" and "part" in this specification refer to software and / or hardware that can independently complete or cooperate with other components to complete specific functions, where the hardware can be, for example, a field programmable gate array (FPGA), an integrated circuit (IC), etc.
[0111] Each processing unit and / or module of the embodiments of the present application may be implemented by an analog circuit that implements the functions described in the embodiments of the present application, or may be implemented by software that executes the functions described in the embodiments of the present application.
[0112] See also Figure 3 , which shows a schematic diagram of the structure of an electronic device involved in an embodiment of the present application, the electronic device can be used to implement Figure 1 The method in the embodiment shown. Figure 3 As shown, the electronic device 300 may include: at least one central processor 301 , at least one network interface 304 , a user interface 303 , a memory 305 , and at least one communication bus 302 .
[0113] The communication bus 302 is used to realize the connection and communication between these components.
[0114] The user interface 303 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 303 may also include a standard wired interface and a wireless interface.
[0115] The network interface 304 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0116] Among them, the central processing unit 301 may include one or more processing cores. The central processing unit 301 uses various interfaces and lines to connect various parts of the entire electronic device 300, and executes various functions and processes data of the terminal 300 by running or executing instructions, programs, code sets or instruction sets stored in the memory 305, and calling data stored in the memory 305. Optionally, the central processing unit 301 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The central processing unit 301 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the central processing unit 301, but implemented separately through a chip.
[0117] Among them, the memory 305 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 305 includes a non-transitory computer-readable storage medium. The memory 305 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 305 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 305 may optionally be at least one storage device located away from the aforementioned central processor 301. As Figure 3 As shown, the memory 305 as a computer storage medium may include an operating system, a network communication module, a user interface module, and program instructions.
[0118] exist Figure 3 In the electronic device 300 shown, the user interface 303 is mainly used to provide an input interface for the user and obtain the data input by the user; and the central processor 301 can be used to call the auxiliary navigation application for ship deviation stored in the memory 305, and specifically perform the following operations:
[0119] S1: collecting navigation environment information through the ship automatic identification system and radar system, and calculating the navigation environment information through information fusion technology to obtain a virtual route, wherein the navigation environment information includes ship identification information and radar information;
[0120] S2: Obtaining navigation status information from the control system and predicting the actual heading based on the navigation status information;
[0121] S3: Generate a logo image including a visible virtual route and an actual heading logo through OpenCV machine vision based on the virtual route and the actual heading.
[0122] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the above method are implemented. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a micro drive, and a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), or any type of medium or device suitable for storing instructions and / or data.
[0123] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0124] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0125] In the several embodiments provided in the present application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0126] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0127] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0128] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, disk or optical disk and other media that can store program codes.
[0129] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by entering a program to instruct related hardware. The program may be stored in a computer-readable memory, and the memory may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0130] The above is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure cannot be limited thereto. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of the implementation scheme of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field not recorded in the present disclosure. The description and examples are regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A method for assisting navigation of a ship's deviation, characterized in that: The steps include: S1: collecting navigation environment information from the ship route information through the ship automatic identification system and the radar system, and calculating the navigation environment information through the multi-source information fusion system to obtain a virtual route, wherein the navigation environment information includes the ship identification information and the radar information; S2: Obtaining navigation status information from the control system and predicting the actual heading based on the navigation status information; S3: Generate a logo image including a visible virtual route and an actual heading logo through OpenCV machine vision based on the virtual route and the actual heading; After step S3, the following steps are also included: S4: Constructing a route deviation decision model based on the identification image; S5: obtaining an offset value between the actual heading mark and the visible virtual route based on the decision model, and issuing a deviation warning message if the offset value is greater than a warning threshold; Step S4 includes: S41: performing image grayscale processing on the logo image to obtain a grayscale image; S42: performing image edge detection on the grayscale image to obtain an edge image, wherein the edge image includes a route straight line for representing a visible virtual route and a heading straight line for representing an actual heading mark; S43: performing Hough transform on the route straight line and the heading straight line in the edge image to extract a straight line endpoint array; performing least squares straight line detection fitting on the straight line endpoint array to obtain a route deviation detection image, wherein the route deviation detection image includes a transformed actual heading mark and a transformed visible virtual route; S44: Constructing a route deviation decision model based on the route deviation detection image.
2. The method for assisting navigation of a ship's deviation according to claim 1, characterized in that: Step S1 specifically includes: S11: Convert the route identification information and the radar information into the same coordinate system to form route identification target coordinates and radar target coordinates, and calibrate the time of the route identification target coordinates and the time of the radar target coordinates to the same time; S12: calculating the track correlation of the route identification target coordinates and the radar target coordinates at the preset time by using the Euclidean distance formula to obtain the ship distance correlation; S13: respectively obtaining the ship distance correlations at n moments, and merging the points of the ship distance correlations at n moments to form a similarity matrix; S14: Select the ship with the largest distance correlation value from the similarity matrix as the virtual route.
3. The method for assisting ship deviation according to claim 1, characterized in that: Step S5 specifically includes: S51: obtaining position information of the actual heading centerline in the decision model; S52: Obtain the position information of the left and right virtual routes in the decision model respectively, and obtain the distance between the position information of the left and right virtual route lines and the position information of the actual heading center line respectively. and ; S53: Set the course deviation threshold ,judge and threshold Size relationship, if It means the ship is sailing normally. or It means that the ship has deviated from the route and a deviation warning message is issued when the ship deviates.
4. The method for assisting navigation of a ship's deviation according to claim 1, characterized in that: Step S3 specifically includes: obtaining the coordinate information of the virtual route and the actual heading respectively; and drawing straight lines representing the visible virtual route and the actual heading respectively with different lines through OpenCV machine vision according to the coordinate information to form a marking image.
5. A navigation aid for ship deviation based on the method according to any one of claims 1 to 4, characterized in that: include A route acquisition module (201) is used to collect navigation environment information through a ship automatic identification system and a radar system, and calculate the navigation environment information through information fusion technology to obtain a virtual route, wherein the navigation environment information includes ship identification information and radar information; A heading acquisition module (202) is used to acquire navigation status information in the control system and predict the actual heading based on the navigation status information; A visualization acquisition module (203) is used to generate a marking image including a visible virtual route and actual heading markings through OpenCV machine vision based on the virtual route and actual heading; Also includes A model building module (204) is used to build a route deviation decision model based on the identification image; The warning module (205) is used to obtain the offset value between the actual heading mark and the visible virtual route based on the decision model, and if the offset value is greater than the warning threshold, a deviation warning message is issued.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
