CN110009571A - Calculation of longitude & latitude method, system and the storage medium of position are detected in camera image - Google Patents
Calculation of longitude & latitude method, system and the storage medium of position are detected in camera image Download PDFInfo
- Publication number
- CN110009571A CN110009571A CN201910174818.8A CN201910174818A CN110009571A CN 110009571 A CN110009571 A CN 110009571A CN 201910174818 A CN201910174818 A CN 201910174818A CN 110009571 A CN110009571 A CN 110009571A
- Authority
- CN
- China
- Prior art keywords
- camera
- coordinate
- latitude
- longitude
- pixel
- 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
Links
- 238000004364 calculation method Methods 0.000 title claims abstract description 30
- 238000000034 method Methods 0.000 title claims abstract description 27
- 238000003860 storage Methods 0.000 title claims description 12
- 238000004590 computer program Methods 0.000 claims description 19
- 230000005055 memory storage Effects 0.000 claims description 3
- 230000009466 transformation Effects 0.000 claims description 3
- 238000005457 optimization Methods 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 7
- 238000012545 processing Methods 0.000 description 4
- 235000006508 Nelumbo nucifera Nutrition 0.000 description 3
- 240000002853 Nelumbo nucifera Species 0.000 description 3
- 238000003384 imaging method Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Classifications
-
- G06T3/06—
-
- 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
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
- Studio Devices (AREA)
Abstract
The present invention provides a kind of calculation of longitude & latitude method that position is detected in camera image, comprising: establishes camera and overlooks coordinate system;Calculate pixel coordinate (px, py) point in the case where camera overlooks coordinate system the direction x and the direction y apart from coordinate (cx, cy);The coordinate position (ex, ey) of pixel coordinate (px, py) under the earth axes using camera as origin is calculated apart from coordinate (cx, cy) according to described;The latitude and longitude coordinates (ex_long, ex_lat) of pixel coordinate (px, py) are calculated according to the latitude and longitude coordinates (camera_long, camera_lat) of camera itself and the coordinate position (ex, ey).The feathering angle of combining camera of the present invention, pitch angle, the latitude and longitude coordinates information of field angle and camera itself, assumed using some geometry and approximate, the corresponding latitude and longitude coordinates of image pixel coordinates are calculated, can more accurately calculate the corresponding latitude and longitude coordinates of image pixel coordinates in larger application scenarios.
Description
Technical field
The present invention relates to field of image detection, and in particular to the calculation of longitude & latitude side of position is detected in a kind of camera image
Method, system and storage medium.
Background technique
In intelligent monitoring, the coordinate position of target in the picture, but practical application can detecte by camera image
In, need to know that the coordinate position in image corresponds to actual geographic position, i.e. latitude and longitude coordinates position toward contact.And due to phase
Machine image is the imaging pattern of 2D, hardly results in the 3D location information of pixel coordinate point, therefore obtain the longitude and latitude of pixel coordinate point
Degree coordinate position has difficulties.
Summary of the invention
In view of the foregoing deficiencies of prior art, the purpose of the present invention is to provide detect position in a kind of camera image
Calculation of longitude & latitude method and system, the latitude and longitude coordinates position for solving to obtain pixel coordinate point in the prior art exists tired
Difficult problem.
In order to achieve the above objects and other related objects, the present invention provides the longitude and latitude that position is detected in a kind of camera image
Calculation method, the calculation method include:
It establishes camera and overlooks coordinate system;
Calculate pixel coordinate (px, py) point in the case where camera overlooks coordinate system the direction x and the direction y apart from coordinate (cx, cy);
Pixel coordinate (px, py) is calculated using camera as the earth axes of origin apart from coordinate (cx, cy) according to described
Under coordinate position (ex, ey);
According to the latitude and longitude coordinates (camera_long, camera_lat) and the coordinate position (ex, ey) of camera itself
Calculate the latitude and longitude coordinates (ex_long, ex_lat) of pixel coordinate (px, py).
Optionally, calculating pixel coordinate (px, the py) point camera overlook coordinate system under the direction x and y apart from coordinate
(cx, cy), specifically includes:
Acquisition camera pitch angle alpha, viewing field of camera angle FOV, the wide W of image range and high H, image pixel coordinates are in y
Value px of the value py and image pixel coordinates of axis direction in x-axis direction;
According to the camera pitch angle alpha, viewing field of camera angle FOV, image range wide W and high H and image pixel
The distance cy that pixel coordinate (px, py) point overlooks the direction coordinate system y in camera is calculated in value py of the coordinate in y-axis direction,
In, cy=camera_height*tan (beta), beta=alpha+FOV*H/W* (H-py);
Distance cy, the viewing field of camera angle according to the pixel coordinate (px, py) point in the camera vertical view direction coordinate system y
Pixel coordinate (px, py) point is calculated in the value px of x-axis direction in FOV, the wide W of described image range and image pixel coordinates
The distance cx in the direction coordinate system x is overlooked in camera, wherein cx=cy*tan (gamma), gamma=FOV* (px-W/2)/W.
Optionally, described to calculate pixel coordinate (px, py) using camera as origin apart from coordinate (cx, cy) according to described
Coordinate position (ex, ey) under earth axes, specifically includes:
Camera is overlooked the direction x and y under coordinate system to be transformed into using camera as origin apart from coordinate (cx, cy), due east x
Direction, due north are under the earth axes in the direction y;
The distance cx and the pixel coordinate in the direction coordinate system x are overlooked in camera according to the pixel coordinate (px, py) point
(px, py) point calculates the coordinate position (ex, ey) in the distance cy that camera overlooks the direction coordinate system y, then:
Ex=cx*cos (90-theta)+cy*sin (90-theta), ey=cy*cos (90-theta)-cx*sin (90-
Theta), wherein theta is rotation angle of the camera relative to due east direction.
Optionally, the latitude and longitude coordinates (camera_long, camera_lat) according to camera itself and the coordinate
Position (ex, ey) calculates the latitude and longitude coordinates (ex_long, ex_lat) of pixel coordinate (px, py), specifically includes:
Obtain the corresponding ground distance of one second latitude and latitude radius;
It is corresponding that one second longitude is calculated according to the corresponding ground distance of one second latitude and the latitude radius
Ground distance;
According to the coordinate position (ex, ey), the latitude and longitude coordinates of camera itself and one second latitude corresponding ground identity distance
From latitude and longitude coordinates (ex_long, the ex_ that pixel coordinate (px, py) is calculated in ground distance corresponding with one second longitude
lat)。
In order to achieve the above objects and other related objects, the present invention also provides the longitudes and latitudes that position is detected in a kind of camera image
Computing device is spent, which includes:
Coordinate system creation module overlooks coordinate system for establishing camera;
Apart from coordinate calculation module, for calculating pixel coordinate (px, py) point direction x and y in the case where camera overlooks coordinate system
Direction apart from coordinate (cx, cy);
Coordinate position computing module, for calculating pixel coordinate (px, py) with phase apart from coordinate (cx, cy) according to described
Machine is the coordinate position (ex, ey) under the earth axes of origin;
Latitude and longitude coordinates computing module, for latitude and longitude coordinates (camera_long, the camera_ according to camera itself
Lat) and the coordinate position (ex, ey) calculate pixel coordinate (px, py) latitude and longitude coordinates (ex_long, ex_lat).
Optionally, described to include: apart from coordinate calculation module
First parameter acquisition submodule, for obtain camera pitch angle alpha, viewing field of camera angle FOV, image range width
W and high H, image pixel coordinates y-axis direction value py and image pixel coordinates x-axis direction value px;
First computational submodule, for according to the camera pitch angle alpha, viewing field of camera angle FOV, image range width
The W and value py of high H and image pixel coordinates in y-axis direction is calculated pixel coordinate (px, py) point and overlooks coordinate in camera
It is the distance cy in the direction y, wherein cy=camera_height*tan (beta), beta=alpha+FOV*H/W* (H-py);
Second computational submodule, for according to the pixel coordinate (px, py) point camera overlook the direction coordinate system y away from
It is calculated from cy, the viewing field of camera angle FOV, the wide W of described image range and image pixel coordinates in the value px of x-axis direction
The distance cx in the direction coordinate system x is overlooked in camera to pixel coordinate (px, py) point, wherein cx=cy*tan (gamma), gamma
=FOV* (px-W/2)/W.
Optionally, the coordinate position computing module includes:
Coordinate transformation module, for by camera overlook coordinate system under the direction x and y apart from coordinate (cx, cy) be transformed into
Camera is origin, and due east is the direction x, and due north is under the earth axes in the direction y;
Third computational submodule, for according to the pixel coordinate (px, py) point camera overlook the direction coordinate system x away from
From cx and the pixel coordinate (px, py) point the distance cy that camera overlooks the direction coordinate system y calculate the coordinate position (ex,
Ey), then:
Ex=cx*cos (90-theta)+cy*sin (90-theta), ey=cy*cos (90-theta)-cx*sin (90-
Theta), wherein theta is rotation angle of the camera relative to due east direction.
Optionally, the latitude and longitude coordinates computing module includes:
Second parameter acquisition module, for obtaining the corresponding ground distance of one second latitude and latitude radius;
4th computational submodule, for being calculated according to the corresponding ground distance of one second latitude and the latitude radius
Obtain the corresponding ground distance of one second longitude;
5th computational submodule, for the latitude and longitude coordinates and one according to the coordinate position (ex, ey), camera itself
The longitude and latitude that pixel coordinate (px, py) is calculated in the second corresponding ground distance of latitude and the corresponding ground distance of one second longitude is sat
It marks (ex_long, ex_lat).
In order to achieve the above objects and other related objects, the present invention also provides a kind of computer readable storage medium, storages
Computer program executes the method when computer program is run by processor.
In order to achieve the above objects and other related objects, the present invention also provides a kind of systems, comprising:
Memory, for storing computer program;
Processor, for executing the computer program of the memory storage, so that the equipment executes the optimizing
Method.
As described above, in a kind of camera image of the invention detect position calculation of longitude & latitude method and system, have with
It is lower the utility model has the advantages that
The latitude and longitude coordinates information of the feathering angle of combining camera of the present invention, pitch angle, field angle and camera itself,
Assumed using some geometry and approximate, it, can be in larger application scenarios to calculate the corresponding latitude and longitude coordinates of image pixel coordinates
In more accurately calculate the corresponding latitude and longitude coordinates of image pixel coordinates.
Detailed description of the invention
Fig. 1 is image and ground imaging region maps relation schematic diagram;
Fig. 2 is image areas imaging mapping relations figure;
Fig. 3 is camera top view;
Fig. 4 is camera coordinates and terrestrial coordinates transition diagram;
Fig. 5 is earth longitude and latitude side view;
Fig. 6 is the calculation of longitude & latitude method flow diagram that position is detected in a kind of camera image of the present invention;
Fig. 7 is the schematic diagram that the calculation of longitude & latitude device of position is detected in a kind of camera image of the present invention;
Fig. 8 is the schematic diagram apart from coordinate calculation module;
Fig. 9 is the schematic diagram of coordinate position computing module;
Figure 10 is the schematic diagram of latitude and longitude coordinates computing module.
Specific embodiment
Illustrate embodiments of the present invention below by way of specific specific example, those skilled in the art can be by this specification
Other advantages and efficacy of the present invention can be easily understood for disclosed content.The present invention can also pass through in addition different specific realities
The mode of applying is embodied or practiced, the various details in this specification can also based on different viewpoints and application, without departing from
Various modifications or alterations are carried out under spirit of the invention.It should be noted that in the absence of conflict, following embodiment and implementation
Feature in example can be combined with each other.
It should be noted that illustrating the basic structure that only the invention is illustrated in a schematic way provided in following embodiment
Think, only shown in schema then with related component in the present invention rather than component count, shape and size when according to actual implementation
Draw, when actual implementation kenel, quantity and the ratio of each component can arbitrarily change for one kind, and its assembly layout kenel
It is likely more complexity.
As shown in fig. 6, the present invention provides a kind of calculation of longitude & latitude method for detecting position in camera image, the calculation method
Include:
S1 establishes camera and overlooks coordinate system;
S2 calculate pixel coordinate (px, py) point in the case where camera overlooks coordinate system the direction x and the direction y apart from coordinate (cx,
cy);
S3 calculates pixel coordinate (px, py) using camera as the ground coordinate of origin apart from coordinate (cx, cy) according to described
Coordinate position (ex, ey) under system;
S4 according to the latitude and longitude coordinates (camera_long, camera_lat) of camera itself and the coordinate position (ex,
Ey the latitude and longitude coordinates (ex_long, ex_lat) of pixel coordinate (px, py)) are calculated.
The latitude and longitude coordinates information of the feathering angle of combining camera of the present invention, pitch angle, field angle and camera itself,
Assumed using some geometry and approximate, it, can be in larger application scenarios to calculate the corresponding latitude and longitude coordinates of image pixel coordinates
In more accurately calculate the corresponding latitude and longitude coordinates of image pixel coordinates.
As shown in Figure 1, camera overlooks ground, camera heights camera_height, camera pitch angle is alpha, it is assumed that
Ground be all it is horizontal, the pitch angle of the corresponding point in image midpoint is beta, is mid_py_distance apart from camera.
The range in the corresponding ground vertical view of image range as shown in Figure 2 region is mapped as a trapezoidal model from a rectangle
It encloses, image slices vegetarian refreshments is mapped to the point in trapezoidal range, corresponds to trapezoidal frame range in Fig. 3.
If Fig. 3 is camera top view, in step S1, S2, the center line in region is overlooked with the corresponding ground of image range
For the y-axis of coordinate system, vertical direction is x-axis, establishes camera and overlooks coordinate system, this coordinate system is named as C, it is assumed that image is sat
Corresponding pitch angle beta of all the points in mark on the horizontal line of identical y is approximate consistent, and being equal to is image immediately ahead of camera
The point pitch angle of y location, the pitch angle can be calculated by following formula in centerline:
Beta=alpha+FOV*H/W* (H-py), wherein W, H indicate width, the height of image, and py is the image pixel coordinates side y
To value, alpha be camera pitch angle, FOV be viewing field of camera angle, therefore,
Cy=mid_py_distance=camera_height*tan (beta);
Point drift angle gamma is proportional to pixel x coordinate and FOV, and gamma=FOV* (px-W/2)/W, px are image pixel
Coordinate x-axis direction value, then, and cx=cy*tan (gamma).
Therefore, be calculated pixel coordinate (px, py) point camera overlook coordinate system C under the direction x and y apart from coordinate
(cx,cy)。
In step s3, in order to calculate the position a little under earth axes, as shown in figure 4, camera is overlooked coordinate system C
The direction lower x and y is transformed into apart from coordinate (cx, cy) using camera as origin, and due east is the direction x, and due north is that the ground in the direction y is sat
Under mark system E, rotation angle of the camera relative to due east direction is theta here, and the conversion being transformed under terrestrial coordinate system in this way is closed
System are as follows:
Ex=cx*cos (90-theta)+cy*sin (90-theta)
Ey=cy*cos (90-theta)-cx*sin (90-theta)
In this way, just obtaining pixel coordinate (px, py) using camera as the coordinate position under the earth axes E of origin
(ex,ey)。
In step s 4, longitude and latitude is calculated by (ex, ey), with reference to shown in Fig. 5.
Since latitude is with the earth center of circle, earth radius is divided toward the angle in south, can approximately be obtained on ground
On,
Corresponding ground distance approximation lat_second_dis=(PI*ER/2)/(180*60*60) of one second latitude, about
30.9 meters, wherein ER is earth radius (6371 km), and PI is pi (3.14159265).
Latitude radius lat_R=ER*cos (lat) can be calculated, lat is in the case where given latitude for longitude
Latitude, corresponding ground distance approximation long_second_dis=(PI*lat_R/2)/(360*60*60) of such one second longitude.
Therefore, available (ex, ey) according to the latitude and longitude coordinates of camera itself (camera_long, camera_lat)
Corresponding latitude and longitude coordinates
Ex_long=camera_long+ex/long_second_dis seconds
Ex_lat=camera_lat+ex/lat_second_dis seconds
In this way, just having obtained the latitude and longitude coordinates (ex_long, ex_lat) of pixel coordinate (px, py)
The present invention also provides the calculation of longitude & latitude device for detecting position in a kind of camera image, which includes:
Coordinate system creation module 1 overlooks coordinate system for establishing camera;
Apart from coordinate calculation module 2, for calculating pixel coordinate (px, py) point direction x and y in the case where camera overlooks coordinate system
Direction apart from coordinate (cx, cy);
Coordinate position computing module 3, for according to it is described apart from coordinate (cx, cy) calculate pixel coordinate (px, py) with
Camera is the coordinate position (ex, ey) under the earth axes of origin;
Latitude and longitude coordinates computing module 4, for latitude and longitude coordinates (camera_long, the camera_ according to camera itself
Lat) and the coordinate position (ex, ey) calculate pixel coordinate (px, py) latitude and longitude coordinates (ex_long, ex_lat).
It is described to include: apart from coordinate calculation module in an embodiment
First parameter acquisition submodule 21, for obtaining camera pitch angle alpha, viewing field of camera angle FOV, image range
Wide W and high H, image pixel coordinates y-axis direction value py and image pixel coordinates x-axis direction value px;
First computational submodule 22, for according to the camera pitch angle alpha, viewing field of camera angle FOV, image range
The wide W and value py of high H and image pixel coordinates in y-axis direction is calculated pixel coordinate (px, py) point and overlooks seat in camera
The distance cy in the direction mark system y, wherein cy=camera_height*tan (beta), beta=alpha+FOV*H/W* (H-
py);
Second computational submodule 23, for overlooking the direction coordinate system y in camera according to the pixel coordinate (px, py) point
Distance cy, the viewing field of camera angle FOV, the wide W of described image range and image pixel coordinates are calculated in the value px of x-axis direction
Obtain the distance cx that pixel coordinate (px, py) point overlooks the direction coordinate system x in camera, wherein cx=cy*tan (gamma),
Gamma=FOV* (px-W/2)/W.
In an embodiment, the coordinate position computing module includes:
Coordinate transformation module 31 is transformed into for camera to be overlooked the direction x and y under coordinate system apart from coordinate (cx, cy)
Using camera as origin, due east is the direction x, and due north is under the earth axes in the direction y;
Third computational submodule 32, for overlooking the direction coordinate system x in camera according to the pixel coordinate (px, py) point
Distance cx and the pixel coordinate (px, py) point overlook the distance cy calculating coordinate position in the direction coordinate system y in camera
(ex, ey), then:
Ex=cx*cos (90-theta)+cy*sin (90-theta), ey=cy*cos (90-theta)-cx*sin (90-
Theta), wherein theta is rotation angle of the camera relative to due east direction.
In an embodiment, the latitude and longitude coordinates computing module includes:
Second parameter acquisition module 41, for obtaining the corresponding ground distance of one second latitude and latitude radius;
4th computational submodule 42, for according to the corresponding ground distance of one second latitude and the latitude radiuscope
Calculation obtains the corresponding ground distance of one second longitude;
5th computational submodule 43, for according to the coordinate position (ex, ey), camera itself latitude and longitude coordinates and
The longitude and latitude of pixel coordinate (px, py) is calculated in the corresponding ground distance of one second latitude and the corresponding ground distance of one second longitude
Coordinate (ex_long, ex_lat).
The present invention also provides a kind of computer readable storage mediums, store computer program, and the computer program is located
The method is executed when managing device operation.
The present invention also provides a kind of systems, comprising:
Memory, for storing computer program;
Processor, for executing the computer program of the memory storage, so that the equipment executes the method.
The processor can be central processing unit (Central Processing Unit, CPU), can also be it
His general processor, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit
(Application Specifi.Work ntegrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor
Deng.
The memory can be internal storage unit or External memory equipment, such as plug-in type hard disk, intelligent memory card
(Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (FlashCard) etc..Into one
Step ground, the memory can also both include internal storage unit, also include External memory equipment.The memory is for storing
The computer program and other programs and data.The memory can be also used for temporarily storing oneself and be exported or will
The data to be exported.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function
Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different
Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing
The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also
To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integrated
Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list
Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above system
The specific work process of middle unit, module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment
The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure
Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually
It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician
Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed
The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device/terminal device and method, it can be with
It realizes by another way.For example, device described above/terminal device embodiment is only schematical, for example, institute
The division of module or unit is stated, only a kind of logical function partition, there may be another division manner in actual implementation, such as
Multiple units or components can be combined or can be integrated into another system, or some features can be ignored or not executed.Separately
A bit, shown or discussed mutual lotus root is closed or directly lotus root is closed or communication connection can be through some interfaces, device
Or the indirect lotus root of unit is closed or communication connection, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or
In use, can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-mentioned implementation
All or part of the process in example method, can also instruct relevant hardware to complete, the meter by computer program
Calculation machine program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that on
The step of stating each embodiment of the method.Wherein, the computer program includes computer program code, the computer program
Code can be source code form, object identification code form, executable file or certain intermediate forms etc..Computer-readable Jie
Matter may include: can carry the computer program code any entity or device, recording medium, USB flash disk, mobile hard disk,
Magnetic disk, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory ((RAM,
Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..
The above-described embodiments merely illustrate the principles and effects of the present invention, and is not intended to limit the present invention.It is any ripe
The personage for knowing this technology all without departing from the spirit and scope of the present invention, carries out modifications and changes to above-described embodiment.Cause
This, institute is complete without departing from the spirit and technical ideas disclosed in the present invention by those of ordinary skill in the art such as
At all equivalent modifications or change, should be covered by the claims of the present invention.
Claims (10)
1. detecting the calculation of longitude & latitude method of position in a kind of camera image, which is characterized in that the calculation method includes:
It establishes camera and overlooks coordinate system;
Calculate pixel coordinate (px, py) point in the case where camera overlooks coordinate system the direction x and the direction y apart from coordinate (cx, cy);
Pixel coordinate (px, py) is calculated under the earth axes using camera as origin apart from coordinate (cx, cy) according to described
Coordinate position (ex, ey);
It is calculated according to the latitude and longitude coordinates (camera_long, camera_lat) of camera itself and the coordinate position (ex, ey)
The latitude and longitude coordinates (ex_long, ex_lat) of pixel coordinate (px, py).
2. detecting the calculation of longitude & latitude method of position in a kind of camera image according to claim 1, which is characterized in that institute
State calculate pixel coordinate (px, py) point camera overlook coordinate system under the direction x and y apart from coordinate (cx, cy), specifically include:
Acquisition camera pitch angle alpha, viewing field of camera angle FOV, the wide W of image range and high H, image pixel coordinates are in y-axis side
To value py and image pixel coordinates x-axis direction value px;
According to the camera pitch angle alpha, viewing field of camera angle FOV, image range wide W and high H and image pixel coordinates
The distance cy that pixel coordinate (px, py) point overlooks the direction coordinate system y in camera is calculated in value py in y-axis direction, wherein cy
=camera_height*tan (beta), beta=alpha+FOV*H/W* (H-py);
According to the pixel coordinate (px, py) point camera overlook the distance cy in the direction coordinate system y, the viewing field of camera angle FOV,
Pixel coordinate (px, py) point is calculated in phase in the value px of x-axis direction in the wide W and image pixel coordinates of described image range
The distance cx in the machine vertical view direction coordinate system x, wherein cx=cy*tan (gamma), gamma=FOV* (px-W/2)/W.
3. detecting the calculation of longitude & latitude method of position in a kind of camera image according to claim 2, which is characterized in that institute
It states and calculates the seat of pixel coordinate (px, py) under the earth axes using camera as origin apart from coordinate (cx, cy) according to described
Cursor position (ex, ey), specifically includes:
Camera is overlooked the direction x and y under coordinate system to be transformed into using camera as origin apart from coordinate (cx, cy), due east is the side x
To due north is under the earth axes in the direction y;
According to the pixel coordinate (px, py) point camera overlook the direction coordinate system x distance cx and the pixel coordinate (px,
Py it) puts and calculates the coordinate position (ex, ey) in the distance cy that camera overlooks the direction coordinate system y, then:
Ex=cx*cos (90-theta)+cy*sin (90-theta), ey=cy*cos (90-theta)-cx*sin (90-
Theta), wherein theta is rotation angle of the camera relative to due east direction.
4. detecting the calculation of longitude & latitude method of position in a kind of camera image according to claim 3, which is characterized in that institute
It states and calculates picture according to the latitude and longitude coordinates (camera_long, camera_lat) and the coordinate position (ex, ey) of camera itself
The latitude and longitude coordinates (ex_long, ex_lat) of plain coordinate (px, py), specifically include:
Obtain the corresponding ground distance of one second latitude and latitude radius;
The corresponding ground of one second longitude is calculated according to the corresponding ground distance of one second latitude and the latitude radius
Distance;
According to the coordinate position (ex, ey), the latitude and longitude coordinates of camera itself and the corresponding ground distance of one second latitude and
The latitude and longitude coordinates (ex_long, ex_lat) of pixel coordinate (px, py) are calculated in the corresponding ground distance of one second longitude.
5. detecting the calculation of longitude & latitude device of position in a kind of camera image, which is characterized in that the device includes:
Coordinate system creation module overlooks coordinate system for establishing camera;
Apart from coordinate calculation module, for calculating pixel coordinate (px, py) point direction x and the direction y in the case where camera overlooks coordinate system
Apart from coordinate (cx, cy);
Coordinate position computing module, for being with camera apart from coordinate (cx, cy) calculating pixel coordinate (px, py) according to described
Coordinate position (ex, ey) under the earth axes of origin;
Latitude and longitude coordinates computing module, for according to the latitude and longitude coordinates (camera_long, camera_lat) of camera itself and
The coordinate position (ex, ey) calculates the latitude and longitude coordinates (ex_long, ex_lat) of pixel coordinate (px, py).
6. detecting the calculation of longitude & latitude device of position in a kind of camera image according to claim 5, which is characterized in that institute
It states and includes: apart from coordinate calculation module
First parameter acquisition submodule, for obtain camera pitch angle alpha, viewing field of camera angle FOV, image range wide W with
High H, image pixel coordinates y-axis direction value py and image pixel coordinates x-axis direction value px;
First computational submodule, for according to the camera pitch angle alpha, viewing field of camera angle FOV, image range wide W with
The value py of high H and image pixel coordinates in y-axis direction is calculated pixel coordinate (px, py) point and overlooks coordinate system y in camera
The distance cy in direction, wherein cy=camera_height*tan (beta), beta=alpha+FOV*H/W* (H-py);
Second computational submodule, for overlooking the distance in the direction coordinate system y in camera according to the pixel coordinate (px, py) point
Cy, the viewing field of camera angle FOV, the wide W of described image range and image pixel coordinates are calculated in the value px of x-axis direction
Pixel coordinate (px, py) point overlooks the distance cx in the direction coordinate system x in camera, wherein cx=cy*tan (gamma), gamma=
FOV*(px–W/2)/W。
7. detecting the calculation of longitude & latitude device of position in a kind of camera image according to claim 6, which is characterized in that institute
Stating coordinate position computing module includes:
Coordinate transformation module is transformed into for camera to be overlooked the direction x and y under coordinate system with camera apart from coordinate (cx, cy)
For origin, due east is the direction x, and due north is under the earth axes in the direction y;
Third computational submodule, for overlooking the distance cx in the direction coordinate system x in camera according to the pixel coordinate (px, py) point
The coordinate position (ex, ey) is calculated in the distance cy that camera overlooks the direction coordinate system y with the pixel coordinate (px, py) point,
Then:
Ex=cx*cos (90-theta)+cy*sin (90-theta), ey=cy*cos (90-theta)-cx*sin (90-
Theta), wherein theta is rotation angle of the camera relative to due east direction.
8. detecting the calculation of longitude & latitude device of position in a kind of camera image according to claim 7, which is characterized in that institute
Stating latitude and longitude coordinates computing module includes:
Second parameter acquisition module, for obtaining the corresponding ground distance of one second latitude and latitude radius;
4th computational submodule, for being calculated according to the corresponding ground distance of one second latitude and the latitude radius
The corresponding ground distance of one second longitude;
5th computational submodule, for according to the coordinate position (ex, ey), the latitude and longitude coordinates of camera itself and one second latitude
It spends corresponding ground distance and the latitude and longitude coordinates of pixel coordinate (px, py) is calculated in the corresponding ground distance of one second longitude
(ex_long,ex_lat)。
9. a kind of computer readable storage medium stores computer program, which is characterized in that the computer program is by processor
The method as described in Claims 1 to 4 any one is executed when operation.
10. a kind of system characterized by comprising
Memory, for storing computer program;
Processor, for executing the computer program of the memory storage, so that the equipment executes such as Claims 1 to 4
Optimization method described in any one.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910174818.8A CN110009571B (en) | 2019-03-08 | 2019-03-08 | Longitude and latitude calculation method, system and storage medium for detection position in camera image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910174818.8A CN110009571B (en) | 2019-03-08 | 2019-03-08 | Longitude and latitude calculation method, system and storage medium for detection position in camera image |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110009571A true CN110009571A (en) | 2019-07-12 |
CN110009571B CN110009571B (en) | 2023-07-21 |
Family
ID=67166617
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910174818.8A Active CN110009571B (en) | 2019-03-08 | 2019-03-08 | Longitude and latitude calculation method, system and storage medium for detection position in camera image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110009571B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110542407A (en) * | 2019-07-23 | 2019-12-06 | 中国科学院长春光学精密机械与物理研究所 | Method for acquiring positioning information of any pixel point of aerial image |
CN111167052A (en) * | 2020-03-18 | 2020-05-19 | 沈阳天目科技有限公司 | Automatic fire monitor target longitude and latitude calculation method based on camera positioning |
CN113194257A (en) * | 2021-04-29 | 2021-07-30 | 高新兴科技集团股份有限公司 | Method for correcting PTZ camera attitude by utilizing GNSS coordinates |
CN115100293A (en) * | 2022-06-24 | 2022-09-23 | 河南工业大学 | ADS-B signal blindness-compensating method |
WO2022211708A1 (en) * | 2021-03-30 | 2022-10-06 | Saab Ab | A method, software product, device and system for determining a direction at a position |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003346132A (en) * | 2002-05-28 | 2003-12-05 | Toshiba Corp | Coordinate conversion device and coordinate conversion program |
JP2008176768A (en) * | 2006-12-19 | 2008-07-31 | Hitachi Kokusai Electric Inc | Image processor |
JP2008263270A (en) * | 2007-04-10 | 2008-10-30 | Matsushita Electric Ind Co Ltd | Camera device |
CN102103747A (en) * | 2009-12-16 | 2011-06-22 | 中国科学院电子学研究所 | Method for calibrating external parameters of monitoring camera by adopting reference height |
CN103822644A (en) * | 2014-02-14 | 2014-05-28 | 北京航天控制仪器研究所 | Camera calibration method of three-dimensional laser imaging system |
CN104063863A (en) * | 2014-06-20 | 2014-09-24 | 交通运输部水运科学研究所 | Pitch-down type binocular vision system for watercourse monitoring and image processing method |
CN105527656A (en) * | 2015-11-26 | 2016-04-27 | 中国民用航空总局第二研究所 | Tower-type airport runway foreign body positioning method |
CN106530218A (en) * | 2016-10-28 | 2017-03-22 | 浙江宇视科技有限公司 | Coordinate conversion method and apparatus |
CN108801220A (en) * | 2018-05-31 | 2018-11-13 | 西南交通大学 | The processing method of vedio data based on sun shadow positioning |
-
2019
- 2019-03-08 CN CN201910174818.8A patent/CN110009571B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003346132A (en) * | 2002-05-28 | 2003-12-05 | Toshiba Corp | Coordinate conversion device and coordinate conversion program |
JP2008176768A (en) * | 2006-12-19 | 2008-07-31 | Hitachi Kokusai Electric Inc | Image processor |
JP2008263270A (en) * | 2007-04-10 | 2008-10-30 | Matsushita Electric Ind Co Ltd | Camera device |
CN102103747A (en) * | 2009-12-16 | 2011-06-22 | 中国科学院电子学研究所 | Method for calibrating external parameters of monitoring camera by adopting reference height |
CN103822644A (en) * | 2014-02-14 | 2014-05-28 | 北京航天控制仪器研究所 | Camera calibration method of three-dimensional laser imaging system |
CN104063863A (en) * | 2014-06-20 | 2014-09-24 | 交通运输部水运科学研究所 | Pitch-down type binocular vision system for watercourse monitoring and image processing method |
CN105527656A (en) * | 2015-11-26 | 2016-04-27 | 中国民用航空总局第二研究所 | Tower-type airport runway foreign body positioning method |
CN106530218A (en) * | 2016-10-28 | 2017-03-22 | 浙江宇视科技有限公司 | Coordinate conversion method and apparatus |
CN108801220A (en) * | 2018-05-31 | 2018-11-13 | 西南交通大学 | The processing method of vedio data based on sun shadow positioning |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110542407A (en) * | 2019-07-23 | 2019-12-06 | 中国科学院长春光学精密机械与物理研究所 | Method for acquiring positioning information of any pixel point of aerial image |
CN111167052A (en) * | 2020-03-18 | 2020-05-19 | 沈阳天目科技有限公司 | Automatic fire monitor target longitude and latitude calculation method based on camera positioning |
CN111167052B (en) * | 2020-03-18 | 2021-02-26 | 沈阳天目科技有限公司 | Automatic fire monitor target longitude and latitude calculation method based on camera positioning |
WO2022211708A1 (en) * | 2021-03-30 | 2022-10-06 | Saab Ab | A method, software product, device and system for determining a direction at a position |
CN113194257A (en) * | 2021-04-29 | 2021-07-30 | 高新兴科技集团股份有限公司 | Method for correcting PTZ camera attitude by utilizing GNSS coordinates |
CN115100293A (en) * | 2022-06-24 | 2022-09-23 | 河南工业大学 | ADS-B signal blindness-compensating method |
Also Published As
Publication number | Publication date |
---|---|
CN110009571B (en) | 2023-07-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110009571A (en) | Calculation of longitude & latitude method, system and the storage medium of position are detected in camera image | |
Kneip et al. | OpenGV: A unified and generalized approach to real-time calibrated geometric vision | |
CN106530218B (en) | Coordinate conversion method and device | |
Fathi et al. | Automated sparse 3D point cloud generation of infrastructure using its distinctive visual features | |
US10176564B1 (en) | Collaborative disparity decomposition | |
US20150243016A1 (en) | Orientation estimation apparatus, orientation estimation method, and computer-readable recording medium storing orientation estimation computer program | |
CN104715479A (en) | Scene reproduction detection method based on augmented virtuality | |
CN109100730A (en) | A kind of fast run-up drawing method of more vehicle collaborations | |
CN108734744A (en) | A kind of remote big field-of-view binocular scaling method based on total powerstation | |
US8264537B2 (en) | Photogrammetric networks for positional accuracy | |
CN112686877B (en) | Binocular camera-based three-dimensional house damage model construction and measurement method and system | |
CN102800127A (en) | Light stream optimization based three-dimensional reconstruction method and device | |
CN112556685A (en) | Navigation route display method and device, storage medium and electronic equipment | |
Rameau et al. | MC-Calib: A generic and robust calibration toolbox for multi-camera systems | |
CN108430032A (en) | A kind of method and apparatus for realizing that VR/AR device locations are shared | |
CN110148173A (en) | The method and apparatus of target positioning, electronic equipment, computer-readable medium | |
CN108062537A (en) | A kind of 3d space localization method, device and computer readable storage medium | |
Gu et al. | Calibration of stereo rigs based on the backward projection process | |
CN110298320B (en) | Visual positioning method, device and storage medium | |
Qing et al. | Weighted total least squares for the visual localization of a planetary rover | |
Clark et al. | The Cramer-Rao Lower Bound for 3-D state estimation from rectified stereo cameras | |
CN116205986A (en) | Calibration method and device for external parameters of vehicle-mounted looking-around camera, computer equipment and medium | |
CN110470232A (en) | A kind of method, apparatus, measuring system and electronic equipment measuring difference in height | |
Kim et al. | Motion estimation for multi-camera systems using global optimization | |
CN115063489A (en) | External parameter calibration method, device, equipment and storage 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 |