Target tracking method and device and electronic equipment

Through the coordinated work of the first and second image acquisition devices, the difference between the video frame prediction and the actual position is utilized to adjust the monitoring range, solving the problem of tracking deviation between the gun camera and the ball camera, and achieving efficient and stable tracking of the target object.

CN120692452APending Publication Date: 2025-09-23HANGZHOU MICROIMAGE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510733519.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-03
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

In the prior art, gun cameras and ball cameras are prone to deviation when tracking target objects, resulting in insufficient tracking continuity and stability.

Method used

Through the collaborative work of the first and second image acquisition devices, the difference between the predicted and actual positions of consecutive video frames is used to determine the target tracking parameters and adjust the monitoring range to ensure accurate tracking, including technical means such as coordinate transformation and weighted summation.

Benefits of technology

The accuracy and stability of target object tracking are improved, ensuring the consistency and smoothness of tracking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120692452A_ABST
    Figure CN120692452A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and particularly provides a target tracking method and device and electronic equipment. The method comprises the following steps: acquiring a first prediction position of a target object based on video frames of the target object, which are continuously acquired for N times, determining a first actual position of the target object according to the acquired (N + 1) th video frame of the target object; determining a target tracking parameter based on the first predicted position and the first actual position, and a latest second predicted position and a second actual position of the target object determined by a second image acquisition device; the target tracking parameter is used for adjusting the monitoring range of the first image acquisition device or the second image acquisition device, so that the first image acquisition device or the second image acquisition device tracks the target object. In this way, the continuity and stability of target object tracking can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, device and electronic device for target tracking. Background Art

[0002] In some surveillance scenarios, the gun camera has a wide viewing angle and can monitor a larger range, while the dome camera can use its 360° rotation and zoom features to capture details and continuously track the target object. Therefore, the target object is usually continuously tracked using a gun camera and a dome camera respectively.

[0003] Under related technologies, when a target object such as a person or vehicle enters the monitoring range of the gun camera, the gun camera usually detects the position of the target object in real time based on the monitoring screen, and controls the rotation of the dome camera based on the real-time position of the target object to control the target object to be located in the center of the dome camera's monitoring field of view, thereby achieving continuous tracking of the target object.

[0004] However, with this approach, when there is a deviation in the gun detection, the continuity and stability of the target object tracking cannot be guaranteed. Summary of the Invention

[0005] To solve the above technical problems, the embodiments of the present application provide a method, device and electronic device for target tracking.

[0006] In one aspect, an embodiment of the present application provides a method for target tracking, which is applied to a first image acquisition device, wherein the first image acquisition device is connected to a second image acquisition device, and the monitoring ranges of the first image acquisition device and the second image acquisition device overlap. The method includes:

[0007] Obtaining a first predicted position of the target object based on N consecutive captured video frames of the target object;

[0008] Determining a first actual position of the target object according to the N+1th video frame captured of the target object; the N+1th video frame is a next video frame captured after capturing video frames of the target object N times in a row;

[0009] Based on the first predicted position and the first actual position, as well as the latest second predicted position and the second actual position of the target object determined by the second image acquisition device, the target tracking parameters are determined; the target tracking parameters are used to adjust the monitoring range of the first image acquisition device or the second image acquisition device so that the first image acquisition device or the second image acquisition device tracks the target object.

[0010] In one embodiment, determining target tracking parameters based on the first predicted position and the first actual position, and the latest second predicted position and the second actual position of the target object includes:

[0011] Obtaining a first prediction deviation based on a difference between the first predicted position and the first actual position;

[0012] Obtaining a second prediction deviation based on a difference between the second predicted position and the second actual position;

[0013] Target tracking parameters are determined based on the first actual position, the first predicted deviation, the second actual position, and the second predicted deviation.

[0014] In one embodiment, determining target tracking parameters based on the first actual position, the first predicted deviation, the second actual position, and the second predicted deviation includes:

[0015] If the first prediction deviation is lower than the second prediction deviation, the first actual position is determined as the target tracking parameter;

[0016] If the first prediction deviation is not lower than the second prediction deviation, the second actual position is determined as the target tracking parameter.

[0017] In one embodiment, determining target tracking parameters based on the first actual position, the first predicted deviation, the second actual position, and the second predicted deviation includes:

[0018] Determining weights corresponding to the first actual position and the second actual position respectively according to the first prediction deviation and the second prediction deviation;

[0019] According to the weights corresponding to the first actual position and the second actual position, the first actual position and the second actual position are weightedly summed to obtain the target tracking parameter.

[0020] In one embodiment, after determining the target tracking parameters, the method further includes:

[0021] Use any of the following:

[0022] If the first image acquisition device is the device to be adjusted, controlling the rotation component in the first image acquisition device to rotate according to the target tracking parameter to adjust the monitoring range of the first image acquisition device;

[0023] If the second image acquisition device is the device to be adjusted, a rotation instruction including target tracking parameters is sent to the second image acquisition device, so that the second image acquisition device controls the rotation component set according to the target tracking parameters to rotate, thereby adjusting the monitoring range of the second image acquisition device;

[0024] The first image acquisition device or the second image acquisition device is a device to be adjusted, and a rotating component for adjusting the monitoring range is provided in the device to be adjusted.

[0025] In one embodiment, before determining the target tracking parameters based on the first predicted position and the first actual position, and the latest second predicted position and the second actual position of the target object, the method further includes:

[0026] Performing coordinate transformation on the first actual position according to a first coordinate transformation relationship between the first coordinate system and the spatial coordinate system to obtain a transformed first actual position;

[0027] transforming the first predicted position according to the first coordinate transformation relationship to obtain a transformed first predicted position;

[0028] The first coordinate system is a two-dimensional coordinate system established for the video frames captured by the first image capture device; the spatial coordinate system is established for the device to be adjusted, and the spatial coordinates in the spatial coordinate system include horizontal rotation angles and vertical rotation angles.

[0029] In one embodiment, before determining the target tracking parameters based on the first predicted position and the first actual position, and the latest second predicted position and the second actual position of the target object, the method further includes:

[0030] Performing coordinate transformation on the second actual position according to a second coordinate transformation relationship between the second coordinate system and the spatial coordinate system to obtain a transformed second actual position;

[0031] transforming the second predicted position according to the second coordinate transformation relationship to obtain a transformed second predicted position;

[0032] The second coordinate system is a two-dimensional coordinate system established for the video frames captured by the second image capture device.

[0033] In one embodiment, the device to be adjusted is a dome camera, and the rotating assembly is a pan / tilt head in the dome camera; the device not to be adjusted in the first image acquisition device and the second image acquisition device is a gun camera.

[0034] In one embodiment, after determining the target tracking parameters, the method further includes:

[0035] If it is determined that the most recently acquired N+1 frames of video do not meet the position detection condition, and the most recently acquired N+1 frames of video by the second image acquisition device meet the position detection condition, then the most recently acquired second actual position obtained through the connection is determined as a new target tracking parameter;

[0036] The position detection condition is set according to whether the video frame contains the target object.

[0037] In one embodiment, after determining the target tracking parameters, the method further includes:

[0038] If it is determined that the most recently acquired N+1th video frame meets the position detection condition, then a new first actual position is determined based on the most recently acquired N+1th video frame;

[0039] If the N+1 video frames most recently acquired by the second image acquisition device do not meet the position detection condition, the new first actual position is determined as a new target tracking parameter.

[0040] In one aspect, an embodiment of the present application provides a target tracking device, which is applied to a first image acquisition device, the first image acquisition device is connected to a second image acquisition device, and the monitoring ranges of the first image acquisition device and the second image acquisition device overlap, and the device includes:

[0041] A prediction unit, configured to obtain a first predicted position of the target object based on N consecutively captured video frames of the target object;

[0042] a detection unit, configured to determine a first actual position of the target object based on an N+1th video frame captured of the target object; the N+1th video frame is a next video frame captured after N consecutive video frames of the target object are captured;

[0043] a determining unit, configured to determine target tracking parameters based on the first predicted position and the first actual position, and the latest second predicted position and the second actual position of the target object;

[0044] Among them, the second predicted position and the second actual position are determined by the second image acquisition device, and the target tracking parameter is used to adjust the monitoring range of the first image acquisition device or the second image acquisition device so that the first image acquisition device or the second image acquisition device tracks the target object.

[0045] In one embodiment, the determining unit is configured to:

[0046] Obtaining a first prediction deviation based on a difference between the first predicted position and the first actual position;

[0047] Obtaining a second prediction deviation based on a difference between the second predicted position and the second actual position;

[0048] Target tracking parameters are determined based on the first actual position, the first predicted deviation, the second actual position, and the second predicted deviation.

[0049] In one embodiment, the determining unit is configured to:

[0050] If the first prediction deviation is lower than the second prediction deviation, the first actual position is determined as the target tracking parameter;

[0051] If the first prediction deviation is not lower than the second prediction deviation, the second actual position is determined as the target tracking parameter.

[0052] In one embodiment, the determining unit is configured to:

[0053] Determining weights corresponding to the first actual position and the second actual position respectively according to the first prediction deviation and the second prediction deviation;

[0054] According to the weights corresponding to the first actual position and the second actual position, the first actual position and the second actual position are weightedly summed to obtain the target tracking parameter.

[0055] In one embodiment, the determining unit is further configured to:

[0056] Use any of the following:

[0057] If the first image acquisition device is the device to be adjusted, controlling the rotation component in the first image acquisition device to rotate according to the target tracking parameter to adjust the monitoring range of the first image acquisition device;

[0058] If the second image acquisition device is the device to be adjusted, a rotation instruction including target tracking parameters is sent to the second image acquisition device, so that the second image acquisition device controls the rotation component set according to the target tracking parameters to rotate, thereby adjusting the monitoring range of the second image acquisition device;

[0059] The first image acquisition device or the second image acquisition device is a device to be adjusted, and a rotating component for adjusting the monitoring range is provided in the device to be adjusted.

[0060] In one embodiment, the determining unit is further configured to:

[0061] Performing coordinate transformation on the first actual position according to a first coordinate transformation relationship between the first coordinate system and the spatial coordinate system to obtain a transformed first actual position;

[0062] transforming the first predicted position according to the first coordinate transformation relationship to obtain a transformed first predicted position;

[0063] The first coordinate system is a two-dimensional coordinate system established for the video frames captured by the first image capture device; the spatial coordinate system is established for the device to be adjusted, and the spatial coordinates in the spatial coordinate system include horizontal rotation angles and vertical rotation angles.

[0064] In one embodiment, the determining unit is further configured to:

[0065] Performing coordinate transformation on the second actual position according to a second coordinate transformation relationship between the second coordinate system and the spatial coordinate system to obtain a transformed second actual position;

[0066] transforming the second predicted position according to the second coordinate transformation relationship to obtain a transformed second predicted position;

[0067] The second coordinate system is a two-dimensional coordinate system established for the video frames captured by the second image capture device.

[0068] In one embodiment, the device to be adjusted is a dome camera, and the rotating assembly is a pan / tilt head in the dome camera; the device not to be adjusted in the first image acquisition device and the second image acquisition device is a gun camera.

[0069] In one embodiment, the determining unit is further configured to:

[0070] If it is determined that the most recently acquired N+1 frames of video do not meet the position detection condition, and the most recently acquired N+1 frames of video by the second image acquisition device meet the position detection condition, then the most recently acquired second actual position obtained through the connection is determined as a new target tracking parameter;

[0071] The position detection condition is set according to whether the video frame contains the target object.

[0072] In one embodiment, the determining unit is further configured to:

[0073] If it is determined that the most recently acquired N+1th video frame meets the position detection condition, then a new first actual position is determined based on the most recently acquired N+1th video frame;

[0074] If the N+1 video frames most recently acquired by the second image acquisition device do not meet the position detection condition, the new first actual position is determined as a new target tracking parameter.

[0075] In one aspect, an embodiment of the present application provides an electronic device, including:

[0076] processor; and

[0077] A memory stores computer instructions, wherein the computer instructions are used to enable a processor to execute the steps of the method provided in any of the various optional implementations of target tracking described above.

[0078] On the one hand, an embodiment of the present application provides a computer-readable storage medium storing computer instructions, which are used to enable a computer to execute the steps of the method provided in any of the various optional implementations of target tracking described above.

[0079] On the one hand, an embodiment of the present application provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the steps of the method provided in any of the various optional implementations of target tracking described above.

[0080] The target tracking method in the embodiment of the present application includes obtaining a first predicted position of the target object based on N consecutive video frames of the target object; determining a first actual position of the target object based on the N+1th video frame of the target object; the N+1th video frame being the next video frame captured after the N consecutive video frames of the target object are captured; determining target tracking parameters based on the first predicted position and the first actual position, as well as the latest second predicted position and the second actual position of the target object determined by the second image acquisition device; the target tracking parameters are used to adjust the monitoring range of the first image acquisition device or the second image acquisition device so that the first image acquisition device or the second image acquisition device tracks the target object. In this way, the first image acquisition device and the second image acquisition device are combined to give full play to the detection capability of each image acquisition device, improve the accuracy of target object tracking, make tracking more coherent and stable, and improve the continuity and stability of target object tracking. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] Figure 1 This is a flow chart of a target tracking method in an embodiment of the present application.

[0082] Figure 2 This is an example diagram of an image acquisition device in an embodiment of the present application.

[0083] Figure 3 It is an interactive flow chart of a target tracking method in an embodiment of the present application.

[0084] Figure 4 This is a flow chart of a method for detecting a gun in an embodiment of the present application.

[0085] Figure 5 This is a flow chart of a method for ball camera detection in an embodiment of the present application.

[0086] Figure 6 This is a flow chart of a method for rotating a ball camera in an embodiment of the present application.

[0087] Figure 7 This is a structural block diagram of a target tracking device in an embodiment of the present application.

[0088] Figure 8 It is a structural diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0089] The technical solutions of the present application will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. In addition, the technical features involved in the different embodiments of the present application described below can be combined with each other as long as they do not conflict with each other.

[0090] In some surveillance scenarios, target objects are usually tracked through gun cameras and dome cameras.

[0091] Box cameras are fixed-angle, bullet-shaped cameras with a fixed field of view. The focal length of a box camera's lens is typically smaller, resulting in a wider field of view, but at shorter distances. Dome cameras are spherical cameras that can rotate 360° horizontally and within a certain vertical range, offering a flexible field of view. Dome cameras typically have a zoom lens, allowing for longer-range observation and close-up capture.

[0092] In one related technology, a dome camera typically uses a bolt-action camera to guide the tracking of a target object, meaning the dome camera lacks autonomous tracking capabilities. Specifically, when a target object enters the bolt-action camera's monitoring range, the bolt-action camera detects the target object's position in real time based on the surveillance footage. Based on the target object's real-time position, the bolt-action camera controls its rotation to keep the target object centered within the camera's field of view, enabling the dome camera to continuously track the target object. However, this bolt-action camera's detection can be skewed, making it impossible to guarantee the camera's consistent and stable tracking of the target object.

[0093] Furthermore, under another related technology, after the gun camera guides the dome camera to track the target object for a period of time, it can switch to the dome camera independently tracking the target object. Specifically, after the gun camera guides the dome camera to track the target object for a period of time, the gun camera stops guiding the dome camera operation, and the dome camera can detect the position of the target object in real time based on its own monitoring image and perform rotation operations based on the real-time position of the target object.

[0094] However, during the autonomous tracking phase of the dome camera, deviations may occur in the dome camera's detection, and therefore, the continuity and stability of the dome camera's tracking of the target object cannot be guaranteed.

[0095] Based on the defects of the above-mentioned related technologies, the embodiments of the present application provide a method, device and electronic device for target tracking, aiming to ensure the continuity and stability of target object tracking.

[0096] A target tracking method is provided in an embodiment of the present application. The method can be applied to a first image acquisition device, which can be any type of electronic device, and can be any type of device suitable for implementation, such as a terminal device and a server, etc., which will not be described in detail in the present application.

[0097] In an embodiment of the present application, the present invention is applied to a scenario including a first image acquisition device and a second image acquisition device. Optionally, the first image acquisition device and the second image acquisition device can be located in the same electronic device, or can be independent of each other. There is a connection (e.g., a communication connection) between the first image acquisition device and the second image acquisition device, and the monitoring ranges of the first image acquisition device and the second image acquisition device overlap. For example, the first image acquisition device can be a dome camera, and the second image acquisition device can be a gun camera.

[0098] If the first image acquisition device and the second image acquisition device are located in the same electronic device, a controller may be provided in the electronic device. If the two are different independent devices, a controller is provided in the first image acquisition device, and optionally, a controller may also be provided in the second image acquisition device.

[0099] The first image acquisition device or the second image acquisition device is the device to be adjusted, and the device to be adjusted is provided with a rotating component for adjusting the monitoring range. The monitoring range of the first image acquisition device or the second image acquisition device other than the device to be adjusted can be a specified range.

[0100] In one application scenario, the device to be adjusted may be a dome camera, and the rotating component may be a pan / tilt head in the dome camera; the device not to be adjusted in the first image acquisition device and the second image acquisition device may be a gun camera.

[0101] In one application scenario, the first image acquisition device and the second image acquisition device are located in the same electronic device. The electronic device may include at least one first image acquisition device and at least one second image acquisition device. For example, the electronic device may be a gun-ball linkage system. The gun-ball linkage system may include at least one gun camera and at least one ball camera.

[0102] In one embodiment, the controller in the electronic device can determine the latest first actual position of the target object and its corresponding first predicted position based on multiple video frames captured by the first image acquisition device, and then determine the first predicted deviation based on the first actual position and the first predicted position. At the same time, it can also determine the latest second actual position of the target object and its corresponding second predicted position based on the multiple video frames captured by the second image acquisition device, and then determine the second predicted deviation based on the second actual position and the second predicted position. In addition, the controller can determine the target tracking parameters based on the first actual position and its corresponding first predicted deviation, and the second actual position and its corresponding second predicted deviation, and adjust the monitoring range of the device to be adjusted based on the target tracking parameters.

[0103] In another application scenario, the first image acquisition device and the second image acquisition device are two independent devices, the first image acquisition device is provided with a first controller, and the second image acquisition device is provided with a second controller.

[0104] In one embodiment, the first controller can determine the latest first actual position of the target object and its corresponding first predicted position based on multiple video frames captured by the first image acquisition device. At the same time, the second controller can determine the latest second actual position of the target object and its corresponding second predicted position based on multiple video frames captured by the second image acquisition device. The first controller receives the second predicted position and the second actual position sent by the second controller, and determines the target tracking parameters based on the first predicted position, the first actual position, the second predicted position and the second actual position, and adjusts the monitoring range of the device to be adjusted based on the target tracking parameters.

[0105] In another embodiment, the first controller can determine the latest first actual position of the target object and its corresponding first predicted position based on the multiple video frames captured by the first image acquisition device, and then determine the first prediction deviation based on the first actual position and the first predicted position. At the same time, the second controller can determine the latest second actual position of the target object and its corresponding second predicted position based on the multiple video frames captured by the second image acquisition device, and then determine the second prediction deviation based on the second actual position and the second predicted position. The first controller receives the second actual position and the second predicted deviation sent by the second controller, and determines the target tracking parameters based on the first actual position, the first predicted deviation, the second actual position and the second predicted deviation.

[0106] See Figure 1 The following is a flow chart of a target tracking method in an embodiment of the present application. Figure 1 The method is described below. The specific implementation process of the method is as follows:

[0107] Step 101: Obtain a first predicted position of the target object based on N consecutively captured video frames of the target object.

[0108] In one embodiment, if the first image acquisition device detects that the target object is included in all of the N consecutive video frames acquired most recently, the next position of the target object is predicted based on the N video frames to obtain a first predicted position, where N is a positive integer.

[0109] Optionally, the captured video frames can be periodically extracted from the monitored video at specified intervals. Optionally, the target object can be a pre-set specified object, such as a specified person, or a specified type of object that enters the monitoring range, such as a person or an animal, or any moving object that enters the monitoring range. In actual applications, the target object can be set according to the actual application scenario and is not limited here.

[0110] Specifically, the first image acquisition device continuously captures video frames in real time and detects the presence of a target object based on each video frame in real time. When a target object is detected, the first image acquisition device determines the current actual position of the target object. If it is determined that the target object is contained in the most recent N consecutive video frames, the target object's movement speed (including speed magnitude and movement direction) is determined based on the detected positions of the target object. The next position of the target object is predicted based on the current actual position and movement speed of the target object to obtain a first predicted position.

[0111] Step 102: determining a first actual position of the target object according to the N+1th video frame captured of the target object; the N+1th video frame is the next video frame captured after capturing video frames of the target object N times in succession.

[0112] In one embodiment, the first image acquisition device continuously acquires video frames in real time, and after acquiring the above-mentioned N frames of video frames, acquires the next video frame, i.e., the N+1th frame of video frame, and detects the position of the target object based on the acquired N+1th frame of video frame to obtain the first actual position.

[0113] Furthermore, based on a principle similar to that of the first image acquisition device determining the first actual position and the first predicted position, the second image acquisition device may also determine the second actual position and the second predicted position based on the captured multiple video frames.

[0114] In one embodiment, if the second image acquisition device detects that the target object is contained in the most recently acquired N consecutive video frames, the next position of the target object is predicted based on the N video frames to obtain a second predicted position; the second image acquisition device detects the position of the target object based on the acquired N+1th video frame to obtain a second actual position.

[0115] During a single cycle of target tracking, the second image acquisition device determines the second actual position and the second predicted position based on the latest N+1 frames of video frames acquired, and the first image acquisition device determines the first actual position and the first predicted position based on the latest N+1 frames of video frames acquired, and receives the second actual position and the second predicted position. It should be noted that since the latest N+1 frames of video frames acquired by the first image acquisition device and the second image acquisition device are both acquired in real time, there may be a certain time delay when the first image acquisition device receives the second actual position and the second predicted position. Therefore, the first actual position and the first predicted position can also be adjusted according to a specified time delay or a timestamp corresponding to the second actual position. For example, the first actual position and the first predicted position determined based on the N+1 frames of video frames acquired at an earlier time can be selected according to the time delay.

[0116] Furthermore, it is possible to pre-establish a two-dimensional coordinate system for each of the two image acquisition devices, establish a spatial coordinate system for the device to be adjusted, and establish a coordinate transformation relationship between each two-dimensional coordinate and the spatial coordinate system to achieve calibration of the two image acquisition devices. The spatial coordinates in the spatial coordinate system include horizontal and vertical rotation angles.

[0117] In one embodiment, coordinate transformation is performed on the first actual position and the first predicted position respectively, and the implementation process may include:

[0118] According to a first coordinate transformation relationship between the first coordinate system and the spatial coordinate system, the first actual position is coordinate transformed to obtain a transformed first actual position; according to the first coordinate transformation relationship, the first predicted position is transformed to obtain a transformed first predicted position.

[0119] The first coordinate system is a two-dimensional coordinate system established for the video frames captured by the first image capture device.

[0120] In one embodiment, coordinate transformation is performed on the second actual position and the second predicted position respectively, and the implementation process may include:

[0121] According to the second coordinate transformation relationship between the second coordinate system and the spatial coordinate system, the second actual position is coordinate transformed to obtain the transformed second actual position; according to the second coordinate transformation relationship, the second predicted position is transformed to obtain the transformed second predicted position.

[0122] The second coordinate system is a two-dimensional coordinate system established for the video frames captured by the second image capture device.

[0123] Optionally, the first image acquisition device may be rotatable, such as a dome camera. The second image acquisition device may be configured to capture video frames in a fixed optical acquisition direction, such as a gun camera or a fixed, non-rotating dome camera. In practical applications, the second image acquisition device may also be arbitrarily movable or rotatable to capture video frames in any optical acquisition direction, without limitation herein.

[0124] For example, the second image acquisition device is fixedly installed and is used to acquire video frames within a fixed monitoring range according to a fixed optical acquisition direction. The second coordinate system can be established with the center of the monitoring range as the coordinate origin.

[0125] It should be noted that the second actual position and the second predicted position can be coordinate-converted in the first image device or the second image device. For example, the second image acquisition device converts the second actual position and the second predicted position. This is not limited here.

[0126] Step 103: Determine target tracking parameters based on the first predicted position and the first actual position, as well as the latest second predicted position and the second actual position of the target object determined by the second image acquisition device; the target tracking parameters are used to adjust the monitoring range of the first image acquisition device or the second image acquisition device so that the first image acquisition device or the second image acquisition device tracks the target object.

[0127] In one embodiment, when executing step 103, the following steps may be performed:

[0128] S1031: Obtain a first prediction deviation based on a difference between the first predicted position and the first actual position.

[0129] In one implementation, the spatial distance between the first actual position and the first predicted position is used as the first prediction deviation.

[0130] S1032: Obtain a second prediction deviation based on the difference between the second predicted position and the second actual position.

[0131] Furthermore, the first image acquisition device may also directly receive the second actual position and the second predicted deviation sent by the second image acquisition device.

[0132] That is, the second image acquisition device may further determine a second prediction deviation based on the difference between the second predicted position and the second actual position, and transmit the second actual position and the second prediction deviation to the first image acquisition device. The second prediction deviation may be determined by the first image acquisition device or the second image acquisition device, and is not limited herein.

[0133] In the embodiment of the present application, the second prediction deviation can be determined based on a principle similar to that of determining the first prediction deviation, which will not be described in detail here.

[0134] S1033: Determine target tracking parameters according to the first actual position, the first predicted deviation, the second actual position, and the second predicted deviation.

[0135] In one implementation, when executing step S1033, any of the following methods may be used:

[0136] Method 1: If the first prediction deviation is lower than the second prediction deviation, the first actual position is determined as the target tracking parameter; if the first prediction deviation is not lower than the second prediction deviation, the second actual position is determined as the target tracking parameter.

[0137] Method 2: Determine the weights corresponding to the first actual position and the second actual position respectively according to the first prediction deviation and the second prediction deviation; perform weighted summation of the first actual position and the second actual position according to the weights corresponding to the first actual position and the second actual position to obtain the target tracking parameters.

[0138] Furthermore, after the target tracking parameters are determined, the monitoring range of the first image acquisition device or the second image acquisition device is adjusted according to the target tracking parameters.

[0139] In one embodiment, when adjusting the monitoring range of the device to be adjusted, any of the following methods may be used:

[0140] Method 1: If the first image acquisition device is the device to be adjusted, the rotation component in the first image acquisition device is controlled to rotate according to the target tracking parameters to adjust the monitoring range of the first image acquisition device.

[0141] For example, the rotating component may be a pan / tilt head.

[0142] In this way, the target object can be controlled to be within the monitoring range of the second image acquisition device by rotating the first image acquisition device.

[0143] Method 2: If the second image acquisition device is the device to be adjusted, a rotation instruction containing target tracking parameters is sent to the second image acquisition device, so that the second image acquisition device rotates according to the rotation component set by the target tracking parameters to adjust the monitoring range of the second image acquisition device.

[0144] In this way, the target object can be controlled to be within the monitoring range of the second image acquisition device by rotating the second image acquisition device.

[0145] Furthermore, after the monitoring range of the device to be adjusted is adjusted, steps 101 to 103 may be executed cyclically to adjust the monitoring range of the device to be adjusted in real time.

[0146] Furthermore, when adjusting the monitoring range of the device to be adjusted in real time, if one image acquisition device fails to detect the target object, the actual position of the target object successfully detected by another image acquisition device can be directly used to determine the target tracking parameters, and the monitoring range of the device to be adjusted can be adjusted based on the target tracking parameters.

[0147] In one implementation, any of the following methods may be used:

[0148] Method 1: If it is determined that the latest N+1 video frames collected do not meet the position detection conditions, and the latest N+1 video frames collected by the second image acquisition device meet the position detection conditions, the latest second actual position obtained through the connection will be determined as the new target tracking parameter.

[0149] The position detection condition is set according to whether the video frame contains the target object.

[0150] In one embodiment, the position detection condition is that the target object is included in the latest N+1 video frames. In actual applications, the position detection condition can be set according to the actual application scenario and is not limited here.

[0151] Method 2: If it is determined that the latest N+1 video frames collected meet the position detection conditions, the new first actual position is determined based on the latest N+1 video frames collected; if the latest N+1 video frames collected by the second image acquisition device do not meet the position detection conditions, the new first actual position is determined as the new target tracking parameter.

[0152] Furthermore, when the first image acquisition device cannot detect the target object from the latest acquired video frame, it may only perform real-time monitoring, but stop detecting the target object from the video frame.

[0153] In one embodiment, if the first image acquisition device does not detect the target object from the latest acquired video frame, the first image acquisition device switches to a detection termination state to stop detecting the target object.

[0154] Furthermore, the second image acquisition device can continuously acquire video frames and detect in real time whether there is a target object. If the first image acquisition device determines that the second image acquisition device continuously detects the target object and is currently in a detection termination state, the detection can be restarted.

[0155] In one embodiment, when the first image acquisition device is in a detection termination state, if the first image acquisition device receives a new second actual position determined based on a video frame acquired by the second image acquisition device, it switches to a detection start state to start detecting the target object.

[0156] Furthermore, the first image acquisition device may also continuously detect in real time whether a target object exists based on the acquired video frames, that is, the first image acquisition device is always in a detection state.

[0157] Furthermore, the lens parameters of the first image acquisition device may be adjusted based on the target tracking parameters, such as controlling the lens zoom.

[0158] In this way, the first image acquisition device can always capture the target object, achieving close-up capture of the target object and continuous and stable tracking.

[0159] In the embodiments of the present application, it can be applied to video surveillance scenarios and perimeter protection scenarios.

[0160] See Figure 2 The figure shows an example of an image acquisition device. Figure 2 The system includes both box cameras and dome cameras. Box cameras are fixed and can monitor in a fixed optical acquisition direction. Dome cameras can support 360° horizontal rotation and a certain vertical angle range.

[0161] The following takes the first image acquisition device as a ball camera and the second image acquisition device as a gun camera as an example. Figure 3 The above embodiment is described as an example, wherein the ball camera is provided with a ball camera master controller (i.e., a first controller) for data processing, and a ball camera pan / tilt (i.e., a rotation component) for performing a rotation operation, and the gun camera is provided with a gun camera master controller (i.e., a second controller) for data processing, see Figure 3 FIG. 1 is an interactive flow chart of a target tracking method, wherein the flow of the method includes:

[0162] Step 301: The main control of the gun camera continuously performs target object detection based on the real-time acquired video frames.

[0163] Step 302: The gun master controller determines a second actual position of the target object and a corresponding second predicted deviation based on the acquired detection result.

[0164] Step 303: The gun camera master controller continuously sends the second actual position and the second predicted deviation to the dome camera master controller.

[0165] Among them, the gun main control performs image acquisition, target object detection, second actual position and its corresponding second predicted deviation determination operations in real time and continuously.

[0166] Step 304: The dome camera master controller receives the second actual position and its corresponding second predicted deviation.

[0167] Furthermore, if the dome camera master is currently in the detection termination state, it can switch to the detection start state after receiving the second actual position and its corresponding second predicted deviation, determine the second actual position as the target tracking parameter, and execute step 309.

[0168] Step 305: The dome camera master controller performs target object detection based on the collected video frames.

[0169] Step 306: The dome camera master controller determines a first actual position and a corresponding first predicted deviation based on the acquired detection result.

[0170] Step 307: The dome camera master controller selects the target object position as a target tracking parameter based on the first prediction deviation and the second prediction deviation.

[0171] Step 308: The dome camera master controller sends a rotation instruction to the dome camera pan / tilt head based on the target tracking parameters.

[0172] Step 309: The dome camera pan / tilt head performs a rotation operation based on the rotation instruction.

[0173] Specifically, when executing steps 301 to 309 , the specific steps may refer to the above steps 101 to 102 , which will not be described in detail here.

[0174] It should be noted that in actual applications, the first image acquisition device and the second image acquisition device are both used for image acquisition, and for each data processing operation after image acquisition (such as actual position detection, predicted position determination, coordinate conversion, predicted deviation calculation, target tracking parameter determination, etc.), the data processing operation can be performed in the first image acquisition device or the second image acquisition device, and further, it can also be performed in a data processing device other than the first image acquisition device and the second image acquisition device.

[0175] The following combination Figure 4 , which explains the gun detection method in detail. Figure 4 FIG. 1 is a flow chart of a method for detecting a bolt, which is applied to a bolt. The flow chart includes:

[0176] Step 401: Start target object detection.

[0177] Step 402: Determine whether the target object is detected in all the N most recently acquired video frames. If so, execute step 403; otherwise, execute step 402.

[0178] For example, the gun camera performs image acquisition to obtain a captured video sequence, and performs target object detection on the latest 5 (ie, N) video frames in the video sequence to detect whether the video frames contain the target object.

[0179] In actual applications, N can be set according to the actual application scenario and is not limited here.

[0180] Step 403: Determine the actual position of the target object in each of the N most recently acquired video frames.

[0181] Step 404: predicting the next position of the target object based on the multiple actual positions of the target object to obtain a second predicted position.

[0182] Specifically, the moving speed of the target object (including moving direction and speed) can be determined based on N actual positions, and the possible position of the target object in the next video frame, i.e., the second predicted position, can be predicted based on the latest actual position and moving speed.

[0183] Step 405 : Determine whether the target object is detected in the latest captured N+1th video frame. If so, execute step 406 ; otherwise, execute step 402 .

[0184] Step 406: Detect the latest second actual position of the target object based on the (N+1)th video frame.

[0185] The second actual position and the second predicted position may both be pixel coordinates on the video frame captured by the gun camera.

[0186] Step 407: Perform coordinate transformation on both the second actual position and the second predicted position.

[0187] Step 408: Calculate the deviation between the converted second actual position and the converted second predicted position to obtain a second predicted deviation.

[0188] Specifically, the spatial distance between the second actual position and the second predicted position is calculated to obtain a second prediction deviation.

[0189] For example, the second actual position in the second coordinate system is converted to the dome camera's spatial coordinates in the dome camera's spatial coordinate system (i.e., the spatial coordinate system), which is the converted second actual position. The dome camera's spatial coordinates include a horizontal rotation angle (Pan, P) and a vertical rotation angle (Tilt, T), which are used to precisely control the dome camera's viewing angle. The dome camera's spatial coordinates can be expressed as (P, T). For example, a dome camera's spatial coordinates can be (120°, 30°), indicating that the dome camera is rotated 120° to the right and tilted 30° upward.

[0190] Step 409: Send the converted second actual position and the second predicted deviation to the ball camera.

[0191] Step 410 : Determine the 2nd frame to the N+1th frame as the new 1st frame to the Nth frame, and execute step 404 .

[0192] Specifically, when executing steps 401 to 410, the specific steps may refer to the above steps 101 to 102, which will not be described in detail here.

[0193] In an embodiment of the present application, the second image acquisition device can detect the position of the target object based on multiple frames of continuously acquired video frames to obtain the motion trajectory of the target object (i.e., the actual position in each video frame), and make a prediction based on the motion trajectory to obtain a second predicted position. Based on the next video frame, the target object's latest second actual position is detected, and a second prediction deviation is determined based on the spatial distance between the second predicted position and the second actual position. In this way, the second image acquisition device can continuously track the target object and obtain the second actual position and the second prediction deviation.

[0194] In the embodiment of the present application, after the gun camera starts the target object detection, the target object detection can be continuously performed, and the detected second actual position and the second predicted deviation can be continuously sent to the ball camera.

[0195] The following combination Figure 5 , which explains the ball camera detection method in detail. Figure 4 FIG. 1 is a flow chart of a method for detecting a ball camera, which is applied to a ball camera. The flow includes:

[0196] Step 501: Receive a second actual position and a second predicted deviation sent by a gun.

[0197] Step 502: Determine whether it is in the detection start state. If so, execute step 503; otherwise, execute step 510.

[0198] Step 503: Determine whether the target object is detected in all the N most recently acquired video frames. If so, execute step 504; otherwise, execute step 503.

[0199] Step 504: predicting the next position of the target object according to the actual position of the target object in each of the N most recently acquired video frames to obtain a first predicted position.

[0200] Step 505 : Determine whether the target object is detected in the latest captured N+1th video frame. If so, execute step 506 ; otherwise, execute step 503 .

[0201] Step 506: Detect the latest first actual position of the target object based on the (N+1)th video frame.

[0202] Step 507: performing coordinate transformation on the first actual position and the first predicted position respectively to obtain the transformed first actual position and the transformed first predicted position.

[0203] Step 508: Calculate the deviation between the converted first actual position and the converted first predicted position to obtain a first predicted deviation.

[0204] Step 509 : Determine the 2nd frame to the N+1th frame as the new 1st frame to the Nth frame, and execute step 504 .

[0205] Step 510: Switch to the detection start state and execute step 503.

[0206] In an embodiment of the present application, the first image acquisition device can detect the position of the target object based on multiple frames of continuously acquired video frames to obtain a motion trajectory of the target object (i.e., the actual position in each video frame), and make a prediction based on the motion trajectory to obtain a first predicted position. Based on the next video frame, the target object's latest first actual position is detected, and a first prediction deviation is determined based on the spatial distance between the first predicted position and the first actual position. In this way, the first image acquisition device can continuously track the target object and obtain the first actual position and the first prediction deviation.

[0207] The following combination Figure 6 , which explains in detail the method of ball camera rotation. Figure 6 FIG. 1 is a flow chart of a method for rotating a ball camera, which is applied to a ball camera. The flow chart includes:

[0208] Step 601: Determine whether a second actual position and its corresponding second predicted deviation are received. If so, execute step 602; otherwise, execute step 607.

[0209] Step 602: Determine whether the device is in the detection start state. If so, execute step 603; otherwise, execute step 605.

[0210] Step 603: Determine whether the first actual position is detected, if so, execute step 604, otherwise, execute step 605.

[0211] Step 604: Determine whether the second prediction deviation is smaller than the first prediction deviation. If so, execute step 605; otherwise, execute step 606.

[0212] Step 605: Based on the second actual position, control the rotation of the ball camera pan / tilt.

[0213] Step 606: Based on the first actual position, control the rotation of the ball camera pan / tilt.

[0214] Step 607: If the first actual position is detected, the pan / tilt head of the speed dome camera is controlled to rotate based on the first actual position.

[0215] In an embodiment of the present application, during the stage when the first image acquisition device continuously tracks the target object, the second image acquisition device can continuously track the target object to obtain a second actual position and a second predicted deviation, and the first image acquisition device can continuously track the target object to obtain a first actual position and a first predicted deviation, and based on the first predicted deviation and the second predicted deviation, select an actual position with higher accuracy from the first actual position and the second actual position as a target tracking parameter, and the first image position, and track towards the target tracking parameter with higher accuracy. In this way, the first image acquisition device and the second image acquisition device are combined to give full play to the detection capability of each image acquisition device, improve the accuracy of target object tracking, make the tracking more coherent and smooth, and improve the continuity and stability of target object tracking.

[0216] Furthermore, if only the first actual position is successfully acquired, the first image acquisition device is controlled to rotate according to the first actual position; if only the second actual position is successfully acquired, the first image acquisition device is controlled to rotate according to the second actual position. This ensures that if either image acquisition device loses the target object being detected, the target tracking by the first image acquisition device will not be terminated, further improving the continuity and stability of target object tracking. For example, in complex application environments, such as those with numerous obstacles such as leaves, where the target object detected by any one image detection device is not consistent, tracking can be performed using the detection results of another image detection device, thereby ensuring continuous and stable tracking of the target object.

[0217] Based on the same inventive concept, a target tracking device is also provided in the embodiment of the present application. Since the principle of solving the problem by the above-mentioned device and equipment is similar to that of a target tracking method, the implementation of the above-mentioned device can refer to the implementation of the method, and the repeated parts will not be repeated. The device can be applied to electronic devices. This application does not limit the type of electronic device. It can be any type of device suitable for implementation, such as terminal devices and servers, etc. This application will not go into details. The device embodiment can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of the electronic device in which it is located reading the corresponding computer program instructions in the non-volatile memory into the memory for execution.

[0218] See Figure 7 FIG. 1 is a block diagram of a target tracking device according to an embodiment of the present application. In some embodiments, the target tracking device according to the present application example includes:

[0219] A prediction unit 701 is configured to obtain a first predicted position of a target object based on N consecutively captured video frames of the target object;

[0220] A detection unit 702 is configured to determine a first actual position of the target object based on an N+1th video frame captured of the target object; the N+1th video frame is a next video frame captured after N consecutive video frames of the target object are captured;

[0221] a determining unit 703, configured to determine target tracking parameters based on the first predicted position and the first actual position, and the latest second predicted position and the second actual position of the target object;

[0222] Among them, the second predicted position and the second actual position are determined by the second image acquisition device, and the target tracking parameter is used to adjust the monitoring range of the first image acquisition device or the second image acquisition device so that the first image acquisition device or the second image acquisition device tracks the target object.

[0223] In one implementation, the determining unit 703 is configured to:

[0224] Obtaining a first prediction deviation based on a difference between the first predicted position and the first actual position;

[0225] Obtaining a second prediction deviation based on a difference between the second predicted position and the second actual position;

[0226] Target tracking parameters are determined based on the first actual position, the first predicted deviation, the second actual position, and the second predicted deviation.

[0227] In one implementation, the determining unit 703 is configured to:

[0228] If the first prediction deviation is lower than the second prediction deviation, the first actual position is determined as the target tracking parameter;

[0229] If the first prediction deviation is not lower than the second prediction deviation, the second actual position is determined as the target tracking parameter.

[0230] In one implementation, the determining unit 703 is configured to:

[0231] Determining weights corresponding to the first actual position and the second actual position respectively according to the first prediction deviation and the second prediction deviation;

[0232] According to the weights corresponding to the first actual position and the second actual position, the first actual position and the second actual position are weightedly summed to obtain the target tracking parameter.

[0233] In one implementation, the determining unit 703 is further configured to:

[0234] Use any of the following:

[0235] If the first image acquisition device is the device to be adjusted, controlling the rotation component in the first image acquisition device to rotate according to the target tracking parameter to adjust the monitoring range of the first image acquisition device;

[0236] If the second image acquisition device is the device to be adjusted, a rotation instruction including target tracking parameters is sent to the second image acquisition device, so that the second image acquisition device controls the rotation component set according to the target tracking parameters to rotate, thereby adjusting the monitoring range of the second image acquisition device;

[0237] The first image acquisition device or the second image acquisition device is a device to be adjusted, and a rotating component for adjusting the monitoring range is provided in the device to be adjusted.

[0238] In one implementation, the determining unit 703 is further configured to:

[0239] Performing coordinate transformation on the first actual position according to a first coordinate transformation relationship between the first coordinate system and the spatial coordinate system to obtain a transformed first actual position;

[0240] transforming the first predicted position according to the first coordinate transformation relationship to obtain a transformed first predicted position;

[0241] The first coordinate system is a two-dimensional coordinate system established for the video frames captured by the first image capture device; the spatial coordinate system is established for the device to be adjusted, and the spatial coordinates in the spatial coordinate system include horizontal rotation angles and vertical rotation angles.

[0242] In one implementation, the determining unit 703 is further configured to:

[0243] Performing coordinate transformation on the second actual position according to a second coordinate transformation relationship between the second coordinate system and the spatial coordinate system to obtain a transformed second actual position;

[0244] transforming the second predicted position according to the second coordinate transformation relationship to obtain a transformed second predicted position;

[0245] The second coordinate system is a two-dimensional coordinate system established for the video frames captured by the second image capture device.

[0246] In one embodiment, the device to be adjusted is a dome camera, and the rotating assembly is a pan / tilt head in the dome camera; the device not to be adjusted in the first image acquisition device and the second image acquisition device is a gun camera.

[0247] In one implementation, the determining unit 703 is further configured to:

[0248] If it is determined that the most recently acquired N+1 frames of video do not meet the position detection condition, and the most recently acquired N+1 frames of video by the second image acquisition device meet the position detection condition, then the most recently acquired second actual position obtained through the connection is determined as a new target tracking parameter;

[0249] The position detection condition is set according to whether the video frame contains the target object.

[0250] In one implementation, the determining unit 703 is further configured to:

[0251] If it is determined that the most recently acquired N+1th video frame meets the position detection condition, then a new first actual position is determined based on the most recently acquired N+1th video frame;

[0252] If the N+1 video frames most recently acquired by the second image acquisition device do not meet the position detection condition, the new first actual position is determined as a new target tracking parameter.

[0253] The target tracking method in the embodiment of the present application includes obtaining a first predicted position of the target object based on N consecutive video frames of the target object; determining a first actual position of the target object based on the N+1th video frame of the target object; the N+1th video frame being the next video frame captured after the N consecutive video frames of the target object are captured; determining target tracking parameters based on the first predicted position and the first actual position, as well as the latest second predicted position and the second actual position of the target object determined by the second image acquisition device; the target tracking parameters are used to adjust the monitoring range of the first image acquisition device or the second image acquisition device so that the first image acquisition device or the second image acquisition device tracks the target object. In this way, the first image acquisition device and the second image acquisition device are combined to give full play to the detection capability of each image acquisition device, improve the accuracy of target object tracking, make tracking more coherent and stable, and improve the continuity and stability of target object tracking.

[0254] In an embodiment of the present application, an electronic device is further provided, including:

[0255] processor; and

[0256] The memory stores computer instructions, where the computer instructions are used to enable the processor to execute the method of any of the above embodiments.

[0257] In an embodiment of the present application, a computer-readable storage medium is provided, which stores computer instructions, and the computer instructions are used to enable a computer to execute the method of any of the above-mentioned embodiments.

[0258] An embodiment of the present application also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device implements any of the above-mentioned methods.

[0259] Figure 8 FIG1 shows a schematic diagram of the structure of an electronic device 8000. Figure 8 As shown, the electronic device 8000 includes: a processor 8010 and a memory 8020, and optionally, may also include a power supply 8030, a display unit 8040, and an input unit 8050.

[0260] The processor 8010 is the control center of the electronic device 8000. It uses various interfaces and lines to connect various components, and performs various functions of the electronic device 8000 by running or executing software programs and / or data stored in the memory 8020, thereby monitoring the electronic device 8000 as a whole.

[0261] In the embodiment of the present application, the processor 8010 executes the various steps in the above embodiment when calling the computer program stored in the memory 8020.

[0262] Optionally, the processor 8010 may include one or more processing units. Preferably, the processor 8010 may integrate an application processor and a modem processor, wherein the application processor primarily processes the operating system, user interface, and applications, and the modem processor primarily processes wireless communications. It is understood that the modem processor may not be integrated into the processor 8010.

[0263] The memory 8020 may mainly include a program storage area and a data storage area. The program storage area may store an operating system, various applications, etc., and the data storage area may store data created based on the use of the electronic device 8000. In addition, the memory 8020 may include a high-speed random access memory and a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device.

[0264] The electronic device 8000 also includes a power supply 8030 (such as a battery) for supplying power to various components. The power supply can be logically connected to the processor 8010 through a power management system, thereby managing functions such as charging, discharging, and power consumption through the power management system.

[0265] The display unit 8040 can be used to display information input by the user or information provided to the user, as well as various menus of the electronic device 8000. In the embodiment of the present application, it is mainly used to display the display interface of each application in the electronic device 8000 and objects such as text and pictures displayed on the display interface. The display unit 8040 may include a display panel 8041. The display panel 8041 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc.

[0266] The input unit 8050 can be used to receive information such as numbers or characters input by the user. The input unit 8050 may include a touch panel 8051 and other input devices 8052. The touch panel 8051, also known as a touch screen, can receive user touch operations on or near it (for example, operations performed by the user using a finger, a stylus, or any other suitable object or accessory on or near the touch panel 8051).

[0267] Specifically, the touch panel 8051 can detect user touch operations and the signals generated by the touch operations, convert these signals into touch point coordinates, and send them to the processor 8010. It can also receive and execute commands sent by the processor 8010. In addition, the touch panel 8051 can be implemented using various types, such as resistive, capacitive, infrared, and surface acoustic wave. Other input devices 8052 can include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), a trackball, a mouse, a joystick, etc.

[0268] Of course, the touch panel 8051 can cover the display panel 8041. When the touch panel 8051 detects a touch operation on or near it, it transmits it to the processor 8010 to determine the type of touch event. Then the processor 8010 provides corresponding visual output on the display panel 8041 according to the type of touch event. Figure 8 In the embodiment, the touch panel 8051 and the display panel 8041 are two independent components to realize the input and output functions of the electronic device 8000, but in some embodiments, the touch panel 8051 and the display panel 8041 can be integrated to realize the input and output functions of the electronic device 8000.

[0269] The electronic device 8000 may also include one or more sensors, such as a pressure sensor, a gravity acceleration sensor, a proximity light sensor, etc. Of course, according to the needs of specific applications, the electronic device 8000 may also include other components such as a camera. Since these components are not the key components used in the embodiments of this application, Figure 8 It is not shown and will not be described in detail.

[0270] Those skilled in the art will understand that Figure 8 The electronic device is merely an example and does not limit the electronic device. The electronic device may include more or fewer components than shown in the figure, or may include a combination of certain components or different components.

[0271] For the convenience of description, the above parts are divided into modules (or units) according to their functions and described separately. Of course, when implementing this application, the functions of each module (or unit) can be implemented in the same or multiple software or hardware.

Claims

1. A target tracking method, characterized in that: The method is applied to a first image acquisition device, the first image acquisition device is connected to a second image acquisition device, and the monitoring ranges of the first image acquisition device and the second image acquisition device overlap, and the method includes: Obtaining a first predicted position of the target object based on N consecutive captured video frames of the target object; determining a first actual position of the target object according to an N+1th video frame captured of the target object, wherein the N+1th video frame is a next video frame captured after capturing video frames of the target object N times in succession; Based on the first predicted position and the first actual position, as well as the latest second predicted position and the second actual position of the target object determined by the second image acquisition device, target tracking parameters are determined; the target tracking parameters are used to adjust the monitoring range of the first image acquisition device or the second image acquisition device so that the first image acquisition device or the second image acquisition device tracks the target object.

2. The method according to claim 1, characterized in that The determining of target tracking parameters based on the first predicted position and the first actual position, and the latest second predicted position and the second actual position of the target object determined by the second image acquisition device, includes: Obtaining a first prediction deviation based on a difference between the first predicted position and the first actual position; obtaining a second prediction deviation according to a difference between the second predicted position and the second actual position; The target tracking parameter is determined according to the first actual position, the first predicted deviation, the second actual position, and the second predicted deviation.

3. The method according to claim 2, characterized in that The determining the target tracking parameter according to the first actual position, the first predicted deviation, the second actual position, and the second predicted deviation includes: If the first prediction deviation is lower than the second prediction deviation, determining the first actual position as the target tracking parameter; If the first prediction deviation is not lower than the second prediction deviation, the second actual position is determined as the target tracking parameter.

4. The method according to claim 2, characterized in that The determining the target tracking parameter according to the first actual position, the first predicted deviation, the second actual position, and the second predicted deviation includes: Determining weights corresponding to the first actual position and the second actual position, respectively, based on the first prediction deviation and the second prediction deviation; According to the weights corresponding to the first actual position and the second actual position, the first actual position and the second actual position are weightedly summed to obtain the target tracking parameter.

5. The method according to any one of claims 1 to 4, characterized in that After determining the target tracking parameters, the method further includes: Use any of the following: If the first image acquisition device is the device to be adjusted, controlling the rotation component in the first image acquisition device to rotate according to the target tracking parameter to adjust the monitoring range of the first image acquisition device; If the second image acquisition device is the device to be adjusted, sending a rotation instruction including the target tracking parameter to the second image acquisition device, so that the second image acquisition device controls the rotation component set according to the target tracking parameter to rotate, so as to adjust the monitoring range of the second image acquisition device; The first image acquisition device or the second image acquisition device is a device to be adjusted, and a rotating component for adjusting the monitoring range is provided in the device to be adjusted.

6. The method according to claim 5, characterized in that Before determining target tracking parameters based on the first predicted position and the first actual position, and the latest second predicted position and second actual position of the target object determined by the second image acquisition device, the method further includes: Performing coordinate transformation on the first actual position according to a first coordinate transformation relationship between the first coordinate system and the spatial coordinate system to obtain a transformed first actual position; transforming the first predicted position according to the first coordinate transformation relationship to obtain a transformed first predicted position; Among them, the first coordinate system is a two-dimensional coordinate system established for the video frame captured by the first image acquisition device; the spatial coordinate system is established for the device to be adjusted, and the spatial coordinates in the spatial coordinate system include horizontal rotation angles and vertical rotation angles.

7. The method according to claim 6, characterized in that Before determining target tracking parameters based on the first predicted position and the first actual position, and the latest second predicted position and second actual position of the target object determined by the second image acquisition device, the method further includes: performing coordinate transformation on the second actual position according to a second coordinate transformation relationship between the second coordinate system and the spatial coordinate system to obtain a transformed second actual position; transforming the second predicted position according to the second coordinate transformation relationship to obtain a transformed second predicted position; The second coordinate system is a two-dimensional coordinate system established for the video frames captured by the second image acquisition device.

8. The method according to claim 5, characterized in that The device to be adjusted is a ball camera, and the rotating component is a pan / tilt head in the ball camera; the device not to be adjusted in the first image acquisition device and the second image acquisition device is a gun camera.

9. The method according to any one of claims 1 to 4, characterized in that After determining the target tracking parameters, the method further includes: If it is determined that the most recently acquired N+1 video frames do not meet the position detection condition, and the most recently acquired N+1 video frames by the second image acquisition device meet the position detection condition, then determining the most recently acquired second actual position obtained through the connection as a new target tracking parameter; The position detection condition is set according to whether the target object is included in the video frame.

10. The method according to any one of claims 1 to 4, characterized in that After determining the target tracking parameters, the method further includes: If it is determined that the most recently acquired N+1th video frame meets the position detection condition, then a new first actual position is determined based on the most recently acquired N+1th video frame; If the N+1 video frames most recently acquired by the second image acquisition device do not meet the position detection condition, the new first actual position is determined as a new target tracking parameter.

11. A target tracking device, characterized in that: The device is applied to a first image acquisition device, the first image acquisition device is connected to a second image acquisition device, and the monitoring ranges of the first image acquisition device and the second image acquisition device overlap, and the device includes: A prediction unit, configured to obtain a first predicted position of the target object based on N consecutively captured video frames of the target object; a detection unit, configured to determine a first actual position of the target object based on an N+1th video frame captured of the target object, wherein the N+1th video frame is a next video frame captured after capturing video frames of the target object N times in succession; a determining unit, configured to determine target tracking parameters based on the first predicted position and the first actual position, and the latest second predicted position and second actual position of the target object determined by the second image acquisition device; The second predicted position and the second actual position are determined by the second image acquisition device, and the target tracking parameters are used to adjust the monitoring range of the first image acquisition device or the second image acquisition device so that the first image acquisition device or the second image acquisition device tracks the target object.

12. An electronic device, characterized in that: include: processor; as well as A memory storing computer instructions, wherein the computer instructions are used to enable the processor to execute the method according to any one of claims 1 to 10.