Method for realizing target positioning based on single camera and computer equipment

Through the geometric and triangular calculation method based on a single camera, the problems of low positioning accuracy and low computing efficiency in the existing technology are solved, and high-precision and low-cost target positioning are achieved. It is suitable for a variety of scenarios and camera models, improving the The level of intelligence of the monitoring system.

CN119131157AActive Publication Date: 2024-12-13KUNMING MAPU SPACE TECH CO LTD

Patent Information

Application Number
CN202411620464.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2024-12-13
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, especially sensitive to environmental changes, complex calculations and difficult to process in real time.

Method used

By obtaining the basic parameters of the camera, combining geometric and triangular calculations, mathematical models and algorithms are constructed, calculating the latitude and longitude of any target point in the camera's field of view, and using the basic parameters and PTZ information of a single camera to calculate the range distance and offset angle of the target point. Then calculate the latitude and longitude of the target point.

Benefits of technology

It realizes high-precision and low-cost single-camera target positioning, which is suitable for real-time monitoring and a variety of scenarios, improves computing efficiency and scope of application, supports a variety of camera models and platforms, and is easy to upgrade the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure QLYQS_1
    Figure QLYQS_1
  • Figure QLYQS_2
    Figure QLYQS_2
  • Figure QLYQS_3
    Figure QLYQS_3
Patent Text Reader

Abstract

The invention discloses a method for realizing target positioning based on a single camera and computer equipment, and belongs to the technical field of positioning, and the method comprises the following steps: obtaining basic parameters of the camera; calculating a current horizontal field angle HFOV and a current vertical field angle VFOV of the camera; calculating a horizontal deviation angle DFOV and a vertical deviation angle VDFOV of a target point in the image relative to a central point of the image; calculating the range distance R of the target point; and calculating the longitude and latitude of the target point. The method has the advantages that the longitude and latitude of any target point in the visual field can be realized based on the single camera, the positioning accuracy is high, the calculation efficiency is high, the method is suitable for various types of cameras, the application range is wide, the method can be realized on the basis of the existing hardware, additional expensive equipment is not needed, the method is suitable for upgrading and reconstruction on the existing monitoring system, the cost is low, and the method is suitable for popularization and application. The implementation is simple and easy.
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: 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.

[0003] 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.

[0004] 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.

[0005] 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

[0006] 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.

[0007] 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: 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; 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; S4, calculate the range distance R of the target point; 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; 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.

[0008] Furthermore, 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.

[0009] Another further method, 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: HFOV = 2 × arctan( ); VFOV = 2 × arctan( ); 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.

[0010] Furthermore, the calculation method of the horizontal offset angle DFOV in step S3 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 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; S32, calculate the horizontal offset angle DFOV, the formula is as follows: DFOV=arctan( ); Where: HFOV is the current horizontal field of view of the camera; IMGW is the width of the image in pixels.

[0011] Furthermore, the calculation method of the vertical offset angle VDFOV in step S3 is 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 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; S34, calculate the vertical offset angle VDFOV, the formula is as follows: ; ; VDFOV=arctan ; 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.

[0012] Furthermore, the calculation formula of the range distance R in step S4 is as follows: R= ; 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.

[0013] 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: ; ; 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.

[0014] 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.

[0015] 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.

[0016] Beneficial effects of the present invention: 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.

[0017] 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.

[0018] 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.

[0019] 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

[0020] 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.

[0021] Example 1 A method for realizing target positioning based on a single camera comprises the following steps: 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; S2, calculate the current horizontal field of view HFOV and vertical field of view VFOV of the camera; 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; 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: Calculate the horizontal offset angle DFOV of the target point in the image relative to the center of the image: 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; S32, calculate the horizontal offset angle DFOV, the formula is as follows: DFOV=arctan( ); Where: HFOV is the current horizontal field of view of the camera; IMGW is the width of the image in pixels; Calculate the vertical offset angle VDFOV of the target point in the image relative to the center of the image: 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; S34, calculate the vertical offset angle VDFOV, the formula is as follows: ; ; VDFOV=arctan ; 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 R of the target point: R= ; 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 longitude and latitude of the target point: 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: ; ; 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.

[0022] In this embodiment, the specific parameters are as follows: 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°. S2. 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=65.7° / 4=16.425°; VFOV=maxVFOV / Zoom=39.4° / 4=9.85°; 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: 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; S32, calculate the horizontal offset angle DFOV of the target point in the image relative to the image center: DFOV=arctan( )=arctan( ) = -2.311°; S33, m=774-720=54; S34, calculate the vertical offset angle VDFOV of the target point in the image relative to the image center: = =3422.3012; =4892.0944; VDFOV=arctan =arctan =0.696°; S4. Calculate the range R of the target point: R= = =48.9418; S5. Calculate the latitude and longitude of the target point: 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: °; °; S52, calculate the actual latitude Target Latitude and the actual longitude Target Longitude of the target point: Target Latitude=23.221667°+0.0003194°=23.2220°; Target Longitude=104.620833°-0.0003287°=104.6205°.

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

[0024] Specifically, 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: HFOV = 2 × arctan( ); VFOV = 2 × arctan( ); 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.

[0025] Example 3 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.

[0026] Example 4 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.

[0027] 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 target positioning based on a single camera, Features: 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; S4, calculate the range distance R of the target point; 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; 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. According to claim 1, a method for realizing target positioning based on a single camera, Features: 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. According to claim 1, a method for realizing target positioning based on a single camera, Features: 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: HFOV=2×arctan( ); VFOV =2×arctan( ); 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. The method for realizing target positioning based on a single camera according to claim 1, Features: The calculation method of the horizontal offset angle DFOV in step S3 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 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; S32, calculate the horizontal offset angle DFOV, the formula is as follows: DFOV=arctan( ); Where: HFOV is the current horizontal field of view of the camera; IMGW is the width of the image in pixels.

5. According to claim 4, a method for realizing target positioning based on a single camera, Features: The calculation method of the vertical offset angle VDFOV in step S3 is 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 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; S34, calculate the vertical offset angle VDFOV, the formula is as follows: ; ; VDFOV=arctan ; 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.

6. The method for realizing target positioning based on a single camera according to claim 1, Features: The calculation formula of the range distance R in step S4 is as follows: R= ; 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.

7. The method for realizing target positioning based on a single camera according to claim 1, Features: 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.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program. Features: 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-7 is implemented.

9. A computer-readable storage medium having a computer program stored thereon, Features: 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 7 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

  • Personnel positioning method and system based on image analysis

    CN118799404A

  • Target positioning method based on oblique photography of unmanned aerial vehicle

    CN118896593A

  • Method for obtaining photogrammetric data using a layered approach

    US20210264666A1

Cited By

  • Target tracking method, device, equipment and medium

    CN119292288A

  • A target tracking method, apparatus, device and medium

    CN119292288B