The present invention relates to an information processing method in the field of vessel traffic service system (VTS), in particular relates to a ship identity recognition method base on fusion of AIS data and video data.
Video monitoring has become an important means of information collection in ship traffic, port management and other fields due to its intuitive, timely, accurate and large amount of information.
The ship target extraction and identification method in surveillance video can effectively reduce the human cost and improve the intelligent degree of maritime management, which has high research and application value.
Patent document CN201210543644.6 discloses a feature-based rapid identification method for ships, which trains a decision tree classifier based on ship features through a manually labeled ship feature library, and then uses the classifier to detect images in the video. This method can quickly extract ship targets from the waterway, but it cannot effectively identify the ship's identity information.
The image-based ship identification method published in the patent document CN201710981682.2 detects the ship target in the video through an improved background subtraction method, and compares it with the collected AIS information to obtain the ship's identity information. This method realizes ship identity recognition to a certain extent, but a single motion detection method is easy to miss the detection of stationary or low-speed ship targets, and it is easy to misdetect other moving objects as ship targets. This method realizes image coordinates and geography by calibrating the camera model. The conversion of coordinates makes the pan tilt camera unable to rotate and zoom.
The technical problem to be solved by the present invention is to provide a geographic information-based simulation test system for medium-high frequency communication channels ship identity recognition method based on the fusion of AIS data and video data, which can effectively identify the ship's identity, reduce the human cost and improve the intelligent degree of maritime management.
The technical solution provided by the invention to solve the above technical problem is to provide a geographic information-based simulation test system for medium-high frequency communication channels ship identity recognition method based on the fusion of AIS data and video data, comprising steps as follows: step 1: collecting a ship sample to train a ship target classifier; step 2: performing, using the ship target classifier, ship target detection on a video frame collected by a gimbal camera; step 3: performing a comparison with a recognized ship library to filter a recognized ship, if the target is new, continue with the next steps; step 4: acquiring AIS data and filtering same across time and spatial scales; step 5: predicting the current position of an AIS target using a linear extrapolation method; step 6: converting the current position to an image coordinate system; step 7: performing position matching between the new target in step 3 and the converted AIS target in step 4, and the fail matched new target waiting for the next matching process; step 8: performing feature extraction on the successfully matched target and storing the extracted feature, together with ship identity information, into the recognized ship library, as the filtering standard of step 3.
Preferably, the specific process of step 1 is as follows: in the monitoring scene, collecting a number of ship image samples with different types and attitudes and a number of image samples without ship as positive and negative samples respectively, and training the ship target classifier based on Haar feature by offline training.
Preferably, the specific process of step 2 is as follows: detecting the ship target from the video frames collected by the pan-tilt camera by the trained ship target classifier, extracting the center point of the bottom edge of the ship target as the position of the target to participate in the position matching in the following steps.
Preferably, the step 4 filters the received AIS target data as follows: in terms of time, AIS data that is not updated beyond the preset time is considered as invalid data; in the terms of space, AIS targets that are out of the preset range are considered as invalid data.
Preferably, the preset time is 3 minutes, the preset range is ±15° of the camera field of view.
Preferably, the specific process of step 5 is as follows: predicting the actual position (x1,y1) at the current moment t0 according to the received AIS data, the AIS target data including sailing speed V, sailing direction θ, position (x0,y0), AIS data sending time t−1, the prediction formula as follows:
Wherein D is the sailing distance of AIS target from time t−1 to time t0, D=V(t0−t−1), R is the radius of the earth.
Preferably, wherein the step 6 including:
Step 6.1: calibrating the camera parameters, obtaining the angle between the zero azimuth angle and the horizontal plane, and the angle between the horizontal direction and the geographical true north of the pan-tilt camera, the specific method is as follows:
Selecting n reference points, n is a natural number, the geographical location of the nth reference point is expressed as (xn,yn), the coordinates under the image coordinate system are (un,vn), and the origin of the coordinates of the pixel coordinate system in the image coordinate system are (u0,v0), the calculation formulas of θH and θN are as follows:
Wherein An is the azimuth angle between the nth reference point and the camera, and Bn is the angle between the line between the nth reference point and the camera and the horizontal plane.
Step 6.2: transforming the location of the AIS target from geographic coordinates to camera image coordinates, and the transformed coordinates (u,v) are calculated as follows:
Wherein A is azimuth angle between AIS target and the camera, B is angle between connecting line of AIS target and the camera and horizontal plane, (u0,v0) are coordinates of origin of pixel coordinate system in image coordinate system, VP,VT,VZ are current pan-tilt parameters, f0 is basic focal length of the pan-tilt camera, w is unit pixel width and h is unit pixel height.
Preferably, wherein implementing step 4, step 5 and step 6 in the whole identification process, continuously receiving ship AIS data within the receiving scope and processing the received AIS data.
Preferably, wherein the specific process of step 7 is as follows: calculating the Euclidean distance D between the position of the ship to be matched and the transformed target position of AIS, the formula is as follows:
D=√{square root over ((u1−u)2+(v1−v)2)}
The position of the ship to be matched is (u1,v1), and the transformed target position of AIS is (u,v); calculating the confidence level C of matching success, the formula is as follows:
Wherein D is the Euclidean distance between the ship to be matched and the transformed target position of AIS, T is the preset threshold; the matching rules are: when D is greater than the preset threshold T, the target matching is judged failure directly; when D is less than the preset threshold T, the AIS target with the maximum confidence C of matching success is selected as the successful matching target.
Preferably, wherein the specific process of step 3 and step 8 are as follows: extracting the texture, contour, color and position features of the matched ship target to construct the target template, storing in the identified ship database together with the matching information; when a new target is generated, firstly comparing it with the identified ship database, if it is a recognized ship, it will be filtered, performing the matching process only when the ship is confirmed as new.
Compared with the prior art, the beneficial effects of the present invention are as follows: the geographic information-based simulation test system for medium-high frequency communication channels ship identity recognition method based on the fusion of AIS data and video data provided by the present invention can integrate AIS and video data through technical means such as image processing and information processing, and quickly and accurately extract and recognize ship targets in surveillance videos, which can effectively reduce human costs and has broad application prospects in ship transportation, port management and other fields.
The invention will now be further described below with reference to the accompanying drawings and examples.
Please refer to
Step 1: collecting a ship sample to train a ship target classifier;
Step 2: performing, using the ship target classifier, ship target detection on a video frame collected by a gimbal camera;
Step 3: performing a comparison with a recognized ship library to filter a recognized ship, if the target is new, continue with the next steps;
Step 4: acquiring AIS data and filtering same across time and spatial scales;
Step 5: predicting the current position of an AIS target using a linear extrapolation method;
Step 6: converting the current position to an image coordinate system;
Step 7: performing position matching between the new target in step 3 and the converted AIS target in step 4, and the fail matched new target waiting for the next matching process;
Step 8: performing feature extraction on the successfully matched target and storing the extracted feature, together with ship identity information, into the recognized ship library, as the filtering standard of step 3.
The step 1 is offline training and the number of ship samples participating in the training is an important factor influencing the detection rate of the ship target classifier.
In the step 2 the video acquisition sensor is a high-definition pan tilt camera; the center point of the lower edge of the ship target is extracted to represent the ship's position.
The step 3 compares the contour, color, texture, location and other characteristics of the detected ship target with the identified ship library, filters the identified ships, and executes the identification process only on the new target to improve the operating efficiency of the system.
The steps 4 and 5 do not indicate the order of execution. In fact, the steps 4 and 5 are executed during the entire identification process, and the ship AIS data within the range is continuously received.
The step 7 realizes the conversion between the geographic coordinate system and the image coordinate system according to the real-time parameters and installation parameters of the pan tilt, allowing movement of the pan tilt and zooming of the field of view.
In the step 8, the characteristics of the ship target are extracted including contour, color, texture, and position, and the identity information includes mmsi, ship name, type, size, and so on.
The invention includes four parts: ship target detection, AIS target data filtering and position estimation, target position matching, and construction of the identified ship library; the four parts are described in detail as follows.
1. Ship Target Detection
In the monitoring scene, collecting 2,000 picture samples of ships of different types and postures and 6,000 picture samples that do not contain ships as positive and negative samples, and scale the samples to 20×20 to train a ship target classifier based on Haar features, And then use the trained ship target classifier to detect the ship target on the video frame collected by the pan tilt camera, and extract the center point of the lower edge of the ship target as the position of the target to participate in the position matching in the subsequent steps.
It should be noted that the present invention uses offline training to train the ship target classifier, and the training process does not affect the efficiency of the ship target classifier in detecting the ship target. The number of ship samples participating in the training is an important factor influencing the detection rate of the ship target classifier. The present invention selects 2000 positive samples and 6000 negative samples to participate in the training, taking the detection rate and training time into consideration. It is a preferred value rather than a fixed value.
It should be noted that the height of the ship in the image will cause the position of the ship target to shift. Therefore, the present invention selects the center point of the lower edge of the ship target in the image as the position of the ship target for matching, thereby improving the accuracy of identity recognition.
2. AIS Target Data Filtering and Location Estimation
The received AIS target data is filtered on two scales of time and space, so as to eliminate invalid AIS target data and improve the efficiency of matching and recognition. The filtering basis is as follows:
(2.1) In the terms of time, AIS data that is not updated beyond the preset time is considered as invalid data.
(2.2) In the terms of space, AIS targets that are out of the preset range are considered as invalid data.
Because the AIS data update speed is lower than the surveillance video update speed, the received AIS target position always lags behind the current target actual position. In the present invention predicting the actual position (x1,y1) at the current moment t0 according to the data including the AIS target sailing speed V, sailing direction θ, position (x0,y0), AIS data sending time t−1, to improve the accuracy of identification. The prediction formula as follows:
Wherein D is the sailing distance of AIS target from time t−1 to time t0, D=V(t0−t1), R is the radius of the earth.
3. Target Position Matching
21 pan tilt camera; 22 camera optical axis; 23 building; 24 Geographical True North; 25 the azimuth angle of the target relative to the camera; 26 the projection line of the connection between the target and the camera on the horizontal plane; 27 the angle between the line between the target and the camera and the horizontal plane; 28 sea level; 29 camera imaging plane.
In order to better show the relationship between the various angles,
It should be noted, Oc-xcyczc is the camera coordinate system, O′-UV is the pixel coordinates system, pan tilt parameters of the pan tilt camera are expressed as VP, VT, VZ respectively, f is the camera focal length, a is the angle between the line between the projection point of the target on the U axis and the camera center and the optical axis, β is the angle between the line between the target projection point on the V axis and the camera center and the optical axis, θH is the zero azimuth of the pan tilt camera and the horizontal plane, θN is the angle between the zero azimuth angle of the pan tilt camera in the horizontal direction and the true geographic north.
The position matching method proposed by the present invention includes the following steps:
Step 1: carrying out the camera installation parameter calibration, obtaining the angle θH between the zero azimuth angle of the pan tilt camera and the horizontal plane, and the angle between the horizontal direction and the geographic true north;
Step 2: converting the AIS target position from geographic coordinates to camera image plane coordinates;
Step 3: calculating the Euclidean distance between the position of the ship to be matched and the converted AIS target position;
Step 4: calculating the confidence of matching success and judge whether the matching is successful according to the confidence.
It should be noted that in step 1, the zero azimuth angle of the pan tilt camera indicates the parameters VP, VT of the pan tilt, which are all zero-degree direction lines, the angle θH between the zero azimuth angle of the pan tilt camera and the horizontal plane, and the calibration method of the included angle θN between the horizontal direction and the geographic true north as follows:
Selecting n reference points, n is a natural number, the geographical location of the nth reference point is expressed as (xn,yn), the coordinates under the image coordinate system are (un,vn), and the origin of the coordinates of the pixel coordinate system in the image coordinate system are (u0,v0), the calculation formulas of θH and θN are as follows:
Wherein An is the azimuth angle between the nth reference point and the camera, and Bn is the angle between the line between the nth reference point and the camera and the horizontal plane, n is an integer greater than 2, and the preferred value is 6.
It should be noted that in step 2 transforming the location of the AIS target from geographic coordinates to camera image coordinates, and the transformed coordinates (u,v) are calculated as follows:
Wherein A is azimuth angle between AIS target and the camera, B is angle between connecting line of AIS target and the camera and horizontal plane, (u0,v0) are coordinates of origin of pixel coordinate system in image coordinate system, VP, VT, VZ are current pan-tilt parameters, f0 is basic focal length of the pan-tilt camera, w is unit pixel width and is h is unit pixel height.
It should be noted that in step 3 calculating the Euclidean distance D between the position of the ship to be matched and the transformed target position of AIS, the formula is as follows:
D=√{square root over ((u1−u)2+(v1−v)2)} (7)
Wherein the position of the ship to be matched is (u1,v1), and the transformed target position of AIS is (u,v).
It should be noted that in step 4 calculating the confidence level C of matching success, the formula is as follows:
Wherein D is the Euclidean distance between the ship to be matched and the transformed target position of AIS, T is the preset threshold, the threshold value T is preferably 100 pixels.
The matching rules are: when D is greater than the preset threshold T, the target matching is judged failure directly; when D is less than the preset threshold T, the AIS target with the maximum confidence C of matching success is selected as the successful matching target.
4. Recognized Ship Library Construction
In order to avoid repetitive execution of the matching process for the ship target and increase the running speed, the present invention extracts texture, contour, color and position characteristics of the successfully matched ship target to construct a target template, and store it in the identified ship database together with the matching information. When a new target is generated, firstly compare it with the identified ship library, if it is an identified ship then filter it, and only perform the matching process when the target is new.
In summary, the present invention can integrate AIS and video data through technical means such as image processing and information processing, and quickly and accurately extract and recognize ship targets in surveillance videos, which can effectively reduce human costs and has broad application prospects in ship transportation, port management and other fields. The specific advantages are as follows:
(1) The ship target in the video is detected by the ship target classifier, which reduces the rate of missed detection and false detection.
(2) By filtering AIS data on two scales of time and space, the amount of calculation is reduced and the running speed is improved.
(3) Predict the AIS target position by linear extrapolation, which solves the shortcoming of slow update of AIS data and improves the accuracy of identification.
(4) Different from the calibration camera model, the present invention realizes the conversion of geographic coordinates and image coordinates through real-time parameters of the pan tilt and camera installation parameters, allowing movement of the pan tilt and zooming of the field of view during the recognition process.
(5) By constructing a library of identified ships, the ship target avoids repeating the matching process and improves the operation speed.
While the present invention has been disclosed as above in preferred embodiments, it is not intended to limit the invention. Any person skilled in the art may make various improvement and modifications within the spirit and scope of the invention. Therefore, the scope of protection of the invention shall be subject to that defined in the claims.
Number | Date | Country | Kind |
---|---|---|---|
201811360912.4 | Nov 2018 | CN | national |
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2019/078720 | Mar 2019 | US |
Child | 17097057 | US |