Target positioning method based on rotatable pan-tilt camera

By using a target positioning method based on a rotatable pan-tilt camera, geometric calculations are performed using the camera's parameters and position information. This solves the problems of high cost of positioning terminals and large errors after adjusting the angle of a fixed camera in existing technologies, and achieves accurate positioning and trajectory analysis.

CN121661136APending Publication Date: 2026-03-13FUJIAN YIRONG INFORMATION TECH
View PDF 6 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-04
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

In existing technologies, positioning methods based on positioning terminals have additional costs and are greatly affected by the environment, while visual positioning methods based on fixed cameras have large calculation errors after the camera angle is adjusted, making it impossible to accurately calculate the position of people.

Method used

A target positioning method based on a rotatable pan-tilt camera is adopted. The target detection algorithm is used to identify the coordinates of pixels. Combined with the camera's factory parameters, installation parameters and real-time position parameters, a series of geometric calculations are used to achieve accurate target positioning.

Benefits of technology

Without increasing hardware costs, accurate target positioning from any camera angle was achieved, improving the practicality of security monitoring and providing reliable technical support for personnel movement trajectory positioning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121661136A_ABST
    Figure CN121661136A_ABST
Patent Text Reader

Abstract

The invention relates to a target positioning method based on a rotatable pan-tilt camera, and the method comprises the following steps: collecting an image, and calculating the pixel point coordinates of a target; carrying out positioning calculation on the target by utilizing the pixel point coordinates of the target and the relevant parameters of the camera; calculating an included angle a4 between the target at the overlook angle and the center line of the camera on the horizontal plane; calculating an included angle a5 between the target and the camera in the vertical direction from the longitudinal section angle; calculating an angle deviation value a6 between the current lens of the camera and the horizontal plane; calculating an angle deviation value a7 between a connecting line of the camera and the target and a ground vertical line; calculating the actual distance b2 between the ground projection point of the camera and the target; calculating the actual distance b3 between the ground projection point of the camera and the target in the overlooking angle; calculating an included angle a9 between a connecting line of the camera and the target and the due north direction; and calculating positioning coordinates of the target. The method has the advantages that the optimized target positioning calculation method is adopted, and target positioning calculation of the camera at any angle is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of security monitoring technology, and in particular to a target positioning method based on a rotatable pan-tilt camera. Background Technology

[0002] When personnel enter the video surveillance range, their location needs to be pinpointed and their movement trajectory recorded. Warnings should be issued for targets entering dangerous areas, and the target trajectory can be used as evidence for subsequent investigations. In the field of security monitoring, there are currently several mainstream target positioning methods:

[0003] 1. Location acquisition based on positioning terminals

[0004] Positioning terminals typically refer to devices with satellite positioning or UWB wireless pulse positioning capabilities. Personnel wear these terminals to collect target locations and map their routes. However, they have the following main drawbacks: 1) To achieve personnel positioning, personnel need to wear additional positioning equipment, increasing material and maintenance costs; 2) Positioning terminals are significantly affected by the environment; severe weather affects satellite positioning accuracy, and UWB wireless pulse positioning has relatively large positioning errors in complex environments with many obstacles; 3) Target positioning cannot be achieved for outsiders not wearing positioning terminals.

[0005] 2. Camera vision-based positioning

[0006] Security monitoring sites are typically equipped with camera surveillance equipment. Camera-based positioning mainly calculates the coordinates of a person by combining the pixel position of the person in the frame with the camera's installation location, angle, and field of view.

[0007] Chinese invention CN117935114A, published on April 26, 2024, entitled "A Method, System, Device, and Medium for Personnel Trajectory Mapping Based on a Camera," calculates personnel location by pre-measuring the coordinates of a fixed-angle camera, the camera's mounting height, and the camera's field of view distance, and combining this with the pixel positions of personnel in the video image. This invention has significant drawbacks that affect its practical application. Its main shortcomings are: 1) The camera used for positioning must be at a fixed angle, but most PTZ cameras adjust their angles according to security needs. Once the camera deviates from its original angle, the previously measured distance parameters become inaccurate, making it impossible to correctly calculate personnel location. 2) Measuring distance parameters based on a fixed camera angle is difficult and prone to errors. Summary of the Invention

[0008] To address the aforementioned problems, the present invention aims to provide a target positioning method based on a rotatable PTZ camera. Utilizing existing cameras in security facilities, this method calculates the target position using an optimized target positioning calculation method without increasing hardware deployment costs, thereby achieving target positioning calculation at any camera angle.

[0009] To achieve the above objectives, the present invention adopts the following technical solution:

[0010] A target localization method based on a rotatable pan-tilt camera includes the following steps:

[0011] Images are captured by a rotatable pan-tilt camera, and the location of the target is identified based on a target detection algorithm. The pixel coordinates of the target in the image are then calculated.

[0012] The target's location is calculated using the target's pixel coordinates and camera-related parameters; these parameters include the camera's factory parameters, camera installation parameters, and camera's real-time position parameters.

[0013] The target's location calculation process is as follows:

[0014] Calculate the angle α4 between the target and the camera centerline on the horizontal plane from the top-down angle;

[0015] Calculate the angle a5 between the target and the camera in the vertical direction from the longitudinal section angle;

[0016] Calculate the angular deviation value a6 between the current camera lens and the horizontal plane;

[0017] Using the included angle a5 and the angle deviation value a6, calculate the angle deviation value a7 between the line connecting the camera and the target and the vertical line of the ground;

[0018] Using the angle deviation value a7 and the camera's mounting parameters, the actual distance b2 between the camera's ground projection point and the target is calculated from the longitudinal section.

[0019] Calculate the actual distance b3 between the camera's ground projection point and the target from the top-down angle using the included angle a and the actual distance b2;

[0020] Based on the camera's current position parameters and setup parameters, calculate the angle a9 between the line connecting the camera and the target and the due north direction;

[0021] The target's location coordinates are calculated using the camera's setup parameters, actual distance b3, and included angle a9.

[0022] The present invention has the following beneficial effects:

[0023] This invention utilizes the camera's factory parameters, installation parameters, and the P-value and T-value of its real-time position to automatically calculate the actual location of targets such as people in the frame even after the camera has been moved. This invention significantly improves the practicality of camera-based target localization, solving the problem of traditional visual localization's inability to accurately calculate location after camera rotation. It provides strong technical support for the backtracking and analysis of personnel movement trajectories in the security monitoring field. Attached Figure Description

[0024] Figure 1 A schematic diagram showing the pixel positions of the inventors in an image;

[0025] Figure 2 This is a schematic diagram illustrating the calculation of the distance between the image and the camera from a top-down perspective according to the present invention;

[0026] Figure 3 This is a schematic diagram illustrating the calculation of the angle between the line connecting the person and the camera and the center line from a top-down perspective, according to the present invention.

[0027] Figure 4 This is a schematic diagram illustrating the angle between the line connecting the person and the camera and the center line calculated from a longitudinal section according to the present invention.

[0028] Figure 5 is a schematic diagram showing the deviation angle between the camera orientation and the horizontal plane of the present invention;

[0029] Figure 6 This is a schematic diagram showing the angle between the camera personnel line and the vertical line of the present invention;

[0030] Figure 7 This is a schematic diagram showing the actual distance between the camera's ground projection point and a person according to the present invention;

[0031] Figure 8 This is a schematic diagram illustrating the actual distance between the camera's ground projection point and the person in a top-down view, according to the present invention.

[0032] Figure 9 This is a schematic diagram showing the angle between the camera of this invention and true north;

[0033] Figure 10 This is a schematic diagram showing the angle between the line connecting the camera and the person in this invention and true north;

[0034] Figure 11 This is a schematic diagram illustrating the calculation of personnel positioning coordinates according to the present invention. Detailed Implementation

[0035] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:

[0036] Using people as the target in this embodiment, the target localization method based on a rotatable pan-tilt camera consists of two parts: a personnel target detection module and a personnel localization calculation module. The personnel target detection module uses a target detection algorithm to obtain the pixel position of the personnel target bounding box in the camera image based on the real-time video stream image captured by the camera. The personnel localization calculation module uses relevant formulas to calculate the position of the personnel relative to the current camera based on the current camera's P and T position parameters, the current camera's mounting height, the current camera's positioning coordinates, and the pixel position of the personnel's legs in the image.

[0037] The operation steps of the target localization method based on a rotatable pan-tilt camera are as follows:

[0038] Step 10, please refer to Figure 1 Images are captured by a rotatable pan-tilt camera. Based on a target detection algorithm, the location of the target is identified. The top-left corner pixel coordinates are defined as (0, 0), and the target's pixel coordinates in the image are calculated as (x1, y1). Taking a 1920*1080 resolution camera image as an example, the top-left pixel position is (0, 0), and the bottom-right pixel position is (1920, 1080). If a person's feet are at the center of the image, the person's pixel coordinates are (960, 540).

[0039] Step 20: Obtain relevant camera parameters: To perform personnel positioning calculations, relevant camera parameters need to be obtained before each calculation, including:

[0040] ① Factory parameters of the PTZ camera: camera resolution (w1, h1), horizontal field of view a1, vertical field of view a2;

[0041] ②Pan-Tilt Camera Setup Parameters: Setup coordinates (x2, y2), setup height h2, P-value p1 for the camera's due north direction, and T-value t1 when the camera lens is horizontal; The P-value is the position parameter of the pan-tilt camera in the horizontal 360° direction, and the T-value is the position parameter of the pan-tilt camera in the vertical direction;

[0042] ③ The current pan-tilt camera's pan-tilt position parameters P value p2 and T value t2.

[0043] Step 30: The target location calculation process is as follows:

[0044] Step 31: Calculate the angle α4 between the person and the camera centerline O on the horizontal plane from a top-down perspective.

[0045] Please see Figure 2If the image width resolution is w1, and the line intersecting the ground at the bottom of the image (hereinafter referred to as the intersection line L) is scaled proportionally to the same width as the resolution, then based on the camera's horizontal field of view angle a1 and the resolution width w1, the distance b1 between the intersection line L and the camera is calculated from the top-down angle:

[0046] The pixel value c1, which is half the width of the image, is: ;

[0047] The horizontal field of view of the camera is half of the viewing angle a1, angle a3: ;

[0048] Angle a3 converted to radians aa3: ;

[0049] Combining the tangent function Calculate the distance b1 between the camera and the intersecting line L: ;

[0050] Please see Figure 3 Based on the x-coordinate x1 of the target pixel, the deviation x2 of the target pixel position from the center line O is calculated as follows: ;

[0051] The radian value corresponding to the angle a4 between the line connecting the target and the camera and the center line O is: ;

[0052] The radian aa4 is calculated using the arctangent function: ;

[0053] The formula for calculating the included angle a4 is: .

[0054] Step 32: Calculate the angle a5 between the person and the camera in the vertical direction from the longitudinal section angle.

[0055] Please see Figure 4 Given an image height resolution of h1, calculate the vertical angle a5 between the person and the camera's center line based on the person's pixel coordinate y1. The angle is negative when the person is above the center point and positive when they are below it.

[0056] First, calculate the deviation of the person's pixel position from the center point in pixels y2:

[0057] Let the radian corresponding to the perpendicular angle a5 between the line connecting the person and the camera and the center line be αa5. ;

[0058] The radian aa5 can be calculated using the arctangent function:

[0059] The complete formula for calculating the vertical angle a5 is: .

[0060] Step 33: Calculate the angular deviation value a6 between the current camera lens and the horizontal plane.

[0061] Please see Figure 5 Obtain the real-time position parameter T value t2 of the camera, perform angle conversion based on the horizontal position T value t1 of the camera, and calculate the deviation angle a6 between the camera's orientation and the horizontal plane. The value is positive when the camera is below the horizontal plane and negative when it is above the horizontal plane.

[0062] The specific angle calculation method is as follows: Divide the camera's vertical field of view angle a2 by the maximum value T. max and minimum value T min The maximum range between t2 and t1 is used to obtain the angle corresponding to each T-value unit. Then, the deviation angle a6 is obtained by multiplying the deviation between t2 and t1 by the angle corresponding to each T-value unit. The formula is as follows:

[0063] , among which, T max and T min These are the camera's factory settings.

[0064] Step 34: Calculate the angular deviation value a7 between the line connecting the camera and the person and the vertical line D.

[0065] Please see Figure 6 Based on the vertical angle a5 between the person and the camera centerline L and the angular deviation a6 between the camera and the horizontal plane, the angle a7 between the line connecting the camera and the person and the vertical line is calculated. The calculation formula is: a7 = 90 - a5 - a6.

[0066] Step 35: Calculate the actual distance b2 between the camera's ground projection point and the person from the longitudinal section.

[0067] Please see Figure 7 Given the angle a7 between the line connecting the camera personnel and the vertical line D, and the known camera mounting height h2, convert the angle deviation value a7 into radians aa7: ;

[0068] Based on the tangent function, the equation is: ;

[0069] Finally, the actual distance b2 between the camera's ground projection point and the target in the longitudinal section can be calculated: .

[0070] Step 36: Calculate the actual distance b3 between the camera's ground projection point and the person.

[0071] Please see Figure 8Since there is also an angle a4 between the person and the camera on the top-down plane, let's convert the angle a4 to radians aa4: ;

[0072] The actual distance b3 between the person and the camera is calculated using the cosine function. The formula is as follows: ;

[0073] The final calculation formula for obtaining the distance b3 between the camera's ground projection point and the actual distance to the person is as follows: .

[0074] Step 37: Calculate the angle α9 between the line connecting the camera and the person and the due north direction based on the camera's P-value.

[0075] Please see Figure 9 The system obtains the camera's current position parameter p2 and its north-direction position parameter p1 when the camera was set up. Based on the range of the camera's P value and the range of its horizontal rotation angle, it calculates the angle deviation value a8 between the camera's centerline O and the north direction. The camera's P value D generally ranges from 1 to 0 to -1, and its horizontal rotation angle range is 360 degrees.

[0076] , where P max and P min These are the camera's factory settings.

[0077] Please see Figure 10 The angle a9 between the line connecting the camera and the target and due north is calculated using the formula a9 = a8 + a4.

[0078] Step 38: Calculate the personnel's location coordinates.

[0079] Please see Figure 11 Based on the angle a9 between the line connecting the camera and the person and due north, the actual distance b3 between the camera and the person, and the camera's mounting coordinates (x2, y2), the actual coordinates of the person (x3, y3) can be calculated.

[0080] The X-axis coordinate x3 of the person can be obtained using trigonometric functions:

[0081] ;

[0082] Personnel Y-axis coordinate y3:

[0083] .

[0084] This invention utilizes the camera's factory parameters, installation parameters, and the P-value and T-value of its real-time position to automatically calculate the actual location of targets such as people in the frame even after the camera has been moved. This invention significantly improves the practicality of camera-based target localization, solving the problem of traditional visual localization's inability to accurately calculate location after camera rotation. It provides strong technical support for the backtracking and analysis of personnel movement trajectories in the security monitoring field.

[0085] The above description is merely a specific embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural transformations made based on the content of the present invention specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A target localization method based on a rotatable pan-tilt camera, characterized in that, Includes the following steps: Images are captured by a rotatable pan-tilt camera, and the location of the target is identified based on a target detection algorithm. The pixel coordinates of the target in the image are then calculated. The target's location is calculated using the target's pixel coordinates and camera-related parameters; these parameters include the camera's factory parameters, camera installation parameters, and camera's real-time position parameters. The target's location calculation process is as follows: Calculate the angle α4 between the target and the camera centerline on the horizontal plane from the top-down angle; Calculate the angle a5 between the target and the camera in the vertical direction from the longitudinal section angle; Calculate the angular deviation value a6 between the current camera lens and the horizontal plane; Using the included angle a5 and the angle deviation value a6, calculate the angle deviation value a7 between the line connecting the camera and the target and the vertical line of the ground; Using the angle deviation value a7 and the camera's mounting parameters, the actual distance b2 between the camera's ground projection point and the target is calculated from the longitudinal section. Calculate the actual distance b3 between the camera's ground projection point and the target from the top-down angle using the included angle a and the actual distance b2; Based on the camera's current position parameters and setup parameters, calculate the angle a9 between the line connecting the camera and the target and the due north direction; The target's location coordinates are calculated using the camera's setup parameters, actual distance b3, and included angle a9.

2. The target positioning method based on a rotatable pan-tilt camera according to claim 1, characterized in that: The top-left corner pixel coordinates of the image are defined as (0, 0), the target pixel position in the image is (x1, y1), and the camera's factory parameters include camera resolution (w1, h1), horizontal field of view angle a1, and vertical field of view angle a2. The setup parameters include setup coordinates (x2, y2), setup height h2, camera's north direction P-value p1, and camera lens horizontal T-value t1. The camera's real-time position parameters refer to the current camera's P-value p2 and current camera's T-value t2. The P-value is the camera's position parameter in the horizontal 360° direction, and the T-value is the camera's position parameter in the vertical direction. The calculation process of the included angle a4 is as follows: based on the horizontal field of view angle a1 and resolution width w1 of the camera, calculate the distance b1 between the intersection line of the bottom of the image and the ground and the camera from the top view angle, and then calculate the included angle a4 between the target and the center line of the camera on the horizontal plane according to the pixel coordinates x1 of the target. The calculation process of the included angle a5 is as follows: calculate the deviation pixel value y2 between the target and the center line of the camera from the longitudinal section angle, then calculate the radian corresponding to the perpendicular angle a5 between the line connecting the target and the camera and the center line, and finally use the arctangent function to calculate the included angle a5 between the target and the camera in the vertical direction. The calculation process of the angle deviation value a6 is as follows: obtain the current position parameter t2 of the camera, perform angle conversion based on the position parameter t1 when the camera lens is horizontal, and calculate the angle deviation value a6 between the camera's orientation and the horizontal plane. The calculation process for the angular deviation value a7 between the line connecting the camera and the target and the vertical line of the ground is as follows: a7 = 90 - a5 - a6; The calculation process of the actual distance b2 is as follows: convert the angle deviation value a7 into a radian value, and then calculate the actual distance b2 between the camera's ground projection point and the target in the longitudinal section using the tangent function based on the camera's mounting height h2. The calculation process for the actual distance b3 is as follows: convert angle a4 into radians, and then combine it with the actual distance b2 to calculate the actual distance b3 using the cosine function. The calculation process of the included angle a9 is as follows: obtain the current position parameter p2 of the camera and the position parameter p1 of the north direction when the camera is set up. According to the range of the camera's P value and the range of the horizontal rotation angle, calculate the angle deviation value a8 between the camera center line and the north direction. Then, calculate the angle a9 between the line connecting the camera and the target and the north direction using the formula a9 = a8 + a4. The calculation process for the target's positioning coordinates is as follows: Based on the included angle a9, the actual distance b3, and the camera's mounting coordinates x2, the target's X-axis coordinate x3 is calculated using trigonometric functions; based on the included angle a9, the actual distance b3, and the camera's mounting coordinates y2, the target's Y-axis coordinate x3 is calculated using trigonometric functions, and finally, the target's positioning coordinates (x3, y3) are obtained.

3. The target positioning method based on a rotatable pan-tilt camera according to claim 2, characterized in that: The specific steps for setting the included angle a4 are as follows: If the image width resolution is w1, and the intersection line between the bottom of the image and the ground is scaled proportionally to the same width as the resolution, then based on the camera's horizontal field of view angle a1 and the resolution width w1, the distance b1 between the intersection line and the camera is calculated from a top-down angle: The pixel value c1, which is half the width of the image, is: ; The horizontal field of view of the camera is half of the viewing angle a1, angle a3: ; Angle a3 converted to radians aa3: ; Combining the tangent function Calculate the distance b1 between the camera and the intersecting line: ; Based on the x1 of the target pixel, the deviation x2 of the target pixel position from the center line is calculated as follows: ; The radian value corresponding to the angle a4 between the line connecting the target and the camera and the centerline is: ; The radian aa4 is calculated using the arctangent function: ; The formula for calculating the included angle a4 is: .

4. A target positioning method based on a rotatable pan-tilt camera according to claim 2, characterized in that: The specific calculation steps for the included angle a5 are as follows: The deviation of the target pixel position from the horizontal center line, pixel value y2, is calculated as follows: Wherein, the height resolution of the image is h1, the vertical coordinate of the target pixel is y1, which is negative when the target is above the horizontal center line and positive when it is below the horizontal center line; The radian corresponding to the angle a5 between the line connecting the target and the camera and the vertical direction of the horizontal center line is αa5: ; The radian aa5 is calculated using the arctangent function: ; The formula for calculating the included angle a5 in the vertical direction is: .

5. A target positioning method based on a rotatable pan-tilt camera according to claim 2, characterized in that: The specific steps for obtaining the deviation value a6 are as follows: Divide the camera's vertical field of view angle a2 by the maximum value of T. max and minimum value T min The maximum range between t2 and t1 is used to obtain the angle corresponding to each T-value unit. Then, the angle deviation value a6 is obtained by multiplying the deviation value between t2 and t1 by the angle corresponding to each T-value unit. Where t2 is the real-time position parameter of the camera, t1 is the position parameter of the camera lens when it is horizontal, and T max and T min This is the camera's factory setting; the angle deviation value a6 is positive when the camera lens is below the horizontal plane and negative when it is above the horizontal plane.

6. A target positioning method based on a rotatable pan-tilt camera according to claim 2, characterized in that: The specific steps for determining the actual distance b2 are as follows: Convert the angular deviation value a7 to radians aa7: ; Based on the tangent function, the equation is: ; b2: The actual distance b2 between the camera's ground projection point and the target in the longitudinal section. Where h2 is the mounting height of the camera.

7. A target positioning method based on a rotatable pan-tilt camera according to claim 2, characterized in that: The specific steps for determining the actual distance b3 are as follows: Convert the included angle a4 to radians aa4: ; The actual distance b3 between the target and the camera is calculated using the cosine function: ; After further formula conversion, we get .

8. A target positioning method based on a rotatable pan-tilt camera according to claim 2, characterized in that: The specific formula for calculating the included angle deviation value a8 is as follows: Where p2 is the current position parameter of the camera, p1 is the position parameter of the camera in the due north direction when it was set up, and P max and P min These are the camera's factory settings.

9. A target positioning method based on a rotatable pan-tilt camera according to claim 2, characterized in that: The formula for calculating the target's location coordinates is: ; The camera's installation coordinates are (x2, y2), and the target's actual coordinates are (x3, y3).

Citation Information

Patent Citations

  • Binocular visual navigation system and method based on power robot

    CA2950791A1

  • Jet flow closed-loop control method based on image processing and monocular vision

    CN112435298A

  • Unmanned aerial vehicle automatic landing method and device of unmanned aerial vehicle automatic range extending cruise system

    CN114355982A

  • Target positioning system and method based on cooperation of double cameras

    CN117745848A

  • Personnel trajectory drawing method, system and device based on camera and medium

    CN117935114A