A method and computer device for realizing target positioning based on a single camera

By obtaining the basic parameters of the camera and combining geometric and triangular calculations, mathematical models and algorithms are built, and the problem of single-camera target positioning accuracy and low calculation efficiency is solved, achieving high-precision and high-efficiency target positioning, which is suitable for a variety of scenarios.

CN119131157BActive Publication Date: 2025-03-11KUNMING MAPU SPACE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411620464.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-03-11
Estimated Expiration
2044-11-14

AI Technical Summary

Technical Problem

The target positioning method based on a single camera in the prior art has problems such as low positioning accuracy, low computing efficiency and limited application scope, and it is difficult to meet the needs of real-time monitoring and dynamic tracking scenarios.

Method used

By obtaining the basic parameters of the camera, combining geometric and triangular calculations, mathematical models and algorithms are constructed to calculate the range distance, latitude and longitude increments of the target point, thereby achieving accurate positioning of the target point.

Benefits of technology

It achieves high-precision and high-efficiency target positioning, is suitable for a variety of cameras and scenarios, reduces costs, and is suitable for implementation based on existing hardware.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FDA0005234428350000011
    Figure FDA0005234428350000011
  • Figure FDA0005234428350000012
    Figure FDA0005234428350000012
  • Figure FDA0005234428350000021
    Figure FDA0005234428350000021
Patent Text Reader

Abstract

The present invention discloses a method and computer equipment for realizing target positioning based on a single camera, belonging to the field of positioning technology, and the steps are to obtain basic parameters of the camera; calculate the current horizontal field of view HFOV and vertical field of view VFOV of the camera; calculate the horizontal offset angle DFOV and vertical offset angle VDFOV of the target point in the image relative to the center point of the image; calculate the range distance R of the target point; and calculate the longitude and latitude of the target point. The advantages of the present invention are: the longitude and latitude of any target point in the field of view can be realized based on a single camera, the positioning accuracy is high, the calculation efficiency is high, it is applicable to various types of cameras, the application range is wide, it can be realized on the basis of existing hardware, no additional expensive equipment is required, it is suitable for upgrading and transformation on the existing monitoring system, the cost is low, the implementation is simple, and it is easy to realize.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of positioning technology, and in particular to a method and computer equipment for realizing target positioning based on a single camera. Background Art

[0002] In the prior art, there are several solutions for achieving target positioning based on cameras:

[0003] Positioning method based on image matching: by matching the image taken by the camera with the reference image of known location, the geographical location of the target point in the image is calculated. This method has the following disadvantages: it relies on the image database, which requires the establishment and maintenance of the reference image database in advance; the calculation is complex, the image matching process is computationally intensive, and it is difficult to process in real time; it is sensitive to environmental changes, and changes in lighting, weather, etc. will affect the matching accuracy.

[0004] Triangulation method: The relative position and viewing angle between multiple cameras are used to calculate the position of the target point through triangulation. This method requires multiple cameras to work together, and a single camera cannot be used. The application scope is limited and can only be used in areas covered by multiple cameras. It is difficult to apply to scenes with a single camera, and the cost is high and the layout is complex. The multi-camera system needs to be accurately installed and calibrated.

[0005] Visual SLAM technology: Using images acquired by the camera, combined with sensors such as inertial measurement units, the SLAM algorithm is used to achieve camera positioning and map construction. SLAM technology is usually used for navigation of robots and drones. The algorithm is complex, the amount of calculation is large, and it is difficult to process in real time. It requires the fusion of multiple sensor data, which is costly and difficult to meet real-time application requirements. The real-time performance is insufficient.

[0006] Therefore, developing a method for target positioning based on a single camera with low environmental dependence, simple algorithm and high calculation accuracy has broad application prospects. Summary of the invention

[0007] The technical problem to be solved by the present invention is to provide a method and a computer device for realizing target positioning based on a single camera with high positioning accuracy, high calculation efficiency and wide application range.

[0008] In order to solve the above technical problems, the present invention provides a method for realizing target positioning based on a single camera, comprising the following steps:

[0009] S1. Obtain the basic parameters of the camera: including the initial latitude and longitude of the camera and the installation height h of the camera; the PTZ information of the camera: the pan angle Pan, the pitch angle Tilt, the image resolution of the camera: the width IMGW and the height IMGH of the image; and stipulate that the pan angle Pan is 0° when facing due north, negative when facing west, and positive when facing east;

[0010] S2, calculate the current horizontal field of view HFOV and vertical field of view VFOV of the camera;

[0011] S3, calculating the horizontal offset angle DFOV and the vertical offset angle VDFOV of the target point in the image relative to the center point of the image;

[0012] S4, calculate the range distance R of the target point;

[0013] S5. Calculate the latitude and longitude of the target point:

[0014] S51, converting the range distance R of the target point into a latitude increment ΔLatitude and a longitude increment ΔLongitude of the target point relative to the camera;

[0015] S52, calculate the actual latitude Target Latitude and the actual longitude Target Longitude of the target point:

[0016] Target Latitude=Latitude+ΔLatitude;

[0017] Target Longitude=Longitude+ΔLongitude.

[0018] Furthermore, the calculation method of step S2 is as follows:

[0019] Get the basic parameters of the camera: the current zoom ratio Zoom, the maximum field of view of the camera: the maximum horizontal field of view maxHFOV, the maximum vertical field of view maxVFOV, calculate the current horizontal field of view HFOV and vertical field of view VFOV of the camera, the calculation formula is as follows:

[0020] HFOV=maxHFOV / Zoom;

[0021] VFOV=maxVFOV / Zoom.

[0022] Another further method, the calculation method of step S2 is as follows:

[0023] Get the width, height and focal length of the camera's photosensitive element; calculate the camera's current horizontal field of view HFOV and vertical field of view VFOV. The calculation formula is as follows:

[0024] HFOV = 2 × arctan( );

[0025] VFOV = 2 × arctan( );

[0026] Where:

[0027] sensor width is the width of the photosensitive element in millimeters;

[0028] sensor height is the height of the photosensitive element in millimeters;

[0029] focal length is the focal length of the camera in millimeters.

[0030] Furthermore, the calculation method of the horizontal offset angle DFOV in step S3 is as follows:

[0031] S31, obtaining the pixel coordinates of the center point of the image and the target point, and calculating the number of pixels n of the horizontal offset of the target point relative to the center point of the image, where n=the pixel horizontal coordinate of the target point-the pixel horizontal coordinate of the center point; if it is offset to the right, n is a positive number, and if it is offset to the left, n is a negative number;

[0032] S32, calculate the horizontal offset angle DFOV, the formula is as follows:

[0033] DFOV=arctan( );

[0034] Where:

[0035] HFOV is the current horizontal field of view of the camera;

[0036] IMGW is the width of the image in pixels.

[0037] Furthermore, the calculation method of the vertical offset angle VDFOV in step S3 is as follows:

[0038] S33, calculate the number of pixels m of the vertical offset of the target point in the image relative to the center point of the image, where m=the pixel ordinate of the target point-the pixel ordinate of the center point; if the offset is downward, m is a positive number, and if the offset is upward, m is a negative number;

[0039] S34, calculate the vertical offset angle VDFOV, the formula is as follows:

[0040] ;

[0041] ;

[0042] VDFOV=arctan ;

[0043] Where:

[0044] IMGH is the height of the image, in pixels;

[0045] Tilt is the pitch angle of the camera;

[0046] VFOV is the current vertical field of view of the camera.

[0047] Furthermore, the calculation formula of the range distance R in step S4 is as follows:

[0048] R= ;

[0049] Where:

[0050] h is the installation height of the camera;

[0051] Tilt is the pitch angle of the camera;

[0052] VDFOV is the vertical offset angle of the target point in the image relative to the center point of the image.

[0053] Furthermore, it is stipulated that the translation angle Pan is 0° when facing due north, negative when facing west, and positive when facing east; then the calculation formulas for the latitude increment ΔLatitude and the longitude increment ΔLongitude in step S51 are as follows:

[0054] ;

[0055] ;

[0056] Where:

[0057] R is the range of the target point;

[0058] Pan is the pan angle of the camera;

