CN112616019B - Target tracking method and device, holder and storage medium - Google Patents

Target tracking method and device, holder and storage medium Download PDF

Info

Publication number
CN112616019B
CN112616019B CN202011491174.4A CN202011491174A CN112616019B CN 112616019 B CN112616019 B CN 112616019B CN 202011491174 A CN202011491174 A CN 202011491174A CN 112616019 B CN112616019 B CN 112616019B
Authority
CN
China
Prior art keywords
speed
horizontal
vertical
coordinate
tracking
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.)
Active
Application number
CN202011491174.4A
Other languages
Chinese (zh)
Other versions
CN112616019A (en
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.)
Chongqing Unisinsight Technology Co Ltd
Original Assignee
Chongqing Unisinsight Technology 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 Chongqing Unisinsight Technology Co Ltd filed Critical Chongqing Unisinsight Technology Co Ltd
Priority to CN202011491174.4A priority Critical patent/CN112616019B/en
Publication of CN112616019A publication Critical patent/CN112616019A/en
Application granted granted Critical
Publication of CN112616019B publication Critical patent/CN112616019B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/695Control of camera direction for changing a field of view, e.g. pan, tilt or based on tracking of objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast

Abstract

The embodiment of the invention provides a target tracking method, a target tracking device, a holder and a storage medium, and relates to the technical field of video monitoring. The method comprises the steps of determining the current position coordinate, the size information, the moving speed and the moving trend of a target to be tracked, calculating the tracking position coordinate and the motor tracking speed according to the current position coordinate, the size information, the moving speed, the moving trend and other parameters, adjusting the direction of a pan-tilt based on the tracking position coordinate and the motor tracking speed, and sending the size information and the current position coordinate to a camera so that the camera can adjust the focal length based on the size information and the current position coordinate. The direction of the holder is adjusted by determining the tracking position coordinates and the motor tracking speed, so that the camera can be aligned to the target to be tracked, and the focal length is adjusted based on the size information and the current position coordinates of the camera, so that the camera can shoot clear images including the target to be tracked.

Description

Target tracking method, device, holder and storage medium
Technical Field
The invention relates to the technical field of video monitoring, in particular to a target tracking method, a target tracking device, a holder and a storage medium.
Background
With the continuous progress of the technology, the application of the monitoring equipment is more and more extensive. In more and more fields, monitoring equipment is required. For example, whether intrusion behaviors exist in an area or not is monitored in real time by using monitoring equipment, illegal behaviors are shot, and the like.
In the prior art, many current monitoring devices can capture and evidence illegal events, but the captured pictures usually have the problems that the targets are too small and not clear, and the captured pictures cannot be used as evidence for evidence collection.
Disclosure of Invention
In view of the above, the present invention provides a target tracking method, an apparatus, a holder and a storage medium to solve the above problems.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:
in a first aspect, an embodiment of the present application provides a target tracking method, which is applied to a pan-tilt, where the pan-tilt is in communication connection with a control center and a camera, and the target tracking method includes:
receiving parameter information of a target to be tracked, which is sent by the control center;
determining the current position coordinate, the size information, the moving speed and the moving trend of the target to be tracked according to the parameter information;
determining the predicted position coordinate of the target to be tracked according to the current position coordinate, the moving speed, the moving trend and the acquired transmission delay;
determining the motor tracking amplitude according to the size information and the preset multiplying power;
determining a tracking position coordinate according to the acquired camera position coordinate, the predicted position coordinate and the motor tracking amplitude;
calculating a motor tracking speed according to the camera position coordinate, the predicted position coordinate, the moving speed, the motion trend, a preset motor maximum speed and the acquired current motor speed;
adjusting the direction of the holder based on the tracking position coordinates and the motor tracking speed;
and sending the size information and the current position coordinate to the camera so that the camera adjusts the focal length based on the size information and the current position coordinate.
In an alternative embodiment, the camera position coordinates include a first horizontal coordinate and a first vertical coordinate, the predicted position coordinates include a second horizontal coordinate and a second vertical coordinate, the tracking position coordinates include a third horizontal coordinate and a third vertical coordinate, and the motor tracking amplitude includes a horizontal tracking amplitude and a vertical tracking amplitude;
the step of determining the tracking position coordinate according to the acquired camera position coordinate, the predicted position coordinate and the motor tracking amplitude comprises the following steps:
calculating a difference value between the first horizontal coordinate and the second horizontal coordinate to obtain a first difference value;
calculating a difference value between the first vertical coordinate and the second vertical coordinate to obtain a second difference value;
setting the second horizontal coordinate as the third horizontal coordinate if the absolute value of the first difference is less than or equal to the horizontal tracking amplitude; otherwise, calculating to obtain the third horizontal coordinate according to the first difference, the first horizontal coordinate and the horizontal tracking amplitude;
setting the second vertical coordinate as the third vertical coordinate if the absolute value of the second difference is less than or equal to the vertical tracking amplitude; otherwise, the third vertical coordinate is obtained through calculation according to the second difference value, the first vertical coordinate and the vertical tracking amplitude.
In an optional implementation manner, the step of calculating the third horizontal coordinate according to the first difference, the first horizontal coordinate, and the horizontal tracking amplitude includes:
setting the sum of the first horizontal coordinate and the horizontal tracking amplitude as the third horizontal coordinate if the first difference is less than 0;
if the first difference value is greater than 0, setting the difference between the first horizontal coordinate and the horizontal tracking amplitude as the third horizontal coordinate;
the step of calculating the third vertical coordinate according to the second difference, the first vertical coordinate and the vertical tracking amplitude comprises:
if the second difference is less than 0, setting the sum of the first vertical coordinate and the vertical tracking amplitude as the third vertical coordinate;
and if the second difference value is larger than 0, setting the difference between the first vertical coordinate and the vertical tracking amplitude as the third vertical coordinate.
In an alternative embodiment, the step of calculating a motor tracking speed according to the camera position coordinate, the predicted position coordinate, the moving speed, the motion trend, a preset motor maximum speed, and the acquired current motor speed includes:
calculating a first motor speed according to the camera position coordinate, the predicted position coordinate and a preset field angle;
estimating to obtain a second motor speed according to the current speed of the motor, the preset maximum speed of the motor and the preset motor speed amplification;
converting the moving speed into a relative speed;
calculating to obtain a third motor speed according to the motion trend, the relative speed and the first motor speed;
setting the smaller of the second motor speed and the third motor speed as the motor tracking speed.
In an alternative embodiment, the camera position coordinates include a first horizontal coordinate and a first vertical coordinate, the predicted position coordinates include a second horizontal coordinate and a second vertical coordinate, the preset field of view includes a vertical field of view and a horizontal field of view, the first motor speed includes a first vertical speed and a first horizontal speed, and the preset maximum motor speed includes a vertical maximum speed and a horizontal maximum speed;
the step of calculating the first motor speed according to the camera position coordinates, the predicted position coordinates and a preset field angle comprises:
determining a first offset and a second offset according to the vertical field angle and the horizontal field angle respectively;
if a third difference between the second vertical coordinate and the first vertical coordinate is less than or equal to the first offset, determining that the first vertical speed is 0; otherwise, calculating the first vertical speed according to the vertical maximum speed, the third difference value and the vertical field angle;
if a fourth difference between the second horizontal coordinate and the first horizontal coordinate is less than or equal to the second offset, determining that the first horizontal speed is 0; otherwise, calculating the first horizontal velocity according to the horizontal maximum velocity, the fourth difference and the horizontal field angle.
In an alternative embodiment, the horizontal maximum velocity, the horizontal field angle, and the first horizontal velocity satisfy the following equation:
Figure BDA0002840749110000041
wherein speed _ p1Is the first levelA speed, max _ speed _ p is the horizontal maximum speed, dist _ p is the fourth difference value, fov _ p is the horizontal field angle;
the vertical maximum velocity, the vertical field angle, and the first vertical velocity satisfy the equation:
Figure BDA0002840749110000042
wherein speed _ t1At the first vertical speed, max _ speed _ t is the vertical maximum speed, dist _ t is the third difference value, and fov _ t is the vertical field angle.
In an alternative embodiment, the first motor speed comprises a first vertical speed and a first horizontal speed, the third motor speed comprises a third vertical speed and a third horizontal speed, and the relative speeds comprise a horizontal relative speed and a vertical relative speed;
the step of calculating a third motor speed according to the motion trend, the relative speed and the first motor speed comprises the following steps:
if the movement trend is a stationary trend, setting the first vertical speed as the third vertical speed, and setting the first horizontal speed as the third horizontal speed;
if the movement trend is an approaching trend, setting the difference value between the first vertical speed and the vertical relative speed as the third vertical speed, and setting the difference value between the first horizontal speed and the horizontal relative speed as the third horizontal speed;
and if the movement trend is a far trend, setting the sum of the first vertical speed and the vertical relative speed as the third vertical speed, and setting the sum of the first horizontal speed and the horizontal relative speed as the third horizontal speed.
In an alternative embodiment, the moving speed includes a vertical moving speed and a horizontal moving speed, and the relative speed includes a horizontal relative speed and a vertical relative speed;
the moving speed and the relative speed satisfy the following formula:
obj_mot_speed_p=speed_obj_p×speed_coef_p
obj_mot_speed_t=speed_obj_t×speed_coef_t
wherein obj _ mot _ speed _ p is the horizontal relative speed, speed _ obj _ p is the horizontal moving speed, speed _ coef _ p is a preset horizontal conversion coefficient, obj _ mot _ speed _ t is the vertical relative speed, speed _ obj _ t is the vertical moving speed, and speed _ coef _ t is a preset vertical conversion coefficient.
In an alternative embodiment, the size information includes an actual height and an actual width, and the motor tracking amplitude includes a horizontal tracking amplitude and a vertical tracking amplitude;
the step of determining the motor tracking amplitude according to the size information and the preset multiplying power comprises the following steps:
determining the product of the actual width and the preset multiplying power as the horizontal tracking amplitude;
and determining the product of the actual height and the preset multiplying power as the vertical tracking amplitude.
In a second aspect, an embodiment of the present application further provides a target tracking apparatus, which is applied to a pan/tilt, where the pan/tilt is in communication connection with a control center and a camera, and the target tracking apparatus includes:
the receiving and transmitting module is used for receiving the parameter information of the target to be tracked, which is sent by the control center;
the processing module is used for determining the current position coordinate, the size information, the moving speed and the moving trend of the target to be tracked according to the parameter information;
the processing module is further used for determining a predicted position coordinate of the target to be tracked according to the current position coordinate, the moving speed, the motion trend and the acquired transmission delay;
the processing module is also used for determining the motor tracking amplitude according to the size information and the preset multiplying power;
the processing module is also used for determining a tracking position coordinate according to the acquired camera position coordinate, the predicted position coordinate and the motor tracking amplitude;
the processing module is also used for calculating the tracking speed of the motor according to the position coordinate of the camera, the predicted position coordinate, the moving speed, the motion trend, the preset maximum speed of the motor and the acquired current speed of the motor;
the processing module is also used for adjusting the direction of the holder based on the tracking position coordinate and the motor tracking speed;
the transceiver module is further configured to send the size information and the current position coordinate to the camera, so that the camera adjusts a focal length based on the size information and the current position coordinate.
In a third aspect, an embodiment of the present application further provides a pan/tilt head, including a processor and a memory, where the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the steps of the target tracking method according to any one of the foregoing embodiments.
In a fourth aspect, the present application further provides a storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps of the target tracking method according to any one of the foregoing embodiments.
The target tracking method, the device, the cradle head and the storage medium provided by the embodiment of the invention determine the current position coordinate, the size information, the moving speed and the moving trend of the target to be tracked according to the parameter information by receiving the parameter information of the target to be tracked sent by the control center, determine the predicted position coordinate of the target to be tracked according to the current position coordinate, the moving speed, the moving trend and the acquired transmission delay, determine the tracking amplitude of a motor according to the size information and the preset multiplying power, determine the tracking position coordinate according to the acquired position coordinate, the predicted position coordinate and the tracking amplitude of the motor, calculate the tracking speed of the motor according to the position coordinate, the predicted position coordinate, the moving speed, the size information, the moving trend, the preset maximum speed of the motor and the acquired current speed of the motor, and adjust the direction of the cradle head based on the tracking position coordinate and the tracking speed of the motor, and sending the size information and the current position coordinates to the camera so that the camera adjusts the focal length based on the size information and the current position coordinates. The direction of the pan-tilt is adjusted by determining the tracking position coordinate and the motor tracking speed, so that the camera can be aligned to the target to be tracked, and the focal length is adjusted based on the size information and the current position coordinate, so that the camera can shoot clear images including the target to be tracked.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 shows a diagram of an application environment provided by an embodiment of the present invention.
Fig. 2 shows a flowchart of a target tracking method provided by an embodiment of the present invention.
Fig. 3 shows a detailed flowchart of S204 in fig. 2.
Fig. 4 shows a detailed flowchart of S205 in fig. 2.
Fig. 5 shows a detailed flowchart of S206 in fig. 2.
Fig. 6 shows a detailed flowchart of S2061 in fig. 5.
Fig. 7 shows a detailed flowchart of S2064 in fig. 5.
Fig. 8 is a functional block diagram of a target tracking apparatus according to an embodiment of the present invention.
Fig. 9 shows a schematic block diagram of a pan-tilt provided by the embodiment of the invention.
Icon: 100-a pan-tilt; 110-a memory; 120-a processor; 130-a communication unit; 140-a motor; 200-a control center; 300-a camera; 400-a target tracking device; 410-a transceiver module; 420-processing module.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It is noted that relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Fig. 1 is a diagram of an application environment of a target tracking method according to an embodiment of the present application. The application environment includes a control center 200, a pan/tilt head 100, and a camera 300. The control center 200 is electrically connected to the pan/tilt head 100 and the camera 300, respectively, and the pan/tilt head 100 is electrically connected to the camera 300.
The camera 300 is disposed on the pan/tilt head 100 and is used for automatically taking pictures or videos or taking pictures or videos under the control of the control center 200. In an alternative embodiment, the camera 300 may be a dome camera 300. It is to be understood that the camera 300 may be other devices having imaging and photographing functions.
The control center 200 is used to identify whether a target exists in a picture or video taken by the camera 300 and determine information such as a position of the target.
The pan/tilt head 100 is configured to adjust its own position according to information such as the position transmitted by the control center 200 to adjust the shooting angle of the camera 300, thereby implementing a tracking operation on the target so as to shoot a clear image including the target.
Specifically, the pan/tilt head 100 may include a processor 120 and a motor 140, and the processor 120 may adjust the speed and the angle of the motor 140 according to the information such as the position transmitted by the control center 200, so as to drive the camera 300 to rotate, thereby changing the shooting direction of the camera 300.
The embodiment of the present application further provides a target tracking method, which is applied to the foregoing pan/tilt 100, and is used for tracking a target to be tracked. Please refer to fig. 2, which is a flowchart illustrating a target tracking method according to an embodiment of the present disclosure. The target tracking method comprises the following steps:
s201, receiving parameter information of the target to be tracked, which is sent by the control center 200.
It can be understood that the control center 200 may detect whether a target exists in the acquired image by using a target detection algorithm, and after the target is detected, may take the target as a target to be tracked, and extract and send parameter information of the target to be tracked.
The parameter information may include a plurality of plane position coordinates of the target to be tracked within the monitoring screen and a timestamp corresponding to each plane position coordinate, each plane position coordinate represents a plane position of the target to be tracked in a corresponding frame image, and the corresponding timestamp represents a time for acquiring the corresponding frame image.
It should be noted that the plurality of plane position coordinates at least include a current plane coordinate of the image to be tracked, and the current plane coordinate is a plane position coordinate of the target to be tracked in the latest frame of image acquired by the camera 300.
It should be further noted that the plane position coordinates may include position coordinates of vertices of the target to be tracked, for example, if the target to be tracked is a quadrilateral, the plane position coordinates include position coordinates of four vertices of the target to be tracked.
And S202, determining the current position coordinate, the size information, the moving speed and the moving trend of the target to be tracked according to the parameter information.
The current position coordinate is a spherical coordinate corresponding to the current plane coordinate, and reflects a position coordinate of the target to be tracked in a spherical coordinate system with the camera 300 as the center, and the current position coordinate includes a fourth horizontal coordinate and a fourth vertical coordinate. It should be noted that the fourth horizontal coordinate and the fourth vertical coordinate are a horizontal offset angle and a vertical offset angle of the target to be tracked with respect to the center, respectively.
Specifically, the current position coordinates may be obtained by converting from plane position coordinates, and the current position coordinates (P ', T') and the plane position coordinates (X, Y) satisfy the following equation:
Figure BDA0002840749110000101
wherein H is a preset horizontal half angle of view, V is a preset vertical half angle of view, (X)mid,Ymid) The (P, T) is the position coordinate of the center of the preset plane, and the (P, T) is the position coordinate of the center of the preset spherical surface.
The horizontal half angle of view and the vertical half angle of view are related to the model of the camera 300, and reflect the field of view of the camera 300.
The size information includes the actual width and the actual height of the target to be tracked. The actual width is an angle covered by the target to be tracked in the horizontal direction, and the actual height is an angle covered by the target to be tracked in the vertical direction. It can be understood that after the spherical position coordinates of the plurality of vertices are determined by the above formula, the actual width and the actual height of the target to be tracked can be calculated by using coordinate operations.
The moving speed includes a vertical moving speed and a horizontal moving speed. The vertical moving speed is used for reflecting the moving speed of the target to be tracked in the vertical direction, and the horizontal moving speed is used for reflecting the moving speed of the target to be tracked in the horizontal direction.
The process of calculating the moving speed using the parameter information may be as follows: the parameter information may include a first plane position coordinate, a first time stamp T1 corresponding to the first plane position coordinate, a second plane position coordinate, and a second time stamp T2 corresponding to the second plane position coordinate, and then the first plane position coordinate, the second plane position coordinate are respectively converted into a first spherical position coordinate (P1, T1) and a second spherical position coordinate (P2, T2) using the above coordinate conversion formula, so that the vertical movement speed and the horizontal movement speed may be calculated using the following formulas:
Figure BDA0002840749110000111
the speed _ obj _ p is a horizontal moving speed, and the speed _ obj _ t is a vertical moving speed.
In addition, the position of the target to be tracked in the multi-frame image can be accurately judged according to the spherical position coordinates corresponding to the plane position coordinates, so that the motion trend of the target to be tracked is determined.
Specifically, the movement tendency may include three of stationary, approaching, and departing. The static state is that the target to be tracked is in a static state, the approaching state is that the target to be tracked moves towards the direction approaching the pan-tilt 100, and the departing state is that the target to be tracked moves towards the direction departing from the pan-tilt 100.
In an alternative embodiment, the movement trend may specifically include approaching and departing in a horizontal direction and approaching and departing in a vertical direction.
And S203, determining the predicted position coordinate of the target to be tracked according to the current position coordinate, the moving speed, the moving trend and the acquired transmission delay.
The transmission delay is a difference between the time when the pan/tilt head 100 receives the current plane coordinate and the timestamp corresponding to the current plane coordinate, and reflects the delay of the control center 200 in transmitting data.
And the predicted position coordinates are used for reflecting the possible position of the target to be tracked in the current state. Specifically, the predicted position coordinates include a second horizontal coordinate and a second vertical coordinate.
Specifically, the pan/tilt head 100 may first calculate a vertical displacement according to the transmission delay and the vertical moving speed, and calculate a horizontal displacement according to the transmission delay and the horizontal moving speed; and then, calculating to obtain a predicted position coordinate according to the motion trend, the current plane coordinate, the vertical displacement and the horizontal displacement.
If the motion trend is close, subtracting the horizontal displacement on the basis of the fourth horizontal coordinate to obtain a second horizontal coordinate; if the movement trend is far away, the horizontal displacement is added on the basis of the fourth horizontal coordinate, and then the second horizontal coordinate can be obtained.
If the motion trend is close, subtracting the vertical displacement on the basis of the fourth vertical coordinate to obtain a second vertical coordinate; if the motion trend is far away, the vertical displacement is added on the basis of the fourth vertical coordinate, and then the second vertical coordinate can be obtained.
And S204, determining the motor tracking amplitude according to the size information and the preset multiplying power.
The motor tracking amplitude comprises a horizontal tracking amplitude and a vertical tracking amplitude. The horizontal tracking amplitude reflects a single adjustment amplitude of the motor 140 in the horizontal direction, and the vertical tracking amplitude reflects a single adjustment amplitude of the motor 140 in the vertical direction.
Specifically, referring to fig. 3, the step S204 includes:
and S2041, determining the product of the actual width and the preset multiplying power as a horizontal tracking amplitude.
That is, the actual width and the horizontal tracking amplitude satisfy the following formula:
scope_p=w×ratio
wherein, scope _ p is the horizontal tracking amplitude, w is the actual width, and ratio is the preset multiplying power.
And S2042, determining the product of the actual height and the preset multiplying power as the vertical tracking amplitude.
That is, the actual height and the vertical tracking amplitude satisfy the following formula:
scope_t=h×ratio
wherein, scope _ t is the vertical tracking amplitude, and h is the actual height.
It should be noted that the preset magnification ratio may be set according to the actual requirement of the user.
In an optional embodiment, a magnification ratio during the first tracking processing of the pan/tilt 100 on the target to be tracked may be greater than a magnification ratio during the second tracking processing of the pan/tilt 100 on the same target to be tracked.
In another alternative embodiment, the preset magnification may be changed with the tracking time, and the preset magnification becomes smaller as the tracking time becomes longer. For example, the magnification may be set to 1/2 at the start of tracking, and set to 1/3 after tracking continues for 1.5 seconds.
Understandably, the horizontal tracking amplitude and the vertical tracking amplitude are respectively determined through the actual width and the actual height, so that the problem that the target cannot be tracked due to too large or too small tracking amplitude can be avoided.
And S205, determining tracking position coordinates according to the acquired position coordinates of the camera, the predicted position coordinates and the motor tracking amplitude.
The camera position coordinates reflect the current position of the camera 300 (or the pan/tilt head 100), and include a first horizontal coordinate and a first vertical coordinate. The tracking position coordinate is the basis for adjusting the direction of the pan/tilt head 100. The tracking position coordinates include a third horizontal coordinate and a third vertical coordinate. Referring to fig. 4, the S205 includes:
s2051, calculating a difference between the first horizontal coordinate and the second horizontal coordinate to obtain a first difference.
And S2052, calculating a difference value between the first vertical coordinate and the second vertical coordinate to obtain a second difference value.
S2053, if the absolute value of the first difference is less than or equal to the horizontal tracking amplitude, setting the second horizontal coordinate as a third horizontal coordinate; otherwise, calculating to obtain a third horizontal coordinate according to the first difference, the first horizontal coordinate and the horizontal tracking amplitude. Specifically, if the first difference is smaller than 0, the sum of the first horizontal coordinate and the horizontal tracking amplitude is set as the third horizontal coordinate; and if the first difference value is larger than 0, setting the difference between the first horizontal coordinate and the horizontal tracking amplitude as the third horizontal coordinate.
That is, if pos _ cur _ p < pos _ pre _ p, pos _ tra _ p is pos _ cur _ p + scope _ p;
if pos _ cur _ p > pos _ pre _ p, pos _ tra _ p is pos _ cur _ p-scope _ p.
Wherein pos _ cur _ p is a first horizontal coordinate, pos _ pre _pPos _ tra _ p is the third horizontal coordinate, scope _ p is the horizontal tracking amplitude.
S2054, if the absolute value of the second difference is less than or equal to the vertical tracking amplitude, setting the second vertical coordinate as a third vertical coordinate; and otherwise, calculating to obtain a third vertical coordinate according to the second difference, the first vertical coordinate and the vertical tracking amplitude.
Specifically, if the second difference is smaller than 0, the sum of the first vertical coordinate and the vertical tracking amplitude is set as a third vertical coordinate; and if the second difference value is larger than 0, setting the difference between the first vertical coordinate and the vertical tracking amplitude as a third vertical coordinate.
That is, if pos _ cur _ t < pos _ pre _ t, pos _ tra _ t is pos _ cur _ t + scope _ t;
if pos _ cur _ t > pos _ pre _ t, pos _ tra _ t is pos _ cur _ t-scope _ t.
Wherein pos _ cur _ t is a first vertical coordinate, pos _ pre _ t is a second vertical coordinate, pos _ tra _ t is a third vertical coordinate, and scope _ t is a vertical tracking amplitude.
It should be noted that, in the tracking process of the pan/tilt head 100, it is necessary to determine whether the current position coordinate of the target to be tracked is valid, and if the current position coordinate is valid, the step S205 and the following steps are continuously executed. For example, the current position coordinate may have a corresponding flag, and if the flag is in an active state, the cradle head 100 determines that the current position coordinate is active, and if the flag is in an inactive state, the cradle head 100 determines that the current position coordinate is inactive.
Further, the flag state of the current position coordinates may be set by the control center 200. In an alternative embodiment, the user may manually set the flag bit of the current position coordinate through the control center 200, or the control center 200 may set the flag bit to an invalid state after determining that a clear image including the target to be tracked has been captured.
And S206, calculating the tracking speed of the motor according to the position coordinate of the camera, the predicted position coordinate, the moving speed, the motion trend, the preset maximum speed of the motor and the acquired current speed of the motor.
The motor tracking speed is the speed of the motor 140 during the process of tracking the target to be tracked by the pan/tilt head 100.
Referring to fig. 5, S206 includes:
and S2061, calculating the first motor speed according to the camera position coordinate, the predicted position coordinate and a preset field angle.
The first motor speed is used to reflect the maximum operation speed of the motor 140 in the process of tracking the target to be tracked, and is associated with the size information of the target to be tracked and the maximum motor speed.
The preset motor maximum speeds include a vertical maximum speed and a horizontal maximum speed, which are associated with the model of the motor 140 included in the head 100.
Referring to fig. 6, S2061 includes:
s20611, the first offset amount and the second offset amount are determined according to the vertical field angle and the horizontal field angle, respectively.
In an alternative embodiment, the first offset amount is a product of the vertical field angle and a predetermined ratio, and the second offset amount is a product of the horizontal field angle and a predetermined ratio. The vertical and horizontal viewing angles are used to reflect the vertical and horizontal viewing ranges of the camera 300, and are related to the model and intrinsic parameters of the camera 300.
S20612, if the third difference value between the second vertical coordinate and the first vertical coordinate is less than or equal to the first offset, determining that the first vertical speed is 0; otherwise, the first vertical speed is calculated according to the vertical maximum speed, the third difference value and the vertical field angle.
It can be understood that, if the third difference is less than or equal to the first offset, it indicates that the target to be tracked is near the center of the camera image, and at this time, the angle of the pan/tilt head 100 does not need to be adjusted, so that the first vertical speed is directly determined to be 0; if the third difference is greater than the first offset, it indicates that the target to be tracked is not near the center of the camera image, and at this time, the angle of the pan/tilt head 100 needs to be adjusted to track the target, so that the first vertical speed needs to be calculated according to the vertical maximum speed, the third difference and the vertical field angle.
Specifically, the vertical maximum velocity, the third differential vertical field angle, and the first vertical velocity satisfy the equation:
Figure BDA0002840749110000151
wherein speed _ t1At the first vertical speed, max _ speed _ t is the vertical maximum speed, dist _ t is the third difference, and fov _ t is the vertical field angle.
S20613, if the fourth difference value between the second horizontal coordinate and the first horizontal coordinate is less than or equal to the second offset, determining that the first horizontal speed is 0; otherwise, calculating the first horizontal velocity according to the horizontal maximum velocity, the fourth difference and the horizontal field angle.
It can be understood that, if the fourth difference is less than or equal to the second offset, it indicates that the target to be tracked is near the center of the camera image, and at this time, the angle of the pan/tilt head 100 does not need to be adjusted, so that the first horizontal speed is directly determined to be 0; if the fourth difference is greater than the second offset, it indicates that the target to be tracked is not near the center of the camera image, and at this time, the angle of the pan/tilt head 100 needs to be adjusted to track the target, so that the first horizontal velocity needs to be calculated according to the horizontal maximum velocity, the fourth difference, and the horizontal field angle.
Specifically, the horizontal maximum velocity, the fourth difference, the horizontal field angle, and the first horizontal velocity satisfy the equation:
Figure BDA0002840749110000152
wherein speed _ p1At the first horizontal speed, max _ speed _ p is the horizontal maximum speed, dist _ p is the fourth difference value, and fov _ p is the horizontal field angle.
And S2062, estimating to obtain the speed of the second motor according to the current speed of the motor, the preset maximum speed of the motor and the preset speed amplification of the motor.
The current speed of the motor comprises a motor horizontal speed and a motor vertical speed, the second motor speed comprises a second horizontal speed and a second vertical speed, and the current speed of the motor and the second motor speed meet the formula:
speed_inc_p=speed_pres_p+max_speed_p×k
speed_inc_t=speed_pres_t+max_speed_t×k
the speed _ inc _ p is a second horizontal speed, the speed _ pres _ p is a motor horizontal speed, the speed _ inc _ t is a second vertical speed, the speed _ pres _ t is a motor vertical speed, and k is a preset motor speed amplification.
S2063, the moving speed is converted into a relative speed.
The moving speed is the speed of the target to be tracked in the plane coordinate system, and the relative speed is actually used for converting the plane coordinate system into the spherical coordinate system and representing the moving angle of the target to be tracked per second.
The moving speed includes a vertical moving speed and a horizontal moving speed, and the relative speed includes a horizontal relative speed and a vertical relative speed. Specifically, the moving speed and the relative speed satisfy the following equations:
obj_mot_speed_p=speed_obj_p×speed_coef_p
obj_mot_speed_t=speed_obj_t×speed_coef_t
wherein obj _ mot _ speed _ p is a horizontal relative speed, speed _ obj _ p is a horizontal moving speed, speed _ coef _ p is a preset horizontal conversion coefficient, obj _ mot _ speed _ t is a vertical relative speed, speed _ obj _ t is a vertical moving speed, and speed _ coef _ t is a preset vertical conversion coefficient.
And S2064, calculating to obtain a third motor speed according to the motion trend, the relative speed and the first motor speed.
Referring to fig. 7, S2064 includes:
s20641, if the movement tendency is the stationary tendency, the first vertical velocity is set as the third vertical velocity, and the first horizontal velocity is set as the third horizontal velocity.
It can be understood that when the target to be tracked is in a static state, the target can be accurately tracked by directly setting the first vertical speed as the third vertical speed and setting the first horizontal speed as the third horizontal speed.
S20642, if the movement tendency is an approaching tendency, setting a difference value between the first vertical velocity and the vertical relative velocity as a third vertical velocity, and setting a difference value between the first horizontal velocity and the horizontal relative velocity as a third horizontal velocity.
It can be understood that if the movement trend is a close trend, it indicates that the target to be tracked and the motor 140 are running in opposite directions, and in order to avoid that the motor speed is too high and the target to be tracked cannot be accurately captured and photographed, the relative speed needs to be subtracted from the first motor speed, so that the third motor speed can be obtained.
S20643, if the movement tendency is the distant tendency, the sum of the first vertical velocity and the vertical relative velocity is set as the third vertical velocity, and the sum of the first horizontal velocity and the horizontal relative velocity is set as the third horizontal velocity.
It can be understood that if the movement trend is a far trend, it indicates that the target to be tracked and the motor 140 are running in opposite directions, and in order to avoid that the motor speed is too slow and the target to be tracked cannot be accurately captured and photographed, a relative speed needs to be added to the first motor speed, so that a third motor speed can be obtained.
S2065, the smaller of the second motor speed and the third motor speed is set as the motor tracking speed.
Specifically, the smaller of the second horizontal velocity and the third horizontal velocity is set as the motor tracking velocity horizontal component, and the smaller of the second vertical velocity and the third vertical velocity is set as the motor tracking velocity vertical component.
And S207, adjusting the direction of the holder 100 based on the tracking position coordinates and the motor tracking speed.
It is understood that adjusting the direction of the pan/tilt head 100 based on the tracking position coordinates and the motor tracking speed may align the direction of the camera 300 with the target to be tracked, so that the target to be tracked may appear in the picture.
S208, sending the size information and the current position coordinates to the camera 300, so that the camera 300 adjusts the focal length based on the size information and the current position coordinates.
It can be understood that the focal length is adjusted by the size information and the current position coordinates of the target to be tracked, so that the camera 300 can shoot the clear target to be tracked. In order to execute the corresponding steps in the above embodiments and various possible manners, an implementation manner of the target tracking apparatus 400 is given below, and optionally, the target tracking apparatus 400 may adopt the device structure of the pan/tilt head 100 shown in fig. 1. Further, referring to fig. 8, fig. 8 is a functional block diagram of a target tracking apparatus 400 according to an embodiment of the present invention. It should be noted that the basic principle and the generated technical effect of the target tracking apparatus 400 provided in the present embodiment are the same as those of the above embodiments, and for the sake of brief description, no part of the present embodiment is mentioned, and corresponding contents in the above embodiments may be referred to. The target tracking apparatus 400 includes: a transceiver module 410 and a processing module 420.
The transceiver module 410 is configured to receive parameter information of a target to be tracked, which is sent by the control center 200.
It is understood that in an alternative embodiment, the transceiver module 410 may be used to perform S201.
The processing module 420 is configured to determine the current position coordinate, the size information, the moving speed, and the moving trend of the target to be tracked according to the parameter information.
It is to be appreciated that in an alternative embodiment, the processing module 420 may be configured to perform S202.
The processing module 420 is further configured to determine a predicted position coordinate of the target to be tracked according to the current position coordinate, the moving speed, the moving trend, and the acquired transmission delay.
It is understood that, in an alternative embodiment, the processing module 420 may be further configured to execute S203.
The processing module 420 is further configured to determine a motor tracking amplitude according to the size information and a preset magnification.
Specifically, the processing module 420 is configured to determine a product of the actual width and a preset multiplying factor as a horizontal tracking amplitude, and determine a product of the actual height and the preset multiplying factor as a vertical tracking amplitude.
It is to be understood that, in an alternative embodiment, the processing module 420 is further configured to execute S204, S2041, and S2042.
The processing module 420 is further configured to determine a tracking position coordinate according to the acquired camera position coordinate, the predicted position coordinate, and the motor tracking amplitude.
Specifically, the camera position coordinates include a first horizontal coordinate and a first vertical coordinate, the predicted position coordinates include a second horizontal coordinate and a second vertical coordinate, the tracking position coordinates include a third horizontal coordinate and a third vertical coordinate, and the motor tracking amplitude includes a horizontal tracking amplitude and a vertical tracking amplitude.
The processing module 420 is configured to calculate a difference between the first horizontal coordinate and the second horizontal coordinate to obtain a first difference, calculate a difference between the first vertical coordinate and the second vertical coordinate to obtain a second difference, and set the second horizontal coordinate as a third horizontal coordinate when an absolute value of the first difference is smaller than or equal to the horizontal tracking amplitude; otherwise, calculating to obtain a third horizontal coordinate according to the first difference, the first horizontal coordinate and the horizontal tracking amplitude; and setting the second vertical coordinate as a third vertical coordinate when the absolute value of the second difference is less than or equal to the vertical tracking amplitude; and otherwise, calculating to obtain a third vertical coordinate according to the second difference, the first vertical coordinate and the vertical tracking amplitude.
It is understood that, in an alternative embodiment, the processing module 420 can be further configured to execute steps S205, S2051, S2052, S2053, and S2054.
The processing module 420 is further configured to calculate a motor tracking speed according to the camera position coordinate, the predicted position coordinate, the moving speed, the movement trend, the preset maximum speed of the motor, and the acquired current speed of the motor.
Specifically, the processing module 420 is configured to calculate a first motor speed according to the camera position coordinate, the predicted position coordinate, and the preset field angle, obtain a second motor speed according to the current motor speed, the preset maximum motor speed, and the preset motor speed amplification, convert the moving speed into a relative speed, obtain a third motor speed according to the motion trend, the relative speed, and the first motor speed, and set a smaller value of the second motor speed and the third motor speed as the motor tracking speed.
In an optional implementation manner, the processing module 420 is further configured to determine a first offset and a second offset according to the vertical field angle and the horizontal field angle, respectively, and if a third difference between the second vertical coordinate and the first vertical coordinate is less than or equal to the first offset, determine that the first vertical speed is 0; otherwise, calculating a first vertical speed according to the vertical maximum speed, the third difference value and the vertical field angle; if the fourth difference between the second horizontal coordinate and the first horizontal coordinate is less than or equal to the second offset, determining that the first horizontal speed is 0; otherwise, calculating the first horizontal velocity according to the horizontal maximum velocity, the fourth difference value and the horizontal field angle.
In an alternative embodiment, the processing module 420 is further configured to set the first vertical speed as a third vertical speed and set the first horizontal speed as a third horizontal speed if the movement trend is a stationary trend; if the movement trend is an approaching trend, setting the difference value between the first vertical speed and the vertical relative speed as a third vertical speed, and setting the difference value between the first horizontal speed and the horizontal relative speed as a third horizontal speed; if the movement tendency is a distant tendency, the sum of the first vertical velocity and the vertical relative velocity is set as a third vertical velocity, and the sum of the first horizontal velocity and the horizontal relative velocity is set as a third horizontal velocity.
It is understood that in an alternative embodiment, the processing module 420 can be further configured to execute S206, S2061, S20611, S20612, S20613, S2062, S2063, S2064, S20641, S20642, S20643 and S2065.
The processing module 420 is configured to adjust the direction of the pan/tilt head 100 based on the tracking position coordinates and the motor tracking speed.
It is understood that in an alternative embodiment, the processing module 420 may be further configured to execute S207.
The transceiver module 410 is further configured to send the size information and the current position coordinates to the camera 300, so that the camera 300 adjusts the focal length based on the size information and the current position coordinates.
It is understood that, in an alternative embodiment, the transceiver module 410 may also be used to perform S208.
Fig. 9 is a block diagram of the cradle head 100. The holder 100 includes a memory 110, a processor 120, a communication unit 130, and a motor 140. The memory 110, the processor 120, the communication unit 130 and the motor 140 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines.
The memory 110 is used to store programs or data. The Memory 110 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
The processor 120 is used to read/write data or programs stored in the memory 110 and perform corresponding functions.
The communication unit 130 is configured to establish a communication connection between the cradle head 100 and another communication terminal via the network, and is configured to transceive data via the network.
The motor 140 is configured to operate under the control of the controller to change the angle of the pan/tilt head 100.
It should be understood that the configuration shown in fig. 9 is merely a schematic configuration of the head 100, and that the head 100 may also include more or fewer components than shown in fig. 9, or have a different configuration than shown in fig. 9. The components shown in fig. 9 may be implemented in hardware, software, or a combination thereof.
To sum up, the target tracking method, apparatus, pan/tilt and storage medium provided in the embodiments of the present invention receive the parameter information of the target to be tracked sent by the control center, determine the current position coordinate, size information, moving speed and moving trend of the target to be tracked according to the parameter information, determine the predicted position coordinate of the target to be tracked according to the current position coordinate, moving speed, moving trend and the obtained transmission delay, determine the motor tracking amplitude according to the size information and the preset multiplying power, determine the tracking position coordinate according to the obtained camera position coordinate, predicted position coordinate and motor tracking amplitude, calculate the motor tracking speed according to the camera position coordinate, predicted position coordinate, moving speed, moving trend, the preset maximum speed of the motor and the obtained current speed of the motor, adjust the direction of the pan/tilt based on the tracking position coordinate and the motor tracking speed, and sending the size information and the current position coordinates to the camera so that the camera adjusts the focal length based on the size information and the current position coordinates. The direction of the holder is adjusted by determining the tracking position coordinates and the motor tracking speed, so that the camera can be aligned to the target to be tracked, and the focal length is adjusted based on the size information and the current position coordinates of the camera, so that the camera can shoot clear images including the target to be tracked.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A target tracking method is applied to a holder, the holder is in communication connection with a control center and a camera, and the target tracking method comprises the following steps:
receiving parameter information of a target to be tracked, which is sent by the control center;
determining the current position coordinate, the size information, the moving speed and the moving trend of the target to be tracked according to the parameter information; determining the predicted position coordinate of the target to be tracked according to the current position coordinate, the moving speed, the moving trend and the acquired transmission delay;
determining the motor tracking amplitude according to the size information and the preset multiplying power;
determining a tracking position coordinate according to the acquired position coordinate of the camera, the predicted position coordinate and the motor tracking amplitude; the tracking position coordinate is a basis for adjusting the direction of the holder;
calculating a motor tracking speed according to the camera position coordinate, the predicted position coordinate, the moving speed, the motion trend, a preset motor maximum speed and the acquired current speed of the motor;
adjusting the direction of a pan-tilt based on the tracking position coordinates and the motor tracking speed so as to enable the direction of the camera to be aligned with the target to be tracked;
sending the size information and the current position coordinates to the camera so that the camera adjusts the focal length based on the size information and the current position coordinates;
the camera position coordinates comprise a first horizontal coordinate and a first vertical coordinate, the predicted position coordinates comprise a second horizontal coordinate and a second vertical coordinate, the tracking position coordinates comprise a third horizontal coordinate and a third vertical coordinate, and the motor tracking amplitude comprises a horizontal tracking amplitude and a vertical tracking amplitude; the step of determining the tracking position coordinate according to the acquired camera position coordinate, the predicted position coordinate and the motor tracking amplitude comprises the following steps:
calculating a difference value between the first horizontal coordinate and the second horizontal coordinate to obtain a first difference value;
calculating a difference value between the first vertical coordinate and the second vertical coordinate to obtain a second difference value;
setting the second horizontal coordinate as the third horizontal coordinate if the absolute value of the first difference is less than or equal to the horizontal tracking amplitude; otherwise, calculating to obtain the third horizontal coordinate according to the first difference, the first horizontal coordinate and the horizontal tracking amplitude;
setting the second vertical coordinate as the third vertical coordinate if the absolute value of the second difference is less than or equal to the vertical tracking amplitude; otherwise, calculating to obtain the third vertical coordinate according to the second difference, the first vertical coordinate and the vertical tracking amplitude;
the step of calculating the tracking speed of the motor according to the position coordinate of the camera, the predicted position coordinate, the moving speed, the motion trend, the preset maximum speed of the motor and the acquired current speed of the motor comprises the following steps:
calculating a first motor speed according to the camera position coordinate, the predicted position coordinate and a preset field angle;
estimating to obtain a second motor speed according to the current speed of the motor, the preset maximum speed of the motor and the preset motor speed amplification;
converting the moving speed into a relative speed;
calculating to obtain a third motor speed according to the motion trend, the relative speed and the first motor speed;
setting the smaller of the second motor speed and the third motor speed as the motor tracking speed.
2. The method of claim 1, wherein the step of calculating the third horizontal coordinate from the first difference, the first horizontal coordinate, and the horizontal tracking magnitude comprises:
setting the sum of the first horizontal coordinate and the horizontal tracking amplitude as the third horizontal coordinate if the first difference is less than 0;
if the first difference value is greater than 0, setting the difference between the first horizontal coordinate and the horizontal tracking amplitude as the third horizontal coordinate;
the step of calculating the third vertical coordinate according to the second difference, the first vertical coordinate and the vertical tracking amplitude comprises:
if the second difference is less than 0, setting the sum of the first vertical coordinate and the vertical tracking amplitude as the third vertical coordinate;
and if the second difference value is larger than 0, setting the difference between the first vertical coordinate and the vertical tracking amplitude as the third vertical coordinate.
3. The target tracking method according to claim 1, wherein the preset field angles include a vertical field angle and a horizontal field angle, the first motor speed includes a first vertical speed and a first horizontal speed, and the preset motor maximum speed includes a vertical maximum speed and a horizontal maximum speed;
the step of calculating the first motor speed according to the camera position coordinates, the predicted position coordinates and a preset field angle comprises:
determining a first offset and a second offset according to the vertical field angle and the horizontal field angle respectively;
if a third difference between the second vertical coordinate and the first vertical coordinate is less than or equal to the first offset, determining that the first vertical speed is 0; otherwise, calculating the first vertical speed according to the vertical maximum speed, the third difference and the vertical field angle;
if a fourth difference between the second horizontal coordinate and the first horizontal coordinate is less than or equal to the second offset, determining that the first horizontal speed is 0; otherwise, calculating the first horizontal velocity according to the horizontal maximum velocity, the fourth difference and the horizontal field angle.
4. The target tracking method according to claim 3, wherein the horizontal maximum velocity, the horizontal angle of view, and the first horizontal velocity satisfy the equation:
Figure FDA0003538382320000031
wherein speed _ p1At the first horizontal velocity, max _ speed _ p is the horizontal maximum velocity, dist _ p is the fourth difference value, fov _ p is the horizontal field angle;
the vertical maximum velocity, the vertical field angle, and the first vertical velocity satisfy the equation:
Figure FDA0003538382320000032
wherein speed _ t1At the first vertical speed, max _ speed _ t is the vertical maximum speed, dist _ t is the third difference value, and fov _ t is the vertical field angle.
5. The target tracking method of claim 1, wherein the first motor speed comprises a first vertical speed and a first horizontal speed, the third motor speed comprises a third vertical speed and a third horizontal speed, and the relative speeds comprise a horizontal relative speed and a vertical relative speed;
the step of calculating a third motor speed according to the motion trend, the relative speed and the first motor speed comprises the following steps:
if the movement trend is a stationary trend, setting the first vertical speed as the third vertical speed, and setting the first horizontal speed as the third horizontal speed;
if the movement trend is an approaching trend, setting the difference value between the first vertical speed and the vertical relative speed as the third vertical speed, and setting the difference value between the first horizontal speed and the horizontal relative speed as the third horizontal speed;
and if the movement trend is a far trend, setting the sum of the first vertical speed and the vertical relative speed as the third vertical speed, and setting the sum of the first horizontal speed and the horizontal relative speed as the third horizontal speed.
6. The target tracking method according to claim 1, wherein the moving speed includes a vertical moving speed and a horizontal moving speed, and the relative speed includes a horizontal relative speed and a vertical relative speed;
the moving speed and the relative speed satisfy the following formula:
obj_mot_speed_p=speed_obj_p×speed_coef_p
obj_mot_speed_t=speed_obj_t×speed_coef_t
wherein obj _ mot _ speed _ p is the horizontal relative speed, speed _ obj _ p is the horizontal moving speed, speed _ coef _ p is a preset horizontal conversion coefficient, obj _ mot _ speed _ t is the vertical relative speed, speed _ obj _ t is the vertical moving speed, and speed _ coef _ t is a preset vertical conversion coefficient.
7. The target tracking method of any one of claims 1 to 6, wherein the size information includes an actual height and an actual width;
the step of determining the motor tracking amplitude according to the size information and the preset multiplying power comprises the following steps:
determining the product of the actual width and the preset multiplying power as the horizontal tracking amplitude;
and determining the product of the actual height and the preset multiplying power as the vertical tracking amplitude.
8. A target tracking device, applied to a pan-tilt, the pan-tilt being in communication with a control center and a camera, the target tracking device comprising:
the receiving and transmitting module is used for receiving the parameter information of the target to be tracked, which is sent by the control center;
the processing module is used for determining the current position coordinate, the size information, the moving speed and the moving trend of the target to be tracked according to the parameter information;
the processing module is further used for determining a predicted position coordinate of the target to be tracked according to the current position coordinate, the moving speed, the motion trend and the acquired transmission delay;
the processing module is also used for determining the motor tracking amplitude according to the size information and the preset multiplying power;
the processing module is also used for determining a tracking position coordinate according to the acquired camera position coordinate, the predicted position coordinate and the motor tracking amplitude; the tracking position coordinate is a basis for adjusting the direction of the holder;
the processing module is also used for calculating the motor tracking speed according to the camera position coordinate, the predicted position coordinate, the moving speed, the motion trend, the preset maximum speed of the motor and the acquired current speed of the motor;
the processing module is further used for adjusting the direction of the holder based on the tracking position coordinates and the motor tracking speed so as to enable the direction of the camera to be aligned with the target to be tracked;
the transceiver module is further configured to send the size information and the current position coordinate to the camera, so that the camera adjusts a focal length based on the size information and the current position coordinate;
the camera position coordinates comprise a first horizontal coordinate and a first vertical coordinate, the predicted position coordinates comprise a second horizontal coordinate and a second vertical coordinate, the tracking position coordinates comprise a third horizontal coordinate and a third vertical coordinate, and the motor tracking amplitude comprises a horizontal tracking amplitude and a vertical tracking amplitude;
the processing module is specifically configured to: calculating a difference value between the first horizontal coordinate and the second horizontal coordinate to obtain a first difference value; calculating a difference value between the first vertical coordinate and the second vertical coordinate to obtain a second difference value; setting the second horizontal coordinate as the third horizontal coordinate if the absolute value of the first difference is less than or equal to the horizontal tracking amplitude; otherwise, calculating to obtain the third horizontal coordinate according to the first difference, the first horizontal coordinate and the horizontal tracking amplitude; setting the second vertical coordinate as the third vertical coordinate if the absolute value of the second difference is less than or equal to the vertical tracking amplitude; otherwise, calculating to obtain the third vertical coordinate according to the second difference, the first vertical coordinate and the vertical tracking amplitude;
the processing module is specifically further configured to: calculating a first motor speed according to the camera position coordinate, the predicted position coordinate and a preset field angle; estimating to obtain a second motor speed according to the current speed of the motor, the preset maximum speed of the motor and the preset motor speed amplification; converting the moving speed into a relative speed; calculating to obtain a third motor speed according to the motion trend, the relative speed and the first motor speed; setting the smaller of the second motor speed and the third motor speed as the motor tracking speed.
9. A pan-tilt head comprising a processor and a memory, said memory storing machine executable instructions executable by said processor to perform the steps of the target tracking method of any one of claims 1 to 7.
10. A storage medium having stored thereon a computer program, characterized in that the computer program, when being executed by a processor, carries out the steps of the object tracking method according to any one of claims 1-7.
CN202011491174.4A 2020-12-16 2020-12-16 Target tracking method and device, holder and storage medium Active CN112616019B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011491174.4A CN112616019B (en) 2020-12-16 2020-12-16 Target tracking method and device, holder and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011491174.4A CN112616019B (en) 2020-12-16 2020-12-16 Target tracking method and device, holder and storage medium

