Video acquisition method and device, computer device and storage medium

By lowering the zoom factor and adjusting the acquisition direction, the field of view is expanded when the target object is lost. By using a deep learning model for re-identification, the problem of tracking loss caused by target object occlusion or rapid movement is solved, and stable recovery of video footage is achieved.

CN118354207BActive Publication Date: 2025-12-19ARASHI VISION INC
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410392232.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-29
Publication Date
2025-12-19
Estimated Expiration
2043-05-29

AI Technical Summary

Technical Problem

Existing technologies are prone to tracking loss when the target object is occluded or moves quickly out of the frame, and lack an effective recovery mechanism.

Method used

When the target object is lost, the device zoom factor is reduced to obtain its location information, the acquisition direction is adjusted, and video footage of the re-identified object is acquired within the expanded field of view. A deep learning model is then used for feature matching to restore tracking.

Benefits of technology

It improves the success rate of re-identifying objects in complex scenes, ensuring the stability and continuity of video footage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118354207B_ABST
    Figure CN118354207B_ABST
Patent Text Reader

Abstract

The application relates to a video acquisition method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: in the process of acquiring a video picture, when an object loss picture without a target object is acquired, a device zoom coefficient is adjusted to obtain an adjusted zoom coefficient; and based on the adjusted zoom coefficient, a video picture of a re-identified object matched with the target object is acquired. In the case that the target object is lost, the video picture of the re-identified object can be determined and acquired, so that the stability of the video acquisition is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Cross-reference to related applications

[0002] This application claims priority to Chinese Patent Application No. 2023106179175, filed on May 29, 2023, entitled "Video Acquisition Method, Apparatus, Computer Equipment and Storage Medium", the entire contents of which are incorporated herein by reference. Technical Field

[0003] This application relates to the field of image processing technology, and in particular to a video acquisition method, apparatus, computer equipment, storage medium, and computer program product. Background Technology

[0004] In traditional methods, the process of taking pictures based on the position of the target object belongs to target tracking technology, which can be implemented based on optical flow, template matching, feature point, correlation filtering, deep learning, and other methods.

[0005] However, when dealing with situations where the target is obscured by other people or objects, or moves quickly out of the frame, tracking can easily be lost. The main drawback of existing technology is the lack of an effective recovery mechanism. Summary of the Invention

[0006] Therefore, it is necessary to provide a video acquisition method, apparatus, computer equipment, computer-readable storage medium, and computer program product to address the aforementioned technical problems, which can identify and re-acknowledge video footage of the target object when it is lost.

[0007] Firstly, this application provides a video capture method. The method includes:

[0008] During the video capture process, when the captured image of an object that does not exist is lost, the zoom factor of the device is reduced to obtain the reduced zoom factor.

[0009] Based on the reduced zoom factor, video footage is captured from the re-identified objects that match the target object.

[0010] In one embodiment, the step of capturing video footage of the re-identified object matching the target object based on the reduced zoom factor includes...

[0011] In the forward video frame of the scene where the object is lost, obtain the location information of the target object;

[0012] Based on the location information of the target object, the device acquisition direction is adjusted to obtain the adjusted acquisition direction;

[0013] According to the adjusted zoom factor and the adjusted collection direction, a re-identified object matched with the target object is collected in a video frame.

[0014] In one of the embodiments, the adjusting the collection direction of the device according to the position information of the target object comprises:

[0015] If the target object is located at the left edge position of the front video frame, the collection direction of the device is adjusted based on the left edge position;

[0016] If the target object is located at the right edge position of the front video frame, the collection direction of the device is adjusted based on the right edge position.

[0017] In one of the embodiments, the collecting the re-identified object matched with the target object in a video frame according to the adjusted zoom factor comprises:

[0018] The zoom factor of the device is gradually reduced within a range between the zoom factor of the object loss frame when being photographed and a preset zoom factor, so as to obtain a gradually reduced zoom factor of the device;

[0019] The gradually reduced zoom factor of the device is the adjusted zoom factor.

[0020] In one of the embodiments, the collecting the re-identified object matched with the target object in a video frame according to the adjusted zoom factor comprises:

[0021] According to the adjusted zoom factor, a cropping range of a real video frame is enlarged to obtain an enlarged cropping range, the real video frame is a video frame collected through a lens, and / or the frame magnification parameter of the real video frame is reduced to obtain a reduced frame magnification parameter;

[0022] According to the enlarged cropping range and / or the reduced frame magnification parameter, a to-be-identified video frame is intercepted from the real video frame;

[0023] According to the to-be-identified video frame, the re-identified object matched with the target object is identified, and a video frame of the re-identified object is collected.

[0024] In one of the embodiments, before the video frame of the re-identified object is collected, the method further comprises:

[0025] The adjusted zoom factor is gradually increased to obtain an increased zoom factor;

[0026] If the zoom factor after the increase belongs to a lens switching interval, lens switching is performed, and the zoom factor after the increase is continuously increased until the zoom factor of the object loss frame when the object is photographed is obtained, and the re-identified object is image collected.

[0027] In one of the embodiments, the lens switching interval includes at least one of a first switching focus section and a second switching focus section; the first switching focus section is a zoom factor interval of a super wide-angle lens and a wide-angle lens in a switching process; and the second switching focus section is a zoom factor interval of a wide-angle lens and a long-focus lens in a switching process.

[0028] In one of the embodiments, the collected video frame includes:

[0029] In the current video frame containing the target object, a key part specification of the target object is determined;

[0030] According to a deviation value between the key part specification and a preset expected specification, a zoom factor when the current video frame is photographed is adjusted to obtain a next zoom factor;

[0031] The target object is video collected through the next zoom factor.

[0032] In one of the embodiments, the collected object loss frame in which the target object does not exist includes:

[0033] A reference feature of the target object is obtained;

[0034] In the collected video frame, feature extraction of a candidate object is performed to obtain a candidate object feature;

[0035] Similarity between the candidate object feature and the reference feature is determined;

[0036] In each of the video frames, an object loss frame corresponding to the similarity that meets an object loss condition is determined.

[0037] In one of the embodiments, the collected object loss frame in which the target object does not exist includes:

[0038] In a plurality of video frames photographed in a current time period, a number of continuous frame object loss frames in which the target object does not exist is counted to obtain a continuous frame loss number;

[0039] If the continuous frame loss number meets an object loss condition, the plurality of video frames photographed in the current time period include an object loss frame.

[0040] In one of the embodiments, the obtaining the position information of the target object in the forward video frame in which the object loses the picture comprises:

[0041] In the video frame collected in the current time period, a forward video frame containing the target object is determined.

[0042] In the forward video frame, a picture edge region where the target object is located is identified.

[0043] In a second aspect, the present application further provides a video collection device. The device comprises:

[0044] A parameter adjustment module, configured to, in the process of collecting the video frame, when an object loss frame in which the target object does not exist is collected, lower the zoom factor of the device to obtain a lowered zoom factor.

[0045] A picture re-collection module, configured to collect a video frame of a re-identified object matched with the target object based on the lowered zoom factor.

[0046] In a third aspect, the present application further provides a handheld gimbal, comprising a motor and a processor, the motor is configured to control the gimbal to rotate according to the adjusted collection direction, and the processor implements the steps of the video collection in any of the above embodiments when executing the computer program.

[0047] In a fourth aspect, the present application further provides a computer device. The computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the steps of the video collection in any of the above embodiments when executing the computer program.

[0048] In a fifth aspect, the present application further provides a computer readable storage medium. The computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the video collection in any of the above embodiments.

[0049] In a sixth aspect, the present application further provides a computer program product. The computer program product comprises a computer program, and the computer program is executed by a processor to implement the steps of the video collection in any of the above embodiments.

[0050] The video acquisition method, device, computer device, storage medium and computer program product described above, in the process of acquiring a video picture, when an object loss picture without a target object is acquired, the zoom factor of the device is adjusted to be lower, a zoom factor after adjustment is obtained, the field of view range can be expanded, and the probability of detecting a re-identified object is improved; therefore, based on the zoom factor after adjustment, a video picture of a re-identified object matched with the target object is acquired. The re-identified object is used to replace the original target object to acquire a video picture, so that shooting is restored, and the stability of the video picture is ensured. BRIEF DESCRIPTION OF DRAWINGS

[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the embodiments or the related art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.

[0052] Figure 1 An application environment diagram of a video acquisition method in an embodiment;

[0053] Figure 2 A flowchart of a video acquisition method in an embodiment;

[0054] Figure 3 A video picture acquired at a first time point in an embodiment;

[0055] Figure 4 A to-be-determined loss video picture acquired at a second time point in an embodiment;

[0056] Figure 5 A region of interest at a second time point in an embodiment;

[0057] Figure 6 A forward video picture at a third time point in an embodiment;

[0058] Figure 7 A video picture at a third time point in an embodiment;

[0059] Figure 8 A video picture at a fourth time point in an embodiment;

[0060] Figure 9 A video picture acquired at a first time point in another embodiment;

[0061] Figure 10 A video picture acquired at a second time point in another embodiment;

[0062] Figure 11 Fig. 3 is a schematic diagram of a video frame collected at a third time point in another embodiment;

[0063] Figure 12 Fig. 4 is a schematic diagram of a video frame collected at a fourth time point in another embodiment;

[0064] Figure 13 Fig. 5 is a structural block diagram of a video collection device in an embodiment;

[0065] Figure 14 Fig. 6 is an internal structural diagram of a computer device in an embodiment. DETAILED DESCRIPTION

[0066] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0067] The video collection method provided by the embodiments of the present application can be applied in an application environment as shown in Fig. 1. In Fig. 1, the terminal 102 can be, but is not limited to, various cameras, video cameras, panoramic cameras, action cameras, personal computers, notebook computers, smart phones, tablet computers and portable wearable devices. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The terminal 102 can be fixed on the holder body by welding or the like, and can also be detachably connected or rotatably connected with the holder body. Figure 1 In an embodiment, as shown in Fig. 2, a video collection method is provided. Taking the terminal 102 in Fig. 1 as an example, the method includes the following steps:

[0068] Figure 2 Figure 1

[0069] In step 202, in the process of collecting a video frame, when an object loss frame in which the target object does not exist is collected, the position information of the target object is acquired in a forward video frame of the object loss frame; the time stamp of the forward video frame is earlier than the time stamp of the object loss frame.

[0070] ​​​The target object is an object used to control the video picture acquisition process before the object loss picture appears. The target object can be a person, a pet, an object or a virtual character. The position information of the target object in the video picture is used to acquire the video picture. Alternatively, the position information of the target object can be determined by the acquired video picture containing the target object; and the next video picture acquisition corresponding to the acquired video picture is performed according to the position information, so as to realize the tracking shooting of the target object. The acquired video picture can be acquired at a current timestamp, and the next video picture acquisition corresponding to the acquired video picture is performed at a next timestamp. The acquired video picture can be acquired in a current time period, and the next video picture acquisition corresponding to the acquired video picture is performed in a next time period.

[0071] The object loss picture is at least one frame of video picture in the process of acquiring the video picture of the target object, and is used to represent the end of the acquisition of the video picture of the target object. The target object does not exist in the object loss picture, and the previous picture of the object loss picture can or can not exist the target object. Alternatively, the object loss picture can be determined by the similarity between an object in the video picture and the target object, or by the pending loss picture without the target object, and the pending loss picture can be determined based on the similarity.

[0072] The forward video picture is a video picture in which the target object exists, and the timestamp of the forward video picture is earlier than the timestamp of the object loss picture. Alternatively, the forward video picture can be a previous frame of video picture before the acquisition of the object loss picture, or can be multiple frames of video picture before the acquisition of the object loss picture.

[0073] In one embodiment, the acquisition of the video picture comprises: updating the position information of the target object in real time based on a filter tracker or a twin network tracker, and adjusting the acquisition direction of the device by rotating the gimbal, so that the target object is in a preset position range in the video picture, and detecting the position of the target object; determining whether the target object is in a shielding state or out of the field of view range according to the position of the target object in the current picture, until the object loss picture of the target object is acquired.

[0074] Correspondingly, the acquisition of the object loss picture without the target object comprises: if the target object is detected to be in a shielding state or out of the field of view range in a current time period, it is determined that the object loss picture without the target object is acquired. Alternatively, the object loss picture can also be determined by the similarity.

[0075] In step 204, the acquisition direction of the device is adjusted according to the position information of the target object to obtain an adjusted acquisition direction; and / or the zoom factor of the device is lowered to obtain a lowered zoom factor.

[0076] The target object's location information is obtained from the forward video frame where the object is missing, and this information is used to determine the target object's position relative to the forward video frame. When the target object is located in a certain area, its location information corresponds to that area. For example, if the target object is located at the left edge of the forward video frame, its location information indicates that it is located at the left edge, and the device's acquisition direction is then adjusted based on this left edge position.

[0077] The device acquisition direction refers to the direction in which the terminal captures the video image. The angle of the video image captured by the terminal changes synchronously with the acquisition direction. The device acquisition direction is used to indicate the rotation of the handheld gimbal. When a target object is present in the captured video image, the device acquisition direction changes synchronously according to the target object's position. When the video image shows a scene where the object is missing, the target object's position information is determined from the video image preceding the scene where the object is missing. This position information indicates the target object's expected direction of movement. Therefore, the device acquisition direction is adjusted based on this position information to obtain an adjusted acquisition direction, which is then aligned with the target object's expected direction of movement. This movement trend is used to attempt to locate the target object.

[0078] Among them, the video footage to be identified is acquired based on the adjusted acquisition direction. The possible location of the target object can be inferred from its state before it was lost. The camera lens is rotated to find the object to be re-identified. The process involves changing the acquisition direction of the device by controlling the rotation of the camera's pan-tilt unit.

[0079] The device zoom factor is the zoom ratio used by the terminal to acquire video footage. The field of view of the video footage captured by the terminal changes synchronously with the acquisition direction. The device zoom factor is negatively correlated with the field of view of the video footage captured by the terminal. In different video capture modes, the device zoom factor and the target object have different relationships; in one capture mode, the device zoom factor can change according to the movement trend of the target object; in another capture mode, the device zoom factor is not necessarily related to the movement trend of the target object.

[0080] Lowering the zoom factor expands the field of view of the video frame when the subject is missing from the frame, allowing the video to be captured within the expanded field of view. Optionally, lowering the zoom factor can be used to control the switching between multiple lenses within different zoom ranges, or to control the cropping or magnification of the actual video footage.

[0081] In an optional embodiment, in the case that the object loss picture is captured, the zoom factor of the camera is reduced so that the field of view of the picture is enlarged to search for the target in a larger range. The zoom factor is adjusted by calling the hardware interface for controlling the camera.

[0082] In step 206, the video picture of the re-identified object matched with the target object is captured based on the adjusted zoom factor and / or the adjusted capturing direction.

[0083] The re-identified object is a re-identified target object. The re-identified object is a photographed object that is re-identified as being matched with the target object after the target object is lost. The re-identified object before and after the object loss picture is matched with the target object, so that the re-identified object and the target object are the same photographed object. Optionally, during the process of capturing the video picture of the target object, there are object loss pictures at different time intervals, and there are respective target objects and re-identified objects before and after each time interval; wherein the target object in a certain time interval can be a target object that does not change from the start of the selfie, or can be a re-identified object determined in the previous time interval of the time interval.

[0084] Optionally, the re-identified object is identified in the to-be-identified video picture. The to-be-identified video picture can be a video picture captured along the adjusted capturing direction, can be a video picture captured in the enlarged field of view at the reduced zoom factor, or can be a video picture captured in the enlarged field of view at the reduced zoom factor along the adjusted capturing direction.

[0085] Optionally, the to-be-identified video picture is used for detecting the re-identified object, and when the re-identified object is detected, the video picture of the re-identified object is captured. In an optional embodiment, the process of capturing the to-be-identified video picture includes: capturing the video picture through the gradually reduced zoom factor towards the gradually adjusted capturing direction to obtain the to-be-identified video picture.

[0086] Optionally, the process of determining whether the to-be-identified video picture contains the re-identified object includes: determining the reference feature of the target object from the video picture containing the target object; matching the candidate object features extracted from each frame of the to-be-identified video picture with the reference feature; and if the reference feature matched candidate object feature is detected, it is determined that the to-be-identified video picture containing the reference feature matched candidate object feature contains the re-identified object matched with the target object.

[0087] In an example embodiment, in the process of expanding the field of view and / or rotating the lens, a target re-identification algorithm is used to search for the target in the new field of view to obtain a re-identified object. A deep learning model (such as a Siamese network, a ReID network, etc.) is used to extract the features of the candidate object, and then a feature matching algorithm (such as cosine similarity, Euclidean distance, etc.) is used to match the candidate object with the target object, so as to determine the re-identified object that matches the target object from the video frame to be identified.

[0088] In an example embodiment, when a re-identified object with high similarity to the target object is found in the new field of view, the re-identified object is determined to be the re-found target object, and the target tracking is resumed. After the tracking is resumed, the zoom factor is restored to the original value (the default value or the zoom factor when the object loss frame is captured), so that the frame returns to the normal field of view range, and the process of capturing the video frame in step 202 is continued.

[0089] In an example embodiment, the effect of the present embodiment is compared with the traditional scheme through multiple video frames. For the video frames of Figures 3 to 8 , they are arranged in time stamp order; in the first stage, the video frames of the present embodiment are as shown in Figure 3 (a), and the traditional video frames are as shown in Figure 3 (b). In the second stage, the target object is blocked by an obstacle, and at this time, the indefinite loss frame is captured. The video frames of the present embodiment are as shown in Figure 4 (a), and the traditional video frames are as shown in Figure 4 (b). In this stage, the key parts of the present embodiment are divided as shown in Figure 5 (a), and the key parts of the traditional scheme are divided as shown in Figure 5 (b); in the third stage, it is the capturing stage of the forward video frame, and the present embodiment is as shown in Figure 6 (a), and the traditional video frame is as shown in Figure 6 (b); in the fourth stage, the present embodiment has a capturing stage of the video frame to be identified, which is as shown in Figure 7 (a), and the traditional video frame does not have a capturing stage of the video frame to be identified, which is as shown in Figure 7 (b); in the fifth stage, the present embodiment has a capturing stage of the re-identified object, which is as shown in Figure 8 (a), and the traditional video frame does not have this capturing stage, which is as shown in Figure 8 (b).

[0090] In the video collection method, in the process of collecting the video picture, when an object loss picture without the target object is collected, the position information of the target object is obtained in the forward video picture of the object loss picture. Since the position information can reflect the expected motion direction of the target object, the device collection direction can be adjusted according to the position information of the target object to obtain an adjusted collection direction, so as to increase the success rate of re-identified object detection in a complex scene. The zoom factor of the device is lowered to obtain a lowered zoom factor, so as to expand the field of view and improve the probability of detecting the re-identified object. Therefore, the video picture of the re-identified object matched with the target object is collected based on the lowered zoom factor and / or the adjusted collection direction. The video picture is collected by replacing the original target object with the re-identified object, so as to realize recovery shooting and ensure the stability of the video picture.

[0091] In order to more clearly illustrate the different stages of collecting the video picture according to the present scheme, first, the related steps of the appearance of the object loss picture are described.

[0092] In one embodiment, the video picture is collected, including: determining the key part specification of the target object in the current video picture containing the target object; adjusting the zoom factor of the current video picture when shooting according to the deviation value between the key part specification and the preset expected specification to obtain a next zoom factor; and collecting the video picture of the target object through the next zoom factor.

[0093] The current video picture is at least one frame of video picture obtained by shooting the target object in the current time period before the appearance of the object loss picture. Alternatively, the current video picture can be a certain frame of video picture, or can include multiple frames of video picture in the current time period.

[0094] The key part specification is the picture proportion or size information of a certain key part of the target object. Alternatively, the feature recognition accuracy of the key part is high, which can be used to determine a salient region, and the width or area of the salient region is taken as the key part specification. Alternatively, the key part specification is the face specification of the target object.

[0095] The preset expected specification is a specification set in advance and used as a reference value of the key part specification. Alternatively, the preset expected specification can be set according to the picture proportion, size specification, or other specifications; the preset expected specification can be set by artificial setting or can be a default value.

[0096] The deviation value between the key part specification and the preset expected specification is used to determine the difference degree between the key part specification and the preset expected specification; the deviation value can be the ratio between the key part specification and the preset expected specification.

[0097] Thus, by adjusting the zoom factor of the current video frame when shooting through the deviation value, the next zoom factor is obtained, which can make the key part specification close to the preset expected specification, so that the key part specification is guaranteed to be unchanged or tend to the preset expected specification in the next video frame of the current video frame, so that the size of the target object in the video frame is larger and the details are clearer. Taking video conferencing as an example, the face can be taken as the key part, and through the ratio of the face specification to the preset expected specification, the face area of the video conference is guaranteed to be within a reasonable field of view, so that the size of the face in the frame is larger and the details are clearer.

[0098] In an exemplary embodiment, the present scheme is the state of combined use of AI Zoom, which is used to control the zoom factor of the frame so that the specification of the key part (head) of the target object in the frame remains relatively stable during recording.

[0099] First, the process of parameter setting. The preset expected specification of the target rectangular frame of the key part is set, which can be the percentage of the height of the head to the height of the frame, the width ratio, or the area ratio, etc. This value can be preset by the system or adjusted by the user, such as in the application Flow, the preset expected specification is the preset value in the App.

[0100] Next, the adjustment process. The adjustment process includes: collecting video frames based on the position of the target object, detecting and obtaining the specification of the rectangular frame of the target object in each frame, which includes but is not limited to height, width, area, or square root of area. Then, calculate the size difference between the head specification and the preset expected specification, which can mean calculating the difference between the current target rectangular frame size and the expected size. Next, adjust the device zoom factor, which is adjusted according to the above size difference. For example, if the current target rectangular frame size is larger than the expected size, the zoom factor is reduced; if the current target rectangular frame size is smaller than the expected size, the zoom factor is increased. The proportional control method (such as PID controller) can be used to adjust the zoom factor to achieve a smooth adjustment process. Then, the zoom is updated to update the frame zoom according to the adjusted zoom factor. It can be understood that the adjustment process can be executed in a loop until the object loss frame is collected.

[0101] Through this algorithm process, the size of the target in the frame can be kept relatively stable by controlling the zoom factor of the frame during video frame collection. This is very useful in long-distance tracking, which can automatically switch the system to a large zoom factor represented by a long-focus lens, making the size of the target object in the frame larger and the details clearer.

[0102] In an exemplary embodiment, byFigures 9-12 The difference between the embodiment and the conventional technology is described in time sequence, which includes a first time point, a second time point, a third time point and a fourth time point arranged in time sequence. At the first time point, the device zoom factor of the embodiment is 4x, and the video picture is as shown in Figure 9 (a), while the conventional device zoom factor is lx, and the conventional video picture is as shown in Figure 9 (b). At the second time point, the next zoom factor based on the face specification at the first time point is used to collect the video picture of the target object, and the video picture obtained is as shown in Figure 10 (a), the device zoom factor is increased to 5.3x, while the conventional device zoom factor is lx, and the conventional video picture is as shown in Figure 10 (b).

[0103] At the third time point, the device zoom factor of the embodiment is 5.1x, the target object is at the left edge position, and the video picture is as shown in Figure 11 (a), while the conventional device zoom factor is lx, and the conventional video picture is as shown in Figure 11 (b). At the fourth time point, after adjusting the device collection direction based on the position information at the third time point, the video picture collected through the adjusted collection direction is as shown in Figure 12 (a), the device zoom factor is increased to 5.1x, while the conventional device zoom factor is lx, and the conventional video picture is as shown in Figure 12 (b).

[0104] In one embodiment, collecting an object loss picture in which the target object does not exist includes: obtaining a reference feature of the target object; extracting a candidate object feature in the collected video picture to obtain a candidate object feature; determining the similarity between the candidate object feature and the reference feature; and determining the object loss picture corresponding to the similarity satisfying the object loss condition in each video picture.

[0105] Optionally, the reference feature of the target object is the feature obtained by performing feature extraction on the target object. The reference feature can be obtained by performing feature extraction on the region of interest in which the target object is located in the current video picture or other collected video pictures of the same target object. Optionally, in terms of data form, the reference feature can be a reference template or a reference feature vector. The reference feature vector can be extracted according to the rectangular frame at the initialization of the target, and can also be dynamically updated in the process of collecting the video of the target object, and the update condition is that the target object is not in the loss state, i.e., the object loss picture of the target object is not collected. The dynamic updating manner can be periodic updating or updating at intervals of a certain number of frames.

[0106] The candidate object feature is a feature extracted by a candidate object recognition process. Each video frame collected has its own candidate object feature. The similarity between the candidate object feature and the reference feature can be used to determine whether the candidate object is a re-identified object. Exemplarily, both the candidate object feature and the reference feature are feature vectors, and the similarity between the candidate object feature vector and the reference feature vector can be determined by a similarity technique.

[0107] The object loss condition is used to determine whether the similarity represents that the target object does not exist in the video frame. The object loss condition can be that the similarity is less than a preset value, a preset ratio or other similarity comparison results, and the object loss condition can also be determined based on the number of consecutive frames lost obtained by counting the number of pending loss frames, to further increase the accuracy.

[0108] In an exemplary embodiment, the similarity can be calculated based on a template matching or feature point matching method. The similarity can be calculated based on the similarity between the candidate object and the features of the preset template or feature point set. The similarity can also be calculated based on a deep learning model (such as a Siamese network, a ReID network, etc.) to extract the features of the candidate object, and then calculate the similarity between the candidate object features and the reference features. Common methods include cosine similarity and Euclidean distance. When the similarity is lower than a set threshold, or the distance between the feature vectors is greater than a set threshold, it can be considered that the target object is lost or leaves the field of view, and an object loss frame is collected.

[0109] Since the object loss frame is collected during the process of extracting the reference feature of the target object, the reference feature can be dynamically adjusted based on the dynamically changing target object, so that the similarity between the candidate object feature and the reference feature is dynamically adjusted, the accuracy of object loss frame recognition is improved, and the re-identified object in the candidate object is more stably identified.

[0110] In another embodiment, collecting an object loss frame in which the target object does not exist includes: counting the number of consecutive frames of pending loss frames in which the target object does not exist in a plurality of video frames captured in a current time period to obtain a number of consecutive frames lost; and if the number of consecutive frames lost satisfies an object loss condition, there is an object loss frame in the plurality of video frames captured in the current time period.

[0111] The pending loss frame is a video frame in which the target object does not exist. The number of consecutive frames lost is the number of consecutive video frames of the pending loss frame in the current time period, which is used to more accurately determine whether the target object is in a temporary occlusion state or other state, so as to more accurately determine whether an object loss frame appears.

[0112] In an embodiment, in the plurality of video pictures taken in the current time period, the number of consecutive missing pictures in which the target object does not exist is counted to obtain a consecutive missing picture number, including: in the plurality of video pictures taken in the current 1 second, based on similarity or motion relationship relevance, determining the pending missing picture in which the target object does not exist; counting the number of video frames of the pending missing picture to obtain the consecutive missing picture number.

[0113] Illustratively, in order to avoid the target object being in a temporary occlusion state, or the motion of the target object being abnormal to cause misjudgment, a consecutive missing counter can be set. Only when the target is detected to be missing or out of the field of view for consecutive multiple frames, it is considered that the target is truly missing.

[0114] In the case that the consecutive missing picture number meets the object missing condition, it can be more accurately determined that there is an object missing picture in the plurality of video pictures taken in the current time period, so as to obtain the position information of the target object in the forward video picture of the object missing picture in the case that the object missing picture exists.

[0115] After the related steps of the appearance of the object missing picture are described, the determination process of the adjusted collection direction is described.

[0116] In an embodiment, the position information of the target object is obtained in the forward video picture of the object missing picture, including: determining the forward video picture containing the target object in the video picture collected in the current time period; identifying the picture edge area where the target object is located in the forward video picture.

[0117] The picture edge area is to determine the motion trend of the target object relative to the terminal in the case of taking the collected video picture as a reference object. When the target object is in a certain picture edge area, the motion trend of the target object at least indicates the expected motion direction indicated by the picture edge area, and the motion speed of the target object can be reflected through multiple forward video pictures. Alternatively, the picture edge area can belong to the left edge position or the right edge position of the video picture.

[0118] In an embodiment, the forward video picture containing the target object is determined in the video picture collected in the current time period, including: in the video picture collected in the current time period, the forward video picture containing the target object is sequentially found according to the time stamp of the object missing picture; and the collected video picture includes the forward video picture containing the target object, and can also include the pending missing picture in which the target object does not exist.

[0119] In one embodiment, in the forward video picture, a picture edge region where the target object is located is identified, including: in the forward video picture, a region of interest where the target object is located is identified; and according to a coordinate position where the region of interest is located, a picture edge region where the target object is located is determined.

[0120] The forward video picture containing the target object is determined, and a motion trend of the target object is predicted in a dynamically changing time period, so as to more accurately determine the picture edge region where the target object is located, and each picture edge region corresponds to a respective motion trend.

[0121] In one embodiment, the device collection direction is adjusted according to the position information of the target object, including: if the target object is located at a left edge position of the forward video picture, the device collection direction is adjusted based on the left edge position; and if the target object is located at a right edge position of the forward video picture, the device collection direction is adjusted based on the right edge position.

[0122] The left edge position is used for adjusting the device collection direction to the left side of the terminal, and the right edge position is used for adjusting the device collection direction to the right side of the terminal.

[0123] In one feasible embodiment, if the target object is located at the left edge position of the forward video picture, the device collection direction is adjusted based on the left edge position, including: if a picture edge region where the target object is located is consistent with a coordinate or a similarity of the left edge position, the device collection direction is adjusted to the left side of the terminal.

[0124] Correspondingly, if the target object is located at the right edge position of the forward video picture, the device collection direction is adjusted based on the right edge position, including: if a picture edge region where the target object is located is consistent with a coordinate or a similarity of the right edge position, the device collection direction is adjusted to the right side of the terminal.

[0125] Therefore, by using one of the left edge position and the right edge position of the forward video picture to adjust the device collection direction, the adjusted collection direction can be matched with most motion trends.

[0126] After the adjusted collection direction is obtained through the above-mentioned embodiments, an adjustment process of a device zoom coefficient is described, which involves a process of lowering the device zoom coefficient to increase the field of view, and also involves a process of restoring the device zoom coefficient to match the field of view with the object loss picture.

[0127] In an optional implementation, the estimated motion direction of the target object is determined according to the last known position of the target object before the target object is lost. For example, when the object is at the left or right edge position before being lost, the gimbal is rotating to the left or right, and the driving signal of the gimbal is extended for a short period of time after the object is lost, so that the gimbal continues to move in the direction in which the target object disappears (0.5 seconds), so as to better find and follow the target object.

[0128] In an optional implementation, when the target object is blocked by other objects or the target object quickly moves out of the field of view, the estimated motion direction and speed of the target object relative to the background are determined according to the multiple frames of forward video images before the target object is lost. Specifically, in each frame of video image, the motion vector of each pixel point is calculated based on the dense optical flow method; the target motion vector is determined according to the mean or median value of the pixel optical flow vectors in the target object; the background motion vector is determined according to the mean or median value of the pixel optical flow vectors outside the target object; and the estimated motion direction and speed of the target object relative to the background are determined according to the difference between the target motion vector and the background motion vector. The average of the motion vectors of several frames before the target object is lost can obtain a more accurate estimation. After the target object is lost, the target object can be rotated for 0.5 seconds or 1 second according to the current estimated target direction and speed, which helps to better find the target object.

[0129] In an embodiment, the device zoom factor is gradually reduced to obtain a reduced zoom factor, including: gradually reducing the device zoom factor in a value range between the zoom factor when the object loss image is captured and a preset zoom factor to obtain a gradually reduced device zoom factor; and the gradually reduced device zoom factor is the reduced zoom factor.

[0130] The preset zoom factor can be the minimum zoom factor of the device, or a zoom factor dynamically adjusted based on certain algorithms. Adjusting the device zoom factor in the value range between the zoom factor when the object loss image is captured and the preset zoom factor can make the range of the field of view captured by the terminal through the lens relatively small, and the efficiency is relatively high.

[0131] Gradually reducing the device zoom factor can gradually and stably increase the field of view involved in the shooting of the terminal, so as to gradually and stably improve the probability of identifying the re-identified object in the case that the target object is blocked by other objects or certain objects, or the target object moves quickly.

[0132] In one specific embodiment, the camera is gradually switched to the minimum zoom supported by the phone at a rate of 2x per second. For example, if the device zoom is 4.5x at a certain time and the minimum zoom supported by the camera is 0.5x (ultra-wide lens), then the switching starts at 4.5x, 1 second later at 2.5x (=4.5-2*1), and 2 seconds later at 0.5x (=4.5-2*2); or, for example, if the current device zoom is 3x and the minimum zoom supported by the camera is 1x (main lens), then the switching starts at 3x, 0.5 seconds later at 2x (=3-2*0.5), and 1 second later at 1x (=3-2*1).

[0133] In one embodiment, the device zoom is adjusted according to the size of the target object, so that the size of the target object in the video frame is less than a preset size. Optionally, the device zoom is adjusted to obtain an adjusted zoom, including: determining the total number of pixels in the video frame based on the screen area; calculating the maximum size of the target object in the video frame according to the total number of pixels and the preset size; determining the number of pixels of the target object according to the size of the target object in the forward video frame; determining the scaling ratio between the number of pixels of the target object and the total number of pixels; and adjusting the zoom of the object loss frame during shooting according to the scaling ratio to obtain the adjusted zoom. If the scaling ratio is less than the minimum zoom supported by the system, the minimum zoom supported by the system is used. Thus, the scaling ratio of the device zoom is determined by the preset size, so as to reduce the range of the device zoom, thereby improving the accuracy.

[0134] For example, the preset size is 4%, and the screen area = 1920*1080 = 2,073,600 pixels. The maximum object area allowed is calculated as: maximum object area = screen area * 4% = 2,073,600 * 0.04 = 82,944 pixels. If the size of the target object in the forward video frame is 480x270 pixels (widthxheight), the number of pixels of the target object is calculated as: target object pixel amount = 480*270 = 129,600 pixels. Then, the scaling ratio is calculated as: scaling ratio = sqrt(maximum object area / current object area) = sqrt(82,944 / 129,600) ≈ 0.8. That is, if the current device zoom is 1x, it needs to be scaled to 0.8x to meet the requirement.

[0135] In one embodiment, the preset ratio value is sequentially increased according to different time periods, and there are multiple levels of preset ratio values. For example, after the object loss picture is collected, the preset ratio value is set to the first level, i.e., 8%, and the state is maintained for 1 second. If the target recovery tracking state is still not found within the 1 second, the zoom factor of the device is continuously adjusted, the preset ratio value is set to the first level, i.e., 4%, and so on.

[0136] In another embodiment, another multi-level zoom rule is described. Within the current time period after the object loss picture is collected, the zoom factor of the device is scaled according to the preset ratio value to obtain the adjusted zoom factor. If there is still no video picture of the re-identified object within the current time period, the zoom factor of the device is scaled according to the preset ratio value to obtain the adjusted zoom factor, and so on. The preset ratio value can be 0.6 times.

[0137] In one embodiment, the camera used by the terminal involves multiple lenses corresponding to different zoom factor ranges; based on the adjusted zoom factor and / or the adjusted collection direction, the video picture of the re-identified object matched with the target object is collected, including: if the adjusted zoom factor belongs to a lens switching interval, lens switching is performed; during the lens switching process, video picture collection is stopped until the lens switching is completed, and the lens after switching is controlled to collect the video picture to be identified; the re-identified object matched with the target object is identified according to the video picture to be identified, and the video picture of the re-identified object is collected.

[0138] The lens switching interval is the range of the preset zoom factor in the state of lens switching. Optionally, the lens switching interval can be multiple zoom factors or a range of zoom factors. Optionally, when there is a zoom factor switching point between the ultra-wide-angle lens and the wide-angle lens, the zoom factor switching point belongs to the lens switching interval; when there is a zoom factor switching focal length range between the ultra-wide-angle lens and the wide-angle lens, the switching focal length range belongs to the lens switching interval. Optionally, during the shooting in the adjusted collection direction, the lens switching process can be performed synchronously.

[0139] In one feasible embodiment, if the adjusted zoom factor belongs to the lens switching interval, lens switching is performed, including: if the adjusted zoom factor is in the switching focal length range between the wide-angle lens and the long-focus lens, the lens of the terminal is controlled to switch from the long-focus lens to the wide-angle lens.

[0140] Correspondingly, during the lens switching process, the video picture acquisition is stopped until the lens switching is completed, and the terminal is controlled to acquire the to-be-identified video picture through the switched lens, including: during the process of switching the long-focus lens to the wide-angle lens, the video picture acquisition is stopped until the terminal switches to the wide-angle lens, and the to-be-identified video picture is acquired through the wide-angle lens.

[0141] Since the lowered zoom factor is gradually lowered, when the lowered zoom factor belongs to different lens switching intervals, the video picture acquisition of the terminal is stopped through the zoom factors in the lens switching intervals, so as to avoid the misrecognition of the re-identified object in the video pictures acquired in different lens switching processes, improve the probability of accurate identification, and more accurately acquire the video pictures of the re-identified object.

[0142] In one embodiment, the camera used by the terminal involves multiple lenses corresponding to different zoom factor ranges; before acquiring the video pictures of the re-identified object, the method further includes: gradually increasing the lowered zoom factor to obtain a raised zoom factor; if the raised zoom factor belongs to a lens switching interval, lens switching is performed; the raised zoom factor is continuously increased until the zoom factor of the object loss picture when being photographed is obtained.

[0143] In one feasible embodiment, gradually increasing the lowered zoom factor to obtain a raised zoom factor includes: gradually increasing the device zoom factor in the value range between the zoom factor of the object loss picture when being photographed and a preset zoom factor to obtain a gradually increased device zoom factor.

[0144] Correspondingly, if the raised zoom factor belongs to a lens switching interval, lens switching is performed, including: if the gradually increased device zoom factor belongs to a certain focal length section of the lens switching interval, lens switching is performed.

[0145] In another feasible embodiment, gradually increasing the lowered zoom factor to obtain a raised zoom factor includes: if the lowered zoom factor is in a switching focal length section between the wide-angle lens and the long-focus lens, the lens of the terminal is controlled to switch from the wide-angle lens to the long-focus lens.

[0146] Correspondingly, if the gradually increased device zoom factor belongs to a certain focal length section of the lens switching interval, lens switching is performed, including: during the process of switching the wide-angle lens to the long-focus lens, the video picture acquisition is continuously or stopped.

[0147] After the lens switching, the zoom factor after the increase continues to be increased until the zoom factor at which the object loss picture is taken, so that the object loss picture and the video picture collected by re-identifying the object have similar field of view ranges, which can be represented by similar field angles or other parameters, and the similar field of view ranges can make the field of view range of the video picture more stable.

[0148] Optionally, the lens switching interval includes at least one of a first switching focal length section and a second switching focal length section; the first switching focal length section is a zoom factor interval of the ultra-wide-angle lens and the wide-angle lens in the switching process; and the second switching focal length section is a zoom factor interval of the wide-angle lens and the long-focus lens in the switching process.

[0149] In an example embodiment, when the device zoom factor is the zoom factor after the increase and the zoom factor at which the object loss picture is taken belongs to the focal length section of the long-focus lens, the focal length section in which the preset zoom factor is located is distinguished, and the lens switched by the terminal includes at least two cases:

[0150] In one case, if the preset zoom factor belongs to the focal length section of the wide-angle lens, the long-focus lens is switched to the wide-angle lens when the zoom factor after the increase belongs to the second switching focal length section, and the wide-angle lens is the lens switched by the terminal.

[0151] In another case, if the preset zoom factor belongs to the focal length section of the ultra-wide-angle lens, the long-focus lens is switched to the wide-angle lens when the zoom factor after the increase belongs to the second switching focal length section; then the video picture is collected through the switched wide-angle lens until the zoom factor after the increase belongs to the first switching focal length section, then the wide-angle lens is switched to the ultra-wide-angle lens; and then the video picture is collected through the switched ultra-wide-angle lens.

[0152] In another example embodiment, when the device zoom factor is the zoom factor after the increase and the zoom factor at which the object loss picture is taken belongs to the focal length section of the long-focus lens, the focal length section in which the preset zoom factor is located is distinguished, and the lens switched by the terminal includes at least two cases:

[0153] In one case, if the preset zoom factor belongs to the focal length section of the wide-angle lens, the wide-angle lens is switched to the long-focus lens when the zoom factor after the increase belongs to the second switching focal length section, and the long-focus lens is the lens switched by the terminal.

[0154] In another case, if the preset zoom factor belongs to the focus range of the ultra-wide-angle lens, the ultra-wide-angle lens is switched to the wide-angle lens when the zoom factor after the increase belongs to the first switching focus range; then the video picture is collected through the switched wide-angle lens until the zoom factor after the increase belongs to the second switching focus range, and then the wide-angle lens is switched to the telephoto lens; and then the video picture of the re-identified object is collected through the switched telephoto lens.

[0155] Therefore, after the object loss picture appears, the lens can be switched to the wide-angle lens or the ultra-wide-angle lens to shoot in a larger visual angle range, so that there is a higher probability to obtain the to-be-identified video picture of the re-identified object; and during the video picture collection of the re-identified object, the lens can be switched to the wide-angle lens or the telephoto lens, so that the overall fluctuation of the visual field range of the video collection is small.

[0156] In another embodiment, the terminal adopts a digital zoom manner; and correspondingly, the video picture of the re-identified object matched with the target object is collected based on the zoom factor after the decrease and / or the adjusted collection direction, including: according to the zoom factor after the decrease, increasing the cropping range of the real video picture to obtain the increased cropping range; the real video picture is a video picture collected through the lens; and / or decreasing the picture magnification parameter of the real video picture to obtain the decreased picture magnification parameter; according to the increased cropping range and / or the decreased picture magnification parameter, the to-be-identified video picture is intercepted from the real video picture; the re-identified object matched with the target object is identified according to the to-be-identified video picture, and the video picture of the re-identified object is collected.

[0157] The real video picture is a video picture actually collected by the terminal through the lens, and the video picture actually recorded or collected by the terminal is a video picture obtained by cropping the real video picture based on the cropping range and performing magnification processing on the cropped video picture according to the picture magnification parameter.

[0158] Optionally, the device zoom factor is negatively correlated with the cropping range, and the device zoom factor is negatively correlated with the picture magnification parameter; during the decrease of the device zoom factor, the corresponding cropping range is increased, and the picture magnification parameter is reduced, so as to realize the interception of the to-be-identified video picture.

[0159] In a feasible embodiment, the to-be-identified video picture is intercepted from the real video picture according to the increased cropping range and the decreased picture magnification parameter, including: according to the increased cropping range, an increased cropping window is intercepted from the real video picture; and the increased cropping window is magnified in size according to the decreased picture magnification parameter to obtain the to-be-identified video picture.

[0160] In the process of digital zoom, a larger post-cropping range is generated by adjusting a lower post-zooming coefficient, the field of view is expanded by adjusting the post-cropping range, and the size of the video picture is kept relatively moderate by adjusting a lower post-magnification parameter, and then the video picture to be recognized is intercepted from the real video picture.

[0161] In one embodiment, the target tracking can be effectively recovered in the case that the target object is blocked, blocked by other characters, or quickly moved out of the picture, etc., and the tracking stability is improved. On the one hand, it is reflected in that the field of view is expanded by reducing the zoom factor when the target tracking is lost, thereby improving the probability of rediscovering the target. On the other hand, it is reflected in that the target is found by rotating the lens, thereby increasing the success rate of target re-identification in a complex scene. On the other hand, the target feature extraction and matching can be performed in combination with a deep learning model, thereby improving the accuracy of target re-identification.

[0162] In one exemplary embodiment, taking reducing the zoom coefficient as an example: reducing the zoom factor of the camera of the mobile phone to half (expanding the field of view) can be realized by optical zoom or digital zoom. The zoom adjustment process is illustrated below in the case of switching lenses and the case of not switching lenses, respectively:

[0163] First, the optical zoom process of switching lenses is described: if a user is using a mobile phone with three lenses (ultra-wide-angle, wide-angle, and telephoto) to shoot. The current zoom factor is 2x (telephoto lens), and the user wants to reduce the zoom factor to half (1x, wide-angle lens). The specific process includes: adjusting the device zoom factor from 2x to 1x through the interface or the algorithm of any of the above embodiments; the mobile phone system detects that the required focal length range needs to be switched to the wide-angle lens (1x); the mobile phone system temporarily closes the camera and pauses the video stream during the lens switching process; after the mobile phone system completes the lens switching, the system reopens the camera, restores the video stream, and adjusts to 1x focal length, so that the user can shoot at the new focal length of 1x.

[0164] Next, the digital zoom process not involving switching lenses is described: if a user is using a mobile phone with only a wide-angle lens to shoot. The current zoom factor is 2x (the result of digital zoom), and the user wants to reduce the zoom factor to half (1x, without digital zoom). The specific process is as follows: adjusting the device zoom factor from 2x to 1x through the interface or the algorithm of any of the above embodiments; the mobile phone system detects that the required focal length range does not require digital zoom; in the image processing stage, the system cancels the cropping and magnification of the image, and restores to the original field of view (1x focal length), so that the user can shoot at the new focal length of 1x.

[0165] In both cases, the zoom factor is reduced from half (2x) to 1x, and the field of view is expanded.

[0166] It can be understood that the above steps belong to the details of specific embodiments, and a suitable zooming manner can be selected according to actual requirements and device performance. The user can not directly perceive this process, but visually, the user can perceive that the zoom factor is reduced and the field of view of the picture is enlarged.

[0167] It should be understood that although each step in the flowchart involved in each embodiment as described above is displayed in sequence according to the arrow, these steps are not necessarily executed in the order indicated by the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately executed with at least part of other steps or steps or stages in other steps.

[0168] Based on the same inventive concept, the embodiments of the present application also provide a video acquisition device for implementing the above-mentioned video acquisition method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more video acquisition device embodiments provided below can refer to the limitations of the video acquisition method in the above text, which will not be repeated here.

[0169] In one embodiment, as shown in Figure 13 a video acquisition device is provided, comprising:

[0170] The position acquisition module 1302 is configured to, in the process of acquiring a video picture, when an object loss picture in which a target object does not exist is acquired, acquire position information of the target object in a forward video picture of the object loss picture; wherein the timestamp of the forward video picture is earlier than the timestamp of the object loss picture.

[0171] The parameter adjustment module 1304 is configured to adjust the device acquisition direction according to the position information of the target object to obtain an adjusted acquisition direction; and / or, to lower the device zoom factor to obtain a lowered zoom factor.

[0172] The picture re-acquisition module 1306 is configured to acquire a video picture of a re-identified object matched with the target object based on the lowered zoom factor and / or the adjusted acquisition direction.

[0173] In one of the embodiments, the position acquisition module 1302 is configured to:

[0174] In a current video picture containing a target object, a key part specification of the target object is determined;

[0175] According to a deviation value between the key part specification and a preset expected specification, a zoom coefficient when the current video picture is captured is adjusted to obtain a next zoom coefficient;

[0176] The target object is captured by the next zoom coefficient.

[0177] In one of the embodiments, the position obtaining module 1302 is configured to:

[0178] Obtain a reference feature of the target object;

[0179] In the captured video picture, a feature extraction of a candidate object is performed to obtain a candidate object feature;

[0180] A similarity between the candidate object feature and the reference feature is determined;

[0181] In each of the video pictures, an object loss picture corresponding to the similarity that meets an object loss condition is determined.

[0182] In one of the embodiments, the position obtaining module 1302 is configured to:

[0183] In a plurality of video pictures captured in a current time period, a number of consecutive frame loss pictures in which the target object does not exist is counted to obtain a consecutive picture loss number;

[0184] If the consecutive picture loss number meets an object loss condition, there is an object loss picture in the plurality of video pictures captured in the current time period.

[0185] In one of the embodiments, the position obtaining module 1302 is configured to:

[0186] In a video picture captured in a current time period, a forward video picture containing the target object is determined;

[0187] In the forward video picture, a picture edge area in which the target object is located is identified.

[0188] In one of the embodiments, the parameter adjusting module 1304 is configured to:

[0189] If the target object is located at a left edge position of the forward video picture, a device capturing direction is adjusted based on the left edge position;

[0190] If the target object is located at a right edge position of the front video frame, a device collection direction adjustment is performed based on the right edge position.

[0191] In one of the embodiments, the parameter adjustment module 1304 is configured to:

[0192] The device zoom factor is gradually reduced to obtain a gradually reduced device zoom factor, in a range between the zoom factor of the object loss frame when being photographed and a preset zoom factor.

[0193] The gradually reduced device zoom factor is the reduced device zoom factor.

[0194] In one of the embodiments, the frame re-collection module 1306 is configured to:

[0195] If the reduced device zoom factor belongs to a lens switching interval, lens switching is performed.

[0196] During the lens switching, the collection of video frames is stopped until the lens switching is completed, and a lens for collecting a to-be-identified video frame is controlled.

[0197] According to the to-be-identified video frame, a re-identified object matched with the target object is identified, and a video frame of the re-identified object is collected.

[0198] In one of the embodiments, the frame re-collection module 1306 is configured to:

[0199] The reduced device zoom factor is gradually increased to obtain an increased device zoom factor.

[0200] If the increased device zoom factor belongs to a lens switching interval, lens switching is performed.

[0201] The increased device zoom factor is continuously increased until the zoom factor of the object loss frame when being photographed is obtained.

[0202] In one of the embodiments, the lens switching interval includes at least one of a first switching focus section and a second switching focus section. The first switching focus section is a zoom factor interval of a super wide-angle lens and a wide-angle lens in a switching process. The second switching focus section is a zoom factor interval of a wide-angle lens and a long-focus lens in a switching process.

[0203] In one of the embodiments, the frame re-collection module 1306 is configured to:

[0204] According to the zoomed-in zoom factor, the clipping range of the real video picture is enlarged to obtain an enlarged clipping range; the real video picture is a video picture collected through a lens; and / or, a picture magnification parameter of the real video picture is reduced to obtain a reduced picture magnification parameter;

[0205] According to the enlarged clipping range and / or the reduced picture magnification parameter, a to-be-recognized video picture is intercepted from the real video picture;

[0206] According to the to-be-recognized video picture, a re-identified object matched with the target object is identified, and a video picture of the re-identified object is collected.

[0207] The above-mentioned modules in the video collection device can be realized by software, hardware, and combinations thereof, in whole or in part. The above-mentioned modules can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a memory in a computer device in software form, so as to be called and executed by a processor to perform the operations corresponding to the above-mentioned modules.

[0208] In an embodiment, a computer device, which can be a terminal, has an internal structure as shown in Figure 14 The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to perform wired or wireless communication with external terminals. The wireless communication can be achieved through WIFI, mobile cellular network, NFC (Near Field Communication), or other technologies. The computer program is executed by the processor to implement a video collection method. The display unit of the computer device is configured to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or can be a key, a trackball, or a touchpad arranged on the shell of the computer device. The input device can also be an external keyboard, a touchpad, or a mouse, etc.

[0209] Those skilled in the art can understand that, Figure 14The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0210] In one embodiment, the present application also provides a handheld holder, comprising a motor for controlling the holder to rotate according to the adjusted collection direction, and a processor for implementing the steps in the above method embodiments when executing the computer program.

[0211] In one embodiment, the present application also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.

[0212] In one embodiment, the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps in the above method embodiments.

[0213] In one embodiment, the present application provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps in the above method embodiments.

[0214] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0215] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric memory (Ferroelectric Random Access Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, etc. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0216] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.

[0217] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A video capturing method, comprising: The method comprises: In the process of collecting video pictures, when an object loss picture without the target object is collected, the zoom factor of the device is adjusted to obtain an adjusted zoom factor; The method further comprises: The method further comprises:

2. The method of claim 1, wherein, If the adjusted zoom factor obtained by gradually increasing the adjusted zoom factor belongs to a lens switching interval, lens switching is performed. The lens switching interval comprises at least one of a first switching focal length section and a second switching focal length section; the first switching focal length section is a zoom factor interval in the switching process of an ultra-wide-angle lens and a wide-angle lens; and the second switching focal length section is a zoom factor interval in the switching process of a wide-angle lens and a long-focus lens. The method further comprises: In the current video picture containing the target object, the key part specification of the target object is determined.

3. The method of claim 2, wherein, ​ ​ ​ 4. The method of claim 1, wherein, ​ ​ 5. The method of claim 4, wherein, ​ 6. The method of claim 1, wherein, ​ ​ Adjust a zooming coefficient of a current video picture when shooting according to a deviation value between the key position specification and a preset expected specification, to obtain a next zooming coefficient; Collect a video picture of the target object through the next zooming coefficient.

7. The method of claim 1, wherein, Collecting an object loss picture in which the target object does not exist includes: Obtaining a reference feature of the target object; Extracting a candidate object feature from the collected video picture; Determining a similarity between the candidate object feature and the reference feature; Determining, in each video picture, an object loss picture corresponding to the similarity that satisfies an object loss condition.

8. The method of claim 1, wherein, Collecting an object loss picture in which the target object does not exist includes: Counting a number of continuous frame pending loss pictures in which the target object does not exist from a plurality of video pictures shot in a current time period, to obtain a continuous picture loss number; If the continuous picture loss number satisfies an object loss condition, there is an object loss picture in the plurality of video pictures shot in the current time period.

9. The method of claim 2, wherein, The method further includes: Determining a forward video picture containing the target object from the video pictures collected in the current time period; Identifying a picture edge region in which the target object is located in the forward video picture.

10. A video capture device, comprising: The device includes: A parameter adjustment module configured to, when an object loss picture in which the target object does not exist is collected in a process of collecting a video picture, lower a zooming coefficient of a device to obtain a lowered zooming coefficient; the lowering of the zooming coefficient of the device to obtain the lowered zooming coefficient includes: determining a maximum size of the target object in the video picture based on a total number of pixels of the video picture and a preset proportion value, determining a scaling proportion based on a size of the target object in a forward video picture and the maximum size, performing zooming of a zooming coefficient of the object loss picture when shooting based on the scaling proportion to obtain the lowered zooming coefficient, increasing a cropping range of a real video picture based on the lowered zooming coefficient to obtain an increased cropping range, the real video picture being a video picture collected through a lens, and / or lowering a picture magnification parameter of the real video picture to obtain a lowered picture magnification parameter, and cutting a to-be-identified video picture from the real video picture based on the increased cropping range and / or the lowered picture magnification parameter; if a re-identified object matching the target object does not exist in the to-be-identified video picture in a preset time period, successively decreasing the preset proportion value and continuing to perform zooming of the zooming coefficient of the device until the re-identified object matching the target object exists in the to-be-identified video picture; A picture re-collection module configured to collect a video picture of the re-identified object matching the target object; The picture re-collection module is further configured to, before collecting the video picture of the re-identified object, gradually increase the lowered zooming coefficient until a zooming coefficient of the object loss picture when shooting is obtained, and then collect an image of the re-identified object.

11. A handheld gimbal, comprising: comprising a motor for controlling the gimbal to rotate according to the adjusted acquisition direction, and a processor for implementing the steps of the method of any one of claims 1 to 9.

12. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by a processor, implements the steps of the method of any one of claims 1 to 9.

Citation Information

Patent Citations

  • Target tracking method and device, electronic equipment and storage medium

    CN108734726A

  • Moving track determining method and device

    CN110188691A

  • Video camera system

    JP1995030795A