CN115421523A - Method for accurately and automatically tracking target - Google Patents

Method for accurately and automatically tracking target Download PDF

Info

Publication number
CN115421523A
CN115421523A CN202211050904.6A CN202211050904A CN115421523A CN 115421523 A CN115421523 A CN 115421523A CN 202211050904 A CN202211050904 A CN 202211050904A CN 115421523 A CN115421523 A CN 115421523A
Authority
CN
China
Prior art keywords
camera
horizontal
target
angle
vertical
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.)
Pending
Application number
CN202211050904.6A
Other languages
Chinese (zh)
Inventor
米向飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianjin Photoelectric Group Co ltd
Original Assignee
Tianjin Photoelectric Group Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianjin Photoelectric Group Co ltd filed Critical Tianjin Photoelectric Group Co ltd
Priority to CN202211050904.6A priority Critical patent/CN115421523A/en
Publication of CN115421523A publication Critical patent/CN115421523A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D3/00Control of position or direction
    • G05D3/12Control of position or direction using feedback

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Closed-Circuit Television Systems (AREA)

Abstract

The invention discloses a method for accurately and automatically tracking a target, which comprises the following steps: s1: establishing a mathematical model for monitoring system motion and imaging; s2: according to a mathematical model of the monitoring system, calculating the real horizontal and vertical relative angles to be moved through a compensation function; s3: the motor control module of the monitoring system drives the motor to operate to a corresponding position to realize target tracking, the method has higher accuracy through reasonable mathematical modeling and rigorous model derivation, and simultaneously, the algorithm is automatically utilized to avoid the complexity of early calibration; the direct angle control can enable the system to accurately move to a target position at the highest speed through a motor control algorithm, the problem that pictures are easy to shake due to PID adjustment is avoided, the dynamic response capability and stability of the system are improved, the direct angle control method has a wide application prospect, and popularization and application are facilitated.

Description

