Target feature acquisition method and device, camera and storage device

By collecting video frames in real time in the camera and splicing the target areas to be analyzed in multiple video frames to generate the target analysis area, the problem of limited hardware resources when processing high-definition video streams is solved, and efficient target feature recognition is achieved.

CN119904770APending Publication Date: 2025-04-29ZHEJIANG UNIVIEW TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311406717.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-27
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

When the camera recognizes pedestrians, vehicles and other mobile targets, the hardware resources are limited, which leads to high computing power consumption and makes it difficult to efficiently process high-definition video streams.

Method used

By collecting video frames in real time, when the number of moving targets contained in the first video frame is greater than the preset threshold, the area to be analyzed is obtained, and the target area to be spliced ​​with the target area where the target to be analyzed in the video frame collected at the previous or next moment is generated to generate the target analysis area and perform feature information analysis.

Benefits of technology

With limited hardware resources, the existing resources are fully utilized to analyze the moving target feature information in multiple video screens, reducing the number of operations per unit time and improving the efficiency of target feature recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119904770A_ABST
    Figure CN119904770A_ABST
Patent Text Reader

Abstract

The invention discloses a target feature acquisition method and device, a camera and a storage device. The method comprises the steps that video frames are collected in real time, and when the number of moving targets contained in a first video frame collected at the current moment is larger than a first preset number threshold value, a to-be-analyzed area in the first video frame is obtained; acquiring a second video frame acquired at a previous moment and / or a next moment, and determining a movement track of the moving target according to the first video frame and the second video frame; determining a to-be-analyzed target in the second video frame according to the movement track of the moving target, and extracting a target area where the to-be-analyzed target is located from the second video frame; and splicing the target region into the to-be-analyzed region to generate a target analysis region, and analyzing the target analysis region to obtain feature information of the moving target contained in the target analysis region. According to the scheme, the feature information of the moving targets in the at least two video pictures can be analyzed at the same time, and the target feature recognition efficiency is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image analysis technology, and in particular to a target feature acquisition method, device, camera and storage device. Background Art

[0002] Nowadays, cameras are used in more and more areas, such as office areas, hospitals, and traffic roads. Cameras can collect video images of the area in which they are located in real time and perform feature recognition on moving targets in the video images.

[0003] However, the hardware resources of cameras are limited, and computing power is required in the process of feature recognition of moving targets such as pedestrians and vehicles. A large number of high-definition video streams consume a lot of computing power. How to better save computing power while making full use of existing hardware resources is becoming increasingly important. Summary of the invention

[0004] The present invention provides a target feature acquisition method, device, camera and storage device, which can fully utilize existing resources under certain hardware resources, analyze feature information of moving targets in adjacent video images, and effectively improve the efficiency of target feature recognition.

[0005] According to one aspect of the present invention, a method for acquiring target features is provided, comprising:

[0006] Capturing video frames in real time, and when the number of moving targets contained in a first video frame captured at a current moment is greater than a first preset number threshold, acquiring a region to be analyzed in the first video frame; wherein the region to be analyzed is an entire region containing all moving targets;

[0007] Acquire a second video frame captured at a previous moment and / or a next moment, and determine a motion trajectory of the moving target according to the first video frame and the second video frame;

[0008] Determine the target to be analyzed in the second video frame according to the motion trajectory of the mobile target, and extract the target area where the target to be analyzed is located from the second video frame;

[0009] The target area is spliced ​​into the area to be analyzed to generate a target analysis area, and the target analysis area is analyzed to obtain feature information of the mobile target contained in the target analysis area.

[0010] According to another aspect of the present invention, there is provided a target feature acquisition device, comprising:

[0011] A module for acquiring an area to be analyzed, used to capture video frames at a certain time, and when the number of moving targets contained in a first video frame captured at a current moment is greater than a first preset number threshold, to acquire an area to be analyzed in the first video frame; wherein the area to be analyzed is an overall area containing all moving targets; a module for determining a motion trajectory, used to acquire a second video frame captured at a previous moment and / or a next moment, and to determine a motion trajectory of the moving target based on the first video frame and the second video frame;

[0012] A target region extraction module, used to determine the target to be analyzed in the second video frame according to the motion trajectory of the mobile target, and extract the target region where the target to be analyzed is located from the second video frame;

[0013] The target feature acquisition module is used to splice the target area into the area to be analyzed to generate a target analysis area, and analyze the target analysis area to obtain feature information of the mobile target contained in the target analysis area.

[0014] According to another aspect of the present invention, there is provided a camera, the camera comprising:

[0015] at least one processor; and

[0016] a memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the target feature acquisition method described in any embodiment of the present invention.

[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the target feature acquisition method described in any embodiment of the present invention when executed.

[0019] The target feature acquisition scheme of the embodiment of the present invention includes: real-time acquisition of video frames, and when the number of moving targets contained in the first video frame acquired at the current moment is greater than a first preset number threshold, acquiring the area to be analyzed in the first video frame; wherein the area to be analyzed is the overall area containing all moving targets; acquiring the second video frame acquired at the previous moment and / or the next moment, and determining the motion trajectory of the moving target based on the first video frame and the second video frame; determining the target to be analyzed in the second video frame based on the motion trajectory of the moving target, and extracting the target area where the target to be analyzed is located from the second video frame; splicing the target area into the area to be analyzed to generate a target analysis area, and analyzing the target analysis area to obtain feature information of the moving target contained in the target analysis area. Through the technical solution provided by the embodiment of the present invention, the target area where the target to be analyzed in the video frame collected at the previous moment and / or the next moment is located is spliced ​​with the area to be analyzed containing all mobile targets in the video frame collected at the current moment to generate a target analysis area to identify the features of the mobile targets in the target analysis area. Under the condition of certain hardware resources, the existing resources can be fully utilized to analyze the feature information of the mobile targets in at least two video screens, thereby reducing the number of operations per unit time, thereby freeing up more computing power and effectively improving the efficiency of target feature recognition.

[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. 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 creative work.

[0022] Figure 1 is a flow chart of a target feature acquisition method provided according to Embodiment 1 of the present invention;

[0023] Figure 2 is a schematic diagram of a target motion area provided by an embodiment of the present invention;

[0024] Figure 3 is a schematic diagram of a moving target motion trajectory provided by an embodiment of the present invention;

[0025] Figure 4 is a schematic diagram of a target analysis area provided by an embodiment of the present invention;

[0026] Figure 5 is a flow chart of a method for acquiring target features provided in Embodiment 2 of the present invention;

[0027] Figure 6 is a schematic diagram of the structure of a target feature acquisition device provided according to Embodiment 3 of the present invention;

[0028] Figure 7 It is a schematic diagram of the structure of a camera for implementing the target feature acquisition method of an embodiment of the present invention. DETAILED DESCRIPTION

[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0031] Embodiment 1

[0032] Figure 1 A flow chart of a target feature acquisition method is provided for the first embodiment of the present invention. This embodiment is applicable to the case of acquiring target features in a target analysis area. The method can be executed by a target feature acquisition device. The target feature acquisition device can be implemented in the form of hardware and / or software. The target feature acquisition device can be configured in a camera. Figure 1 As shown, the method includes:

[0033] S110, capturing video frames in real time, and when the number of moving targets contained in the first video frame captured at the current moment is greater than a first preset number threshold, obtaining the area to be analyzed in the first video frame; wherein the area to be analyzed is the entire area including all moving targets.

[0034] The camera can collect video images of the monitoring scene in real time to perform feature analysis on the target in the monitoring scene through the video images.

[0035] In an embodiment of the present invention, a camera captures video frames in real time, and determines in real time whether the number of moving targets contained in the captured video frames is greater than a first preset number threshold. For the convenience of description, the first video frame in which the number of moving targets is greater than the first preset number threshold is taken as the first video frame, and the capture time of the first video frame is taken as the current time. When the number of moving targets contained in the first video frame captured at the current time is greater than the first preset number threshold, it means that the distribution of the moving targets contained in the first video frame is relatively dense. In order to save time, the overall area containing all the moving targets can be extracted from the first video frame, and the overall area is used as the area to be analyzed in the first video frame. Among them, the moving targets can include human bodies, faces or vehicles. It should be noted that the embodiments of the present invention do not limit the categories of moving targets.

[0036] Optionally, when the number of moving targets contained in the first video frame collected at the current moment is less than the first preset number threshold, return to execute real-time video frame collection. It can be understood that the camera collects video frames in real time, and determines in real time whether the number of moving targets contained in the collected video frames is greater than the first preset number threshold. If not, the camera collects video frames at the next moment until the number of moving targets contained in the collected video frames is greater than the first preset number threshold, and the video frame with the number of moving targets greater than the first preset number threshold is used as the first video frame. Optionally, since the number of moving targets contained in the video frames before the first video frame is less than the first preset number threshold, the area where the moving targets are located in each video frame before the first video frame can be extracted. For example, the circumscribed rectangular area of ​​each moving target can be used as the area where the moving target is located, and the area where the moving target is located in each video frame before the first video frame is stored in a preset storage area to be spliced. When the number of moving targets contained in the storage area to be spliced ​​is greater than the preset threshold, the area where the moving targets are located in the storage area to be spliced ​​is spliced, and the spliced ​​area is subjected to mobile target analysis to obtain feature information of the moving targets.

[0037] Optionally, when the number of moving targets contained in the first video frame collected at the current moment is greater than a first preset number threshold, obtaining the area to be analyzed in the first video frame includes: obtaining the target motion area in the first video frame collected at the current moment, and determining the number of moving targets contained in the target motion area; when the number of moving targets contained in the target motion area is greater than the first preset number threshold, using the target motion area as the area to be analyzed. Exemplarily, obtaining the position information of all moving targets in the first video frame collected at the current moment, determining the target motion area in the first video frame according to the position information of all moving targets, wherein the target motion area may be a position area containing all moving targets.

[0038] Optionally, obtaining the target motion area in the first video frame collected at the current moment includes: determining the initial motion area in the first video frame collected at the current moment; obtaining the position information of the moving target in the initial motion area; determining the motion hotspot in the initial motion area according to the position information, and using the motion hotspot as the target motion area. In an embodiment of the present invention, according to the camera shooting principle, the target in the upper position area of ​​the video frame is farther away from the camera, and the target pixel in the upper position area of ​​the video frame is lower. Therefore, a large number of historical video frames of the monitoring scene collected by the camera can be obtained, and the initial motion area in the first video frame collected at the current moment is determined by analyzing the moving targets in the historical video frames, wherein the pixel value of the moving target contained in the initial motion area is greater than a preset pixel value threshold. Exemplarily, Figure 2 A schematic diagram of a target motion area provided by an embodiment of the present invention, such as Figure 2 As shown, by analyzing the pixel values ​​of the moving targets in the historical video frames, a dividing line is determined, wherein the pixel values ​​of the moving targets in the area above the dividing line are less than a preset pixel threshold, and the pixel values ​​of the moving targets in the area below the dividing line are greater than the preset pixel threshold. Since the pixel values ​​of the moving targets in the area above the dividing line are less than the preset pixel threshold, it is impossible to obtain the feature information of the moving targets in the area above the dividing line, so the area below the dividing line is taken as the initial motion area. The position information of the moving targets in the initial motion area is obtained, and the motion hotspot in the initial motion area is determined according to the position information. For example, the position area containing all the moving targets in the initial motion area is determined as the motion hotspot. The motion hotspot in the initial motion area is taken as the target motion area. Optionally, in order to facilitate calculation and save performance, the target motion area can be horizontally and vertically regularized, wherein the contour lines of the target motion area after horizontal and vertical regularization are all horizontal lines and vertical lines, and there are no inclined line segments. As shown Figure 2 As shown, the target motion area is the motion area that has been regularized horizontally and vertically.

[0039] In an embodiment of the present invention, the number of mobile targets contained in the target motion area is determined, and when the number of mobile targets contained in the target motion area is greater than the first preset number threshold, the target motion area is used as the area to be analyzed. It can be understood that when the number of mobile targets contained in the target motion area is greater than the first preset number threshold, it means that the mobile targets contained in the target motion area are densely distributed. In order to save time, the entire target motion area can be directly used as the area to be analyzed. Exemplarily, when the monitoring scene of the camera is a relatively dense shopping mall or street, there are many mobile targets appearing in the monitoring picture. At this time, the entire target motion area can be directly used as the area to be analyzed.

[0040] S120: Acquire a second video frame captured at a previous moment and / or a next moment, and determine a motion trajectory of the moving target according to the first video frame and the second video frame.

[0041] Among them, the previous moment is the previous acquisition moment of the current moment, and the next moment is the next acquisition moment of the current moment. The video frame acquired by the camera at the previous moment is obtained, and the video frame acquired at the previous moment is used as the second video frame, and the first video frame and the second video frame are analyzed to determine the motion trajectory of the moving target, that is, the video frame acquired at the previous moment and the video frame acquired at the current moment are analyzed to determine the motion trajectory of the moving target. Optionally, the video frame acquired by the camera at the next moment is obtained, and the video frame acquired at the next moment is used as the second video frame, and the first video frame and the second video frame are analyzed to determine the motion trajectory of the moving target, that is, the video frame acquired at the current moment and the video frame acquired at the next moment are analyzed to determine the motion trajectory of the moving target. Optionally, the video frame acquired by the camera at the next moment and the video frame acquired at the next moment are obtained, and the video frame acquired at the previous moment and the video frame acquired at the next moment are both used as the second video frame, and the first video frame and the second video frame are analyzed to determine the motion trajectory of the moving target, that is, the video frame acquired at the previous moment, the video frame acquired at the current moment, and the video frame acquired at the next moment are analyzed to determine the motion trajectory of the moving target.

[0042] S130: Determine a target to be analyzed in the second video frame according to the motion trajectory of the moving target, and extract a target area where the target to be analyzed is located from the second video frame.

[0043] In an embodiment of the present invention, Figure 3 A schematic diagram of a moving target motion trajectory provided by an embodiment of the present invention. Figure 3As shown, the moving target motion trajectory may include the following three situations: first, the same moving target appears in the first video frame and the second video frame at the same time, in which case the moving target motion trajectory is a continuous motion trajectory of the moving target; second, the moving target appears in the first video frame but not in the second video frame, in which case the moving target motion trajectory is interrupted in the second video frame; third, the moving target does not appear in the first video frame but appears in the second video frame, in which case the moving target motion trajectory is a motion trajectory newly appearing in the second video frame. Exemplarily, the moving target newly appearing in the second video frame is determined according to the moving target motion trajectory, and the moving target newly appearing in the second video frame is used as the target to be analyzed in the second video frame.

[0044] Optionally, determining the target to be analyzed in the second video frame according to the motion trajectory of the mobile target includes: judging whether a new mobile target appears in the second video frame according to the motion trajectory of the mobile target, and if so, taking the new mobile target as the target to be analyzed in the second video frame; or, determining the trajectory angle of the mobile target according to the motion trajectory of the mobile target, and taking the mobile target in the second video frame whose trajectory angle is greater than a preset angle threshold as the target to be analyzed in the second video frame.

[0045] Exemplarily, whether a new moving target appears in the second video frame is determined according to the moving target motion trajectory, wherein it can be determined whether the new moving target motion trajectory is included in all the moving target motion trajectories. If so, it indicates that a new moving target appears in the second video frame. When a new moving target appears in the second video frame, the new moving target is used as the target to be analyzed in the second video frame. Optionally, the trajectory angle of the moving target is determined according to the moving target motion trajectory, and it is determined whether the trajectory angle is greater than a preset angle threshold. If so, the moving target whose trajectory angle is greater than the preset angle threshold in the second video frame is used as the target to be analyzed. It can be understood that when the trajectory angle of the moving target is greater than the preset angle threshold, it indicates that the moving direction of the moving target has changed significantly, and the characteristics of the moving target may change significantly. In order to obtain all the characteristic information of the moving target later, even if the moving target is already included in the area to be analyzed, the moving target whose trajectory angle is greater than the preset angle threshold in the second video frame is used as the target to be analyzed again. It should be noted that the target to be analyzed may include only the new moving target, or only the moving target whose trajectory angle is greater than the preset angle threshold, or both the new moving target and the moving target whose trajectory angle is greater than the preset angle threshold. In addition, the embodiment of the present invention does not limit the number of targets to be analyzed.

[0046] In an embodiment of the present invention, the target region where the target to be analyzed is located is extracted from the second video frame. For example, the circumscribed rectangular region of the target to be analyzed in the second video frame is used as the target region. It should be noted that when there are multiple targets to be analyzed, the target regions where the targets to be analyzed are located may be the same in size or may be different in size.

[0047] S140: splice the target area into the area to be analyzed to generate a target analysis area, and analyze the target analysis area to obtain feature information of the mobile target contained in the target analysis area.

[0048] In an embodiment of the present invention, the target area can be spliced ​​into the area to be analyzed based on a preset splicing algorithm to generate a target analysis area. The target analysis area is analyzed to obtain feature information of all mobile targets contained in the target analysis area. Exemplarily, the target analysis area can be input into a pre-trained target feature extraction model, and feature information of each mobile target in the target analysis area can be obtained according to the output result of the target feature extraction model. Exemplarily, if the mobile target is a person, the feature information of the mobile target may include relevant information such as facial features, limb features, and clothing of the person.

[0049] The target feature acquisition method of the embodiment of the present invention includes: acquiring video frames in real time, and when the number of moving targets contained in the first video frame acquired at the current moment is greater than a first preset number threshold, acquiring the area to be analyzed in the first video frame; wherein the area to be analyzed is the overall area containing all moving targets; acquiring the second video frame acquired at the previous moment and / or the next moment, and determining the motion trajectory of the moving target based on the first video frame and the second video frame; determining the target to be analyzed in the second video frame based on the motion trajectory of the moving target, and extracting the target area where the target to be analyzed is located from the second video frame; splicing the target area into the area to be analyzed to generate a target analysis area, and analyzing the target analysis area to acquire feature information of the moving target contained in the target analysis area. Through the technical solution provided by the embodiment of the present invention, the target area where the target to be analyzed in the video frame collected at the previous moment and / or the next moment is located is spliced ​​with the area to be analyzed containing all mobile targets in the video frame collected at the current moment to generate a target analysis area to identify the features of the mobile targets in the target analysis area. Under the condition of certain hardware resources, the existing resources can be fully utilized to analyze the feature information of the mobile targets in at least two video screens, thereby reducing the number of operations per unit time, thereby freeing up more computing power and effectively improving the efficiency of target feature recognition.

[0050] In some embodiments, before analyzing the target analysis area and obtaining the feature information of the mobile target contained in the target analysis area, it also includes: determining whether the target analysis area meets the preset conditions, if not, updating the second video frame based on the previous video frame and / or the next video frame of the second video frame, and splicing the target area where the newly added target to be analyzed in the updated second video frame is located into the target analysis area until the target analysis area meets the preset conditions. The advantage of such a setting is that, under the condition of certain hardware resources, the existing resources can be fully utilized to splice the target areas where the targets to be analyzed in multiple video frames are located into the area to be analyzed, so as to perform feature recognition on more mobile targets in more video images at the same time, further reducing the number of operations per unit time, thereby freeing up more computing power and improving feature recognition efficiency.

[0051] In an embodiment of the present invention, after the target area is spliced ​​into the area to be analyzed and the target analysis area is generated, it is determined whether the target analysis area meets the preset conditions. Optionally, the preset conditions include that the number of mobile targets contained in the target analysis area is greater than or equal to a second preset number threshold, or that the resolution of the target analysis area reaches a preset resolution. It is understandable that the hardware resources of the camera are limited, and the number of mobile targets that can be analyzed is limited. In addition, the image size that the camera can analyze is limited. When the resolution of a certain image is greater than a certain resolution threshold, the camera cannot analyze the image. Therefore, it is determined whether the number of mobile targets contained in the target analysis area is greater than or equal to the second preset number threshold, or whether the resolution of the target analysis area reaches the preset resolution. If not, it means that the target analysis area can continue to splice the target area where the mobile target is located in the previous video frame or the next video frame of the second video frame. Therefore, when the target analysis area does not meet the preset conditions, the second video frame is updated based on the previous video frame or the next video frame of the second video frame, and the target area where the newly added target to be analyzed in the updated second video frame is located is spliced ​​into the target analysis area until the target analysis area meets the preset conditions.

[0052] Exemplarily, if the second video frame is a video frame captured at the previous moment of the current capture moment corresponding to the first video frame, then when the target analysis area does not meet the preset conditions, the previous video frame of the second video frame is obtained, and the motion trajectory of the moving target is determined based on the previous video frame of the second video frame and the second video frame, and the newly added target to be analyzed in the previous video frame of the second video frame is determined based on the motion trajectory of the moving target, and then the area where the newly added target to be analyzed in the previous video frame of the second video frame is located is spliced ​​into the target analysis area, and it is determined whether the newly generated target analysis area meets the preset conditions, and so on, until the target analysis area meets the preset conditions.

[0053] As another example, if the second video frame is a video frame captured at the next moment after the current capture moment corresponding to the first video frame, then when the target analysis area does not meet the preset conditions, a video frame after the second video frame is obtained, and the motion trajectory of the moving target is determined based on the second video frame and the video frame after the second video frame, and a newly added target to be analyzed in the video frame after the second video frame is determined based on the motion trajectory of the moving target, and then the area where the newly added target to be analyzed in the video frame after the second video frame is located is spliced ​​into the target analysis area, and it is determined whether the newly generated target analysis area meets the preset conditions, and so on, until the target analysis area meets the preset conditions.

[0054] As another example, if the second video frame is a video frame captured at the previous moment and the next moment of the current capture moment corresponding to the first video frame, then when the target analysis area does not meet the preset conditions, the previous video frame of the second video frame and the next video frame of the second video frame are obtained, and the motion trajectory of the moving target is determined according to the second video frame and the previous video frame and the next video frame of the second video frame, and the newly added targets to be analyzed in the previous video frame and the next video frame of the second video frame are determined according to the motion trajectory of the moving target, and then the areas where the newly added targets to be analyzed in the previous video frame and the next video frame of the second video frame are located are spliced ​​into the target analysis area, and it is determined whether the newly generated target analysis area meets the preset conditions, and so on, until the target analysis area meets the preset conditions.

[0055] In the embodiment of the present invention, the second video frame is a video frame collected at the next moment of the current collection moment corresponding to the first video frame as an example for explanation. Exemplarily, the current moment is T1, the video frame collected at T1 is S1, the next moment is T2, the video frame collected at T2 is S2, and the target area where the target to be analyzed in the video frame S2 is located is spliced ​​to the area to be analyzed in the video frame S1, and the generated target analysis area is Q1. Then, when the target analysis area does not meet the preset conditions, the video frame S3 collected at the next moment T3 of the T2 moment is obtained, and the moving target motion trajectory is determined according to the video frames S2 and S3, and the target to be analyzed is determined from the video frame S3 according to the moving target motion trajectory, and the target area where the target to be analyzed is located is extracted from the video frame S3, and the target area extracted from the video frame S3 is spliced ​​to the target analysis area Q1 to generate a new target analysis area Q2. Then, it is further determined whether Q2 meets the preset conditions, and so on, until the target analysis area meets the preset conditions. At this time, the target analysis area that meets the preset conditions is analyzed to obtain the feature information of the moving target contained in the target analysis area.

[0056] For example, Figure 4 A schematic diagram of a target analysis area provided by an embodiment of the present invention. Figure 4As shown, the target motion area in the first video frame captured at time T1 is taken as the area to be analyzed as an example, wherein the area to be analyzed contains 5 moving targets, the second preset number threshold is 10, the video frames corresponding to time T2, time T3, time T4 and time T5 respectively contain only one new moving target, and the video frame corresponding to time T6 only contains moving targets whose trajectory angles are greater than the preset angle threshold. Therefore, the target area where the target to be analyzed is located in the video frames corresponding to time T2, time T3, time T4, time T5 and time T6 is extracted, and the extracted target area is spliced ​​into the area to be analyzed to generate a target analysis area. Among them, the resolution of the target analysis area is less than the preset resolution. At this time, the generated target analysis area is analyzed to obtain the feature information of the 10 moving targets contained in the target analysis area. Optionally, the area to be analyzed in the video frame captured at time T7 is obtained, and then S110-S140 are repeated.

[0057] In some embodiments, before obtaining the second video frame captured at the previous moment and / or the next moment, and determining the motion trajectory of the moving target based on the first video frame and the second video frame, it also includes: judging whether the previous moment and / or the next moment is in a preset time period; obtaining the second video frame captured at the previous moment and / or the next moment, and determining the motion trajectory of the moving target based on the first video frame and the second video frame, including: when the previous moment and / or the next moment is in the preset time period, obtaining the second video frame captured at the previous moment and / or the next moment, and determining the motion trajectory of the moving target based on the first video frame and the second video frame.

[0058] In an embodiment of the present invention, the number of moving targets contained in the monitoring screen of the camera is not only related to the monitoring scene, but also closely related to the monitoring time period. For example, when the monitoring scene of the camera is a relatively dense shopping mall or street, then in the period of 0:00-6:00, the number of moving targets appearing in the monitoring screen of the camera is very small, but in the period of 8:00-22:00, the number of moving targets appearing in the monitoring screen of the camera is very large. Therefore, the number of moving targets contained in the video frames collected at the two acquisition moments before and after different time periods may increase or decrease suddenly. For the areas where each moving target is located in the video frames collected in the time period containing fewer moving targets, splicing may not exceed the computing power requirements of the camera. If it is not analyzed in time, it will affect the timeliness of the mobile target analysis.

[0059] Therefore, it is determined whether the previous moment and / or the next moment is in the preset time period. If so, the second video frame collected at the previous moment and / or the next moment is obtained, and the moving target motion trajectory is determined according to the first video frame and the second video frame, so that the target area where the target to be analyzed in the second video frame is located is spliced ​​into the area to be analyzed according to the moving target motion trajectory. Among them, the preset time period is a time period containing a large number of moving targets determined by counting the number of moving targets contained in the historical video frames collected by the camera in each time period. Optionally, the preset time period can also be a time interval for target analysis determined as needed, because if the target analysis exceeds a certain time, it will exceed the time limit. It can be understood that when the previous moment of the current moment is in the preset time period, the moving target motion trajectory can be determined according to the second video frame collected at the previous moment and the first video frame collected at the current moment. When the next moment of the current moment is in the preset time period, the moving target motion trajectory can be determined according to the first video frame collected at the current moment and the second video frame collected at the next moment. When the previous moment and the next moment of the current moment are both within the preset time period, the motion trajectory of the moving target can be determined based on the second video frame captured at the previous moment, the first video frame captured at the current moment, and the second video frame captured at the next moment.

[0060] Embodiment 2

[0061] Figure 5 A flow chart of a target feature acquisition method provided in the second embodiment of the present invention is shown in FIG. Figure 5 As shown, the method includes:

[0062] S510 , capturing video frames in real time, and determining an initial motion region in a first video frame captured at a current moment.

[0063] S520: Acquire position information of the moving target in the initial motion area.

[0064] S530: Determine a motion hotspot in the initial motion area according to the position information, and use the motion hotspot as a target motion area.

[0065] S540: Determine the number of moving targets contained in the target motion area.

[0066] S550, determine whether the number of moving targets is greater than a first preset number threshold, if so, execute S560, otherwise, return to execute S510.

[0067] S560: Use the target motion area as the area to be analyzed.

[0068] S570: Acquire a second video frame captured at the previous moment and / or the next moment, and determine a motion trajectory of the moving target according to the first video frame and the second video frame.

[0069] S580. Determine a new moving target appearing in the second video frame according to the moving target's motion trajectory, and use the new moving target as the target to be analyzed in the second video frame; or, determine the trajectory angle of the moving target according to the moving target's motion trajectory, and use the moving target in the second video frame whose trajectory angle is greater than a preset angle threshold as the target to be analyzed in the second video frame.

[0070] S590: Extract the target region where the target to be analyzed is located from the second video frame, and splice the target region into the region to be analyzed to generate a target analysis region.

[0071] S5100, determine whether the target analysis area meets the preset conditions, if so, execute S5120, otherwise execute S5110.

[0072] S5110. Update the second video frame based on the previous video frame and / or the next video frame of the second video frame, and splice the target area where the newly added target to be analyzed in the updated second video frame is located into the target analysis area, and return to execute S5100.

[0073] S5120: Analyze the target analysis area to obtain feature information of the mobile target contained in the target analysis area.

[0074] Through the target feature acquisition method provided by the embodiment of the present invention, when the hardware resources are certain, the existing resources can be fully utilized to splice the target areas where the targets to be analyzed in multiple video frames are located into the area to be analyzed, so as to perform feature recognition on more moving targets in more video pictures at the same time, further reducing the number of operations per unit time, thereby freeing up more computing power and improving feature recognition efficiency.

[0075] Embodiment 3

[0076] Figure 6 A schematic diagram of the structure of a target feature acquisition device provided in Embodiment 3 of the present invention.

[0077] like Figure 6 As shown, the device comprises:

[0078] The module 610 for acquiring the region to be analyzed is used to capture video frames at a certain time, and when the number of moving targets contained in the first video frame captured at the current moment is greater than a first preset number threshold, acquire the region to be analyzed in the first video frame; wherein the region to be analyzed is the entire region containing all moving targets;

[0079] A motion trajectory determination module 620 is used to obtain a second video frame captured at a previous moment and / or a next moment, and determine a motion trajectory of a moving object according to the first video frame and the second video frame;

[0080] A target region extraction module 630, configured to determine a target to be analyzed in the second video frame according to the motion trajectory of the mobile target, and extract a target region where the target to be analyzed is located from the second video frame;

[0081] The target feature acquisition module 640 is used to splice the target area into the area to be analyzed to generate a target analysis area, and analyze the target analysis area to obtain feature information of the mobile target contained in the target analysis area.

[0082] Optionally, the device further comprises:

[0083] The video frame real-time acquisition loop module is used to return to execute real-time acquisition of video frames when the number of moving targets contained in the first video frame acquired at the current moment is less than a first preset number threshold.

[0084] Optionally, the module for acquiring the area to be analyzed includes:

[0085] A target motion region acquisition unit, used to acquire a target motion region in a first video frame acquired at a current moment, and determine the number of moving targets contained in the target motion region;

[0086] The to-be-analyzed region determining unit is configured to, when the number of moving objects contained in the target motion region is greater than a first preset number threshold, use the target motion region as the to-be-analyzed region.

[0087] Optionally, the target motion area acquisition unit is used to:

[0088] Determine an initial motion region in a first video frame captured at a current moment;

[0089] Acquire the position information of the moving target in the initial motion area;

[0090] A motion hotspot in the initial motion area is determined according to the position information, and the motion hotspot is used as the target motion area.

[0091] Optionally, the target area extraction module is used to:

[0092] Determine whether a new moving target appears in the second video frame according to the moving target's motion trajectory, and if so, take the new moving target as the target to be analyzed in the second video frame; or

[0093] The trajectory angle of the moving target is determined according to the motion trajectory of the moving target, and the moving target whose trajectory angle in the second video frame is greater than a preset angle threshold is used as the target to be analyzed in the second video frame.

[0094] Optionally, the device further comprises:

[0095] A target analysis area judgment module is used to judge whether the target analysis area meets a preset condition before analyzing the target analysis area and obtaining feature information of the mobile target contained in the target analysis area; if not, the second video frame is updated based on the previous video frame and / or the next video frame of the second video frame, and the target area where the newly added target to be analyzed in the updated second video frame is located is spliced ​​into the target analysis area until the target analysis area meets the preset condition; wherein the preset condition includes that the number of mobile targets contained in the target analysis area is greater than or equal to a second preset number threshold, or that the resolution of the target analysis area reaches a preset resolution.

[0096] Optionally, the device further comprises:

[0097] A video acquisition judgment module is used to determine whether the previous moment and / or the next moment is in a preset time period before obtaining a second video frame acquired at the previous moment and / or the next moment and determining the motion trajectory of the moving target according to the first video frame and the second video frame;

[0098] The motion trajectory determination module is used to:

[0099] When the previous moment and / or the next moment is within a preset time period, a second video frame captured at the previous moment and / or the next moment is acquired, and a motion trajectory of the moving target is determined according to the first video frame and the second video frame.

[0100] The target feature acquisition device provided in the embodiment of the present invention can execute the target feature acquisition method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0101] Embodiment 4

[0102] Figure 7 A schematic diagram of a camera 10 that can be used to implement an embodiment of the present invention is shown. The camera is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The camera can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0103] like Figure 7As shown, the camera 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by the at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the camera 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0104] A number of components in the camera 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the camera 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0105] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a target feature acquisition method.

[0106] In some embodiments, the target feature acquisition method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the camera 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the target feature acquisition method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the target feature acquisition method in any other appropriate manner (e.g., by means of firmware).

[0107] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0108] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0109] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0110] To provide interaction with a user, the systems and techniques described herein can be implemented on a camera having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the camera. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0111] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0112] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0113] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0114] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for acquiring target features, characterized in that: include: Capturing video frames in real time, and when the number of moving targets contained in a first video frame captured at a current moment is greater than a first preset number threshold, acquiring a region to be analyzed in the first video frame; wherein the region to be analyzed is an entire region containing all moving targets; Acquire a second video frame captured at a previous moment and / or a next moment, and determine a motion trajectory of the moving target according to the first video frame and the second video frame; Determine the target to be analyzed in the second video frame according to the motion trajectory of the mobile target, and extract the target area where the target to be analyzed is located from the second video frame; The target area is spliced ​​into the area to be analyzed to generate a target analysis area, and the target analysis area is analyzed to obtain feature information of the mobile target contained in the target analysis area.

2. The method according to claim 1, characterized in that Also includes: When the number of moving objects contained in the first video frame captured at the current moment is less than the first preset number threshold, the process returns to executing real-time capture of video frames.

3. The method according to claim 1, characterized in that When the number of moving targets contained in the first video frame collected at the current moment is greater than a first preset number threshold, obtaining the area to be analyzed in the first video frame includes: Acquire a target motion region in a first video frame captured at a current moment, and determine the number of moving objects contained in the target motion region; When the number of moving objects contained in the target motion area is greater than a first preset number threshold, the target motion area is used as an area to be analyzed.

4. The method according to claim 3, characterized in that: Obtain the target motion area in the first video frame captured at the current moment, including: Determine an initial motion region in a first video frame captured at a current moment; Acquire the position information of the moving target in the initial motion area; A motion hotspot in the initial motion area is determined according to the position information, and the motion hotspot is used as the target motion area.

5. The method according to claim 1, characterized in that Determining the target to be analyzed in the second video frame according to the motion trajectory of the moving target includes: Determine whether a new moving target appears in the second video frame according to the moving target's motion trajectory, and if so, take the new moving target as the target to be analyzed in the second video frame; or The trajectory angle of the moving target is determined according to the motion trajectory of the moving target, and the moving target whose trajectory angle in the second video frame is greater than a preset angle threshold is used as the target to be analyzed in the second video frame.

6. The method according to claim 1, characterized in that Before analyzing the target analysis area to obtain feature information of the mobile target contained in the target analysis area, the method further includes: Determine whether the target analysis area meets the preset conditions. If not, update the second video frame based on the previous video frame and / or the next video frame of the second video frame, and splice the target area where the newly added target to be analyzed in the updated second video frame is located into the target analysis area until the target analysis area meets the preset conditions; wherein the preset conditions include that the number of moving targets contained in the target analysis area is greater than or equal to a second preset number threshold, or that the resolution of the target analysis area reaches a preset resolution.

7. The method according to claim 1, characterized in that Before obtaining a second video frame captured at the previous moment and / or the next moment, and determining the motion trajectory of the moving target according to the first video frame and the second video frame, the method further includes: Determine whether the previous moment and / or the next moment is within a preset time period; Acquiring a second video frame captured at a previous moment and / or a next moment, and determining a motion trajectory of a moving target according to the first video frame and the second video frame, including: When the previous moment and / or the next moment is within a preset time period, a second video frame captured at the previous moment and / or the next moment is acquired, and a motion trajectory of the moving target is determined according to the first video frame and the second video frame.

8. A target feature acquisition device, characterized in that: include: A module for acquiring an area to be analyzed, used to capture video frames at a certain time, and when the number of moving targets contained in a first video frame captured at a current moment is greater than a first preset number threshold, to acquire an area to be analyzed in the first video frame; wherein the area to be analyzed is an overall area containing all moving targets; a module for determining a motion trajectory, used to acquire a second video frame captured at a previous moment and / or a next moment, and to determine a motion trajectory of the moving target based on the first video frame and the second video frame; A target region extraction module, used to determine the target to be analyzed in the second video frame according to the motion trajectory of the mobile target, and extract the target region where the target to be analyzed is located from the second video frame; The target feature acquisition module is used to splice the target area into the area to be analyzed to generate a target analysis area, and analyze the target analysis area to obtain feature information of the mobile target contained in the target analysis area.

9. A camera, characterized in that: The camera comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the target feature acquisition method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the target feature acquisition method according to any one of claims 1 to 7 when executed.