Publications (2)

Publication Number Publication Date
CN112616019A CN112616019A (en) 2021-04-06
CN112616019B true CN112616019B (en) 2022-06-03

Family

ID=75240892

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011491174.4A Active CN112616019B (en) 2020-12-16 2020-12-16 Target tracking method and device, holder and storage medium

Country Status (1)

Country Link
CN (1) CN112616019B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022141197A1 (en) * 2020-12-30 2022-07-07 深圳市大疆创新科技有限公司 Method and device for controlling cradle head, movable platform and storage medium
CN113284348B (en) * 2021-05-31 2021-11-16 浙江大华技术股份有限公司 Violation detection system, method and device, control equipment and storage medium
CN113485465A (en) * 2021-06-01 2021-10-08 浙江大华技术股份有限公司 Camera holder control method, device, equipment and storage medium
CN113347357A (en) * 2021-06-01 2021-09-03 安徽创世科技股份有限公司 System and method for automatically tracking camera in linkage mode along with target movement
CN113724324B (en) * 2021-08-30 2023-12-19 杭州华橙软件技术有限公司 Control method and device of cradle head, storage medium and electronic device
CN113744299B (en) * 2021-09-02 2022-07-12 上海安维尔信息科技股份有限公司 Camera control method and device, electronic equipment and storage medium
CN114245016A (en) * 2021-12-21 2022-03-25 睿魔智能科技(深圳)有限公司 Control method and system for video shooting, computer equipment and storage medium
CN114339057B (en) * 2022-03-10 2022-07-29 天芯宜智能网络科技(天津)有限公司 Three-dimensional positioning synchronous tracking camera system and control method
CN114938429B (en) * 2022-05-20 2023-10-24 重庆紫光华山智安科技有限公司 Target tracking method, system, equipment and computer readable medium
CN117714883A (en) * 2022-09-07 2024-03-15 华为技术有限公司 Video camera control method and related device
CN117177069B (en) * 2023-11-02 2024-01-30 百鸟数据科技(北京)有限责任公司 Camera automatic tracking method and system based on ONVIF protocol

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102708685A (en) * 2012-04-27 2012-10-03 南京航空航天大学 Device and method for detecting and snapshotting violation vehicles
CN108259703A (en) * 2017-12-31 2018-07-06 深圳市秦墨科技有限公司 A kind of holder with clapping control method, device and holder
CN109151375A (en) * 2017-06-16 2019-01-04 杭州海康威视数字技术股份有限公司 A kind of target object grasp shoot method, device and video monitoring equipment
CN110930428A (en) * 2020-02-19 2020-03-27 成都纵横大鹏无人机科技有限公司 Target tracking method and device, electronic equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6861818B2 (en) * 2002-01-08 2005-03-01 University Of Rochester Stepper motor controller system and a method thereof
CN102143324A (en) * 2011-04-07 2011-08-03 天津市亚安科技电子有限公司 Method for automatically and smoothly tracking target by cradle head
CN103679687A (en) * 2012-09-18 2014-03-26 杭州海康威视数字技术股份有限公司 Target tracking method of intelligent tracking high-speed dome camera
CN105678808A (en) * 2016-01-08 2016-06-15 浙江宇视科技有限公司 Moving object tracking method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102708685A (en) * 2012-04-27 2012-10-03 南京航空航天大学 Device and method for detecting and snapshotting violation vehicles
CN109151375A (en) * 2017-06-16 2019-01-04 杭州海康威视数字技术股份有限公司 A kind of target object grasp shoot method, device and video monitoring equipment
CN108259703A (en) * 2017-12-31 2018-07-06 深圳市秦墨科技有限公司 A kind of holder with clapping control method, device and holder
CN110930428A (en) * 2020-02-19 2020-03-27 成都纵横大鹏无人机科技有限公司 Target tracking method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112616019A (en) 2021-04-06