Method for accurately and automatically tracking target
Technical Field
The invention relates to the technical field of intelligent monitoring, in particular to a method for accurately and automatically tracking a target.
Background
The existing monitoring system generally analyzes and captures sensitive information (such as human invasion, picture movement and the like) and can trigger alarm, automatic video recording and the like, but if the sensitive information moves to a current visual angle blind area, the monitoring system cannot realize automatic whole-course tracking. Some in the market can realize simple automatic tracking by a mode of calibration in advance, but the method has larger limitation, has poorer tracking effect outside a calibration area range, and also has the defects of performing PID (proportion integration differentiation) adjustment on the motion of a camera according to image analysis. Therefore, it is urgently needed to develop a method for accurately and automatically tracking a target to solve the above technical problems.
In view of the above, the present invention is particularly proposed.
Disclosure of Invention
The invention aims to provide a method for accurately and automatically tracking a target, which has higher accuracy through reasonable mathematical modeling and rigorous model derivation, and simultaneously utilizes an algorithm to automatically realize the purpose of avoiding the complexity of early calibration; the direct angle control can enable the system to accurately move to a target position at the highest speed through a motor control algorithm, the problem that pictures are easy to shake due to PID adjustment is avoided, the dynamic response capability and stability of the system are improved, the direct angle control method has a wide application prospect, and popularization and application are facilitated.
In order to achieve the above object, the present invention provides a method for accurately and automatically tracking a target, comprising the following steps:
s1: establishing a mathematical model for monitoring system motion and imaging;
s2: calculating the real horizontal and vertical relative angles to be moved through a compensation function according to the mathematical models of the motion and the imaging of the monitoring system;
s3: and the motor control module of the monitoring system drives the motor to operate to a corresponding position, so that target tracking is realized.
Preferably, in S1, the specific method for establishing a mathematical model for monitoring system motion and imaging includes: the camera rotates 360 degrees in the horizontal direction and the vertical direction, an environment picture taking the camera as a sphere center can be observed, the position of the camera is abstracted as the sphere center, an observed image is a sphere in space, when the camera rotates to any position, the imaging range is an arc surface taking the projection of the axis of the camera on the sphere as the center and taking the current field angle of the camera as the sphere center angle, and the projection of the axis of the camera on the sphere corresponds to a central pixel point of the current imaging picture.
Preferably, in S2, the relative angle function of the horizontal movement required is as follows:
ω = asin(sin(|x/W|*ɑ)/cos(asin(cos(|x/W|*ɑ)*sinθ)))
in the above equation, ω is a relative angle that needs to be moved in the horizontal direction, x is a horizontal coordinate of the target pixel (with the picture center as a coordinate system origin), W is a horizontal direction resolution of the image, a is a current horizontal direction field angle of the camera, and θ is a current physical elevation angle of the camera.
Preferably, in S2, the relative angle function of the required vertical movement is:
φ = |y/H|*β-(θ-asin(cos(|x/W|*ɑ)*sinθ))
in the above formula, phi is the relative angle that needs to be moved in the vertical direction, x and y are the horizontal and vertical coordinates (with the center of the picture as the origin of the coordinate system) of the target pixel point, W and H are the horizontal and vertical resolutions of the image, respectively, and θ and β are the current horizontal and vertical field angles of the camera, respectively.
The method for accurately and automatically tracking the target provided by the invention has the following beneficial effects.
1. According to the invention, through reasonable mathematical modeling, a mathematical model is established for the camera monitoring system and the imaging principle thereof, and the real horizontal and vertical relative angles to be moved are calculated through a compensation function, so that the accurate tracking and positioning of the target pixel can be realized, the target pixel is ensured to accurately move to the center of the picture, and the accuracy of target tracking is greatly improved.
2. The invention can make the rotating mechanism of the camera system accurately reach the designated position at the highest speed by direct angle control, and avoids the defects of picture shaking and long stabilization time by using PID adjustment.
Drawings
FIG. 1 is a flowchart illustrating a method for accurately and automatically tracking a target according to the present invention;
FIG. 2 is a mathematical model of a camera monitoring system;
fig. 3 is a mathematical model of the imaging level of the camera and the spatial level.
Detailed Description
The present invention will be further described with reference to the following specific embodiments and accompanying drawings to assist in understanding the contents of the invention.
As shown in fig. 1, it is a work flow chart of a method for accurately and automatically tracking a target according to the present invention. The method for accurately and automatically tracking the target comprises the following steps:
s1: a mathematical model of monitoring system motion and imaging is established, and the specific method comprises the following steps: the camera rotates 360 degrees in the horizontal direction and the vertical direction, an environment picture taking the camera as a sphere center can be observed, the position of the camera is abstracted as the sphere center, an observed image is a sphere in space, when the camera rotates to any position, an imaging range is a cambered surface taking the projection of the axis of the camera on the sphere as the center and taking the current field angle of the camera as the sphere center angle, and the projection of the axis of the camera on the sphere corresponds to a central pixel point of the current imaging picture. The camera monitoring system motion and imaging mathematical model is shown in fig. 2, where a point O of a sphere center is a position of a camera, a point G of the sphere center is a projection point of the camera axis on a spherical surface, that is, a center point of a current image, a horizontal field angle of the current camera is α, a horizontal center line of an imaging picture is CD, a vertical center line is an arc line where SG is located, and the angle of the sphere center is COD = α.
As shown in fig. 2, assuming that the target position (T) is to be reached, the current camera should start from point G, move horizontally in the X direction to point M, and then move vertically from point M to the target position (T). Thus, there is an error corresponding to the arc MN in the vertical direction, i.e., an error in the vertical direction, which has a certain relationship with the angle of the horizontal direction.
Assume that the current camera elevation angle is θ. θ = GOS. If the monitoring system wants to move a target point T to a picture horizontal centering position, an angle needing to be horizontally rotated is ≦ SOK (for convenience of description, an angle needing to be horizontally moved is called as ω, and an angle needing to be vertically rotated is called as φ), at the moment, an M point is located at the center of a picture, then vertical motion ≦ MOT is performed, a vertical field angle β of a camera can be obtained through a camera specification, therefore ≦ MOT = ≦ NOT ≦ MON through calculation of T point pixel points. Therefore, the user only needs to calculate the angle MON which is equal to the current elevation theta of the camera minus the elevation angle KON corresponding to the N point.
And projecting the circle (passing through the center O) where the current field angle is located on a horizontal plane to obtain a new model for analysis. The mathematical model of the imaging horizontal plane and the space horizontal plane of the camera is shown in fig. 3, and the projection point of the point N on the horizontal plane is set as L, so that the point L can be known to be on the radius OK, and similarly, the projection J of the point G on the horizontal plane can fall on the radius OS. Making a perpendicular line along the intersection line of the N point and the two planes, and knowing that the OP is determined when the vertical foot is P
Figure 10000254392944
Face NPL, OP
Figure 10000254394482
PL, and θ = ≈ GOS = ≈ NPL, PL// OS in the figure, meanwhile, PN and GO are both vertical to an intersection line OP of a horizontal plane and an imaging plane, so < NOG = < PNO.
Assuming that in a two-dimensional camera picture, a picture central point (corresponding pixel of G point) is taken as a coordinate origin, a picture horizontal pixel size is W, a vertical pixel size is H, and a T point coordinate is (x, y), an angle corresponding to the T point relative to a picture central line is as follows:
∠NOG=|x/W|*ɑ
sin∠KON=NL/ON=ON*cos∠NOG*sinθ /ON=cos(|x/W|*ɑ)sinθ
∠KON=asin(cos(|x/W|*ɑ)sinθ)
in the above formula, a and W can be obtained by querying the camera specification, x represents a horizontal coordinate position of the current target to be tracked in the picture (with the picture center as the origin of coordinates), and θ is the current elevation angle of the camera, and can be obtained by the motor control unit, so that a motion angle (θ - < KON) of the camera that needs to be compensated in the vertical direction can be calculated. The vertical direction of the camera actually needs the rotation angle:
φ = |y/H|*β-(θ-asin(cos(|x/W|*ɑ)*sinθ)) (1)
assuming that omega is an angle required to rotate in the horizontal direction, omega = &, then
sinω=OP/OL=(ON*sin∠PNO)/(ON*cos∠KON)=sin∠PNO/cos∠KON
=sin(|x/W|*ɑ)/cos(asin(cos(|x/W|*ɑ)*sinθ))
ω = asin(sin(|x/W|*ɑ)/cos(asin(cos(|x/W|*ɑ)*sinθ))) (2)
S2: calculating real horizontal and vertical relative angles to be moved through a compensation function according to a mathematical model of motion and imaging of a monitoring system;
the relative angle function that the level needs to move is:
ω = asin(sin(|x/W|*ɑ)/cos(asin(cos(|x/W|*ɑ)*sinθ)))
in the above equation, ω is a relative angle to be moved in the horizontal direction, x is a horizontal coordinate of the target pixel point (with the picture center as the origin of the coordinate system), W is a horizontal direction resolution of the image, α is a current horizontal direction field angle of the camera, and θ is a current physical elevation angle of the camera.
The relative angle function that the vertical needs to move is:
φ = |y/H|*β-(θ-asin(cos(|x/W|*ɑ)*sinθ))
in the above formula, phi is the relative angle that needs to be moved in the vertical direction, x and y are the horizontal and vertical coordinates (using the center of the picture as the origin of the coordinate system) of the target pixel point, W and H are the horizontal and vertical resolutions of the image, respectively, and θ and β are the current horizontal and vertical field angles of the camera, respectively.
S3: and the motor control module of the monitoring system drives the motor to operate to a corresponding position, so that target tracking is realized.
For example: and (3) tracking the moving target by using a 200W pixel camera (with the picture size of 1920 × 1080), monitoring the moving target by using the camera, wherein the pixel position is (1800, 540), and the central coordinate of the moving target is converted into (840, 0) and the current field angle of the camera is 56 degrees × 30 degrees by using the central point of the picture as the origin of coordinates. The currently known parameters are as follows:
x=840,y=0,W=1920,H=1080,ɑ=56°,β=30°
(1) Supposing that the current camera elevation angle is 0 degrees, namely the camera is horizontally placed, theta = 0 degrees, and a compensation formula is substituted
Angle of vertical movement required:
φ = |y/H|*β-(θ-asin(cos(|x/W|*ɑ)*sinθ)) = 0
angle of horizontal rotation
ω = asin(sin(|x/W|*ɑ)/cos(asin(cos(|x/W|*ɑ)*sinθ))) = 24.5°
And (4) conclusion: the camera is located at a horizontal position, the target point is located on the central line of the picture, the deviation angle of the target point and the central point is that the camera only needs to horizontally rotate for 24.5 degrees, and compensation is not needed in the vertical direction.
(2) Assume that the current camera elevation angle is 45 °, i.e., θ = 45 °, and is substituted into the compensation formula
Angle of vertical movement required:
φ = |y/H|*β-(θ-asin(cos(|x/W|*ɑ)*sinθ)) = -4.95°
angle of horizontal rotation
ω = asin(sin(|x/W|*ɑ)/cos(asin(cos(|x/W|*ɑ)*sinθ))) = 32.8°
And (4) conclusion: when the current elevation angle of the camera is 45 degrees, if the target points (840, 0) need to be moved to the center of the screen, the camera needs to horizontally rotate by 32.8 degrees and vertically rotate downwards by 4.95 degrees.
(3) Assuming that the current camera elevation angle is 90 °, i.e. θ = 90 °, the compensation formula is introduced
Angle of vertical movement required:
φ = |y/H|*β-(θ-asin(cos(|x/W|*ɑ)*sinθ)) = -24.5°
angle of horizontal rotation
ω = asin(sin(|x/W|*ɑ)/cos(asin(cos(|x/W|*ɑ)*sinθ))) = 90°
And (4) conclusion: when the current elevation angle of the camera is 90 degrees, the center point of the picture is a Z point right above (below) the sphere in the model, if the target point (840, 0) needs to be moved to the center of the screen, the camera needs to horizontally rotate 90 degrees and vertically rotate downwards 24.5 degrees.
According to the invention, through reasonable mathematical modeling, a mathematical model is established for the camera monitoring system and the imaging principle thereof, and the real horizontal and vertical relative angles which need to be moved are calculated through a compensation function, so that the accurate tracking and positioning of the target pixel can be realized, the target pixel is ensured to accurately move to the center of the picture, and the accuracy of target tracking is greatly improved. The invention can make the rotating mechanism of the camera system accurately reach the designated position at the highest speed by direct angle control, and avoids the defects of picture shaking and long stabilization time by using PID adjustment.
The inventive concept is explained in detail herein using specific examples, which are given only to aid in understanding the core concepts of the invention. It should be understood that any obvious modifications, equivalents and other improvements made by those skilled in the art without departing from the spirit of the present invention are included in the scope of the present invention.

Claims (4)

1. A method for accurately and automatically tracking a target is characterized by comprising the following steps:
s1: establishing a mathematical model for monitoring system motion and imaging;
s2: calculating real horizontal and vertical relative angles to be moved through a compensation function according to a mathematical model of motion and imaging of a monitoring system;
s3: and the motor control module of the monitoring system drives the motor to operate to a corresponding position, so that target tracking is realized.
2. The method for accurately and automatically tracking the target according to claim 1, wherein in S1, the specific method for establishing the mathematical model for monitoring the motion and imaging of the system comprises: the camera rotates 360 degrees in the horizontal direction and the vertical direction, an environment picture taking the camera as a sphere center can be observed, the position of the camera is abstracted as the sphere center, an observed image is a sphere in space, when the camera rotates to any position, the imaging range is an arc surface taking the projection of the axis of the camera on the sphere as the center and taking the current field angle of the camera as the sphere center angle, and the projection of the axis of the camera on the sphere corresponds to a central pixel point of the current imaging picture.
3. The method for accurately and automatically tracking the target according to claim 1, wherein in S2, the relative angle function of the horizontal movement required is as follows:
ω = asin(sin(|x/W|*ɑ)/cos(asin(cos(|x/W|*ɑ)*sinθ)))
in the above equation, ω is a relative angle that needs to be moved in the horizontal direction, x is a horizontal coordinate of the target pixel (with the picture center as a coordinate system origin), W is a horizontal direction resolution of the image, a is a current horizontal direction field angle of the camera, and θ is a current physical elevation angle of the camera.
4. The method of claim 1, wherein in the step S2, the relative angle function of the vertical movement required is as follows:
φ = |y/H|*β-(θ-asin(cos(|x/W|*ɑ)*sinθ))
in the above formula, phi is the relative angle that needs to be moved in the vertical direction, x and y are the horizontal and vertical coordinates (using the center of the picture as the origin of the coordinate system) of the target pixel point, W and H are the horizontal and vertical resolutions of the image, respectively, and θ and β are the current horizontal and vertical field angles of the camera, respectively.
CN202211050904.6A 2022-08-31 2022-08-31 Method for accurately and automatically tracking target Pending CN115421523A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211050904.6A CN115421523A (en) 2022-08-31 2022-08-31 Method for accurately and automatically tracking target

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211050904.6A CN115421523A (en) 2022-08-31 2022-08-31 Method for accurately and automatically tracking target

Publications (1)

Publication Number Publication Date
CN115421523A true CN115421523A (en) 2022-12-02

Family

ID=84199603

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211050904.6A Pending CN115421523A (en) 2022-08-31 2022-08-31 Method for accurately and automatically tracking target

Country Status (1)

Country Link
CN (1) CN115421523A (en)

Similar Documents

Publication Publication Date Title
US6304284B1 (en) Method of and apparatus for creating panoramic or surround images using a motion sensor equipped camera
CN111199560B (en) Video monitoring positioning method and video monitoring system
WO2014044161A1 (en) Target tracking method and system for intelligent tracking high speed dome camera
CN111770270B (en) Camera posture correction method and camera
US8761460B2 (en) Method of automatically tracking and photographing celestial objects, and celestial-object auto-tracking photographing apparatus
JP2011027718A (en) Derivation of 3-dimensional information from single camera and movement sensor
TWI755991B (en) Automatic keystone correction method for projector system
CN102771121A (en) Camera platform system
US11132814B2 (en) Information processing apparatus, information processing method, and storage medium
US20210018138A1 (en) Gimbal mode switching method, device, mobile platform and storage medium
CN111123280A (en) Laser radar positioning method, device and system, electronic equipment and storage medium
CN115190237A (en) Method and equipment for determining rotation angle information of bearing equipment
CN108519067B (en) Method for determining coordinates of shooting target in camera shift operation process
CN110749311A (en) Positioning method, positioning device and storage medium
WO2022057043A1 (en) Target-tracking dynamic projection method and dynamic projection device
TWI726536B (en) Image capturing method and image capturing apparatus
CN115421523A (en) Method for accurately and automatically tracking target
CN111862197A (en) Target tracking method and system in video monitoring and ball machine
CN114827564A (en) Projection equipment control method and device, storage medium and projection equipment
US11936843B2 (en) Generating textured three-dimensional meshes using two-dimensional scanner and panoramic camera
WO2019100216A1 (en) 3d modeling method, electronic device, storage medium and program product
CN112230257A (en) Positioning monitoring method based on PTZ camera
Cheon et al. Object-tracking gimbal for projection mapping
CN115103169B (en) Projection picture correction method, projection picture correction device, storage medium and projection device
JP3914938B2 (en) Projector keystone distortion correction device and projector including the keystone distortion correction device

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