CN109377529A - A kind of picture coordinate transformation method, system and the device of ground coordinate and Pan/Tilt/Zoom camera - Google Patents

A kind of picture coordinate transformation method, system and the device of ground coordinate and Pan/Tilt/Zoom camera Download PDF

Info

Publication number
CN109377529A
CN109377529A CN201811366339.8A CN201811366339A CN109377529A CN 109377529 A CN109377529 A CN 109377529A CN 201811366339 A CN201811366339 A CN 201811366339A CN 109377529 A CN109377529 A CN 109377529A
Authority
CN
China
Prior art keywords
coordinate
pan
tilt
zoom camera
picture
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.)
Granted
Application number
CN201811366339.8A
Other languages
Chinese (zh)
Other versions
CN109377529B (en
Inventor
刘玉平
杨帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
XIAMEN BOCONG INFORMATION TECHNOLOGY Co Ltd
Original Assignee
XIAMEN BOCONG INFORMATION TECHNOLOGY Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by XIAMEN BOCONG INFORMATION TECHNOLOGY Co Ltd filed Critical XIAMEN BOCONG INFORMATION TECHNOLOGY Co Ltd
Priority to CN201811366339.8A priority Critical patent/CN109377529B/en
Publication of CN109377529A publication Critical patent/CN109377529A/en
Application granted granted Critical
Publication of CN109377529B publication Critical patent/CN109377529B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • G06T7/85Stereo camera calibration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30244Camera pose

Abstract

The invention discloses picture coordinate transformation method, system and the devices of a kind of ground coordinate and Pan/Tilt/Zoom camera, are related to safety-security area.This method comprises: being changed the mechanism according to the first coordinate is converted to vertical height angle θ and horizontal azimuth of the Pan/Tilt/Zoom camera when its picture center is directed at the target position for the ground coordinate of the target positionAccording to the second transformation mechanism and the current vertical height angle θ ' and horizontal azimuth of Pan/Tilt/Zoom cameraBy the vertical height angle θ and horizontal azimuthBe converted to coordinate of the target position in the Pan/Tilt/Zoom camera picture.Technical solution of the present invention can be realized automatic marking of the target position in Pan/Tilt/Zoom camera picture, high-efficient and accurate and reliable.

Description

A kind of picture coordinate transformation method of ground coordinate and Pan/Tilt/Zoom camera, system and Device
Technical field
The present invention relates to safety-security area, in particular to the picture coordinate transformation method of a kind of ground coordinate and Pan/Tilt/Zoom camera, System and device.
Background technique
In safety-security area, the exchange being often related between GNSS coordinate and ball machine picture coordinate, such as when ball machine is rotating During, it is intended that a label is shown on ball machine picture, marks the title etc. of building, and turn with ball machine Dynamic, label also and then moves, and is always shown in correct position.
It realizes this mark, current conventional method is: being marked on ball machine picture manually.Subscript is recorded in mark The ball machine coordinate of note point such as building, when ball machine rotation, by the way that ball machine coordinate is converted to picture coordinate, to realize ball machine Label follows always building in the course of rotation.
Although the above-mentioned method manually marked is accurate and reliable, there are inefficiency, cannot achieve automation mark Problem.
Summary of the invention
In order to overcome technical problem as described above, the present invention proposes the picture seat of a kind of ground coordinate and Pan/Tilt/Zoom camera Mark conversion method, system and device, this method obtains Pan/Tilt/Zoom camera at it by getting the ground coordinate of target position Picture center is directed at vertical height angle θ and horizontal azimuth when the target positionAgain by the vertical height angle θ and water Square parallactic angleIt is automatically converted to coordinate of the target position in the Pan/Tilt/Zoom camera picture, realizes target position in PTZ Automatic marking in camera views, it is high-efficient and accurate and reliable.
Specific technical solution of the present invention is as follows:
In a first aspect, the present invention proposes the picture coordinate transformation method of a kind of ground coordinate and Pan/Tilt/Zoom camera, comprising:
Obtain the ground coordinate of target position;
It is changed the mechanism according to the first coordinate and the ground coordinate of the target position is converted into Pan/Tilt/Zoom camera in its picture The heart is directed at vertical height angle θ and horizontal azimuth when the target position
According to the second coordinate transformation mechanism and the current vertical height angle θ ' and horizontal azimuth of Pan/Tilt/Zoom cameraIt will The vertical height angle θ and horizontal azimuthBe converted to coordinate of the target position in the Pan/Tilt/Zoom camera picture.
Further, the first coordinate transformation mechanism is established by following step:
Establish earth axes and Pan/Tilt/Zoom camera coordinate system;
Determine the ground coordinate of the target position and the vertical height angle θ of the Pan/Tilt/Zoom camera and horizontal azimuthIt Between coordinate transformation relation, the coordinate transformation relation includes related conversion parameter, wherein under the correlation conversion parameter passes through Step is stated to determine:
It is demarcated in the earth axes and the Pan/Tilt/Zoom camera coordinate system, comprising: by the Pan/Tilt/Zoom camera Navigate to horizontal azimuthPosition, randomly select at least two different vertical height angle θ1And θ2, and obtain corresponding It is directed toward the ground coordinate (x of two points on ground in Pan/Tilt/Zoom camera picture center1,y1) and (x2,y2);
Pass through θ obtained by calibrating1And θ2And (x1,y1) and (x2,y2) determine the phase in above-mentioned coordinate transformation relation Close conversion parameter.
Further, the second coordinate transformation mechanism is established by following step:
Three-dimensional cartesian coordinate system XYZ is established as Z axis in optical center direction when using Pan/Tilt/Zoom camera vertically downward, and Pan/Tilt/Zoom camera is drawn Face is the plane tangent with unit Pan/Tilt/Zoom camera spherical surface, and the plane and Pan/Tilt/Zoom camera unit sphere point of contact are in ball machine machine core light The intersection point of axis and the unit Pan/Tilt/Zoom camera spherical surface is denoted as P point, and the coordinate of arbitrary point is denoted as (S in Pan/Tilt/Zoom camera picturex, Sy), coordinate of the arbitrary point in the three-dimensional cartesian coordinate system is denoted as (xptz,yptz,zptz), the height of Pan/Tilt/Zoom camera picture Degree is H, and width W, unit is pixel,
The vertical height angle θ and horizontal azimuth of the Pan/Tilt/Zoom cameraIt is sat with arbitrary point in the Pan/Tilt/Zoom camera picture The transformational relation between transformational relation between mark are as follows:
Wherein,θ ' is the PTZ Video camera current vertical height angle,For Pan/Tilt/Zoom camera present level azimuth, f is that the Pan/Tilt/Zoom camera machine core is current Focal length is the product of the Pan/Tilt/Zoom camera current amplification factor and machine core minimum focus, and unit is millimeter.
Second aspect, the present invention propose the picture coordinate transformation system of a kind of ground coordinate and Pan/Tilt/Zoom camera, comprising:
Ground coordinate obtains module, for obtaining the ground coordinate of target position;
Pan/Tilt/Zoom camera coordinate determining module, for being sat the ground of the target position according to the first coordinate transformation mechanism Mark is converted to vertical height angle θ and horizontal azimuth of the Pan/Tilt/Zoom camera when its picture center is directed at the target position
Picture coordinate determining module, for the current vertical height according to the second coordinate transformation mechanism and Pan/Tilt/Zoom camera Angle θ ' and horizontal azimuthBy the vertical height angle θ and horizontal azimuthThe target position is converted in the PTZ Coordinate in camera views.
The third aspect, the present invention propose that the picture coordinate transformation device of a kind of ground coordinate and Pan/Tilt/Zoom camera, feature exist In, including processor and memory, the memory are stored at least one section of program, described program by the processor execute with Realize the picture coordinate transformation method of ground coordinate and Pan/Tilt/Zoom camera as described in relation to the first aspect.
Fourth aspect, the present invention propose a kind of computer readable storage medium, which is characterized in that deposit in the storage medium At least one section of program is contained, at least one section of program is executed by the processor to realize that ground as described in relation to the first aspect is sat The picture coordinate transformation method of mark and Pan/Tilt/Zoom camera.
Technical solution provided by the invention has the benefit that
The present invention obtains the ground coordinate of target position first;It is changed the mechanism according to the first coordinate by the target position Ground coordinate is converted to vertical height angle θ and level orientation of the Pan/Tilt/Zoom camera when its picture center is directed at the target position AngleAccording to the second coordinate transformation mechanism and the current vertical height angle θ ' and horizontal azimuth of Pan/Tilt/Zoom cameraIt will be described Vertical height angle θ and horizontal azimuthBe converted to coordinate of the target position in the Pan/Tilt/Zoom camera picture, such energy Enough realize automatic marking of the target position in Pan/Tilt/Zoom camera picture, it is high-efficient and accurate and reliable.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, required use in being described below to embodiment Attached drawing be briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for this For the those of ordinary skill of field, without creative efforts, it can also be obtained according to these attached drawings others Attached drawing.
Fig. 1 show the coordinate transformation method flow chart of a kind of ground coordinate and Pan/Tilt/Zoom camera of the invention;
Fig. 2 is a kind of method for building up flow chart of first coordinate transformation mechanism in the present invention;
Fig. 3 is a kind of schematic diagram of Pan/Tilt/Zoom camera coordinate system in the present invention;
Fig. 4 is to convert determination method for parameter flow chart in a kind of coordinate transformation relation of the present invention;
Fig. 5 show the present invention it is a kind of using video camera vertically downward when optical center direction establish three-dimensional rectangular coordinate as Z axis The schematic diagram of system;
It is a kind of schematic diagram when ball machine when its picture center is directed at the target position in the present invention shown in Fig. 6;
Fig. 7 show a kind of coordinate when ball machine changes in coordinates to target position in ball machine picture shown in the present invention Carry out the schematic diagram of automatic marking;
Fig. 8 show another seat when ball machine changes in coordinates to target position in ball machine picture shown in the present invention Mark carries out the schematic diagram of automatic marking;
Fig. 9 show the picture coordinate transformation system schematic diagram of a kind of ground coordinate and Pan/Tilt/Zoom camera that the present invention announces;
Figure 10 shows a kind of picture coordinate converting means of ground coordinate and Pan/Tilt/Zoom camera involved in the embodiment of the present invention The structural schematic diagram set.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention Case is described in further detail.
It should be noted that the picture coordinate transformation method of ground coordinate and Pan/Tilt/Zoom camera proposed by the invention is suitable It is extensive with scene.In safety-security area now, in a kind of possible practical operation, for certain in city or emphasis cell Target is paid close attention to, the case where we generally require these target positions of real-time tracking, and carry out in camera views quasi- Really mark, so that target position is able to observe that by monitor camera, the safe feelings in these security protection regions are effectively ensured Condition.
As shown in Figure 1 it is the picture coordinate transformation method flow chart of a kind of ground coordinate and Pan/Tilt/Zoom camera of the invention, shows Go out the specific implementation process of this method, comprising:
In a step 101, the ground coordinate of target position is obtained;
Goal position is the object for current interest, in a kind of possible target following scene, be can be It is deployed in patrol fleet or the police car in security protection area.In a kind of possible realization, these need tracked target object that can lead The dynamic ground coordinate for reporting itself is optionally the ground coordinate of target object, other can also be taken feasible in the present invention The mode on the ground of target position can be obtained, in the present invention and with no restriction.
In a step 102, it is changed the mechanism according to the first coordinate and the ground coordinate of the target position is converted into PTZ camera shooting Vertical height angle θ and horizontal azimuth of the machine when its picture center is directed at the target position
After the ground coordinate for getting target position by step 101, it can be changed the mechanism by the first coordinate by the mesh The ground coordinate of cursor position be converted to vertical height angle θ of the Pan/Tilt/Zoom camera when its picture center is directed at the target position and Horizontal azimuthIt should be noted that above-mentioned first coordinate transformation mechanism should be able to indicate the ground coordinate of the target position With vertical height angle θ and horizontal azimuth of the Pan/Tilt/Zoom camera when its picture center is directed at the target positionBetween conversion Relationship, in a kind of possible realization, it is known that the ground coordinate of target position is changed the mechanism available according to the first coordinate Vertical height angle θ and horizontal azimuth of the Pan/Tilt/Zoom camera when its picture center is directed at the target positionAnother kind can In the realization of energy, it is known that the vertical height angle θ and horizontal azimuth of Pan/Tilt/Zoom cameraIt can also according to first coordinate transformation mechanism To obtain the ground coordinate that its picture center is directed at the target position.
It should be noted that the ground coordinate in the technical solution of the application, established at the earth's surface including all Earth axes, so it is easy to understand that this earth axes have a kind of supposed premise, and being exactly will within the scope of certain distance A plane is regarded on ground as, can be GNSS coordinate optionally, the GNSS coordinate optionally, including GPS coordinate is carrying out When the specific descriptions of scheme, following the description will be illustrated with GPS coordinate, but is not limited GNSS coordinate with this and sat as GPS Mark, those skilled in the art should be understood that the ground coordinate including other GNSS coordinate can also be used as technical solution of the present invention Optional implementation condition.It should be noted that for indicating target object using latitude and longitude coordinates in the present invention program GPS coordinate, such as: (longitude, latitude).
In addition, it should also be noted that, Pan/Tilt/Zoom camera in the technical solution of the application, optionally, including ball machine, i.e., Ball-shaped camera, in the specific descriptions of the scheme of progress, following the description will be illustrated by taking ball machine as an example, but not with this Limit.
If Fig. 2 is a kind of method for building up flow chart that first coordinate is changed the mechanism in the present invention, the tool of this method is shown Body implementation steps, comprising:
In step 201, earth axes and Pan/Tilt/Zoom camera coordinate system are established;
The earth axes are exactly to regard ground as coordinate system that a plane is established within the scope of certain distance, In a kind of possible realization, the earth axes are established by GNSS coordinate system, and the ground coordinate is GNSS coordinate.
If Fig. 3 is a kind of schematic diagram of Pan/Tilt/Zoom camera coordinate system in the present invention, technical solution of the present invention is shown specific One of implementation process reference frame, optionally, the GNSS coordinate system are GPS coordinate system, and the GNSS coordinate is GPS Coordinate, the X and Y-axis of the GPS coordinate system respectively represent the latitude and longitude coordinates direction of earth surface GPS coordinate system, described The X and Y-axis of GPS coordinate system establish the X and Y-axis of the camera coordinate system, and the Z axis of the camera coordinate system is perpendicular to institute X and Y-axis are stated, the video camera is ball machine, (x in Fig. 30,y0) it is ball machine in the GPS coordinate of floor projection point, it needs to illustrate It is, it is contemplated that the visual range of common ball machine only has 1 to 3 kilometers, therefore assume that X in the technical solution of the present invention, and Y-axis is One plane, simultaneously, it is assumed that the Z axis of ball machine coordinate system is perpendicular to ground, then it is three-dimensional to establish XYZ as shown in Figure 3 Coordinate system, the coordinate system provide reference frame for following implementation steps, are the bases for carrying out coordinate conversion.
In step 202, determine the ground coordinate of the target position and the vertical height angle θ of the Pan/Tilt/Zoom camera and Horizontal azimuthBetween coordinate transformation relation, the coordinate transformation relation includes related conversion parameter.
Through the above steps 201 establish Pan/Tilt/Zoom camera coordinate system after, the description based on the coordinate system determines the target The vertical height angle θ and horizontal azimuth of the ground coordinate of position and the Pan/Tilt/Zoom cameraBetween coordinate transformation relation, institute Stating coordinate transformation relation includes related conversion parameter.In the description of this step, retouched in conjunction with the coordinate system of such as Fig. 3 as exemplary It states bright.
Based on the reference frame that above-mentioned steps 201 are established, Formula of Coordinate System Transformation is as follows:
Wherein, (x0,y0) it is the GPS latitude and longitude coordinates of ball machine installation site, for known conditions, (x, y) is in ball machine picture The ground latitude and longitude coordinates that the heart is directed toward,It is constant offset amount (ball machine water when ball machine is in horizontal zero with GPS coordinate X-axis Ball machine angle when stratosphere position optical axis is parallel with GPS coordinate X-axis),It is ball machine and X-axis when (x, y) is directed toward at ball machine picture center Horizontal sextant angle, in upper figureWherein, as shown in the further explanation schematical sections in Fig. 2 to Φ, OB is ball machine The central axis of ball machine, the angle with OA are when (x, y) is directed toward at picture centerI.e. the horizontal coordinate (Pan) of ball machine, θ are that ball machine refers to Vertical angle when to (x, y), h refer to the mounting height of the ball machine.
As can be seen that the conversion parameter of the coordinate transformation relation includes the ball machine from Formula of Coordinate System Transformation (1) and (2) Mounting height h and ball machine level angle constant offset amountIt is understood that when the ball machine mounting height h and The constant offset amount of ball machine level angleWhen known, the GPS coordinate of target position height vertical with the Pan/Tilt/Zoom camera Spend angle θ and horizontal azimuthBetween transformational relation be just determined.
In a kind of possible realization, if Fig. 4 is to convert determination method for parameter in a kind of coordinate transformation relation of the present invention Flow chart shows the specific implementation step of this method, comprising:
In the description of following step, in conjunction with such as Fig. 3 coordinate system as exemplary description explanation.
In step 401, it is demarcated in the earth axes and the Pan/Tilt/Zoom camera coordinate system, comprising: by institute It states Pan/Tilt/Zoom camera and navigates to horizontal azimuthPosition, randomly select at least two different vertical height angle θ1And θ2, And obtain the ground coordinate (x for two points that corresponding Pan/Tilt/Zoom camera picture center is directed toward on ground1,y1) and (x2,y2);
In step 402, pass through θ obtained by calibrating1And θ2And (x1,y1) and (x2,y2) determine that above-mentioned coordinate conversion is closed The related conversion parameter in system.
Ball machine is rotated into horizontal azimuthPosition, choose two different height ball machine vertical angle θ1And θ2, and Obtain the coordinate (x for two points that corresponding ball machine center is directed toward on ground1,y1), (x2,y2), it can be obtained by (1) and (2) formula It arrives:
By available in (3) and (4) formula:
(3) formula or (4) formula are substituted by (5) formula, the calculating formula of the mounting height h of available ball machine at this time, optionally, It is available by (4) formula:
Then, (5) formula substitution (6) formula can be obtained to the mounting height h of ball machine at this time.
Therefore, in (x0,y0)、With h known to when, as (1) and (2) formula discloses GPS coordinate and the institute of the target position State the vertical height angle θ and horizontal azimuth of Pan/Tilt/Zoom cameraBetween Conversion Relations.
It should be noted that according to above-mentioned steps 201 to 202 can determine the ground coordinate of the target position with it is described The vertical height angle θ and horizontal azimuth of Pan/Tilt/Zoom cameraBetween Conversion Relations, that is, establish coordinate between the two turn The system of changing planes, above-mentioned (1) and (2) formula are only illustrated by taking GPS coordinate as an example, other include that the ground coordinate of GNSS coordinate is also Available corresponding coordinate transformational relation.
So, so it is easy to understand that first coordinate transformation mechanism established through the invention is also able to achieve PTZ Vertical height angle θ and horizontal azimuth of the video camera at its picture center alignment target positionBe converted to the target position Ground coordinate.
In a kind of possible practical operation, it is known that Pan/Tilt/Zoom camera is when its picture center is directed at the target position Vertical height angle θ and horizontal azimuthThe the first coordinate transformation mechanism established by step 201 and step 202, can obtain The ground coordinate of the target position is taken, can be GPS coordinate optionally.
In step 103, according to the second coordinate transformation mechanism and the current vertical height angle θ ' and level of Pan/Tilt/Zoom camera AzimuthBy the vertical height angle θ and horizontal azimuthThe target position is converted in the Pan/Tilt/Zoom camera picture In coordinate.
Be illustrated in figure 5 the present invention it is a kind of using video camera vertically downward when optical center direction be that Z axis establishes three-dimensional right angle seat The schematic diagram for marking system, in figure, Pan/Tilt/Zoom camera picture is the plane tangent with unit Pan/Tilt/Zoom camera spherical surface, can be denoted as PUV plane, The intersection point of the plane and Pan/Tilt/Zoom camera unit sphere point of contact in ball machine machine core optical axis and the unit Pan/Tilt/Zoom camera spherical surface, note For P point, the coordinate of arbitrary point is denoted as (S in Pan/Tilt/Zoom camera picturex, Sy), the arbitrary point is in the three-dimensional cartesian coordinate system Coordinate be denoted as (xptz,yptz,zptz), the height of Pan/Tilt/Zoom camera picture is H, and width W, unit is pixel,
The vertical height angle θ and horizontal azimuth of the Pan/Tilt/Zoom cameraIt is sat with arbitrary point in the Pan/Tilt/Zoom camera picture The transformational relation between transformational relation between mark are as follows:
And geometric transform relation as shown in Figure 5, it is known that:
(8) in formula: PxIndicate that vector OP in the unit length of X-direction, is equal toPyIndicate vector OP in the Y direction Unit length, be equal toPzIndicate that vector OP in the unit length of Z-direction, is equal to cos θ;XuIndicate vector PU in X The unit length in direction, is equal toYuIt indicates the unit length of vector PU in the Y direction, is equal toZuIndicate vector PU in Z The unit length in direction is equal to 0;XvIndicate that vector PV in the unit length of X-direction, is equal toYvIndicate that vector PV exists The unit length of Y-direction, is equal toZvIndicate that vector PV in the unit length of Z-direction, is equal to sin θ, f is the PTZ Video camera machine core current focus, is the product of the Pan/Tilt/Zoom camera current amplification factor and machine core minimum focus, and unit is milli Rice.So, it is possible to further obtaining:
It should be noted that can be realized changing coordinates and the PTZ camera shooting of the Pan/Tilt/Zoom camera by (7) to (9) formula Mutual conversion between arbitrary coordinate in machine picture.
Seen from the above description, it after getting the ground coordinate of target position by step 101, is obtained by step 102 To Pan/Tilt/Zoom camera coordinate corresponding with the target position, when video camera goes to any other positions, by the way that (9) formula is substituted into Into (7) formula, camera views coordinate (S corresponding with the ground coordinate of target position at this time can be solvedx, Sy), in turn Complete the work being labeled in camera views to the ground coordinate.
Invention additionally discloses the picture coordinate transformation methods of a kind of ground coordinate that will be proposed and Pan/Tilt/Zoom camera to carry out in fact The specific implementation process of border application, comprising:
Step 1: obtaining the ground coordinate of target position;
It is (118.0461140321,24.6128424820) by the GPS coordinate that GPS instrument reads target position.
The ground coordinate of the target position is converted to Pan/Tilt/Zoom camera according to the first coordinate transformation mechanism and existed by second step Its picture center is directed at vertical height angle θ and horizontal azimuth when the target position
Pass through transformation mechanism formula (1) formula of the first coordinate obtained in embodiment step corresponding to Fig. 2 and (2) formula, meter It is (horizontal azimuth -0.810444, vertical height angle -0.725556) that calculation, which obtains corresponding ball machine coordinate, it should be noted that Here ball machine horizontal azimuth (range be 0~360 degree) has been mapped to (- 1,1) section, by vertical height angle (range for 0~ 90 degree) it has been mapped to (- 1,1) section, by taking horizontal azimuth as an example, mapping equation are as follows: horizontal azimuth (range is -1~1) =-1+1/180* horizontal azimuth (range be 0~360 degree), similarly, ball machine vertical height angle can also be according to reflecting accordingly It penetrates rule to be converted, following ball machine coordinates are all made of the expression-form after mapping, are more in line with actual scene.Such as institute in Fig. 6 It is shown as a kind of schematic diagram when ball machine when its picture center is directed at the target position in the present invention, wherein mesh described in Fig. 6 Cursor position is marked by " X " symbol 601.
Step 3: according to the second coordinate transformation mechanism and the current vertical height angle θ ' and level orientation of Pan/Tilt/Zoom camera AngleBy the vertical height angle θ and horizontal azimuthThe target position is converted in the Pan/Tilt/Zoom camera picture Coordinate.
The changing coordinates of ball machine can be obtained by ball machine proprietary protocol, can also be obtained by ONVIF agreement, this Inventive technique scheme and with no restriction.Here getting ball machine changing coordinates is (- 0.834667, -0.705556).
(7) formula to (9) formula and ball machine changing coordinates in the second coordinate transformation mechanism in 103 is through the above steps (- 0.834667, -0.705556), can be calculated the corresponding ball machine picture coordinate of the ball machine coordinate provided be (432, 156) the entire picture size of ball machine, wherein in the present embodiment is 704*576.One kind shown in the present invention is illustrated in figure 7 to work as Coordinate when ball machine changes in coordinates to target position in ball machine picture carries out the schematic diagram of automatic marking, and wherein label 701 is Target position shown in Fig. 6 carries out the coordinate points of automatic marking in ball machine picture.Comparison diagram 6 and Fig. 7 can be seen that for Given GPS coordinate (118.0461140321,24.6128424820), when ball machine is mobile, that is, current ball machine coordinate hair When changing, the technical solution ball machine picture coordinate that calculates of conversion and true geographical location always one through the invention It causes, illustrates the accuracy for carrying out ball machine picture coordinate automatic marking using technical solution of the present invention.
Be illustrated in figure 8 shown in the present invention another kind when ball machine changes in coordinates to target position in ball machine picture Coordinate carries out the schematic diagram of automatic marking, and wherein label 801 is that the target position carries out automatic marking in ball machine picture Coordinate points.When ball machine is turned to again in a new coordinate position relative to Fig. 6 and Fig. 7, through the above steps 103 In the second coordinate transformation mechanism in (7) formula to (9) formula, the GPS coordinate of target position at this time remains as (118.0461140321,24.6128424820), corresponding ball machine picture coordinate are (512,320), can be with from Fig. 8 picture Find out, geographical location corresponding to the picture coordinate and GPS coordinate that automatic marking goes out still maintains unanimously, illustrates to use again The accuracy of technical solution of the present invention progress ball machine picture coordinate automatic marking.
The present embodiment obtains the ground coordinate of target position first;It is changed the mechanism according to the first coordinate by the target position Ground coordinate be converted to vertical height angle θ and level side of the Pan/Tilt/Zoom camera when its picture center is directed at the target position Parallactic angleAccording to the second coordinate transformation mechanism and the current vertical height angle θ ' and horizontal azimuth of Pan/Tilt/Zoom cameraBy institute State vertical height angle θ and horizontal azimuthCoordinate of the target position in the Pan/Tilt/Zoom camera picture is converted to, in this way It can be realized automatic marking of the target position in Pan/Tilt/Zoom camera picture, it is high-efficient and accurate and reliable.
The present invention also announces the picture coordinate transformation system of a kind of ground coordinate and Pan/Tilt/Zoom camera, is illustrated in figure 9 this hair The picture coordinate transformation system schematic diagram of a kind of ground coordinate and Pan/Tilt/Zoom camera of bright announcement, comprising:
In module 901, ground coordinate obtains module, for obtaining the ground coordinate of target position;
In module 902, Pan/Tilt/Zoom camera coordinate determining module, for being changed the mechanism according to the first coordinate by the target The ground coordinate of position is converted to vertical height angle θ and water of the Pan/Tilt/Zoom camera when its picture center is directed at the target position Square parallactic angle
In module 903, picture coordinate determining module, for according to the second coordinate transformation mechanism and Pan/Tilt/Zoom camera Current vertical height angle θ ' and horizontal azimuthBy the vertical height angle θ and horizontal azimuthBe converted to the target position Set the coordinate in the Pan/Tilt/Zoom camera picture.
Further, the coordinate transferring, comprising:
Establishment of coordinate system module, for establishing Pan/Tilt/Zoom camera coordinate system;
Coordinate converts determining module, and the GNSS coordinate for determining the target position is vertical with the Pan/Tilt/Zoom camera Elevation angle θ and horizontal azimuthBetween coordinate transformation relation, the coordinate transformation relation includes related conversion parameter, In, the correlation conversion parameter is determined by following submodules:
Submodule is demarcated, for being demarcated in the Pan/Tilt/Zoom camera coordinate system, comprising: determine the Pan/Tilt/Zoom camera Horizontal azimuth is arrived in positionPosition, randomly select at least two different vertical height angle θ1And θ2, and obtain corresponding It is directed toward the coordinate (x of two points on ground in Pan/Tilt/Zoom camera picture center1,y1) and (x2,y2);
Parameter determination submodule, the θ for will be obtained above by demarcating module1And θ2And (x1,y1) and (x2,y2) really The related conversion parameter in fixed above-mentioned coordinate transformation relation.
Figure 10 shows the picture coordinate transformation device of ground coordinate and Pan/Tilt/Zoom camera involved in the embodiment of the present invention Structural schematic diagram, the device mainly includes processor 1001, memory 1002 and bus 1003, the memory is stored at least One section of program, described program are executed as the processor to realize the ground coordinate and Pan/Tilt/Zoom camera as described in above-described embodiment Picture coordinate transformation method.
Processor 1001 includes one or more processing cores, and processor 1001 passes through bus 1003 and memory 1002 are connected, and memory 10 is realized when executing the program instruction in memory 1002 for storing program instruction, processor 1001 The picture coordinate transformation method of ground coordinate and Pan/Tilt/Zoom camera that above method embodiment provides.
Optionally, memory 1002 can be by any kind of volatibility or non-volatile memory device or their group It closes and realizes, such as static to access memory (SRAM) at any time, electrically erasable programmable read-only memory (EEPROM) is erasable to compile Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash Device, disk or CD.
The present invention also provides a kind of computer readable storage medium, be stored in the storage medium at least one instruction, At least one section of program, code set or instruction set, at least one instruction, at least one section of program, code set or instruction set are by institute State the picture coordinate conversion of ground coordinate and Pan/Tilt/Zoom camera that processor is loaded and executed to realize above method embodiment offer Method.
Optionally, the present invention also provides a kind of computer program products comprising instruction, when it runs on computers When, so that computer executes the picture coordinate transformation method of ground coordinate described in above-mentioned various aspects and Pan/Tilt/Zoom camera.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware It completes, relevant hardware can also be instructed to complete by program, the program can store computer-readable with one kind In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not used to limit invention, it is all in spirit of the invention and Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.

Claims (10)

1. the picture coordinate transformation method of a kind of ground coordinate and Pan/Tilt/Zoom camera characterized by comprising
Obtain the ground coordinate of target position;
It is changed the mechanism according to the first coordinate and the ground coordinate of the target position is converted into Pan/Tilt/Zoom camera at its picture center pair Vertical height angle θ and horizontal azimuth when the quasi- target position
According to the second coordinate transformation mechanism and the current vertical height angle θ ' and horizontal azimuth of Pan/Tilt/Zoom cameraIt hangs down described Straight elevation angle θ and horizontal azimuthBe converted to coordinate of the target position in the Pan/Tilt/Zoom camera picture.
2. the picture coordinate transformation method of ground coordinate according to claim 1 and Pan/Tilt/Zoom camera, which is characterized in that institute The first coordinate transformation mechanism is stated to establish by following step:
Establish earth axes and Pan/Tilt/Zoom camera coordinate system;
Determine the ground coordinate of the target position and the vertical height angle θ of the Pan/Tilt/Zoom camera and horizontal azimuthBetween Coordinate transformation relation, the coordinate transformation relation include related conversion parameter, wherein the correlation conversion parameter passes through following steps It is rapid to determine:
It is demarcated in the earth axes and the Pan/Tilt/Zoom camera coordinate system, comprising: position the Pan/Tilt/Zoom camera To horizontal azimuthPosition, randomly select at least two different vertical height angle θ1And θ2, and obtain corresponding PTZ It is directed toward the ground coordinate (x of two points on ground in camera views center1,y1) and (x2,y2);
Pass through θ obtained by calibrating1And θ2And (x1,y1) and (x2,y2) determine that the correlation in above-mentioned coordinate transformation relation turns Change parameter.
3. the picture coordinate transformation method of ground coordinate according to claim 2 and Pan/Tilt/Zoom camera, which is characterized in that institute It states earth axes to establish by GNSS coordinate system, the ground coordinate is GNSS coordinate.
4. the picture coordinate transformation method of ground coordinate according to claim 3 and Pan/Tilt/Zoom camera, which is characterized in that institute Stating GNSS coordinate system is GPS coordinate system, and the GNSS coordinate is GPS coordinate, and the X and Y-axis of the GPS coordinate system respectively represent ground The camera coordinate system is established with the X and Y-axis of the GPS coordinate system in the latitude and longitude coordinates direction of ball surface GPS coordinate system X and Y-axis, and the Z axis of the camera coordinate system is perpendicular to the X and Y-axis.
5. the picture coordinate transformation method of ground coordinate according to claim 4 and Pan/Tilt/Zoom camera, which is characterized in that institute Stating video camera is ball machine, and the coordinate transformation relation may be expressed as:Wherein, (x, y) is ball machine The ground latitude and longitude coordinates that picture center is directed toward, the correlation conversion parameter include: the GPS latitude and longitude coordinates of ball machine installation site (x0,y0), ball machine horizontal zero optical axis it is parallel with GPS coordinate X-axis when ball machine angleWith the mounting height h of the ball machine.
6. the picture coordinate transformation method of ground coordinate according to claim 1 and Pan/Tilt/Zoom camera, which is characterized in that institute The second coordinate transformation mechanism is stated to establish by following step:
Three-dimensional cartesian coordinate system XYZ is established as Z axis in optical center direction when using Pan/Tilt/Zoom camera vertically downward, and Pan/Tilt/Zoom camera picture is The tangent plane with unit Pan/Tilt/Zoom camera spherical surface, the plane and Pan/Tilt/Zoom camera unit sphere point of contact ball machine machine core optical axis with The intersection point of the unit Pan/Tilt/Zoom camera spherical surface is denoted as P point, and the coordinate of arbitrary point is denoted as (S in Pan/Tilt/Zoom camera picturex, Sy), institute It states coordinate of the arbitrary point in the three-dimensional cartesian coordinate system and is denoted as (xptz,yptz,zptz), the height of Pan/Tilt/Zoom camera picture is H, Width is W, and unit is pixel,
The vertical height angle θ and horizontal azimuth of the Pan/Tilt/Zoom cameraWith Point Coordinates in the Pan/Tilt/Zoom camera picture it Between transformational relation between transformational relation are as follows:
Wherein,θ ' is PTZ camera shooting Machine current vertical height angle,For Pan/Tilt/Zoom camera present level azimuth, f is that the Pan/Tilt/Zoom camera machine core is currently burnt Away from for the product of the Pan/Tilt/Zoom camera current amplification factor and machine core minimum focus, unit is millimeter.
7. the picture coordinate transformation system of a kind of ground coordinate and Pan/Tilt/Zoom camera characterized by comprising
Ground coordinate obtains module, for obtaining the ground coordinate of target position;
Pan/Tilt/Zoom camera coordinate determining module, for being turned the ground coordinate of the target position according to the first coordinate transformation mechanism It is changed to vertical height angle θ and horizontal azimuth of the Pan/Tilt/Zoom camera when its picture center is directed at the target position
Picture coordinate determining module, for the current vertical height angle θ ' according to the second coordinate transformation mechanism and Pan/Tilt/Zoom camera And horizontal azimuthBy the vertical height angle θ and horizontal azimuthThe target position is converted to image in the PTZ Coordinate in machine picture.
8. the picture coordinate transformation system of ground coordinate according to claim 7 and Pan/Tilt/Zoom camera, which is characterized in that institute Stating coordinate transferring includes:
Establishment of coordinate system module, for establishing earth axes and Pan/Tilt/Zoom camera coordinate system;
Coordinate converts determining module, for determining the ground coordinate of the target position and the vertical height of the Pan/Tilt/Zoom camera Angle θ and horizontal azimuthBetween coordinate transformation relation, the coordinate transformation relation includes related conversion parameter, wherein institute Related conversion parameter is stated to determine by following submodules:
Submodule is demarcated, for being demarcated in the Pan/Tilt/Zoom camera coordinate system, comprising: navigate to the Pan/Tilt/Zoom camera Horizontal azimuthPosition, randomly select at least two different vertical height angle θ1And θ2, and obtain corresponding PTZ and take the photograph It is directed toward the ground coordinate (x of two points on ground in camera picture center1,y1) and (x2,y2);
Parameter determination submodule, the θ for being obtained by demarcating module1And θ2And (x1,y1) and (x2,y2) determine above-mentioned coordinate The related conversion parameter in transformational relation.
9. the picture coordinate transformation device of a kind of ground coordinate and Pan/Tilt/Zoom camera, which is characterized in that including processor and storage Device, the memory are stored at least one section of program, and described program is executed by the processor to realize such as claim 1 to 6 The picture coordinate transformation method of any ground coordinate and Pan/Tilt/Zoom camera.
10. a kind of computer readable storage medium, which is characterized in that be stored at least one section of program, institute in the storage medium At least one section of program is stated to be executed by the processor to realize ground coordinate and the PTZ camera shooting as described in claim 1 to 6 is any The picture coordinate transformation method of machine.
CN201811366339.8A 2018-11-16 2018-11-16 Method, system and device for converting ground coordinates and picture coordinates of PTZ camera Active CN109377529B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811366339.8A CN109377529B (en) 2018-11-16 2018-11-16 Method, system and device for converting ground coordinates and picture coordinates of PTZ camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811366339.8A CN109377529B (en) 2018-11-16 2018-11-16 Method, system and device for converting ground coordinates and picture coordinates of PTZ camera

Publications (2)

Publication Number Publication Date
CN109377529A true CN109377529A (en) 2019-02-22
CN109377529B CN109377529B (en) 2021-05-14

Family

ID=65389238

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811366339.8A Active CN109377529B (en) 2018-11-16 2018-11-16 Method, system and device for converting ground coordinates and picture coordinates of PTZ camera

Country Status (1)

Country Link
CN (1) CN109377529B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110426674A (en) * 2019-07-17 2019-11-08 浙江大华技术股份有限公司 A kind of spatial position determines method, apparatus, electronic equipment and storage medium
CN115546304A (en) * 2022-11-24 2022-12-30 海纳云物联科技有限公司 Method and device for detecting and positioning three-dimensional coordinate system based on camera

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104081433A (en) * 2011-12-22 2014-10-01 派尔高公司 Transformation between image and map coordinates
US20150247912A1 (en) * 2014-03-02 2015-09-03 Xueming Tang Camera control for fast automatic object targeting
CN106033612A (en) * 2015-03-09 2016-10-19 杭州海康威视数字技术股份有限公司 Target tracking method, target tracking device and target tracking system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104081433A (en) * 2011-12-22 2014-10-01 派尔高公司 Transformation between image and map coordinates
US20150247912A1 (en) * 2014-03-02 2015-09-03 Xueming Tang Camera control for fast automatic object targeting
CN106033612A (en) * 2015-03-09 2016-10-19 杭州海康威视数字技术股份有限公司 Target tracking method, target tracking device and target tracking system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
STEFAN HRABAR ET AL.: "PTZ Camera Pose Estimation by Tracking a 3D Target", 《2011 IEEE INTERNATIONAL CONFERENCE ON ROBOTICS AND AUTOMATION》 *
腊磊: "PTZ摄像机的目标检测方法研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110426674A (en) * 2019-07-17 2019-11-08 浙江大华技术股份有限公司 A kind of spatial position determines method, apparatus, electronic equipment and storage medium
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

Also Published As

Publication number Publication date
CN109377529B (en) 2021-05-14

Similar Documents

Publication Publication Date Title
CN109523471A (en) A kind of conversion method, system and the device of ground coordinate and wide angle cameras picture coordinate
US20180059207A1 (en) Method, device and system for target tracking
CN102175221B (en) Vehicle-mounted mobile photographic surveying system based on fisheye lens
CN109345599A (en) A kind of coordinate transformation method and system of ground coordinate and Pan/Tilt/Zoom camera
US20080154494A1 (en) Image-related information displaying system
CN104320587A (en) Method for automatically obtaining shooting range of outdoor pan-tilt camera
CN103874193A (en) Method and system for positioning mobile terminal
CN103017740B (en) Method and system for positioning monitoring target by using video monitoring devices
US11682103B2 (en) Selecting exterior images of a structure based on capture positions of indoor images associated with the structure
JP6804806B2 (en) Positioning accuracy information calculation device and positioning accuracy information calculation method
CN106023207B (en) It is a kind of to be enjoyed a double blessing the Municipal Component acquisition method of scape based on traverse measurement system
CN107665250A (en) High definition road overlooks construction method, device, server and the storage medium of map
CN109509233A (en) A kind of Pan/Tilt/Zoom camera method for tracking target, system and device based on RFID label tag location information
CN109377529A (en) A kind of picture coordinate transformation method, system and the device of ground coordinate and Pan/Tilt/Zoom camera
CN115439531A (en) Method and equipment for acquiring target space position information of target object
JP5572053B2 (en) Orientation estimation apparatus and program
CN112422653A (en) Scene information pushing method, system, storage medium and equipment based on location service
CN115439528A (en) Method and equipment for acquiring image position information of target object
Hyla et al. Analysis of radar integration possibilities in inland mobile navigation
CN116228888B (en) Conversion method and system for geographic coordinates and PTZ camera coordinates
JP2011243076A (en) Object management image generation device and object management image generation program
CN105393084A (en) Location information determination method, device and user equipment
JP2023523364A (en) Visual positioning method, device, equipment and readable storage medium
CN115565092A (en) Method and equipment for acquiring geographical position information of target object
CN113763477B (en) Camera point calibration method, device, equipment and medium

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
GR01 Patent grant
GR01 Patent grant