CN112116529A - PTZ camera-based conversion method for GPS coordinates and pixel coordinates - Google Patents
PTZ camera-based conversion method for GPS coordinates and pixel coordinates Download PDFInfo
- Publication number
- CN112116529A CN112116529A CN202011008170.6A CN202011008170A CN112116529A CN 112116529 A CN112116529 A CN 112116529A CN 202011008170 A CN202011008170 A CN 202011008170A CN 112116529 A CN112116529 A CN 112116529A
- Authority
- CN
- China
- Prior art keywords
- camera
- coordinate system
- axis
- pixel
- coordinate
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 43
- 238000006243 chemical reaction Methods 0.000 title claims abstract description 38
- 238000013507 mapping Methods 0.000 claims abstract description 15
- 230000009466 transformation Effects 0.000 claims abstract description 8
- 230000003287 optical effect Effects 0.000 claims description 15
- 239000011159 matrix material Substances 0.000 claims description 12
- 230000001174 ascending effect Effects 0.000 claims description 6
- 238000004364 calculation method Methods 0.000 claims description 6
- 230000014509 gene expression Effects 0.000 claims description 3
- 239000000126 substance Substances 0.000 claims description 3
- 230000017105 transposition Effects 0.000 claims description 3
- 238000007792 addition Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000011426 transformation method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformation in the plane of the image
- G06T3/60—Rotation of a whole image or part thereof
- G06T3/604—Rotation of a whole image or part thereof using a CORDIC [COordinate Rotation Digital Compute] device
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01S—RADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
- G01S19/00—Satellite radio beacon positioning systems; Determining position, velocity or attitude using signals transmitted by such systems
- G01S19/38—Determining a navigation solution using signals transmitted by a satellite radio beacon positioning system
- G01S19/39—Determining a navigation solution using signals transmitted by a satellite radio beacon positioning system the satellite radio beacon positioning system transmitting time-stamped messages, e.g. GPS [Global Positioning System], GLONASS [Global Orbiting Navigation Satellite System] or GALILEO
- G01S19/42—Determining position
- G01S19/48—Determining position by combining or switching between position solutions derived from the satellite radio beacon positioning system and position solutions derived from a further system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/80—Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
Abstract
The invention discloses a method for converting GPS coordinates and pixel coordinates based on a PTZ camera, which comprises the following steps: (1) establishing a pixel coordinate system, a camera coordinate system and a world coordinate system; (2) constructing a coordinate conversion model S from a world coordinate system to a camera coordinate system; (3) constructing a coordinate conversion model K from a camera coordinate system to a pixel coordinate system; (4) calculating the unknowns of the coordinate transformation model S(5) Calculating an unknown quantity (f) of the coordinate transformation model Kx,fy) (ii) a (6) Mapping from the GPS coordinate point to the pixel coordinate point; (7) and mapping the pixel coordinate points to the GPS coordinate points.
Description
Technical Field
The invention relates to the field of computer vision, in particular to a method for converting GPS coordinates and pixel coordinates based on a PTZ camera.
Background
In recent years, with the gradual construction of the skynet project, traffic major roads, public security checkpoints, public gathering places, hotels, schools, fields and the like can be monitored through cameras. And a PTZ camera head is typically deployed therein. The pan-tilt can control the PTZ camera to perform omnidirectional (left-right/up-down) movement, zoom and zoom. In the case where the camera pose of the PTZ camera is known, the GPS coordinates of the target point and the pixel coordinates on the video screen are uniquely determined. Therefore, the PTZ camera is deployed, and the possibility is provided for the application of the conversion method technology of the GPS coordinates and the pixel coordinates. For example, the conversion method of the GPS coordinates and the pixel coordinates can visualize the GPS information of the territory of the national and local bureau into the video image and provide the territory following function. In addition, the method also allows for mapping of the plot on a video image and conversion to GPS information.
The coordinate transformation methods currently associated with the present invention are: the invention patent (application number: CN201811366347.2, name: a method, system and device for converting ground coordinates and wide-angle camera picture coordinates) discloses a method for converting ground coordinates and wide-angle camera picture coordinates, but does not consider and calculate the initial vertical deflection angle of a camera, so that the conversion of the camera has larger errors and the calibration steps of the camera are complicated; the same disadvantages exist in the invention patent (application number: CN201811366346.8, name: a coordinate conversion method and system of ground coordinates and PTZ cameras).
Disclosure of Invention
In order to overcome the defects in the prior art and realize quick camera calibration and good coordinate conversion precision, the invention provides a method for converting a GPS coordinate and a pixel coordinate based on a PTZ camera.
In order to realize the invention, the technical scheme is as follows:
a method for converting GPS coordinates and pixel coordinates based on a PTZ camera is characterized by comprising the following steps:
step 1) establishing a pixel coordinate system, a camera coordinate system and a world coordinate system;
step 2) constructing a coordinate conversion model S from a world coordinate system to a camera coordinate system;
step 3) constructing a coordinate conversion model K from a camera coordinate system to a pixel coordinate system;
Step 5) calculating the unknown quantity (f) of the coordinate transformation model Kx,fy);
Step 6) mapping from the GPS coordinate point to the pixel coordinate point;
and 7) mapping the pixel coordinate point to the GPS coordinate point.
The method for converting the GPS coordinates and the pixel coordinates based on the PTZ camera is characterized in that in the step (1), the pixel coordinate system takes the upper left corner of an image as an origin, the horizontal right direction is a U axis, and the vertical downward direction is a V axis.
The method for converting the GPS coordinates and the pixel coordinates based on the PTZ camera is characterized in that in the step (1), the camera coordinate system takes the optical center of the camera as an origin O, an X axis and a Y axis are respectively parallel to a U axis and a V axis of the pixel coordinate system, the Z axis is the optical axis direction of the camera, and a right-hand rectangular coordinate system is established.
The method for converting the GPS coordinates and the pixel coordinates based on the PTZ camera is characterized in that in the step (1), a right-hand rectangular coordinate system is established by taking a coordinate point with the longitude and the latitude of the GPS as 0 as an origin, taking the ascending direction from longitude to east as an X axis and taking the ascending direction from latitude to north as a Y axis.
The method for converting the GPS coordinates and the pixel coordinates based on the PTZ camera is characterized in that in the step (2), a coordinate conversion model S for constructing a world coordinate system to a camera coordinate system is a formula (1) and a formula (2);
wherein x isc、ycAnd zcX, Y and the value of the target point on the Z-axis on the camera coordinate system, respectively; x is the number ofwAnd ywAre the values of the target point on the X and Y axes, X, respectively, of the world coordinate system0、y0And h are the values of the camera on the X, Y and Z axes, θ, respectively, of the world coordinate system0Andinitial vertical and horizontal deflection angles, theta and theta, respectively, of the cameraThe vertical deflection angle and the horizontal deflection angle of the camera can be obtained directly through a PTZ camera; r (.) is a matrix operation function; symbol T represents matrix transposition; in addition to this, the present invention is,is an unknown quantity, (x)0,y0) In known amounts.
The method for converting the GPS coordinates and the pixel coordinates based on the PTZ camera is characterized in that in the step (3), a coordinate conversion model K for constructing the camera coordinate system to the pixel coordinate system is a formula (3) and a formula (4);
[u v 1]T=Q*[xc/zc yc/zc 1]T (3)
wherein Q is a parameter matrix in the camera, U and V are values of a U axis and a V axis of a target point on a pixel coordinate system, omega is a zoom multiple of the current camera, gamma is a distortion coefficient of the camera, and (U and V are values of the target point on the pixel coordinate system respectively0,v0) Is the optical center point of the camera,fxAnd fyRespectively normalizing focal lengths of the camera on a U axis and a V axis on a pixel coordinate system, wherein the normalized focal lengths are unknowns; the camera zoom factor ω can be obtained directly from the PTZ camera.
The method for converting the GPS coordinates and the pixel coordinates based on the PTZ camera is characterized in that in the step (4), the unknown quantity of the coordinate conversion model S is calculatedComprises the following steps:
4.1 setting the gamma of the parameter matrix Q in the camera to be 0, u0=(W-1)/2,v0(H-1)/2; wherein W and H are the image resolution width and height, respectively;
4.2 for a target point dataset at the optical center of the cameraEquation (5) can be obtained by substituting equation (1);
wherein X is Xw-x0,Y=yw-y0;xwAnd ywThe values of the target point on the X axis and the Y axis of the world coordinate system respectively; u and V are the coordinates of the target point on the U axis and the V axis of the pixel coordinate system respectively; theta, theta,And omega is the vertical deflection angle, the horizontal deflection angle and the zoom multiple of the camera where the target is located respectively;
4.4 calibrating by controlling the PTZ camera through the holder to obtain the data sets of different target points at the optical center of the cameraAnd when i is an odd number, the condition (x) is satisfiedwi-x0)/(ywi-y0)=(xw(i+1)-x0)/(yw(i+1)-y0) (ii) a Wherein n is the number of target points, and the value of n is an even number which is more than or equal to 2; x is the number ofwiAnd ywiThe values of the ith target point on the X axis and the Y axis of the world coordinate system respectively; u. ofiAnd viCoordinates of the ith target point on a U axis and a V axis on a pixel coordinate system are respectively; thetai、And ωiRespectively setting the vertical deflection angle, the horizontal deflection angle and the zoom multiple of a camera where the ith target is positioned;
4.5 satisfying a pair (x)wi-x0)/(ywi-y0)=(xw(i+1)-x0)/(yw(i+1)-y0) Target point of conditionSubstituting equation (6) and simplifying, the factor θ can be obtained0Equation (7);
F*sinθ0+G*cosθ0=0 (7)
wherein F ═ a1-a2,G=b1-b2;a1And a2The values of the variables a, b obtained by substituting two points into the formula (6), respectively1And b2Values of the variable b obtained by substituting two points into the formula (6) respectively;
4.6 according toEquation (7) can be solved for the unknown quantity θ0Taking a value close to pi; will calculate the obtained theta0Substituting the relation (6) to obtain the unknown quantityFurther determine theta0Andsubstituting into equation (5) to obtain the unknown quantity h;
4.7 for multiple sets of dataAccording to steps 4.1 to 4.6, a plurality of corresponding solution sets can be calculatedThe final camera height h and initial vertical deflection angle theta can be obtained according to the expressions (8), (9), (10), (11) and (12)0And an initial horizontal deflection angle
Where k is the solution set { hjSize of 1,2, … k; h isjCollecting the jth solution for the solution; theta0jFor the jth solution in the solution set, θ01Collecting the 1 st solution for the solution;for the jth solution in the solution set,the 1 st solution is collected for this solution.
The method for converting the GPS coordinates and the pixel coordinates based on the PTZ camera is characterized in that in the step (5), the unknown quantity (f) of the coordinate conversion model K is calculatedx,fy) Comprises the following steps:
5.1 for a target Point data setFirstly, carrying out scaling multiple conversion according to a formula (13);
5.2 converting the zoom multiple into a target point data setSubstituting equation (3), and obtaining equation (14) through solution;
wherein (x)c,yc,zc) Can be obtained by calculation according to the formula (1);
5.3, calibrating by controlling the PTZ camera through the holder to obtain data sets of different target pointsWherein m is not less than 2 and ui≠u0Or vi≠v0(ii) a m is the number of target points;
5.4 for a target Point data setSubstituting into formula (14), and calculating to obtain camera internal parameter unknown quantity (f) by least square methodx,fy)。
The method for converting the GPS coordinates and the pixel coordinates based on the PTZ camera is characterized in that in the step (6), mapping from a GPS coordinate point to a pixel coordinate point is carried out, namely, when the GPS coordinate point (x) of a target point is knownw,yw0), attitude information of cameraCamera zoom factor ω andand (f)x,fy) Then, the pixel coordinates (u, v) of the target point on the camera image can be calculated by the formula (1) and the formula (3).
The method for converting the GPS coordinates and the pixel coordinates based on the PTZ camera is characterized in that in the step (7), the mapping from the pixel coordinate point to the GPS coordinate point comprises the following steps:
7.1 when the pixel coordinates (u, v) of the target point on the image and the attitude information of the camera are knownCamera zoom factor ω andand (f)x,fy) When the data are substituted into the formula (1) and the formula (3), the formula (15) can be obtained;
wherein, the function R () is a calculation formula (2);
7.2 knowing that the left side of the equation for equation (12) is a calculable value, set to [ L M N]TThen equation (15) can be converted to equation (16);
7.3 solving equation (16), the GPS coordinate point of the point can be solved as (x)w=x0-h*L/N,yw=y0-h*M/N,0)。
Compared with the prior art, the invention has the main beneficial effects that:
the PTZ camera is controlled by the holder to obtain the target point data set so as to calculate the unknown number in the coordinate conversion formulaAnd (f)x,fy) And the camera calibration process is simple. And the initial deflection angle of the camera due to problems of installation and the like is considered, so that the coordinate conversion is more accurate. The invention has wide application range, for example, the conversion method can visualize the land parcel GPS information of the national and local bureau into the video image and provide the land parcel following function. In addition, the method also allows for mapping of the plot on a video image and conversion to GPS information.
Drawings
FIG. 1 is a flow chart of the steps of the method of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the detailed description and specific examples, while indicating the scope of the invention, are intended for purposes of illustration only and are not intended to limit the scope of the invention.
Fig. 1 is a flowchart of a method for converting GPS coordinates and pixel coordinates based on a PTZ camera according to the present invention. As shown in fig. 1, the method for converting GPS coordinates and pixel coordinates based on a PTZ camera provided in this embodiment includes the following steps:
s1, establishing a pixel coordinate system, a camera coordinate system and a world coordinate system;
specifically, the pixel coordinate system takes the upper left corner of the image as an origin, the horizontal right direction is a U axis, and the vertical downward direction is a V axis; the camera coordinate system takes the optical center of a camera as an origin O, an X axis and a Y axis are respectively parallel to a U axis and a V axis of a pixel coordinate system, a Z axis is the direction of an optical axis of the camera, and a right-hand rectangular coordinate system is established; the world coordinate system is a right-hand rectangular coordinate system established by taking a coordinate point with the longitude and the latitude of the GPS as 0 as an origin, taking the ascending direction from longitude to east as an X axis and taking the ascending direction from latitude to north as a Y axis.
S2, constructing a coordinate conversion model S from a world coordinate system to a camera coordinate system;
specifically, a coordinate conversion model S from a world coordinate system to a camera coordinate system is constructed into a formula (1) and a formula (2);
wherein x isc、ycAnd zcX, Y and the value of the target point on the Z-axis on the camera coordinate system, respectively; x is the number ofwAnd ywAre the values of the target point on the X and Y axes, X, respectively, of the world coordinate system0、y0And h are the values of the camera on the X, Y and Z axes, θ, respectively, of the world coordinate system0Andinitial vertical and horizontal deflection angles, theta and theta, respectively, of the cameraThe vertical deflection angle and the horizontal deflection angle of the camera can be directly obtained by the PTZ cameraObtaining; r (.) is a matrix operation function; symbol T represents matrix transposition; in addition to this, the present invention is,is an unknown quantity, (x)0,y0) In known amounts.
S3, constructing a coordinate conversion model K from a camera coordinate system to a pixel coordinate system;
specifically, a coordinate conversion model K from a camera coordinate system to a pixel coordinate system is constructed as formula (3) and formula (4);
[u v 1]T=Q*[xc/zc yc/zc 1]T (3)
wherein Q is a parameter matrix in the camera, U and V are values of a U axis and a V axis of a target point on a pixel coordinate system, omega is a zoom multiple of the current camera, gamma is a distortion coefficient of the camera, and (U and V are values of the target point on the pixel coordinate system respectively0,v0) Is the optical center point of the camera, fxAnd fyRespectively normalizing focal lengths of the camera on a U axis and a V axis on a pixel coordinate system, wherein the normalized focal lengths are unknowns; the camera zoom factor ω can be obtained directly from the PTZ camera.
Specifically, the method comprises the following steps:
s4.1, setting gamma to be 0 and u in a parameter matrix Q in the camera0=(W-1)/2,v0(H-1)/2; wherein W and H are the image resolution width and height, respectively;
s4.2 for a target point dataset at the optical center of the cameraEquation (5) can be obtained by substituting equation (1);
wherein X is Xw-x0,Y=yw-y0;xwAnd ywThe values of the target point on the X axis and the Y axis of the world coordinate system respectively; u and V are the coordinates of the target point on the U axis and the V axis of the pixel coordinate system respectively; theta, theta,And omega is the vertical deflection angle, the horizontal deflection angle and the zoom multiple of the camera where the target is located respectively;
s4.4, calibrating by controlling the PTZ camera through the holder to obtain data sets of different target points in the optical center of the cameraAnd when i is an odd number, the condition (x) is satisfiedwi-x0)/(ywi-y0)=(xw(i+1)-x0)/(yw(i+1)-y0) (ii) a Wherein n is the number of target points, and the value of n is an even number which is more than or equal to 2; x is the number ofwiAnd ywiThe values of the ith target point on the X axis and the Y axis of the world coordinate system respectively; u. ofiAnd viCoordinates of the ith target point on a U axis and a V axis on a pixel coordinate system are respectively; thetai、And ωiRespectively setting the vertical deflection angle, the horizontal deflection angle and the zoom multiple of a camera where the ith target is positioned;
s4.5 satisfying a pair (x)wi-x0)/(ywi-y0)=(xw(i+1)-x0)/(yw(i+1)-y0) Target point of conditionSubstituting equation (6) and simplifying, the factor θ can be obtained0Equation (7);
F*sinθ0+G*cosθ0=0 (7)
wherein F ═ a1-a2,G=b1-b2;a1And a2The values of the variables a, b obtained by substituting two points into the formula (6), respectively1And b2Values of the variable b obtained by substituting two points into the formula (6) respectively;
s4.6-from equation (7) one can solve for the unknown quantity θ0Taking a value close to pi; will calculate the obtained theta0Substituting the relation (6) to obtain the unknown quantityFurther determine theta0Andsubstituting into equation (5) to obtain the unknown quantity h;
s4.7 for multiple sets of dataAccording to steps 4.1 to 4.6, a plurality of corresponding solution sets can be calculatedThe final camera height h and initial vertical deflection angle theta can be obtained according to the expressions (8), (9), (10), (11) and (12)0And initial horizontal deflectionCorner
Where k is the solution set { hjSize of 1,2, … k; h isjCollecting the jth solution for the solution; theta0jFor the jth solution in the solution set, θ01Collecting the 1 st solution for the solution;for the jth solution in the solution set,the 1 st solution is collected for this solution.
S5, calculating the unknown quantity (f) of the coordinate transformation model Kx,fy);
Specifically, the method comprises the following steps:
s5.1 for a target Point data setFirstly, carrying out scaling multiple conversion according to a formula (13);
s5.2, converting the zoom multiple into a target point data setSubstituting equation (3), and obtaining equation (14) through solution;
wherein (x)c,yc,zc) Can be obtained by calculation according to the formula (1);
s5.3, calibrating by controlling the PTZ camera through the holder to obtain data sets of different target pointsWherein m is not less than 2 and ui≠u0Or vi≠v0(ii) a m is the number of target points;
s5.4 for a target Point data setSubstituting into formula (14), and calculating to obtain camera internal parameter unknown quantity (f) by least square methodx,fy)。
S6, mapping the GPS coordinate point to the pixel coordinate point;
specifically, mapping of GPS coordinate points to pixel coordinate points is performed such that when the GPS coordinate point (x) of the target point is knownw,yw0), attitude information of cameraCamera zoom factor ω andand (f)x,fy) Can be represented by the formula(1) And (3) calculating to obtain the pixel coordinates (u, v) of the target point on the camera image.
S7, mapping the pixel coordinate point to the GPS coordinate point;
specifically, the method comprises the following steps:
s7.1 when the pixel coordinates (u, v) of the target point on the image and the attitude information of the camera are knownCamera zoom factor ω andand (f)x,fy) Then, the above data can be substituted into formula (1) and formula (3), and formula (15) can be obtained;
wherein, the function R (-) is a calculation formula (2);
s7.2 knowing that the left side of the equation of equation (12) is a calculable value, set to [ L M N]TThen equation (15) can be converted to equation (16);
s7.3, solving equation (16) to obtain the GPS coordinate point of the point as (x)w=x0-h*L/N,yw=y0-h*M/N,0)。
The above-mentioned embodiments are intended to illustrate the technical solutions and advantages of the present invention, and it should be understood that the above-mentioned embodiments are only the most preferred embodiments of the present invention, and are not intended to limit the present invention, and any modifications, additions, equivalents, etc. made within the scope of the principles of the present invention should be included in the scope of the present invention.
Claims (10)
1. A method for converting GPS coordinates and pixel coordinates based on a PTZ camera is characterized by comprising the following steps:
1) establishing a pixel coordinate system, a camera coordinate system and a world coordinate system;
2) constructing a coordinate conversion model S from a world coordinate system to a camera coordinate system;
3) constructing a coordinate conversion model K from a camera coordinate system to a pixel coordinate system;
5) Calculating an unknown quantity (f) of the coordinate transformation model Kx,fy);
6) Mapping from the GPS coordinate point to the pixel coordinate point;
7) and mapping the pixel coordinate points to the GPS coordinate points.
2. The method as claimed in claim 1, wherein in step (1), the pixel coordinate system is based on the upper left corner of the image, the horizontal right direction is the U axis, and the vertical downward direction is the V axis.
3. The method as claimed in claim 1, wherein in step (1), the camera coordinate system is based on the optical center of the camera as an origin O, the X-axis and the Y-axis are parallel to the U-axis and the V-axis of the pixel coordinate system, respectively, and the Z-axis is the optical axis direction of the camera, so as to establish a right-handed rectangular coordinate system.
4. The method as claimed in claim 1, wherein in step (1), the world coordinate system is a right-handed rectangular coordinate system established with a coordinate point with a longitude and latitude of GPS being 0 as an origin, an ascending direction of longitude to east as an X-axis, and a ascending direction of latitude to north as a Y-axis.
5. The method for converting GPS coordinates and pixel coordinates based on a PTZ camera as claimed in claim 1, wherein in step (2), the coordinate conversion model S for constructing the world coordinate system to the camera coordinate system is formula (1) and formula (2):
wherein x isc、ycAnd zcX, Y and the value of the target point on the Z-axis on the camera coordinate system, respectively; x is the number ofwAnd ywAre the values of the target point on the X and Y axes, X, respectively, of the world coordinate system0、y0And h are the values of the camera on the X, Y and Z axes, θ, respectively, of the world coordinate system0Andinitial vertical and horizontal deflection angles, theta and theta, respectively, of the cameraThe vertical deflection angle and the horizontal deflection angle of the camera are respectively obtained by directly obtaining through a PTZ camera; r (.) is a matrix operation function; symbol T represents matrix transposition; in addition to this, the present invention is,is an unknown quantity, (x)0,y0) In known amounts.
6. The PTZ camera-based conversion method of GPS coordinates and pixel coordinates, as claimed in claim 5, wherein in the step (3), the coordinate conversion model K for constructing the camera coordinate system to the pixel coordinate system is formula (3) and formula (4):
[u v 1]T=Q*[xc/zc yc/zc 1]T (3)
wherein Q is a parameter matrix in the camera, U and V are values of a U axis and a V axis of a target point on a pixel coordinate system, omega is a zoom multiple of the current camera, gamma is a distortion coefficient of the camera, and (U and V are values of the target point on the pixel coordinate system respectively0,v0) Is the optical center point of the camera, fxAnd fyRespectively normalizing focal lengths of the camera on a U axis and a V axis on a pixel coordinate system, wherein the normalized focal lengths are unknowns; the camera zoom factor ω can be obtained directly from the PTZ camera.
7. The PTZ camera-based GPS coordinate to pixel coordinate conversion method as claimed in claim 6, wherein in the step (4), the unknown quantity of the coordinate conversion model S is calculatedComprises the following steps:
4.1 setting the gamma of the parameter matrix Q in the camera to be 0, u0=(W-1)/2,v0(H-1)/2; wherein W and H are the image resolution width and height, respectively;
4.2 for a target point dataset at the optical center of the cameraSubstituting formula (1) to obtain equation (5);
wherein X is Xw-x0,Y=yw-y0;xwAnd ywThe values of the target point on the X axis and the Y axis of the world coordinate system respectively; u and V are the target point on the U axis and the V axis of the pixel coordinate system respectivelyThe coordinates of (a); theta, theta,And omega is the vertical deflection angle, the horizontal deflection angle and the zoom multiple of the camera where the target is located respectively;
4.4 calibrating by controlling the PTZ camera through the holder to obtain the data sets of different target points at the optical center of the camera And when i is an odd number, the condition (x) is satisfiedwi-x0)/(ywi-y0)=(xw(i+1)-x0)/(yw(i+1)-y0) (ii) a Wherein n is the number of target points, and the value of n is an even number which is more than or equal to 2; x is the number ofwiAnd ywiThe values of the ith target point on the X axis and the Y axis of the world coordinate system respectively; u. ofiAnd viCoordinates of the ith target point on a U axis and a V axis on a pixel coordinate system are respectively; thetai、And ωiRespectively the vertical deflection angle, the horizontal deflection angle and the zoom factor of the camera where the ith target is positioned;
4.5 satisfying a pair (x)wi-x0)/(ywi-y0)=(xw(i+1)-x0)/(yw(i+1)-y0) Target point of condition Substituting into equation (6) and simplifying to obtain the factor theta0Equation (7);
F*sinθ0+G*cosθ0=0 (7)
wherein F ═ a1-a2,G=b1-b2;a1And a2The values of the variables a, b obtained by substituting two points into the formula (6), respectively1And b2Values of the variable b obtained by substituting two points into the formula (6) respectively;
4.6 solving for the unknown quantity θ according to equation (7)0Taking a value close to pi; will calculate the obtained theta0Substituting into relation (6) to obtain unknown quantityFurther determine theta0Andsubstituting into equation (5) to obtain the unknown quantity h;
4.7 for multiple sets of dataAccording to the steps 4.1 to 4.6, a plurality of corresponding solution sets are obtained through calculationThe final camera height h and initial vertical deflection angle theta can be obtained according to the expressions (8), (9), (10), (11) and (12)0And an initial horizontal deflection angle
8. The PTZ camera-based conversion method of GPS coordinates and pixel coordinates as claimed in claim 7, wherein in the step (5), the unknown quantity (f) of the coordinate conversion model K is calculatedx,fy) Comprises the following steps:
5.1 for a target Point data setFirstly, carrying out scaling multiple conversion according to a formula (13);
5.2 converting the zoom multiple into a target point data setSubstituting equation (3), and obtaining equation (14) through solution;
wherein (x)c,yc,zc) Calculating according to the formula (1);
5.3, calibrating by controlling the PTZ camera through the holder to obtain data sets of different target points
Wherein m is not less than 2 and ui≠u0Or vi≠v0(ii) a m is the number of target points;
9. The PTZ camera-based conversion method of GPS coordinates and pixel coordinates as claimed in claim 8, wherein in step (6), mapping of GPS coordinate points to pixel coordinate points is performed such that, when known, the GPS coordinate points are mapped to pixel coordinate pointsGPS coordinate point (x) of target pointw,yw0), attitude information of cameraCamera zoom factor ω andand (f)x,fy) And (3) calculating to obtain pixel coordinates (u, v) of the target point on the camera image through the formula (1) and the formula (3).
10. The PTZ camera-based conversion method of GPS coordinates and pixel coordinates as claimed in claim 9, wherein the step (7) of mapping the set of pixel coordinate points to the GPS coordinate points comprises the steps of:
7.1 when the pixel coordinates (u, v) of the target point on the image and the attitude information of the camera are knownCamera zoom factor ω andand (f)x,fy) When the data are substituted into the formula (1) and the formula (3), the formula (15) can be obtained;
wherein, the function R (-) is a calculation formula (2);
7.2 knowing that the left side of the equation for equation (12) is a calculable value, set to [ L M N]TThen equation (15) can be converted to equation (16);
7.3 solving equation (16) to obtain the pointHas a GPS coordinate point of (x)w=x0-h*L/N,yw=y0-h*M/N,0)。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011008170.6A CN112116529A (en) | 2020-09-23 | 2020-09-23 | PTZ camera-based conversion method for GPS coordinates and pixel coordinates |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011008170.6A CN112116529A (en) | 2020-09-23 | 2020-09-23 | PTZ camera-based conversion method for GPS coordinates and pixel coordinates |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112116529A true CN112116529A (en) | 2020-12-22 |
Family
ID=73801687
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011008170.6A Pending CN112116529A (en) | 2020-09-23 | 2020-09-23 | PTZ camera-based conversion method for GPS coordinates and pixel coordinates |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112116529A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112734855A (en) * | 2020-12-31 | 2021-04-30 | 网络通信与安全紫金山实验室 | Space beam pointing method, system and storage medium |
CN115375779A (en) * | 2022-10-27 | 2022-11-22 | 智广海联(天津)大数据技术有限公司 | Method and system for marking AR (augmented reality) real scene of camera |
CN115546304A (en) * | 2022-11-24 | 2022-12-30 | 海纳云物联科技有限公司 | Method and device for detecting and positioning three-dimensional coordinate system based on camera |
CN116228888A (en) * | 2023-04-21 | 2023-06-06 | 智广海联(天津)大数据技术有限公司 | Conversion method and system for geographic coordinates and PTZ camera coordinates |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103971375A (en) * | 2014-05-22 | 2014-08-06 | 中国人民解放军国防科学技术大学 | Panoramic gaze camera space calibration method based on image splicing |
WO2019196313A1 (en) * | 2018-04-10 | 2019-10-17 | 平安科技(深圳)有限公司 | Robot walking obstacle detection method and apparatus, computer device, and storage medium |
WO2020062434A1 (en) * | 2018-09-30 | 2020-04-02 | 初速度(苏州)科技有限公司 | Static calibration method for external parameters of camera |
CN111199560A (en) * | 2019-12-31 | 2020-05-26 | 海能达通信股份有限公司 | Video monitoring positioning method and video monitoring system |
CN111523465A (en) * | 2020-04-23 | 2020-08-11 | 中船重工鹏力(南京)大气海洋信息系统有限公司 | Ship identity recognition system based on camera calibration and deep learning algorithm |
CN111611989A (en) * | 2020-05-22 | 2020-09-01 | 四川智动木牛智能科技有限公司 | Multi-target accurate positioning identification method based on autonomous robot |
-
2020
- 2020-09-23 CN CN202011008170.6A patent/CN112116529A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103971375A (en) * | 2014-05-22 | 2014-08-06 | 中国人民解放军国防科学技术大学 | Panoramic gaze camera space calibration method based on image splicing |
WO2019196313A1 (en) * | 2018-04-10 | 2019-10-17 | 平安科技(深圳)有限公司 | Robot walking obstacle detection method and apparatus, computer device, and storage medium |
WO2020062434A1 (en) * | 2018-09-30 | 2020-04-02 | 初速度(苏州)科技有限公司 | Static calibration method for external parameters of camera |
CN111199560A (en) * | 2019-12-31 | 2020-05-26 | 海能达通信股份有限公司 | Video monitoring positioning method and video monitoring system |
CN111523465A (en) * | 2020-04-23 | 2020-08-11 | 中船重工鹏力(南京)大气海洋信息系统有限公司 | Ship identity recognition system based on camera calibration and deep learning algorithm |
CN111611989A (en) * | 2020-05-22 | 2020-09-01 | 四川智动木牛智能科技有限公司 | Multi-target accurate positioning identification method based on autonomous robot |
Non-Patent Citations (4)
Title |
---|
张永举;顾旭波;张健;王兵;郭玲;: "结构光与双目视觉相结合的三维测量", 计算机与现代化, no. 02 * |
李丹: "面向三维激光扫描的无变形纹理映射技术研究", 中国优秀硕士学位论文全文数据库信息科技辑, no. 11 * |
李铀;宋利;王嘉;: "基于图像拼接的双摄像机系统自动标定方法", 电视技术, no. 04 * |
闫珊;姚立波;杨志晖;: "基于智能相机的工业机器人引导与抓取", 常州信息职业技术学院学报, no. 03 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112734855A (en) * | 2020-12-31 | 2021-04-30 | 网络通信与安全紫金山实验室 | Space beam pointing method, system and storage medium |
CN112734855B (en) * | 2020-12-31 | 2024-04-16 | 网络通信与安全紫金山实验室 | Space beam pointing method, system and storage medium |
CN115375779A (en) * | 2022-10-27 | 2022-11-22 | 智广海联(天津)大数据技术有限公司 | Method and system for marking AR (augmented reality) real scene of camera |
CN115546304A (en) * | 2022-11-24 | 2022-12-30 | 海纳云物联科技有限公司 | Method and device for detecting and positioning three-dimensional coordinate system based on camera |
CN115546304B (en) * | 2022-11-24 | 2023-04-11 | 海纳云物联科技有限公司 | Method and device for detecting and positioning three-dimensional coordinate system based on camera |
CN116228888A (en) * | 2023-04-21 | 2023-06-06 | 智广海联(天津)大数据技术有限公司 | Conversion method and system for geographic coordinates and PTZ camera coordinates |
CN116228888B (en) * | 2023-04-21 | 2023-08-22 | 智广海联(天津)大数据技术有限公司 | Conversion method and system for geographic coordinates and PTZ camera coordinates |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112116529A (en) | PTZ camera-based conversion method for GPS coordinates and pixel coordinates | |
CN112894832B (en) | Three-dimensional modeling method, three-dimensional modeling device, electronic equipment and storage medium | |
CN110148169B (en) | Vehicle target three-dimensional information acquisition method based on PTZ (pan/tilt/zoom) pan-tilt camera | |
CN110363158B (en) | Millimeter wave radar and visual cooperative target detection and identification method based on neural network | |
WO2020062434A1 (en) | Static calibration method for external parameters of camera | |
WO2020107931A1 (en) | Pose information determination method and apparatus, and visual point cloud construction method and apparatus | |
CN109523471A (en) | A kind of conversion method, system and the device of ground coordinate and wide angle cameras picture coordinate | |
CN110706273B (en) | Real-time collapse area measurement method based on unmanned aerial vehicle | |
CN111914049A (en) | Method for mapping longitude and latitude coordinates and image coordinates | |
CN113029128A (en) | Visual navigation method and related device, mobile terminal and storage medium | |
CN112348775A (en) | Vehicle-mounted all-round-looking-based pavement pool detection system and method | |
CN106643735A (en) | Indoor positioning method and device and mobile terminal | |
CN113569647B (en) | AIS-based ship high-precision coordinate mapping method | |
CN112200875B (en) | Method and system for cross-coupling error compensation and image matching correction of non-metrology camera | |
CN112446915A (en) | Picture-establishing method and device based on image group | |
CN111710002B (en) | Camera external parameter calibration method based on Optitrack system | |
CN116309851B (en) | Position and orientation calibration method for intelligent park monitoring camera | |
CN116228888B (en) | Conversion method and system for geographic coordinates and PTZ camera coordinates | |
CN107705272A (en) | A kind of high-precision geometric correction method of aerial image | |
JPH09153131A (en) | Method and device for processing picture information and picture information integrating system | |
CN110503604A (en) | It is a kind of based on high-precision POS aviation face battle array image just penetrate joining method in real time | |
CN113658271A (en) | Obstacle space coordinate edge calculation method based on road side monocular vision | |
CN110706260A (en) | Method for detecting moving target in large scene by combining positioning information | |
CN110298788A (en) | A kind of full-view image joining method and system based on vehicle-mounted fisheye camera | |
CN116612184B (en) | Unmanned aerial vehicle camera pose accurate estimation method based on monitoring scene |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |