Summary of the invention
The technical problem that the present invention solves is, due in prior art, in the process of existing boats and ships video monitoring, often function point is all the real-time navigation chart locking certain ship, whether gps system is installed for boats and ships or has installed whether open more difficult judgement, and the needs caused also will be investigated ship and whether use or open gps system while utilizing a large amount of manpowers accurately to monitor for ship, also may need to arrange one by one the ship looked for and dangerous situation occurs, operating efficiency cannot be ensured, also the problem now to the requirement that boats and ships are located in real time cannot be met, and then provide a kind of Ship GPS location check method and Ship GPS interactive system of optimization.
The technical solution adopted in the present invention is, a kind of Ship GPS location check method, and described location check method comprises the following steps:
Step 1.1: utilize video camera to obtain panoramic video, get the mean value set image A as a setting of each pixel of all two field pictures of panoramic video in nearest T time, be set to gray level image;
Step 1.2: the video image B getting current point in time, is set to gray level image; Video image B and background image A is done calculus of differences, and compare difference, difference is designated as M;
Step 1.3: carry out binaryzation to the difference image C of video image B and background image A, get M and compare with threshold value Q, if M is greater than threshold value Q, sets difference image C gray value as 255, otherwise sets its gray value as 0, wherein 8≤Q≤80;
Step 1.4: use algorithm of region growing, the binary image of scanning step 1.4 gained, if there is the pixel value of consecutive points to be 255, is then merged into a region;
Step 1.5: four, the upper and lower, left and right end points obtaining each region forms a rectangle frame, is designated as boats and ships X;
Step 1.6: by comparing with the gross data of boats and ships X in boats and ships real time information data storehouse, whether the rectangle frame that determining step 1.5 obtains can meet the feature of the boats and ships X characteristics of motion, if meet, carry out next step, if do not meet, remove as jamming target, repeat step 1.1;
Step 1.7: for detect and the boats and ships X judging to meet regularity of ship's movement utilizes target lock-on method to lock, and the coordinate of video camera is carried out world coordinates conversion, be converted to latitude and longitude coordinates N;
Step 1.8: the demarcation latitude and longitude coordinates N ' of boats and ships X in latitude and longitude coordinates N and boats and ships real time information data Kuku is compared, note difference is n, if 0≤n≤0.001 °, then think that the boats and ships X identified is exactly these boats and ships in this information bank, the name of vessel in database is presented on boats and ships X;
Step 1.9: the GPS of boats and ships X locates after verification terminates, and carries out the verification of next ship.
Preferably, the target lock-on method described in step 1.7 comprises the following steps:
Step 2.1: the boats and ships X image detected is write effective object queue L;
Step 2.2: traversal subsequent frame, the boats and ships X in the boats and ships Y detected and original effect object queue L carries out paired comparisons, if successful matching, carries out next step, if match unsuccessful, in effective target queue L, increases fresh target Y;
Step 2.3: effective target frame number adds one, and on target frame reference number, repeat step 2.2.
Preferably, described threshold value Q gets 25.
Preferably, described T gets 600s.
Preferably, described n gets 0.00027 °.
Preferably, described paired comparisons comprises the following steps:
Step 3.1: the boats and ships Y newly detected is compared to obtain difference with four, the upper and lower, left and right endpoint value of the boats and ships X in original effect object queue L, gets the absolute value of difference;
Step 3.2: when left end point difference is less than a and lower extreme point difference is less than b, or right endpoint difference be less than c and upper extreme point difference is less than d time successful matching, otherwise be fresh target Y; Wherein, 15 < a < 45,1 < b < 9,15 < c < 45,15 < d < 45.
Preferably, described a gets 30, b and gets 5, c and get 30, d and get 30.
Preferably, described Ship GPS location check method also comprises data base management method, and described data base management method comprises the following steps:
Step 4.1: the video image of the boats and ships that screening is locked;
Step 4.2: the result of comparison is presented on target boats and ships;
Step 4.3: set up time and the direction of motion that boats and ships entered and left monitoring range, be stored into database;
Step 4.4: calling data library inquiry.
Preferably, a kind of Ship GPS interactive system adopting described Ship GPS to locate check method, described Ship GPS interactive system comprises ship's fix terminal and Ship GPS location terminal verification, and described ship's fix terminal and Ship GPS location terminal verification communicate to connect with boats and ships real time information data storehouse respectively; Described Ship GPS location terminal verification comprise the Treatment Analysis module that have employed described Ship GPS location check method and with the video camera of described Treatment Analysis model calling, display module and communication module.
The invention provides a kind of Ship GPS location check method of optimization and have employed the Ship GPS interactive system of Ship GPS location check method, by location check method, target lock-on method, the cooperation of paired comparisons and data base management method, make under the cooperation of supervisory control system, Ship GPS location terminal verification can not only obtain continuous print boats and ships video, realize the round-the-clock monitoring to navigation channel, more by adopting GPS technology to investigate the ship do not installed or install and but do not open gps system with Ship GPS interactive system, real-time locking position can be carried out to boats and ships, once boats and ships are caused danger and also can be rushed towards scene in the very first time and rescue, better ensure that the driving safety of the unobstructed of navigation channel and boats and ships, decrease manual operation, achieve automatic management, and be stored into database by monitoring the data message etc. obtained, be convenient to the digital management of boats and ships, can call in time whenever necessary, and administrative staff can be helped more to understand information about boats and ships.
Embodiment
Below in conjunction with embodiment, the present invention is described in further detail, but protection scope of the present invention is not limited to this.
As shown in the figure, a kind of Ship GPS location check method, described location check method comprises the following steps:
Step 1.1: utilize video camera to obtain panoramic video, get the mean value set image A as a setting of each pixel of all two field pictures of panoramic video in nearest T time, be set to gray level image;
Step 1.2: the video image B getting current point in time, is set to gray level image; Video image B and background image A is done calculus of differences, and compare difference, difference is designated as M;
Step 1.3: carry out binaryzation to the difference image C of video image B and background image A, get M and compare with threshold value Q, if M is greater than threshold value Q, sets difference image C gray value as 255, otherwise sets its gray value as 0, wherein 8≤Q≤80;
Step 1.4: use algorithm of region growing, the binary image of scanning step 1.4 gained, if there is the pixel value of consecutive points to be 255, is then merged into a region;
Step 1.5: four, the upper and lower, left and right end points obtaining each region forms a rectangle frame, is designated as boats and ships X;
Step 1.6: by comparing with the gross data of boats and ships X in boats and ships real time information data storehouse, whether the rectangle frame that determining step 1.5 obtains can meet the feature of the boats and ships X characteristics of motion, if meet, carry out next step, if do not meet, remove as jamming target, repeat step 1.1;
Step 1.7: for detect and the boats and ships X judging to meet regularity of ship's movement utilizes target lock-on method to lock, and the coordinate of video camera is carried out world coordinates conversion, be converted to latitude and longitude coordinates N;
Step 1.8: the demarcation latitude and longitude coordinates N ' of boats and ships X in latitude and longitude coordinates N and boats and ships real time information data Kuku is compared, note difference is n, if 0≤n≤0.001 °, then think that the boats and ships X identified is exactly these boats and ships in this information bank, the name of vessel in database is presented on boats and ships X;
Step 1.9: the GPS of boats and ships X locates after verification terminates, and carries out the verification of next ship.
In the present invention, location check method main purpose is for catching boats and ships profile and verifying location.This method main flow is: the panoramic video being obtained navigation channel by video camera, and gets the mean value set image A as a setting of each pixel of all two field pictures of panoramic video in nearest T time, is set to gray level image; Background image A is now owing to having got all two field pictures of the panoramic video in nearest T time to do mean value, when picture is without ship, background image A is common navigation channel panorama, when picture is when having ship, because boats and ships are moving always, therefore when averaging, background image A is still common navigation channel panorama; Get the video image B of current point in time, video image B is now also coloured image, is set to gray level image, does calculus of differences process with background image A; The difference M that calculus of differences process is obtained constantly and threshold value Q compare, once find that difference M is greater than threshold value Q, indicate that target boats and ships X sails navigation channel into, therefore to arrange its gray value to current difference image C be 255, the i.e. binary conversion treatment of full display white, and difference image C difference M not being greater than threshold value Q to carry out arranging its gray value be 0, namely entirely show the binary conversion treatment of black; In theory, threshold value Q is a scope, adjusts in real time in variable range along with the change of weather, and when weather is good time, threshold value can be adjusted to the threshold value obtained when being greater than weather difference automatically.
Use algorithm of region growing, the binary image of scanning gained, if there is the pixel value of consecutive points to be 255, is then merged into a region; After algorithm of region growing, four, the upper and lower, left and right end points obtaining each region forms a rectangle frame, is designated as boats and ships X; After obtaining boats and ships X, need by comparing with the gross data of boats and ships X in boats and ships real time information data storehouse, judge whether the rectangle frame obtained by algorithm of region growing can meet the feature of the boats and ships X characteristics of motion, just remove as jamming target if cannot meet, the control of comparison is herein by learning to obtain.
Threshold value Q in the present invention generally chooses within the scope of one, obtains, be preferably 25 in embodiments of the invention according to study and calculating.
In the present invention, in units of T time, dynamic realtime upgrades video pictures, according to channel status and the analytical calculation acquisition of reality, is preferably 600s in embodiments of the invention.
Image in the present invention is all set to gray level image after intercepting.Namely gray scale uses black tone to represent object, from 0%(white) to 100%(black) brightness value of represented object.
Simultaneously, piece image comprises target object, background also has noise, want extracting directly from many-valued digital picture and go out target object, the most frequently used method sets a threshold value Q exactly, with Q, the data of image are divided into two parts: be greater than the pixel group of Q and be less than the pixel group of Q, this is the binaryzation (BINARIZATION) of image.The binaryzation of image, is set to 0 or 255 by the gray value of the pixel on image exactly, is namely presented by whole image and significantly only has black and white visual effect.And generally, the edge of object can present the discontinuity of gray scale, therefore the region identical with the gray scale of target can be scattered by some around the pixel group after algorithm of region growing combination and segmentation pixel group, final acquisition one, close to the target frame of rectangle, is target.
The present invention is by location check method, video camera is utilized to obtain navigation channel panoramic picture, difference algorithm is utilized to catch boats and ships profile, when comparing to target in the scope of a certain discovery target after discovery target boats and ships X, ensure that target is not lost, simultaneously timely for detect and the boats and ships X judging to meet regularity of ship's movement utilizes target lock-on method to lock, and the coordinate of video camera is carried out world coordinates conversion, be converted to the latitude and longitude coordinates N of the boats and ships X monitored, the demarcation latitude and longitude coordinates N ' of boats and ships X in latitude and longitude coordinates N and boats and ships real time information data Kuku is compared, if longitude and latitude is in certain deviation range, then think that the boats and ships X identified is exactly these boats and ships in this information bank, name of vessel in database is presented on boats and ships X, namely location and the verification of a boats and ships X is completed, after end, method iterates flow process, the location of continuing next boats and ships is verified.
In the latitude and longitude coordinates N of the boats and ships X monitored in the present invention and boats and ships real time information data Kuku, the difference n of the demarcation latitude and longitude coordinates N ' of boats and ships X generally chooses within the scope of one, with reference to the longitude and latitude scope of actual world map, obtain according to study and calculating, in embodiments of the invention, difference n is preferably 0.00027 °.
The present invention achieves the round-the-clock monitoring to navigation channel by location check method, whether timely verification boats and ships are installed as requested and enable gps system, and locate the physical location of boats and ships, there is can being reminded of departing from, there is can solving in time of potential safety hazard or fault, ensure the safety of the unobstructed of navigation channel and boats and ships, decreased manual operation, achieve automatic management.
Target lock-on method described in step 1.7 comprises the following steps:
Step 2.1: the boats and ships X image detected is write effective object queue L;
Step 2.2: traversal subsequent frame, the boats and ships X in the boats and ships Y detected and original effect object queue L carries out paired comparisons, if successful matching, carries out next step, if match unsuccessful, in effective target queue L, increases fresh target Y;
Step 2.3: effective target frame number adds one, and on target frame reference number, repeat step 2.2.
In the present invention, target lock-on method is mainly used in obtaining continuous print boats and ships image, and ensures that obscuring does not appear in the sequence number of the boats and ships when having many boats and ships.This method main flow is: in the current scope having recognized target, carry out real-time image interception, intercept the image of the first frame, and detect target in the picture, detect that the target image detected then is write effective object queue L by target, then intercept and detect the image of next frame, existing target in the target of intercepting and original effect queue L is carried out paired comparisons, represent that this is the target boats and ships newly added when matching unsuccessful, therefore in effective target queue L, increase target in addition, then effective target frame number is added one when successful matching, and on target frame reference number.Such as, retrieve same ship 1, then what all in this queue target frames marked is all 1, and available frame count is the number of times of successful matching always, means locking ship 1; When going out spot 2 in monitoring range, because the data of ship 1 and ship 2 cannot be matched, therefore ship 2 is increased to another target, target frame marks 2, after detect one time 2 continue on target frame mark 2, available frame count is the number of times of successful matching, mean locking ship 2.
Target lock-on method is the part in the check method of location, and only having target lock-on method normally to work could ensure carrying out smoothly of location check method conscientiously.
Described paired comparisons comprises the following steps:
Step 3.1: the boats and ships Y newly detected is compared to obtain difference with four, the upper and lower, left and right endpoint value of the boats and ships X in original effect object queue L, gets the absolute value of difference;
Step 3.2: when left end point difference is less than a and lower extreme point difference is less than b, or right endpoint difference be less than c and upper extreme point difference is less than d time successful matching, otherwise be fresh target Y; Wherein, 15 < a < 45,1 < b < 9,15 < c < 45,15 < d < 45.
In the present invention, whether the target that paired comparisons is mainly used in the target that newly detects and original effect object queue L matches to determine whether will add new target in original effect object queue L.This method main flow is: from said method, the mode of main intercepting target of the present invention is the binarized target frame obtaining target place, according to the trend walking always to determine target of target frame, therefore by four, the upper and lower, left and right endpoint value of the target in the target that newly detects and original effect object queue L, obtain difference, get the absolute value of difference; When the difference of left end point is less than certain value a and the difference of lower extreme point is less than certain value b, or the difference of right endpoint be less than certain value c and the difference of upper extreme point is less than d time then successful matching, being considered as is the proper motion frame of same existing target; When not meeting above-mentioned comparison condition, be then considered as being a target newly appearing in video camera, namely match unsuccessful.
In the embodiment of this paired comparisons, a value is got 30, b value and is got 5, c value and get 30, d value and get 30, and above each value can be determined by calculating study.
By paired comparisons, the present invention judges whether the ship target in the process of location verification is now existing ship target, be intended to control continuous print target, when especially having many boats and ships in monitoring range, this method can ensure the effective tracking to boats and ships, ensure can lock each ship in tracing process, and fresh target can be set to when occurring in monitoring range newly entering target boats and ships in tracing process fast implement to follow the tracks of, the movement locus that each ship of practical understanding is different, guarantee can not occur in monitoring range that the situation of losing followed by boats and ships, also the navigation that ship is safer can be ensured, not deviation.
Paired comparisons is the part in target lock-on method, only has paired comparisons normally to carry out conscientiously to ensure carrying out smoothly of target lock-on method.
Described Ship GPS location check method also comprises data base management method, and described data base management method comprises the following steps:
Step 4.1: the video image of the boats and ships that screening is locked;
Step 4.2: the result of comparison is presented on target boats and ships;
Step 4.3: set up time and the direction of motion that boats and ships entered and left monitoring range, be stored into database;
Step 4.4: calling data library inquiry.
In the present invention, data base management method is mainly used in intercepting the picture with name of vessel number, confirms boats and ships data message, sets up boats and ships and enters and leave the information such as time of control point and the direction of motion, be stored into database.This method main flow is: in the effective queue obtained by above-mentioned steps, screen video image that the is tracked and boats and ships of locking, intercept the image with name of vessel number and confirm official number and name of vessel, even derive more information, set up out boats and ships according to the information difference of official number and name of vessel and enter and leave the information such as time of monitoring range and the direction of motion, and be stored into database, when needs usage data storehouse, inquiry job is carried out in calling data storehouse.
The data preparation of boats and ships is put in storage by data base management method by the present invention, comprise positional information, and can accomplish when needs to have access in time, the situation of ship can be understood in time, to be more convenient for the management of boats and ships, and to help administrative staff more to understand information about boats and ships, be more suitable for the management work of large batch of boats and ships, raise the efficiency, reduce mistake.
A kind of Ship GPS interactive system adopting described Ship GPS to locate check method is further comprises in the technology of the present invention, described Ship GPS interactive system comprises ship's fix terminal and Ship GPS location terminal verification, and described ship's fix terminal and Ship GPS location terminal verification communicate to connect with boats and ships real time information data storehouse respectively; Described Ship GPS location terminal verification comprise the Treatment Analysis module that have employed described Ship GPS location check method and with the video camera of described Treatment Analysis model calling, display module and communication module.
In the present invention, adopt described Ship GPS to locate the Ship GPS interactive system of check method and comprise the ship's fix terminal that communicates to connect with boats and ships real time information data storehouse respectively and Ship GPS locates terminal verification.Described ship's fix terminal is located on different boats and ships, for opening the position of locating boats and ships in real time, and the locating information of boats and ships is transferred to boats and ships real time information data storehouse by communication connection; Described Ship GPS location terminal verification comprise Treatment Analysis module and with the video camera of described Treatment Analysis model calling, display module and communication module, Ship GPS location check method is then the use of in above-mentioned Treatment Analysis module, described Treatment Analysis module utilizes the video camera connected to obtain the panoramic video in navigation channel, real-time boats and ships image and information is shown by display module, by communication module and boats and ships real time information data storehouse swap data, complete the mutual of ship information.
The invention solves due in prior art, in the process of existing boats and ships video monitoring, often function point is all the real-time navigation chart locking certain ship, whether gps system is installed for boats and ships or has installed whether open more difficult judgement, and the needs caused also will be investigated ship and whether use or open gps system while utilizing a large amount of manpowers accurately to monitor for ship, also may need to arrange one by one the ship looked for and dangerous situation occurs, cannot operating efficiency be ensured, also cannot meet the problem now to the requirement that boats and ships are located in real time.
The present invention is by location check method, target lock-on method, the cooperation of paired comparisons and data base management method, make under the cooperation of supervisory control system, Ship GPS location terminal verification can not only obtain continuous print boats and ships video, realize the round-the-clock monitoring to navigation channel, continuous print boats and ships video can not only be obtained, realize the round-the-clock monitoring to navigation channel, more by adopting GPS technology to investigate the ship do not installed or install and but do not open gps system with Ship GPS interactive system, adopt native system to carry out monitoring to boats and ships to identify, and compare with the GPS information in database, just can know whether boats and ships have installed gps system very easily, do not have installation to send guard boat to be tackled at once, real-time locking position can be carried out to boats and ships, once boats and ships are caused danger and also can be rushed towards scene in the very first time and rescue, better ensure that the driving safety of the unobstructed of navigation channel and boats and ships, decrease manual operation, achieve automatic management, and be stored into database by monitoring the data message etc. obtained, be convenient to the digital management of boats and ships, can call in time whenever necessary, and administrative staff can be helped more to understand information about boats and ships.