[0059] DFOV is the horizontal offset angle of the target point in the image relative to the center point of the image;

[0060] Latitude is the initial latitude of the camera.

[0061] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned method for realizing target positioning based on a single camera when executing the computer program.

[0062] The present invention also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for realizing target positioning based on a single camera is implemented.

[0063] Beneficial effects of the present invention:

[0064] 1. The present invention is based on a single camera, utilizes the basic parameters of a single camera, combines precise geometry and trigonometric calculations, and constructs a unique mathematical model and algorithm. It can quickly calculate the longitude and latitude of any target point in the camera's field of view in real time, with high positioning accuracy and high calculation efficiency. It is suitable for real-time monitoring, dynamic tracking scenes, large-scale data processing, real-time applications and other scenes.

[0065] 2. The present invention is applicable to various types of cameras, including fixed cameras and PTZ cameras, and is not limited by camera models and brands, and has strong versatility. It is not only applicable to ground surveillance cameras, but also to cameras on aviation or aerospace platforms such as drones and satellites, providing technical support for geographic location measurement in various scenarios, and has a wide range of applications.

[0066] 3. The present invention can be implemented on the basis of existing hardware without the need for additional expensive equipment. It is suitable for upgrading and modifying existing monitoring systems, has low cost, is simple to implement, and is easy to realize.

[0067] 4. The present invention can be combined with intelligent video analysis technology to provide accurate geographic location data, further improving the intelligence level of the monitoring system. DETAILED DESCRIPTION

[0068] The specific embodiments of the present invention are further described below. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention. In addition, the technical features involved in each embodiment of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0069] Example 1

[0070] A method for realizing target positioning based on a single camera comprises the following steps:

[0071] S1. Obtain the basic parameters of the camera: including the initial latitude and longitude of the camera and the installation height h of the camera; the PTZ information of the camera: the pan angle Pan, the pitch angle Tilt, the image resolution of the camera: the width IMGW and the height IMGH of the image; and stipulate that the pan angle Pan is 0° when facing due north, negative when facing west, and positive when facing east;

[0072] S2, calculate the current horizontal field of view HFOV and vertical field of view VFOV of the camera;

[0073] Get the basic parameters of the camera: the current zoom ratio Zoom, the maximum field of view of the camera: the maximum horizontal field of view maxHFOV, the maximum vertical field of view maxVFOV, calculate the current horizontal field of view HFOV and vertical field of view VFOV of the camera, the calculation formula is as follows:

[0074] HFOV=maxHFOV / Zoom;

[0075] VFOV=maxVFOV / Zoom;

[0076] S3. Calculate the horizontal offset angle DFOV and vertical offset angle VDFOV of the target point in the image relative to the center point of the image:

[0077] Calculate the horizontal offset angle DFOV of the target point in the image relative to the center of the image:

[0078] S31, obtaining the pixel coordinates of the center point of the image and the target point, and calculating the number of pixels n of the horizontal offset of the target point relative to the center point of the image, where n=the pixel horizontal coordinate of the target point-the pixel horizontal coordinate of the center point; if it is offset to the right, n is a positive number, and if it is offset to the left, n is a negative number;

[0079] S32, calculate the horizontal offset angle DFOV, the formula is as follows:

[0080] DFOV=arctan( );

[0081] Where:

[0082] HFOV is the current horizontal field of view of the camera;

[0083] IMGW is the width of the image in pixels;

[0084] Calculate the vertical offset angle VDFOV of the target point in the image relative to the center of the image:

[0085] S33, calculate the number of pixels m of the vertical offset of the target point in the image relative to the center point of the image, where m=the pixel ordinate of the target point-the pixel ordinate of the center point; if the offset is downward, m is a positive number, and if the offset is upward, m is a negative number;

[0086] S34, calculate the vertical offset angle VDFOV, the formula is as follows:

[0087] ;

[0088] ;

[0089] VDFOV=arctan ;

[0090] Where:

[0091] IMGH is the height of the image, in pixels;

[0092] Tilt is the pitch angle of the camera;

[0093] VFOV is the current vertical field of view of the camera;

[0094] S4. Calculate the range R of the target point:

[0095] R= ;

[0096] Where:

[0097] h is the installation height of the camera;

[0098] Tilt is the pitch angle of the camera;

[0099] VDFOV is the vertical offset angle of the target point in the image relative to the center point of the image; S5, calculate the longitude and latitude of the target point:

[0100] S51, convert the range distance R of the target point into the latitude increment ΔLatitude and the longitude increment ΔLongitude of the target point relative to the camera, and stipulate that the translation angle Pan is 0° when facing due north, negative when facing west, and positive when facing east; the calculation formula is as follows:

[0101] ;

[0102] ;

[0103] Where:

[0104] R is the range of the target point;

[0105] Pan is the pan angle of the camera;

[0106] DFOV is the horizontal offset angle of the target point in the image relative to the center point of the image;

[0107] Latitude is the initial latitude of the camera;

[0108] S52, calculate the actual latitude Target Latitude and the actual longitude Target Longitude of the target point:

[0109] Target Latitude=Latitude+ΔLatitude;

[0110] Target Longitude=Longitude+ΔLongitude.

[0111] In this embodiment, the specific parameters are as follows:

[0112] S1. Get the initial latitude and longitude of the camera. The longitude is (23.221667°, 104.620833°). The installation height of the camera is h, that is, the height difference between the camera and the target is h = 60 meters. The camera's pan angle Pan = -41.09°, the pitch angle Tilt = 50.1°, the camera's image resolution: image width IMGW = 2560, height IMGH = 1440; the current zoom ratio Zoom = 4, the camera's maximum field of view: maximum horizontal field of view maxHFOV = 65.7°, maximum vertical field of view maxVFOV = 39.4°.

[0113] S2. Calculate the current horizontal field of view HFOV and vertical field of view VFOV of the camera. The calculation formula is as follows:

[0114] HFOV=maxHFOV / Zoom=65.7° / 4=16.425°;

[0115] VFOV=maxVFOV / Zoom=39.4° / 4=9.85°;

[0116] S3. Calculate the horizontal offset angle DFOV and vertical offset angle VDFOV of the target point in the image relative to the center point of the image:

[0117] S31. In this embodiment, the coordinates of the center point of the image are [1280, 720], and the coordinates of the target point are [922, 774]; therefore, n=922-1280=-358;

[0118] S32, calculate the horizontal offset angle DFOV of the target point in the image relative to the image center:

[0119] DFOV=arctan( )=arctan( ) = -2.311°;

[0120] S33, m=774-720=54;

[0121] S34, calculate the vertical offset angle VDFOV of the target point in the image relative to the image center:

[0122] = =3422.3012;

[0123] =4892.0944;

[0124] VDFOV=arctan =arctan =0.696°;

[0125] S4. Calculate the range R of the target point:

[0126] R= = =48.9418;

[0127] S5. Calculate the latitude and longitude of the target point:

[0128] S51, converting the range distance R of the target point into the latitude increment ΔLatitude and the longitude increment ΔLongitude of the target point relative to the camera, the calculation formula is as follows:

[0129] °;

[0130] °;

[0131] S52, calculate the actual latitude Target Latitude and the actual longitude Target Longitude of the target point:

[0132] Target Latitude=23.221667°+0.0003194°=23.2220°;

[0133] Target Longitude=104.620833°-0.0003287°=104.6205°.

[0134] Example 2

[0135] A method for realizing target positioning based on a single camera, compared with Example 1, only step S2 is different.

[0136] Specifically, the calculation method of step S2 is as follows:

[0137] Get the width, height and focal length of the camera's photosensitive element; calculate the camera's current horizontal field of view HFOV and vertical field of view VFOV. The calculation formula is as follows:

[0138] HFOV = 2 × arctan( );

[0139] VFOV = 2 × arctan( );

[0140] Where:

[0141] sensor width is the width of the photosensitive element in millimeters;

[0142] sensor height is the height of the photosensitive element in millimeters;

[0143] focal length is the focal length of the camera in millimeters.

[0144] Example 3

[0145] A computer device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the method for realizing target positioning based on a single camera is implemented.

[0146] Example 4

[0147] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned method for realizing target positioning based on a single camera.

[0148] The embodiments of the present invention are described in detail above, but the present invention is not limited to the described embodiments. For those skilled in the art, various changes, modifications, substitutions and variations of these embodiments are made without departing from the principles and spirit of the present invention, and still fall within the protection scope of the present invention.

Claims

1. A method for realizing target positioning based on a single camera, characterized in that: The steps include: S1. Obtain the basic parameters of the camera: including the initial latitude and longitude of the camera and the installation height h of the camera; the PTZ information of the camera: the pan angle Pan, the pitch angle Tilt, and the image resolution of the camera: the width IMGW and the height IMGH of the image; S2, calculate the current horizontal field of view HFOV and vertical field of view VFOV of the camera; S3, calculating the horizontal offset angle DFOV and the vertical offset angle VDFOV of the target point in the image relative to the center point of the image; The calculation method of the horizontal offset angle DFOV is as follows: S31, obtaining the pixel coordinates of the center point of the image and the target point, and calculating the number of pixels n of the horizontal offset of the target point relative to the center point of the image, where n = the horizontal coordinate of the pixel of the target point - the horizontal coordinate of the pixel of the center point; if it is offset to the right, n is a positive number, and if it is offset to the left, n is a negative number; S32, calculate the horizontal offset angle DFOV, the formula is as follows: Where: HFOV is the current horizontal field of view of the camera; IMGW is the width of the image in pixels; The vertical offset angle VDFOV is calculated as follows: S33, calculate the number of pixels m of the vertical offset of the target point in the image relative to the center point of the image, where m=the pixel vertical coordinate of the target point-the pixel vertical coordinate of the center point; if the offset is downward, m is a positive number, and if the offset is upward, m is a negative number; S34, calculate the vertical offset angle VDFOV, the formula is as follows: Where: IMGH is the height of the image, in pixels; Tilt is the pitch angle of the camera; VFOV is the current vertical field of view of the camera; S4, calculate the range distance R of the target point; The calculation formula is as follows: Where: h is the installation height of the camera; Tilt is the pitch angle of the camera; VDFOV is the vertical offset angle of the target point in the image relative to the center point of the image; S5. Calculate the latitude and longitude of the target point: S51, converting the range distance R of the target point into a latitude increment ΔLatitude and a longitude increment ΔLongitude of the target point relative to the camera; The translation angle Pan is specified to be 0° when facing due north, negative when facing west, and positive when facing east; then the calculation formulas for the latitude increment ΔLatitude and the longitude increment ΔLongitude in step S51 are as follows: Where: R is the range of the target point; Pan is the pan angle of the camera; DFOV is the horizontal offset angle of the target point in the image relative to the center point of the image; Latitude is the initial latitude of the camera; S52, calculate the actual latitude Target Latitude and the actual longitude Target Longitude of the target point: Target Latitude=Latitude+ΔLatitude; Target Longitude=Longitude+ΔLongitude.

2. The method for realizing target positioning based on a single camera according to claim 1, characterized in that: The calculation method of step S2 is as follows: Get the basic parameters of the camera: the current zoom ratio Zoom, the maximum field of view of the camera: the maximum horizontal field of view maxHFOV, the maximum vertical field of view maxVFOV, calculate the current horizontal field of view HFOV and vertical field of view VFOV of the camera, the calculation formula is as follows: HFOV = maxHFOV / Zoom; VFOV = maxVFOV / Zoom.

3. The method for realizing target positioning based on a single camera according to claim 1, characterized in that: The calculation method of step S2 is as follows: Get the width, height and focal length of the camera's photosensitive element; calculate the camera's current horizontal field of view HFOV and vertical field of view VFOV. The calculation formula is as follows: Where: Sensor width is the width of the photosensitive element in millimeters; Sensor height is the height of the photosensitive element in millimeters; focal length is the focal length of the camera, in millimeters.

4. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, a method for realizing target positioning based on a single camera as described in any one of claims 1-3 is implemented.

5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, a method for realizing target positioning based on a single camera according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Monocular camera positioning method and device, readable storage medium, and electronic terminal

    CN110243339A

  • Target positioning method and device, computer readable storage medium and computer equipment

    CN112114301A