Summary of the invention
The technical matters that the present invention solves is, because in the prior art, in the process of existing boats and ships video monitoring, often function point all is to lock the real-time navigation chart of certain bar ship, whether gps system is installed or has been installed whether to open and relatively difficult judged for boats and ships, and a large amount of manpower of the needs utilization that causes accurately also will be investigated ship when monitoring for ship and whether uses or open gps system, may also need to arrange one by one the ship of looking for the generation dangerous situation, can't guarantee work efficiency, also can't satisfy present problem to the real-time requirement of locating of boats and ships, and then a kind of Ship GPS location check method and Ship GPS interactive system of optimization are provided.
The technical solution adopted in the present invention is, a kind of Ship GPS location check method, and described location check method may further comprise the steps:
Step 1.1: utilize video camera to obtain panoramic video, get the mean value of each pixel of all two field pictures of panoramic video in the nearest T time and gather as a setting image A, be set to gray level image;
Step 1.2: get the video image B of current point in time, be set to gray level image; Video image B and background image A are done calculus of differences, compare difference, difference is designated as M;
Step 1.3: the difference image C to video image B and background image A carries out binaryzation, gets M and threshold value Q relatively, is 255 if M then establishes difference image C gray-scale value greater than threshold value Q, is 0 otherwise establish its gray-scale value, wherein 8≤Q≤80;
Step 1.4: use algorithm of region growing, the binary image of scanning step 1.4 gained is 255 if the pixel value of consecutive point is arranged, and then is merged into a zone;
Step 1.5: obtain four end points in each regional upper and lower, left and right and form a rectangle frame, be designated as boats and ships X;
Step 1.6: by with boats and ships real-time information database in the gross data of boats and ships X compare, whether the rectangle frame that determining step 1.5 obtains can meet the characteristics of the boats and ships X characteristics of motion, if satisfied then carry out next step, remove repeating step 1.1 as jamming target if do not satisfy then;
Step 1.7: for detecting and judge that the boats and ships X that meets regularity of ship's movement utilizes the target lock-on method to lock, and the coordinate of video camera carried out the 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 the boats and ships real-time information data Kuku is compared, the note difference is n, if 0≤n≤0.001 °, think that then the boats and ships X that identifies is exactly these boats and ships in this information bank, is presented at the name of vessel in the database on the boats and ships X;
Step 1.9: the verification of next ship is carried out after verifying and finishing in the GPS location of boats and ships X.
Preferably, the described target lock-on method of step 1.7 may further comprise the steps:
Step 2.1: the boats and ships X image that detects is write effective target formation L;
Step 2.2: the traversal subsequent frame, the boats and ships X among the boats and ships Y that detects and the former effective object queue L carries out paired comparisons, if successful matching is then carried out next step, if match the unsuccessful fresh target Y that then increases in effective target formation L;
Step 2.3: the effective target frame number adds one, and marks sequence number at the target frame, repeating 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 may further comprise the steps:
Step 3.1: four endpoint values in upper and lower, left and right of the boats and ships X among the boats and ships Y that will newly detect and the former effective object queue L relatively get difference, get the absolute value of difference;
Step 3.2: when the left end point difference less than a and lower extreme point difference less than b, or right endpoint difference successful matching during less than d less than c and upper extreme point difference, 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 may further comprise the steps:
Step 4.1: the video image that screens blocked boats and ships;
Step 4.2: the result that will compare is presented on the target boats and ships;
Step 4.3: set up time and 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 that adopts described Ship GPS location check method, described Ship GPS interactive system comprises ship's fix terminal and Ship GPS location terminal verification, and described ship's fix terminal is connected terminal verification and is connected with boats and ships real-time information database communication respectively with Ship GPS; Described Ship GPS location terminal verification comprises the Treatment Analysis module that has adopted described Ship GPS location check method and video camera, display module and the communication module that is connected with described Treatment Analysis module.
The invention provides a kind of Ship GPS location check method of optimization and adopted Ship GPS to locate the Ship GPS interactive system of check method, by the location check method, the target lock-on method, the cooperation of paired comparisons and data base management method, so that under the cooperation of supervisory system, Ship GPS location terminal verification can not only obtain continuous boats and ships video, realization is to the round-the-clock monitoring in navigation channel, more can be by adopting GPS technology investigation not install or install the ship of but not opening gps system with the Ship GPS interactive system, can carry out real-time locking position to boats and ships, in case boats and ships are caused danger and also can be rushed towards the scene in the very first time and rescue, better guaranteed the driving safety of the unobstructed and boats and ships in navigation channel, reduced manually-operated, realized automatic management, and data message that monitoring is obtained etc. is stored into database, be convenient to the digital management of boats and ships, can in time call whenever necessary, and can help the more information of understanding about boats and ships of managerial personnel.
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 may further comprise the steps:
Step 1.1: utilize video camera to obtain panoramic video, get the mean value of each pixel of all two field pictures of panoramic video in the nearest T time and gather as a setting image A, be set to gray level image;
Step 1.2: get the video image B of current point in time, be set to gray level image; Video image B and background image A are done calculus of differences, compare difference, difference is designated as M;
Step 1.3: the difference image C to video image B and background image A carries out binaryzation, gets M and threshold value Q relatively, is 255 if M then establishes difference image C gray-scale value greater than threshold value Q, is 0 otherwise establish its gray-scale value, wherein 8≤Q≤80;
Step 1.4: use algorithm of region growing, the binary image of scanning step 1.4 gained is 255 if the pixel value of consecutive point is arranged, and then is merged into a zone;
Step 1.5: obtain four end points in each regional upper and lower, left and right and form a rectangle frame, be designated as boats and ships X;
Step 1.6: by with boats and ships real-time information database in the gross data of boats and ships X compare, whether the rectangle frame that determining step 1.5 obtains can meet the characteristics of the boats and ships X characteristics of motion, if satisfied then carry out next step, remove repeating step 1.1 as jamming target if do not satisfy then;
Step 1.7: for detecting and judge that the boats and ships X that meets regularity of ship's movement utilizes the target lock-on method to lock, and the coordinate of video camera carried out the 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 the boats and ships real-time information data Kuku is compared, the note difference is n, if 0≤n≤0.001 °, think that then the boats and ships X that identifies is exactly these boats and ships in this information bank, is presented at the name of vessel in the database on the boats and ships X;
Step 1.9: the verification of next ship is carried out after verifying and finishing in the GPS location of boats and ships X.
Among the present invention, location check method fundamental purpose is for to catch and to verify the location to the boats and ships profile.The main flow process of this method is: obtain the panoramic video in navigation channel by video camera, and the mean value of getting each pixel of all two field pictures of panoramic video in the nearest T time gathers as a setting image A, be set to gray level image; The background image A of this moment does mean value owing to got all two field pictures of the panoramic video in the nearest T time, under picture is situation without ship, background image A is common navigation channel panorama, when picture is to have in the situation of ship, because boats and ships are to move always, so background image A still is common navigation channel panorama when averaging; Get the video image B of current point in time, the video image B of this moment is coloured image also, and it is set to gray level image, does calculus of differences with background image A and processes; Calculus of differences is processed the difference M obtain constantly and threshold value Q compares, in case find difference M greater than threshold value Q then represent to have target boats and ships X to sail the navigation channel into, so it is 255 that current difference image C is arranged its gray-scale value, it is the binary conversion treatment of full display white, and difference M is not arranged its gray-scale value greater than the difference image C of threshold value Q is 0, namely entirely shows the binary conversion treatment of black; In theory, threshold value Q is a scope, adjusts in real time along with the variation of weather in variable range, and threshold value can be adjusted into the threshold value that obtains when poor greater than weather automatically when weather is good.
Use algorithm of region growing, the binary image of scanning gained is 255 if the pixel value of consecutive point is arranged, and then is merged into a zone; Behind the algorithm of region growing, obtain four end points in each regional upper and lower, left and right and form a rectangle frame, be designated as boats and ships X; After obtaining boats and ships X, need to by with boats and ships real-time information database in the gross data of boats and ships X compare, whether the rectangle frame that judgement is obtained by algorithm of region growing can meet the characteristics of the boats and ships X characteristics of motion, remove as jamming target if just can't satisfy, the control of comparison is herein obtained by study.
Threshold value Q among the present invention generally chooses in a scope, obtains according to study and calculating, is preferably 25 in the embodiments of the invention.
Among the present invention take the T time as unit dynamic real-time update video pictures, obtain according to the channel status of reality and analytical calculation, be preferably 600s in the embodiments of the invention.
Image among the present invention all is set to gray level image after intercepting.Gray scale namely uses black tone to represent object, from 0%(white) to 100%(black) brightness value of represented object.
Simultaneously, piece image comprises that target object, background also have noise, want from many-valued digital picture, directly to extract target object, the most frequently used method is set a threshold value Q exactly, with Q the data of image are divided into two parts: greater than the pixel group of Q with less than the pixel group of Q, this is image binaryzation (BINARIZATION).Image binaryzation, the gray-scale value of the pixel on the image is set to 0 or 255 exactly, namely whole image is presented significantly to only have black and white visual effect.And generally speaking, the edge of object can present the uncontinuity of gray scale, so can finally obtain one near the target frame of rectangle by some zones identical with gray scale target that be scattered around the pixel group behind the algorithm of region growing combination and segmentation pixel group, be target.
The present invention is by the location check method, utilize video camera to obtain the navigation channel panoramic picture, utilize difference algorithm that the boats and ships profile is caught, when finding in the scope of a certain discovery target, target to be compared behind the target boats and ships X, the assurance target is not lost, simultaneously in time for detecting and judging that the boats and ships X that meets regularity of ship's movement utilizes the target lock-on method to lock, and the coordinate of video camera carried out the world coordinates conversion, be converted to the latitude and longitude coordinates N of the boats and ships X that monitors, the demarcation latitude and longitude coordinates N ' of boats and ships X in latitude and longitude coordinates N and the boats and ships real-time information data Kuku is compared, if longitude and latitude is in certain deviation range, think that then the boats and ships X that identifies is exactly these boats and ships in this information bank, name of vessel in the database is presented on the boats and ships X, location and the verification of a boats and ships X have namely been finished, after the end, the method iterates flow process continues the location of next boats and ships and verifies.
The difference n of the demarcation latitude and longitude coordinates N ' of boats and ships X generally chooses in a scope in the latitude and longitude coordinates N of the boats and ships X that monitors among the present invention and the boats and ships real-time information data Kuku, longitude and latitude scope with reference to actual world map, obtain according to study and calculating, difference n is preferably 0.00027 ° in the embodiments of the invention.
The present invention has realized round-the-clock monitoring to the navigation channel by the location check method, in time verify boats and ships and whether install as requested and enabled gps system, and the physical location of location boats and ships, can being reminded of departing from arranged, can in time solving of potential safety hazard or fault arranged, ensure the safety of the unobstructed and boats and ships in navigation channel, reduced manually-operated, realized automatic management.
The described target lock-on method of step 1.7 may further comprise the steps:
Step 2.1: the boats and ships X image that detects is write effective target formation L;
Step 2.2: the traversal subsequent frame, the boats and ships X among the boats and ships Y that detects and the former effective object queue L carries out paired comparisons, if successful matching is then carried out next step, if match the unsuccessful fresh target Y that then increases in effective target formation L;
Step 2.3: the effective target frame number adds one, and marks sequence number at the target frame, repeating step 2.2.
Among the present invention, the target lock-on method is mainly used in obtaining continuous boats and ships image, and guarantees that obscuring does not appear in the sequence number of boats and ships when having many boats and ships.The main flow process of this method is: carry out real-time image interception in the current scope that has recognized target, intercept the image of the first frame, and in image, detect target, detect target and then the target image that detects is write effective target formation L, then intercept and detect the image of next frame, the target of intercepting and the existing target among former effective formation L are carried out paired comparisons, represent that when pairing is unsuccessful this is new target boats and ships that add, so in effective target formation L, increase target in addition, when successful matching, then the effective target frame number is added one, and mark sequence number at the target frame.For example, retrieve same ship 1, what then mark on all target frame in this formation all is 1 always, and available frame count is the number of times of successful matching, means locking ship 1; When going out spot 2 in the monitoring range, owing to the data of ship 1 and ship 2 can't be matched, so ship 2 is increased to another target, mark 2 at the target frame, after detect 2 continuation and mark 2 at the target frame, available frame count is the number of times of successful matching, means locking ship 2.
The target lock-on method is the part in the check method of location, only has the normal operation of target lock-on method could conscientiously guarantee carrying out smoothly of location check method.
Described paired comparisons may further comprise the steps:
Step 3.1: four endpoint values in upper and lower, left and right of the boats and ships X among the boats and ships Y that will newly detect and the former effective object queue L relatively get difference, get the absolute value of difference;
Step 3.2: when the left end point difference less than a and lower extreme point difference less than b, or right endpoint difference successful matching during less than d less than c and upper extreme point difference, otherwise be fresh target Y; Wherein, 15<a<45,1<b<9,15<c<45,15<d<45.
Among the present invention, whether the target among the target that paired comparisons is mainly used in newly detecting and the former effective object queue L matches to determine whether will add new target in former effective object queue L.The main flow process of this method is: by said method as can be known, the mode of main intercepting target of the present invention for obtain the target place by the target frame of binaryzation, the trend of always determining target of walking according to the target frame, so by the target that newly detects and four endpoint values in upper and lower, left and right of the target among former effective object queue L, obtain difference, get the absolute value of difference; When the difference of left end point is worth b less than the difference of certain value a and lower extreme point less than certain, or the then successful matching during less than d less than the difference of certain value c and upper extreme point of the difference of right endpoint, being considered as is the proper motion frame of same existing target; When not satisfying above-mentioned comparison condition, then being considered as is a target that newly appears in the video camera, namely matches unsuccessful.
Among 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, more than each value can determine by calculating study.
Whether the ship target that the present invention judges in the process of verifying present location by paired comparisons is existing ship target, be intended to control continuous target, when especially in monitoring range, many boats and ships being arranged, this method can guarantee the effective tracking to boats and ships, guarantee in tracing process, can lock each ship, and can fast it be set to fresh target when occurring newly advancing the target boats and ships in the monitoring range in tracing process implements to follow the tracks of, conscientiously understand the different movement locus of each ship, guarantee can in monitoring range, not occur boats and ships with the situation of losing, also can guarantee the navigation that ship is safer, not deviation.
Paired comparisons is the part in the target lock-on method, only has paired comparisons normally to carry out conscientiously guaranteeing 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 may further comprise the steps:
Step 4.1: the video image that screens blocked boats and ships;
Step 4.2: the result that will compare is presented on the target boats and ships;
Step 4.3: set up time and direction of motion that boats and ships entered and left monitoring range, be stored into database;
Step 4.4: calling data library inquiry.
Among the present invention, data base management method is mainly used in intercepting the picture with ship name, confirms the boats and ships data message, sets up boats and ships and enters and leave the information such as time of control point and direction of motion, is stored into database.The main flow process of this method is: the video image that screens the boats and ships of tracked and locking in the effective formation that obtains by above-mentioned steps, intercepting is with the image of ship name and confirm official number and name of vessel, even derive more information, difference is set up out boats and ships and is entered and leave the information such as time of monitoring range and direction of motion according to the information of official number and name of vessel, and being stored into database, inquiry job is carried out in the calling data storehouse when needs usage data storehouse.
The present invention is by the data preparation warehouse-in of data base management method with boats and ships, comprise positional information, and in needs, can accomplish in time to have access to, can in time understand the situation of ship, the be more convenient for management of boats and ships, and help the more information of understanding about boats and ships of managerial personnel, more be applicable to the management work of large batch of boats and ships, raise the efficiency, reduce mistake.
Also comprised a kind of Ship GPS interactive system that adopts described Ship GPS location check method 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 is connected terminal verification and is connected with boats and ships real-time information database communication respectively with Ship GPS; Described Ship GPS location terminal verification comprises the Treatment Analysis module that has adopted described Ship GPS location check method and video camera, display module and the communication module that is connected with described Treatment Analysis module.
Among the present invention, adopt the Ship GPS interactive system of described Ship GPS location check method to comprise ship's fix terminal and the Ship GPS location terminal verification that is connected with boats and ships real-time information database communication respectively.Described ship's fix terminal is located on the different boats and ships, is used for opening in real time the position with the location boats and ships, and the locating information of boats and ships is transferred to boats and ships real-time information database by communication connection; Described Ship GPS location terminal verification comprises Treatment Analysis module and the video camera, display module and the communication module that are connected with described Treatment Analysis module, then be to have used Ship GPS location check method in the above-mentioned Treatment Analysis module, the video camera that described Treatment Analysis module utilization connects is obtained the panoramic video in navigation channel, show real-time boats and ships image and information by display module, by communication module and boats and ships real-time information data change between database and flash data, finish the mutual of ship information.
The invention solves because in the prior art, in the process of existing boats and ships video monitoring, often function point all is to lock the real-time navigation chart of certain bar ship, whether gps system is installed or has been installed whether to open and relatively difficult judged for boats and ships, and a large amount of manpower of the needs utilization that causes accurately also will be investigated ship when monitoring for ship and whether uses or open gps system, may also need to arrange one by one the ship of looking for the generation dangerous situation, can't guarantee work efficiency, also can't satisfy present problem to the real-time requirement of locating of boats and ships.
The present invention is by the location check method, the target lock-on method, the cooperation of paired comparisons and data base management method, so that under the cooperation of supervisory system, Ship GPS location terminal verification can not only obtain continuous boats and ships video, realization is to the round-the-clock monitoring in navigation channel, can not only obtain continuous boats and ships video, realization is to the round-the-clock monitoring in navigation channel, more can be by adopting GPS technology investigation not install or install the ship of but not opening gps system with the Ship GPS interactive system, adopt native system that boats and ships are monitored identification, and compare with the GPS information in the database, just can know very easily whether boats and ships have installed gps system, do not install to send guard boat to be tackled at once, can carry out real-time locking position to boats and ships, in case boats and ships are caused danger and also can be rushed towards the scene in the very first time and rescue, better guaranteed the driving safety of the unobstructed and boats and ships in navigation channel, reduced manually-operated, realized automatic management, and data message that monitoring is obtained etc. is stored into database, be convenient to the digital management of boats and ships, can in time call whenever necessary, and can help the more information of understanding about boats and ships of managerial personnel.