Method and system for realizing GPS mapping camera picture coordinate on mobile platformTechnical Field
The invention relates to the field of GPS coordinate real-time mapping, in particular to a method and a system for realizing GPS mapping of camera picture coordinates on a mobile platform.
Background
Along with the development and progress of science and technology, camera equipment can be carried on mobile platform, remove real time monitoring and video recording to various places on mobile equipment such as unmanned aerial vehicle, on-vehicle, and mobile platform gets into each industry with the advantage of its flexibility, aspect, has played important effect in the aspect of personnel's management and control, traffic monitoring, investigation case handling, environmental detection etc..
At present, the mobile equipment carrying the camera can provide real-time video, and can play a role in real-time monitoring. However, at the same time, no more background information can be provided for roads, buildings and the like in the video, and video monitoring personnel need to be familiar with the shot scene information to make corresponding judgment and decision according to the real scene. When the monitored scene is relatively unfamiliar to the monitoring personnel, further measures are required to be taken to meet the requirement of further processing of the mobile video.
In view of the above technical problems, the prior art mainly adopts the following methods: 1. the video recorded by the mobile equipment is revisited and is matched with an electronic map for post analysis, so that the opportunity is easily delayed and the decision is influenced; 2. the method has the advantages that information marking is carried out on the fixed camera equipment in advance, background information is richer, monitoring personnel can obtain more scene information conveniently, the camera equipment placed on the mobile platform moves at any time, and the added marking information becomes staggered and cannot be matched with an actual scene; 3. through the mode that unmanned aerial vehicle fixed point was made a video recording or laser radar scans, the later stage is passed through image recognition technology and is combined with GPS location technology, adopts multiple arithmetic unit, carries out long-time operation, and to the 3D reconstruction of real scene week edge ring border, the same real-time poor of this kind of mode and preceding mode, even the little scene of area carries out the 3D modeling after shooing, also need spend very long time moreover.
In summary, it can be found that the direction information and the position information of the actual scene cannot be realized for the mobile platform carrying the camera device in the prior art.
Disclosure of Invention
The invention provides a method and a system for realizing GPS mapping camera picture coordinates on a mobile platform, which solve the technical problem that the mobile platform carrying a camera device cannot realize actual scene and position information.
The invention provides a method for realizing GPS mapping camera picture coordinates on a mobile platform, which comprises the following steps:
acquiring GPS longitude and latitude coordinates, directions and altitudes of the mobile platform camera equipment;
acquiring the position relation between the mobile platform camera and a target GPS;
and updating coordinates G (X, Y) of the target GPS mapping on the real-time picture in real time and displaying the mapping coordinates of the target GPS in real time.
Furthermore, the GPS coordinates, the direction and the altitude of the mobile platform camera are obtained, accurate positioning is carried out through a sensor and an RTK technology, the precision of GPS equipment of the mobile platform is within 3 meters, and the positioning precision is smaller than 0.5 degree in any direction.
Furthermore, the mobile platform camera equipment is a rotatable pan-tilt camera, and the accuracy of the pan-tilt in the horizontal direction and the vertical direction is less than 0.1 degree.
It should be noted that, in order to make the mapping coordinates of the target GPS accurately appear in the image, the positioning accuracy of the GPS device on the mobile platform and the camera positioning device is required to be within 3 meters, and by the RTK technology, the positioning accuracy requires that the arbitrary direction is less than 0.5 degrees, and if the mobile platform is provided with a rotatable pan-tilt camera, the accuracy of the pan-tilt in the horizontal and vertical directions is required to be less than 0.1 degrees.
Furthermore, the obtaining of the position relationship between the mobile platform camera and the target GPS specifically includes,
setting an included angle of a mobile platform camera-a geocentric O-target GPS as c;
respectively acquiring longitude and latitude and altitude data of the mobile platform camera and the target GPS,
the latitude and longitude coordinates A (j, w) of the mobile platform camera,
latitude value of the mobile platform camera
,
Longitude value of the mobile platform camera
,
Altitude of the mobile platform camera
,
Longitude and latitude coordinates B (j, w) of the target GPS,
altitude of the target GPS
,
The latitude value of the target GPS
,
The target GPS longitude value
;
According to the spherical trigonometric cosine theorem, a cosine function of c is obtained:
obtaining the included angle P of the current north-positive direction-the mobile platform camera-the target GPS, wherein the mobile platform camera is a vertical included angle T of 0 degree based on sea level, and the distance between the mobile platform camera and the target GPS
;
Obtaining three-dimensional coordinates (P, T) of the target GPS according to a GPS-PT coordinate formula, wherein:
further, the obtaining and real-time updating of the coordinates G (X, Y) of the target GPS mapped on the real-time image specifically includes;
obtaining dimensional parameters of the mobile platform camera, wherein
p is the horizontal angle of the real-time lens after the position of the mobile platform camera is changed,
t is the vertical angle of the real-time lens after the mobile platform camera changes position,
v is a real-time horizontal field angle of the mobile platform camera after the position of the mobile platform camera is changed;
a horizontal offset and a vertical offset of the target GPS coordinates after changing position for the mobile platform camera,
the difference represents the angular deviation, R is the spherical radius, and the resolution of the two-dimensional video picture is W x H plane;
by adopting a 3D-2D formula,
the invention also provides a system for realizing GPS mapping camera picture coordinates on a mobile platform, which is characterized by comprising,
the acquisition unit is used for acquiring the GPS longitude and latitude coordinates, the direction and the altitude of the mobile platform camera equipment;
the computing unit is used for acquiring and computing the position relation between the mobile platform camera and the target GPS;
and the display unit is used for updating the coordinates G (X, Y) of the target GPS mapping on the real-time picture in real time and displaying the mapping coordinates of the target GPS in real time.
Furthermore, the computing unit specifically includes a memory,
the data acquisition module is used for acquiring longitude and latitude and altitude data of the mobile platform camera and the target GPS;
the first calculation module is used for calculating an included angle c between the mobile platform camera and the ground center O-target GPS;
a second calculation module for calculating the three-dimensional coordinates (P, T) of the target GPS;
and the third calculation module is used for calculating the movement deviation of the target GPS coordinate.
The invention also provides a device for realizing GPS mapping camera picture coordinates on a mobile platform, which comprises a processor and a memory,
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is configured to execute the method of any one of claims 1-4 to implement GPS mapping camera view coordinates on a mobile platform according to instructions in the program code.
The invention also provides a computer program product comprising instructions that, when run on a computer, cause the computer to perform the method of any of claims 1-4 for implementing GPS mapping camera view coordinates on a mobile platform.
According to the technical scheme, the target GPS information position can be displayed in the video picture of the mobile platform in real time, and when the position of the mobile platform changes, the target GPS information position follows in real time, so that the positioning is accurate, and the technical problem that the mobile platform with the camera device in the prior art cannot realize actual scene and position information is solved.
Drawings
FIG. 1 is a schematic flow chart of example 1 of the present invention;
fig. 2 to fig. 3 are model diagrams of P, T obtained by the GPS mapping algorithm according toembodiment 1 of the present invention;
fig. 4 to 6 are schematic diagrams illustrating an effect of implementing GPS real-time mapping in an actual application scenario according toembodiment 1 of the present invention;
fig. 7 is a schematic structural diagram of embodiment 2 of the present invention.
Detailed Description
In order to make the objects, features and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the embodiments described below are only a part of the embodiments of the present application, but not all the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the embodiments in the present application.
Example 1:
fig. 1 is a flowchart illustrating an embodiment of a method for implementing GPS mapping of camera frame coordinates on a mobile platform, including,
step 101, acquiring GPS longitude and latitude coordinates, directions and altitudes of mobile platform camera equipment;
it should be noted that, in order to make the target GPS mapping coordinates accurately present in the image, the positioning accuracy of the GPS device on the mobile platform, i.e. the camera positioning device, is required to be within 3 meters, and by using the RTK technique, the positioning accuracy requires that the arbitrary direction is less than 0.5 degrees, and if the mobile platform is provided with a rotatable pan-tilt camera, the accuracy of the pan-tilt in the horizontal and vertical directions is required to be less than 0.1 degrees.
Specifically, the acquisition process is as follows:
respectively acquiring initial data of a mobile platform camera and a target GPS by using a sensor and an RTK technology:
the target GPS is mapped at coordinates G (X, Y),
the latitude and longitude coordinates a (j, w) of the mobile platform camera,
latitude value of mobile platform camera
,
Longitude value for mobile platform camera
,
Altitude of mobile platform camera
,
Latitude and longitude coordinates B (j, w) of the target GPS,
Latitude value of target GPS
,
Target GPS longitude value
,
The north-positive direction-the mobile platform camera-the target GPS angle is P,
the moving platform camera is based on a vertical included angle T of 0 degree of sea level,
distance between mobile platform camera and target GPS
;
Setting the included angle of a mobile platform camera-a geocentric O-target GPS as c,
the center of the earth is O;
it should be noted that, the data acquired by using the sensor and the RTK technology may specifically be acquired by using a GPS module with an RTK (Real-time kinematic, Real-time differential) technology, such as a pustular GPS module, and the GPS positioning and orientation data in the module may be read according to a communication protocol provided by the module through serial port communication.
102, acquiring the position relation between a mobile platform camera and a target GPS;
from the data obtained instep 101, the cosine function of c is obtained according to the spherical trigonometric cosine theorem from the model diagram of fig. 2:
then:
from the model diagram of fig. 2, according to the spherical sine formula:
in the above formula, P = NAB, ANB =
,
Deformation can result in:
then:
from the model diagram of FIG. 3
After obtaining the three-dimensional coordinates (P, T) of the target GPS, calculating the change of the target GPS after the position of the mobile platform camera changes, specifically, obtaining the dimensional parameters after the position of the mobile platform camera changes:
p is the horizontal angle of the real-time lens after the position of the mobile platform camera is changed,
t is the vertical angle of the real-time lens after the mobile platform camera changes position,
v is a real-time horizontal field angle of the mobile platform camera after the position of the mobile platform camera is changed;
is provided with
Respectively carrying out horizontal offset, vertical offset and angle offset on the target GPS coordinate after the position of the mobile platform camera is changed, wherein R is a spherical radius, and the resolution of a two-dimensional video picture is a plane W x H;
according to the formula of 3D-2D,
it should be noted that, the invention "CN 104504685B-a real-time high-precision positioning method for virtual tags of augmented reality cameras" is cited in the 3D-2D formula, and the drawings and related formulas of the invention need to be referred to for specific derivation and calculation.
And 103, updating the coordinates G (X, Y) of the target GPS mapping on the real-time picture in real time and displaying the mapping coordinates of the target GPS in real time.
And calculating the position of the Δ y and the position of the x of the target GPS in the real-time video picture according to thestep 102, thereby realizing the real-time mapping and updating of the coordinates of the target GPS in the camera picture on the mobile platform.
To describe a specific application scenario of the embodiment, fig. 4, fig. 5, and fig. 6 are schematic diagrams illustrating an effect of the mobile platform (unmanned aerial vehicle) of the embodiment to implement GPS real-time mapping, and fig. 4 illustrates a circle label "happy ocean theme house", where the label of the "happy ocean theme house" is always attached to an indicated actual building in a continuous forward moving process of the mobile platform (unmanned aerial vehicle), please refer to fig. 5 and fig. 6, to achieve the effect of GPS real-time mapping. Except for buildings encircled by circles, other objects based on the GPS positioning tags are mapped in real time in the video.
According to the technical scheme, the longitude and latitude coordinates, the direction and the altitude of the GPS of the mobile platform camera shooting equipment are obtained through the sensor, the position relation between the mobile platform camera and the target GPS is obtained through the model, the difference quantity after the mobile platform changes the direction is calculated and updated to the target GPS coordinate, the real-time display of the target GPS information position in a video picture of the mobile platform is achieved, when the position of the mobile platform changes, the target GPS information position follows in real time, the positioning is accurate, and the technical problem that the mobile platform with the camera shooting device in the prior art cannot achieve actual scenes and position information is solved.
Example 2:
fig. 6 is a schematic structural diagram of a system for implementing GPS mapping of camera frame coordinates on a mobile platform according to the present invention, including,
an acquiringunit 201, configured to acquire a GPS longitude and latitude coordinate, a direction, and an altitude of a mobile platform camera device;
it should be noted that, in this embodiment, the device in the acquisition unit for acquiring data such as the longitude and latitude coordinates, the direction, the altitude, and the like of the GPS of the mobile platform image pickup device is a sensor, and the accuracy of the sensor here will affect the coordinates of the target GPS to be calculated in the present invention, so the higher the accuracy of the sensor is, the better the accuracy of the sensor is, in this embodiment, the positioning accuracy of the GPS device on the mobile platform, that is, the camera positioning device, is within 3 meters, and by the RTK technology, the positioning accuracy requires that any direction is less than 0.5 degrees, and if the mobile platform is provided with a rotatable pan-tilt camera, the accuracy of the pan-tilt in the horizontal direction.
In this embodiment, the obtainingunit 201 obtains initial data of the mobile platform camera and the target GPS respectively:
the target GPS is mapped at coordinates G (X, Y),
the latitude and longitude coordinates a (j, w) of the mobile platform camera,
latitude value of mobile platform camera
,
Longitude value for mobile platform camera
,
Altitude of mobile platform camera
,
Latitude and longitude coordinates B (j, w) of the target GPS,
Latitude value of target GPS
,
Target GPS longitude value
,
The north-positive direction-the mobile platform camera-the target GPS angle is P,
the moving platform camera is based on a vertical included angle T of 0 degree of sea level,
distance between mobile platform camera and target GPS
;
Setting the included angle of a mobile platform camera-a geocentric O-target GPS as c,
the center of the earth is O;
a calculatingunit 202, configured to obtain and calculate a position relationship between the mobile platform camera and a target GPS;
the calculating unit of this embodiment is a core step of the system, and specifically includes,
the data acquisition module 2021 is configured to acquire longitude and latitude and altitude data of the mobile platform camera and the target GPS;
it should be noted that this step partially coincides withstep 201, and the data acquired in this step may be directly extracted fromstep 201.
The first calculation module 2022 is configured to calculate an included angle c between the mobile platform camera and the geocentric O-target GPS;
from the model diagram of fig. 2, the cosine function of c is obtained according to the spherical trigonometric cosine theorem:
then:
a second calculation module 2023 for calculating the three-dimensional coordinates (P, T) of the target GPS;
from the model diagram of fig. 2, according to the spherical sine formula:
in the above formula, P = NAB, ANB =
,
Deformation can result in:
then:
from the model diagram of FIG. 3
A third calculating module 2024, configured to calculate a movement offset of the target GPS coordinate.
After obtaining the three-dimensional coordinates (P, T) of the target GPS, calculating the change of the target GPS after the position of the mobile platform camera changes, specifically, obtaining the dimensional parameters after the position of the mobile platform camera changes:
p is the horizontal angle of the real-time lens after the position of the mobile platform camera is changed,
t is the vertical angle of the real-time lens after the mobile platform camera changes position,
v is a real-time horizontal field angle of the mobile platform camera after the position of the mobile platform camera is changed;
is provided with
、
、
Respectively carrying out horizontal offset, vertical offset and angle offset on the target GPS coordinate after the position of the mobile platform camera is changed, wherein R is a spherical radius, and the resolution of a two-dimensional video picture is a plane W x H;
according to the formula of 3D-2D,
it should be noted that, the invention "CN 104504685B-a real-time high-precision positioning method for virtual tags of augmented reality cameras" is cited in the 3D-2D formula, and the drawings and related formulas of the invention need to be referred to for specific derivation and calculation.
And thedisplay unit 203 is used for updating the coordinates G (X, Y) of the target GPS mapping on the real-time picture in real time and displaying the mapping coordinates of the target GPS in real time.
In the system of the embodiment, the acquisition unit acquires initial GPS data of the mobile platform camera device, the calculation unit establishes the corresponding position relationship between the mobile platform camera and the target GPS, and the display unit updates coordinates G (X, Y) of the target GPS mapped on a real-time picture and displays the mapping coordinates of the target GPS in real time. The real-time presentation of the target GPS information position in the video picture of the mobile platform is realized, and when the position of the mobile platform changes, the target GPS information position is followed in real time, the positioning is accurate, and the technical problem that the mobile platform with the camera device in the prior art cannot realize the actual scene and position information is solved.
Example 3:
a device for realizing GPS mapping camera picture coordinate on a mobile platform comprises a processor and a memory, wherein the memory is used for storing a program code and transmitting the program code to the processor; the processor is configured to execute any one of the embodiments of the method for implementing GPS mapping camera view coordinates on a mobile platform according to instructions in the program code.
Example 4:
a computer program product comprising instructions which, when run on a computer, cause the computer to perform any one of the embodiments of the method of implementing GPS mapping camera view coordinates on a mobile platform.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the apparatus and the product described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in this application, it should be understood that the disclosed method, system, apparatus, and program product may be implemented in other ways.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.