Similar Documents

Publication Publication Date Title
CN112616019B (en) Target tracking method and device, holder and storage medium
US7385626B2 (en) Method and system for performing surveillance
US20100013917A1 (en) Method and system for performing surveillance
US8396253B2 (en) Method and apparatus for recognizing location of user
KR101071352B1 (en) Apparatus and method for tracking object based on PTZ camera using coordinate map
JP5790761B2 (en) Distributed image processing system
KR101530255B1 (en) Cctv system having auto tracking function of moving target
CN107404615B (en) Image recording method and electronic equipment
US20070296813A1 (en) Intelligent monitoring system and method
WO2018103233A1 (en) Virtual reality-based viewing method, device, and system
JP2020031421A (en) Method and camera system combining views from plurality of cameras
CN101272483B (en) System and method for managing moving surveillance cameras
KR102282470B1 (en) Camera apparatus and method of object tracking using the same
JP2001285850A (en) Device and method for automatic following, and recording medium for recording automatic following program
CN110771143A (en) Control method of handheld cloud deck, handheld cloud deck and handheld equipment
CN112637500A (en) Image processing method and device
JP2002374521A (en) Method and device for monitoring mobile object
KR20100121086A (en) Ptz camera application system for photographing chase using sound source recognition and method therefor
CN112640419B (en) Following method, movable platform, device and storage medium
JP6367037B2 (en) Image processing apparatus, image processing program, electronic device, and image processing method
CN115589532A (en) Anti-shake processing method and device, electronic equipment and readable storage medium
CN112702571B (en) Monitoring method and device
US20120026292A1 (en) Monitor computer and method for monitoring a specified scene using the same
JP5364927B2 (en) Motion compensation apparatus and method
KR20130102743A (en) Monitoring system for controlling the privacy mask display and method for using the same

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant