Method and device for automatic target tracking for video surveillance

Through the technical framework of dual-threading and dual-code streams, combined with high-resolution main code stream and low-resolution subcode stream, a fast linkage control between fixed cameras and motion cameras is achieved, solving the problems of high hardware resource consumption and usage costs in the existing technology, and achieving smooth tracking and automatic and reasonable scaling of the targets.

CN114627157BActive Publication Date: 2025-04-11THE SECOND RES INST OF CIVIL AVIATION ADMINISTRATION OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210305870.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-25
Publication Date
2025-04-11
Estimated Expiration
2042-03-25

AI Technical Summary

Technical Problem

In the prior art, it is difficult to reduce the consumption of hardware resources and reduce the cost of use while ensuring smooth tracking of targets and automatic and reasonable scaling.

Method used

Using a technical framework of dual-thread and dual-code streams, the main thread is used for high-resolution main code stream processing, and the sub-thread is used for low-resolution sub-code streams to process single-object tracking algorithms. In this way, while ensuring the clarity of the picture, the consumption of hardware resources is reduced.

Benefits of technology

The goal is achieved smooth tracking and automatic and reasonable scaling, which reduces the consumption of hardware resources and reduces the cost of use, while ensuring the clear and delicate picture effect displayed by users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114627157B_ABST
    Figure CN114627157B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for automatic target tracking for video surveillance. The method comprises: a main thread obtains a main code stream of a motion camera with a resolution greater than a preset resolution threshold, receives a target to be tracked selected on the main code stream, and controls the motion of the motion camera so that the target to be tracked appears in the central area of ​​the picture, and then obtains an initialization rectangular frame of the target to be tracked; a sub-thread obtains a sub-code stream of a motion camera with a resolution less than a preset resolution threshold, and obtains a mapping rectangular frame of the initialization rectangular frame according to a proportional relationship between the main code stream and the sub-code stream; and obtains a tracking rectangular frame of the target to be tracked in the current frame based on the mapping rectangular frame and a preset single target tracking algorithm; and calculates the control parameters of the motion camera according to the position of the rectangular frame; the main thread receives and controls the motion camera according to the control parameters. The present invention can reduce the consumption of hardware resources and reduce the use cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of video processing, and in particular to a method and a device for automatic target tracking for video surveillance. Background Art

[0002] The panoramic images obtained by stitching together a single fixed camera or multiple single-channel fixed cameras (collectively referred to as fixed camera images) are usually used to view the overall situation of a scene; PTZ cameras or pan-tilt cameras (collectively referred to as motion cameras) can be freely rotated and zoomed to view detailed information of areas of interest in the scene; combining the two and realizing mutual linkage can be used to grasp the panoramic situation and local details at the same time, which is an important demand in airport scene monitoring, as well as security fields such as squares and ports.

[0003] In actual use, the mouse is usually used to click on the target of interest on the fixed camera screen, and the motion camera automatically rotates to the target position, so that the fixed camera and the motion camera screen can be viewed at the same time. In use, the linkage response is usually required to be fast. One-click viewing represents the above process, which reflects the linkage between the fixed camera and the motion camera, and also reflects the characteristic of "fast" response speed.

[0004] In the prior art, a target of interest is selected and then continuously tracked by a ball camera, so that the real-time situation and detailed information of the target can be viewed. In the field of security, it is beneficial to command and dispatch. In other fields, for example, the monitoring of aircraft takeoff and landing at the airport can be used to check whether the aircraft landing gear is normally retracted and extended, which plays an important role in the safe operation of the aircraft. In addition, when video recording equipment is used, continuous tracking can record the entire operation process of the target of interest, which is convenient for post-analysis after an accident occurs. Finally, continuous tracking is the basis of other video analysis technologies, such as target behavior analysis and target recognition.

[0005] How to implement practical linkage control strategies and methods, while taking into account smooth target tracking and automatic and reasonable scaling, and also minimizing the consumption of hardware resources and reducing the cost of use, has become a technical problem that needs to be solved urgently. Summary of the invention

[0006] In view of this, the present invention provides a method and device for automatic target tracking for video surveillance, which can reduce the consumption of hardware resources and lower the cost of use while taking into account stable target tracking and automatic and reasonable scaling.

[0007] In a first aspect, a method for automatic target tracking for video surveillance comprises:

[0008] The main thread obtains a main code stream of a motion camera with a resolution greater than a preset resolution threshold, receives a target to be tracked selected on the main code stream, and controls the motion of the motion camera to make the target to be tracked appear in the central area of ​​the picture, and then obtains an initialization rectangular frame of the target to be tracked;

[0009] The sub-thread obtains a sub-code stream of the motion camera whose resolution is less than a preset resolution threshold, and obtains a mapping rectangular frame of the initialization rectangular frame according to a ratio between the main code stream and the sub-code stream; and obtains a tracking rectangular frame of the target to be tracked in the current frame according to the mapping rectangular frame based on a preset single target tracking algorithm; and calculates the control parameters of the motion camera according to the position of the rectangular frame;

[0010] The main thread receives and controls the motion camera according to the control parameters.

[0011] Furthermore, after the step of obtaining the tracking rectangular frame of the target to be tracked in the current frame based on the mapping rectangular frame and a preset single target tracking algorithm, the step further includes:

[0012] The main thread obtains and displays a display rectangular frame corresponding to the tracking rectangular frame of the target to be tracked in the current frame according to the proportional relationship between the main code stream and the sub-code stream.

[0013] Furthermore, the step of calculating the control parameters of the motion camera according to the position of the rectangular frame includes:

[0014] First, calculate the horizontal movement direction pan_direction and vertical movement direction tilt_direction of the motion camera:

[0015]

[0016]

[0017] Where x1, y1 are the coordinates of the center point of the rectangular box of the target to be tracked in the current frame; sw and sh are the width and height of the sub-stream;

[0018] Secondly, calculate the horizontal motion speed pan_speed and vertical motion speed tilt_speed of the motion camera:

[0019]

[0020]

[0021] Where abs is the absolute value function; max_speed is the maximum speed of the motion camera; cons1 and cons2 are constants;

[0022] Thirdly, according to the horizontal motion direction pan_direction, the vertical motion direction tilt_direction, the horizontal motion speed pan_speed and the vertical motion speed tilt-speed of the motion camera, the horizontal value pan and the vertical value tilt that the motion camera needs to rotate are calculated.

[0023] Further, according to the horizontal motion direction, vertical motion direction, horizontal motion speed and vertical motion speed of the motion camera, the step of calculating the horizontal value pan and the vertical value tilt of the motion camera that needs to be rotated includes:

[0024]

[0025]

[0026] Where speed_thr is a constant.

[0027] Furthermore, the step of calculating the control parameters of the motion camera according to the position of the rectangular frame includes:

[0028] First, assume that the size of the reference rectangle is 1 / N of the corresponding size of the sub-stream, N is a set integer, and the width and height rw and rh of the reference rectangle are respectively:

[0029] rw=sw / N

[0030] rh=sh / N

[0031] Secondly, calculate the area change cur_area_change between the current tracking rectangle and the reference rectangle:

[0032] cur-area-change=w1*h1-rw*rh

[0033] Again, when cur_area_change is greater than 0 for consecutive area_trend_thr frames or less than 0 for consecutive area_trend_thr frames, calculate the focal length:

[0034]

[0035] Among them, area_trend_thr is an integer used to prevent the focal length from changing back and forth due to the shaking of the tracking rectangle frame, ensuring the smooth change of the focal length; cur_zoom is the current focal length value obtained by the motion camera device.

[0036] On the other hand, the present invention also provides a target automatic tracking device for video surveillance comprising:

[0037] The main thread module is used to obtain a main code stream of a motion camera with a resolution greater than a preset resolution threshold, receive a target to be tracked selected on the main code stream, and control the motion camera to move so that the target to be tracked appears in the central area of ​​the picture, and then obtain an initialization rectangular frame of the target to be tracked; and is also used to receive and control the motion camera according to the control parameter;

[0038] The sub-thread module is used to obtain a sub-code stream of the motion camera whose resolution is less than a preset resolution threshold, and obtain a mapping rectangular frame of the initialization rectangular frame according to the ratio between the main code stream and the sub-code stream; and obtain a tracking rectangular frame of the target to be tracked in the current frame based on the mapping rectangular frame and a preset single target tracking algorithm; and calculate the control parameters of the motion camera according to the position of the rectangular frame. Main thread.

[0039] Furthermore, the main thread module is used to obtain and display a display rectangular frame corresponding to the tracking rectangular frame of the target to be tracked in the current frame according to the proportional relationship between the main code stream and the sub-code stream.

[0040] Furthermore, the control parameters of the motion camera include a horizontal value and a vertical value and a focal length of the motion camera that need to be rotated.

[0041] According to a third aspect, a computer device is provided, comprising:

[0042] Memory for storing computer programs;

[0043] A processor is used to implement the steps of the automatic target tracking method for video surveillance when executing the computer program.

[0044] In a fourth aspect, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the automatic target tracking method for video surveillance are implemented.

[0045] The automatic target tracking method and device for video surveillance of the present invention uses a dual-thread, dual-stream technical framework. For a single target tracking algorithm that consumes a large amount of graphics card and memory resources, a special sub-thread is used to process on a low-resolution sub-stream, while for result display and human-computer interaction that occupy less hardware resources, a main thread and a high-resolution main stream are used. In this way, while ensuring that a clear and delicate picture effect is displayed to the user, the consumption of hardware resources is also reduced, and the cost of use is reduced. In addition, after the mouse clicks on the target of interest, the rotation angle of the motion camera will be calculated first, and the target at the mouse click position will be placed in the central area of ​​the picture, which is convenient for the subsequent long-term stable tracking of the target; finally, the smooth tracking of the target and the automatic zooming of the focal length are realized according to the control parameters, which can take into account the smooth tracking of the target and the automatic and reasonable zooming, and can reduce the consumption of hardware resources and reduce the cost of use. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0047] Figure 1 is a flow chart of a method for automatic tracking of a target for video surveillance according to an exemplary first embodiment of the present invention;

[0048] Figure 2 is a flow chart of a method for automatic target tracking for video surveillance according to an exemplary second embodiment of the present invention;

[0049] Figure 3 FIG. 4 is a structural block diagram of an automatic target tracking device for video surveillance according to a third exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0050] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0051] It should be noted that the following embodiments and features in the embodiments may be combined with each other in the absence of conflict; and, based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making any creative work are within the scope of protection of the present disclosure.

[0052] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.

[0053] like Figure 1 As shown, a method for automatic target tracking for video surveillance includes:

[0054] S101: The main thread obtains a main code stream of a motion camera (such as a ball camera) whose resolution is greater than a preset resolution threshold, receives a target to be tracked selected on the main code stream, and controls the motion of the motion camera to make the target to be tracked appear in the central area of ​​the picture, and then obtains an initialization rectangular frame of the target to be tracked;

[0055] S102: the sub-thread obtains a sub-code stream of the motion camera whose resolution is less than a preset resolution threshold, and obtains a mapping rectangular frame of the initialization rectangular frame according to a ratio between the main code stream and the sub-code stream; and obtains a tracking rectangular frame of the target to be tracked in the current frame according to the mapping rectangular frame based on a preset single target tracking algorithm; and calculates the control parameters of the motion camera according to the position of the rectangular frame;

[0056] S103: The main thread receives and controls the motion camera according to the control parameters.

[0057] This embodiment uses a dual-thread, dual-stream technical framework. For the single-target tracking algorithm that consumes a lot of graphics card and memory resources, a dedicated sub-thread is used to process on a low-resolution sub-stream. For the result display and human-computer interaction that occupy less hardware resources, the main thread and high-resolution main stream are used. In this way, while ensuring that the user is presented with a clear and delicate picture effect, the consumption of hardware resources is also reduced, and the cost of use is reduced. In addition, after the mouse clicks the target of interest, the rotation angle of the ball camera will be calculated first, and the target at the mouse click position will be placed in the central area of ​​the picture, which is convenient for the subsequent long-term stable tracking of the target; finally, the proposed speed and focal length control model can achieve smooth tracking of the target and automatic zooming of the focal length.

[0058] like Figure 2 As shown, Figure 1The preferred embodiment of the method shown in the figure, the automatic target tracking method for video surveillance specifically includes:

[0059] Step 1: Configure the main stream and sub stream of the camera. Assume that the resolution of the main stream is mw*mh and the resolution of the sub stream is sw*sh.

[0060] Step 2: Create a sub-thread outside the main thread, where the main thread obtains the main code stream to achieve high-resolution image display, ball camera control and human-computer interaction; the sub-thread obtains the sub-code stream to achieve single target tracking;

[0061] Step 3: Click the target to be tracked on the main stream with the mouse;

[0062] Step 4: Automatically move the mouse click position to the center area of ​​the ball camera screen: Calculate the rotation position of the ball camera using the relationship between the imaging device layout size, the imaging screen size and the current focal length, and realize the rotation from the mouse click position to the center of the ball camera screen;

[0063] Step 5: Extract the image sub-window centered on the center point of the image;

[0064] Step 6: Run the detection algorithm on the extracted sub-window to obtain the initial rectangular frame of the target to be tracked:

[0065] init_bbox0=(x0, y0, w0, h0),

[0066] Among them, x0, y0 are the coordinates of the center point of the rectangular box, w0, h0 are the width and height of the rectangular box; the detection algorithm can use the yolo series algorithm, or the Faster R-CNN algorithm, which are open source and can achieve good detection results;

[0067] Step 7: Map init_bbox0 on the main stream to the sub-stream to get the corresponding rectangular frame:

[0068]

[0069] Step 8: Initialize the single target tracking algorithm using init_bbox1 on the sub-stream;

[0070] Step 9: Run the single target tracking algorithm to obtain the rectangular frame position of the target to be tracked in the current frame:

[0071] bbox1 = (x1, y1, w1, h1)

[0072] Among them, x1, y1 are the coordinates of the center point of the rectangular frame, w1, h1 are the width and height of the rectangular frame;

[0073] Step 10: Calculate the horizontal movement direction (pan_direction) and vertical movement direction (tilt_direction) of the ball camera:

[0074]

[0075]

[0076] When pan_direction is 1, it means the current target is on the right side of the screen, so the camera needs to move right to make the target approach the center of the screen; when pan_direction is -1, it means the current target is on the left side of the screen, so the camera needs to move left to make the target approach the center of the screen. Similarly, when tilt_direction is 1 and -1, it means the camera needs to move upward and downward respectively to make the target approach the center of the screen.

[0077] Step 11: Calculate the speed of the ball camera:

[0078]

[0079]

[0080] Wherein, abs is the absolute value function; max_speed is the maximum speed of the ball camera, and the required maximum speed value can also be set according to the installation location and test of the ball camera on site; cons1 and cons2 can be constants used to control the magnitude of speed change, and can also be set as functions of abs(x1-0.5*sw) and abs(y1-0.5*sh) as needed to achieve different speed change rates at different distances from the center of the image.

[0081] Step 12: Based on the calculated horizontal and vertical speeds and the corresponding directions, the horizontal value (pan) and vertical value (tilt) that the ball camera needs to rotate can be obtained:

[0082]

[0083]

[0084] Where speed_thr is a set constant, such as 0.5, which is used to control the ball camera to stop moving when the tracking target is close to the center point of the picture, to prevent the ball camera from shaking back and forth near the center point due to the shaking of the tracking rectangle.

[0085] Step 13: Focal length calculation;

[0086] (1) Assuming that the size of the reference rectangular frame is 1 / N of the corresponding size of the sub-stream (N is a set integer, such as 8, 9, 10, etc.), the width and height rw and rh of the reference rectangular frame are respectively:

[0087] rw=sw / N

[0088] rh=sh / N

[0089] (2) Calculate the area change of the current tracking rectangle and the reference rectangle:

[0090] cur_area_change=w1*h1-rw*rh

[0091] (3) When cur_area_change is greater than 0 for consecutive area_trend_thr frames or less than 0 for consecutive area_trend_thr frames, the new focal length is calculated as follows:

[0092]

[0093] Among them, area_trend_thr is an integer, such as 30, which is used to prevent the focal length from changing back and forth due to the shaking of the tracking rectangle frame and ensure the smooth change of the focal length; cur_zoom is the current focal length value of the ball camera device.

[0094] Step 14: Send instructions to the ball camera to update the existing horizontal speed, vertical speed and focal length of the ball camera to pan, tilt and zoom respectively, so as to achieve smooth linkage of the pan / tilt and automatic change of focal length.

[0095] This embodiment adopts a dual-stream and dual-thread mode for processing. The main thread uses a high-resolution main stream to display results, control the ball camera and human-computer interaction; the sub-thread uses a low-resolution sub-stream to run a time-consuming single target tracking algorithm, which can take into account stable target tracking and automatic and reasonable scaling, while reducing the consumption of hardware resources and reducing the cost of use.

[0096] Figure 3 The target automatic tracking device for video surveillance is shown as follows: Figure 1 The device embodiment corresponding to the automatic tracking method for video surveillance is shown, Figure 1 The explanations of the preferred embodiments are applicable to this embodiment. Figure 3 As shown, a target automatic tracking device for video surveillance comprises:

[0097] The main thread module is used to obtain a main code stream of a motion camera with a resolution greater than a preset resolution threshold, receive a target to be tracked selected on the main code stream, and control the motion camera to move so that the target to be tracked appears in the central area of ​​the picture, and then obtain an initialization rectangular frame of the target to be tracked; and is also used to receive and control the motion camera according to the control parameter;

[0098] The sub-thread module is used to obtain a sub-code stream of a motion camera whose resolution is less than a preset resolution threshold, and obtain a mapping rectangular frame of the initialization rectangular frame according to a proportional relationship between the main code stream and the sub-code stream; and obtain a tracking rectangular frame of a target to be tracked in a current frame based on the mapping rectangular frame and a preset single target tracking algorithm; and calculate the control parameters of the motion camera according to the position of the rectangular frame.

[0099] Preferably, the main thread module is used to obtain and display a display rectangular frame corresponding to the tracking rectangular frame of the target to be tracked in the current frame according to the proportional relationship between the main code stream and the sub-code stream.

[0100] Preferably, the control parameters of the motion camera include a horizontal value (pan) and a vertical value (tilt) required to be rotated and a focal length of the motion camera.

[0101] Specifically, for the main thread module, the functions carried include:

[0102] Main stream: A stream with a higher resolution, which is used to display the real-time video screen for users to view, the tracking rectangle on the video screen, and the operation of selecting the target to be tracked by clicking the mouse;

[0103] Target selection: The user clicks the target with the mouse; the rotation angle of the ball camera is calculated and the ball camera is automatically controlled to make the mouse click position appear in the central area of ​​the screen; then the automatic detection algorithm is run to obtain the rectangular frame of the target to be tracked; finally, the detected rectangular frame is converted to the sub-stream using the proportional relationship between the main stream and the sub-stream for initialization of the tracking algorithm;

[0104] Result display: The final picture for users to view, on which the rectangular frame being tracked can also be displayed; Ball camera control: By sending the horizontal (pan), vertical (tilt) and focal length (zoom) parameters to the ball camera, the ball camera is controlled to move to the appropriate position to ensure that the tracked target is always in the central area of ​​the picture.

[0105] For the child thread module, the functions carried include:

[0106] Sub-stream: A stream with a smaller resolution, on which a single target tracking algorithm is run. Since the single target tracking algorithm is computationally complex, especially the popular deep learning algorithm, which has high requirements for memory and graphics cards, using a low-resolution sub-stream can effectively reduce resource consumption and save hardware costs. For the same hardware, running a single target tracking algorithm on a sub-stream can increase processing speed;

[0107] Initialization: Before running the single target tracking algorithm each time, an initialization operation is required;

[0108] Tracking: The actual operation process of the single target tracking algorithm. Each frame will be run to extract the rectangular frame of the target to be tracked. The rectangular frame can be converted to the main stream through the proportional mapping relationship between the sub-stream and the main stream, and then used to display on the result screen;

[0109] Speed ​​and focal length: Use the tracking rectangle and related models to calculate the horizontal speed, vertical speed and focal length of the ball camera.

[0110] The present invention also provides a computer device, comprising: a memory for storing a computer program; and a processor for implementing the steps of the above-mentioned method for automatic target tracking for video surveillance when executing the computer program.

[0111] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned method for automatic target tracking for video surveillance are implemented.

[0112] The above-mentioned automatic target tracking device for video surveillance, computer equipment and computer-readable storage medium have the corresponding technical effects of the automatic target tracking method for video surveillance, which will not be repeated here.

[0113] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A method for automatic target tracking for video surveillance, characterized in that: include: The main thread obtains a main code stream of a motion camera with a resolution greater than a preset resolution threshold, receives a target to be tracked selected on the main code stream, and controls the motion of the motion camera to make the target to be tracked appear in the central area of ​​the picture, and then obtains an initialization rectangular frame of the target to be tracked; The sub-thread obtains a sub-code stream of the motion camera whose resolution is less than a preset resolution threshold, and obtains a mapping rectangular frame of the initialization rectangular frame according to a proportional relationship between the main code stream and the sub-code stream; And according to the mapped rectangular frame, based on a preset single target tracking algorithm, a tracking rectangular frame of the target to be tracked in the current frame is obtained; and calculating the control parameters of the motion camera according to the position of the rectangular frame; The main thread receives and controls the motion camera according to the control parameters.

2. The automatic target tracking method for video surveillance according to claim 1, characterized in that: After the step of obtaining the tracking rectangular frame of the target to be tracked in the current frame based on the mapping rectangular frame and a preset single target tracking algorithm, the method further includes: The main thread obtains and displays a display rectangular frame corresponding to the tracking rectangular frame of the target to be tracked in the current frame according to the proportional relationship between the main code stream and the sub-code stream.

3. The automatic target tracking method for video surveillance according to claim 2, characterized in that: The step of calculating the control parameters of the motion camera according to the position of the rectangular frame comprises: First, calculate the horizontal movement direction pan_direction and vertical movement direction tilt_direction of the motion camera: Where x1, y1 are the coordinates of the center point of the rectangular box of the target to be tracked in the current frame; sw and sh are the width and height of the sub-stream; Secondly, calculate the horizontal motion speed pan_speed and vertical motion speed tilt_speed of the motion camera: Where abs is the absolute value function; max_speed is the maximum speed of the motion camera; cons1 and cons2 are constants; Thirdly, according to the horizontal motion direction pan_direction, the vertical motion direction tilt_direction, the horizontal motion speed pan_speed and the vertical motion speed tilt_speed of the motion camera, the horizontal value pan and the vertical value tilt that the motion camera needs to rotate are calculated.

4. The automatic target tracking method for video surveillance according to claim 3, characterized in that: The step of calculating the horizontal value pan and the vertical value tilt of the motion camera that need to be rotated according to the horizontal motion direction, the vertical motion direction, the horizontal motion speed and the vertical motion speed of the motion camera includes: Where speed_thr is a constant.

5. The automatic target tracking method for video surveillance according to claim 4, characterized in that: The step of calculating the control parameters of the motion camera according to the position of the rectangular frame comprises: First, assume that the size of the reference rectangular frame is 1 / N of the corresponding size of the sub-stream, N is a set integer, and the width and height rw and rh of the reference rectangular frame are respectively: rw=sw / N rh=sh / N Secondly, calculate the area change cur_area_change between the current tracking rectangle and the reference rectangle: cur_area_change=w1*h1-rw*rh Again, when cur_area_change is greater than 0 for consecutive area_trend_thr frames or less than 0 for consecutive area_trend_thr frames, calculate the focal length: Among them, area_trend_thr is an integer used to prevent the focal length from changing back and forth due to the shaking of the tracking rectangle frame, ensuring the smooth change of the focal length; cur_zoom is the current focal length value obtained by the motion camera device.

6. An automatic target tracking device for video surveillance, characterized in that: include: A main thread module is used to obtain a main code stream of a motion camera with a resolution greater than a preset resolution threshold, receive a target to be tracked selected on the main code stream, and control the motion of the motion camera to make the target to be tracked appear in the central area of ​​the picture, and then obtain an initialization rectangular frame of the target to be tracked; Also used for receiving and controlling the motion camera according to the control parameter; The sub-thread module is used to obtain a sub-code stream of the motion camera whose resolution is less than a preset resolution threshold, and obtain a mapping rectangular frame of the initialization rectangular frame according to a proportional relationship between the main code stream and the sub-code stream; And according to the mapped rectangular frame, based on a preset single target tracking algorithm, a tracking rectangular frame of the target to be tracked in the current frame is obtained; And according to the position of the rectangular frame, the control parameters of the motion camera are calculated.

7. The automatic target tracking device for video surveillance according to claim 6, characterized in that: The main thread module is used to obtain and display a display rectangular frame corresponding to the tracking rectangular frame of the target to be tracked in the current frame according to the proportional relationship between the main code stream and the sub-code stream.

8. The automatic target tracking device for video surveillance according to claim 7, characterized in that: The control parameters of the motion camera include a horizontal value and a vertical value and a focal length of the motion camera that need to be rotated.

9. A computer device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the method for automatic target tracking for video surveillance as claimed in any one of claims 1 to 5 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the automatic target tracking method for video surveillance as claimed in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Deep learning-based aircraft type identification and undercarriage extension and retraction detection method

    CN112380997A

  • Analysis system

    GB201300650D0