Video processing method and device and electronic equipment
By identifying and processing abnormal video frame images in video processing, redetecting and tracking the target object, the problem of low tracking accuracy when the target object is temporarily lost or the subject overlaps in the video is solved, and the accuracy and stability of tracking are improved .
Patent Information
- Application Number
- CN202310949364.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-31
- Publication Date
- 2025-02-14
AI Technical Summary
In the prior art, in video processing, when no target object appears in the video frame image, the electronic device cannot continue to track the target object, resulting in poor tracking accuracy.
By determining the abnormal frame in the video frame image, the subsequent frame image is obtained, and the target object is tracked again based on the detection results.
Improves the tracking accuracy of the target object, ensuring continuous tracking of the target object in the video, even if the target object is temporarily lost or the subject overlaps.
Smart Images

Figure CN119444797A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of video processing technology, and more particularly to a video processing method, device, and electronic device. Background Art
[0002] By shooting videos in different camera movements, you can achieve the effect of locking the subject. For example, during the shooting process, you can keep the subject in the center of the video by moving the camera.
[0003] Currently, electronic devices can track a target object and then lock the display position of the target object to obtain a video with a camera movement effect. For example, after the electronic device tracks a face, it can lock the display position of the face to achieve a camera movement effect. However, if the target object does not appear in any frame of the video, the electronic device cannot continue to track the target object, which results in poor accuracy in tracking the target object. Summary of the invention
[0004] The present disclosure provides a video processing method, device and electronic device, which are used to solve one or more technical problems in the prior art.
[0005] In a first aspect, an embodiment of the present disclosure provides a video processing method, the method comprising:
[0006] Determining a first video frame image in a first video, wherein tracking of a target object in the first video frame image is abnormal;
[0007] Acquire a plurality of second video frame images following the first video frame image in the first video;
[0008] Detecting a target object in the first video frame image and / or a plurality of second video frame images to obtain a detection result of the target object;
[0009] According to the detection result, the target object in the first video is tracked again.
[0010] In a second aspect, an embodiment of the present disclosure provides a video processing device, the video processing device comprising a determination module, an acquisition module, a detection module and a processing module, wherein:
[0011] The determination module is used to determine a first video frame image in a first video, wherein the tracking of the target object in the first video frame image is abnormal;
[0012] The acquisition module is used to acquire a plurality of second video frame images after the first video frame image in the first video;
[0013] The detection module is used to detect the target object in the first video frame image and / or the plurality of second video frame images to obtain the detection result of the target object;
[0014] The processing module is used to re-track the target object in the first video according to the detection result.
[0015] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;
[0016] The memory stores computer-executable instructions;
[0017] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the video processing method as described in the first aspect and various possible aspects of the first aspect.
[0018] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the video processing method as described in the first aspect and various possible aspects of the first aspect are implemented.
[0019] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the video processing method as described in the first aspect and various possible aspects of the first aspect.
[0020] The present disclosure provides a video processing method, device and electronic device, which determine a first video frame image in a first video, wherein the tracking of a target object in the first video frame image is abnormal, obtain multiple second video frame images after the first video frame image in the first video, detect the target object in the first video frame image and / or multiple second video frame images, obtain the detection result of the target object, and re-track the target object in the first video according to the detection result. In the above method, if the video frame image in the first video cannot track the target object, the electronic device can continue to detect the target object in multiple subsequent video frame images, and when the target object reappears, the electronic device can re-track the target object, thereby improving the accuracy of tracking the target object. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0022] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present disclosure;
[0023] Figure 2 A schematic diagram of a video processing method provided by an embodiment of the present disclosure;
[0024] Figure 3 A schematic diagram of a first video frame image provided by an embodiment of the present disclosure;
[0025] Figure 4 A schematic diagram of overlapping subjects where a target object is located provided in an embodiment of the present disclosure;
[0026] Figure 5 A schematic diagram of another target object lost provided by an embodiment of the present disclosure;
[0027] Figure 6 A schematic diagram of a process of re-tracking a target object provided by an embodiment of the present disclosure;
[0028] Figure 7 A schematic diagram of a method for determining a detection result of a target object provided by an embodiment of the present disclosure;
[0029] Fig. 8A A schematic diagram of a process for detecting a target object provided by an embodiment of the present disclosure;
[0030] Figure 8B A schematic diagram of another process of detecting a target object provided by an embodiment of the present disclosure;
[0031] Fig. 9 A schematic diagram of a detection result of determining a target object provided by an embodiment of the present disclosure;
[0032] Fig.10 A schematic flow chart of a method for editing a video frame image provided by an embodiment of the present disclosure;
[0033] Fig.11 A schematic diagram of the structure of a video processing device provided by an embodiment of the present disclosure;
[0034] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0035] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0036] To facilitate understanding, the concepts involved in the embodiments of the present disclosure are explained below.
[0037] Electronic device: a device with wireless transceiver function. Electronic devices can be deployed on land, including indoors or outdoors, handheld, wearable or vehicle-mounted; they can also be deployed on the water (such as ships, etc.). The electronic device can be a mobile phone, a tablet computer, a computer with wireless transceiver function, a virtual reality (VR) electronic device, an augmented reality (AR) electronic device, a wireless terminal in industrial control, a vehicle-mounted electronic device, a wireless terminal in self-driving, a wireless electronic device in remote medical, a wireless electronic device in smart grid, a wireless electronic device in transportation safety, a wireless electronic device in smart city, a wireless electronic device in smart home, a wearable electronic device, etc. The electronic device involved in the embodiments of the present disclosure can also be called a terminal, a user equipment (UE), an access electronic device, a vehicle-mounted terminal, an industrial control terminal, a UE unit, a UE station, a mobile station, a mobile station, a remote station, a remote electronic device, a mobile device, a UE electronic device, a wireless communication device, a UE agent or a UE device, etc. Electronic devices may also be fixed or mobile.
[0038] In the related art, when an electronic device obtains a camera-moving video, it can track the target object in the video, and then lock the display position of the target object to achieve the camera-moving effect of the video. For example, the electronic device can detect a face in a video frame image, and lock the display position of the face in the video frame image, and then obtain a camera-moving video in which the position of the face in the video remains unchanged. However, in the above method, it is necessary to accurately track the target object. If the target object is lost in multiple video frame images in the video, the electronic device cannot track the target object, resulting in low tracking accuracy of the electronic device for the target object, and the obtained camera-moving video has a poor effect.
[0039] In order to solve the problems in the related art, the embodiment of the present disclosure provides a video processing method, in which an electronic device can determine a first video frame image in a first video, wherein the tracking of a target object in the first video frame image is abnormal, obtain multiple second video frame images after the first video frame image in the first video, obtain tracking abnormality information of the target object corresponding to the first video frame image, wherein the tracking abnormality information is that the subject where the target object is located overlaps or the target object is lost, detect the target object in the first video frame image and / or multiple second video frame images according to the tracking abnormality information, obtain the detection result of the target object, and re-track the target object in the first video according to the detection result. In this way, when the tracking of the target object in the first video frame image is abnormal, the electronic device can re-detect the target object in the first video according to the tracking abnormality information, and re-track the target object, so as to improve the tracking accuracy of the target object.
[0040] Next, combine Figure 1 , the application scenarios of the embodiments of the present disclosure are described.
[0041] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present disclosure. Figure 1 , including: an electronic device. A video is input to the electronic device, and the first frame of the video includes a face (target object). When the user clicks on the user's face, the electronic device can adjust the display position of the face in each frame of the image to fix the display position of the face in the video. However, when the electronic device adjusts the display position of the face in the image of the second frame, since the face in the image of the second frame of the video is lost, the electronic device cannot obtain the display position of the face in the image of the second frame, and therefore, the electronic device cannot process subsequent images. In this way, the electronic device can continue to detect the face in the image after the second frame until the electronic device detects the face in the fifth frame of the image. The electronic device can continue to adjust the display position of the face in the fifth frame of the image to fix the display position of the face in the video. In this way, when an abnormality occurs when the electronic device tracks the target object in the video, the electronic device can continue to track the target object in the subsequent frames, and then adjust the display position of the target object in the video by editing the image, which can not only improve the accuracy of tracking the target object, but also improve the effect of the acquired moving mirror video.
[0042] It should be noted that Figure 1 The application scenarios of the embodiments of the present disclosure are merely illustrative and are not intended to limit the application scenarios of the embodiments of the present disclosure.
[0043] The technical solution of the present invention and how the technical solution of the present invention solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.
[0044] Figure 2 A flowchart of a video processing method provided by an embodiment of the present disclosure. Figure 2 , the method may include:
[0045] S201: Determine a first video frame image in a first video.
[0046] The execution subject of the embodiment of the present disclosure may be an electronic device, or a video processing device arranged in the electronic device. Optionally, the video processing device may be implemented by software, or the video processing device may be implemented by a combination of software and hardware, which is not limited in the embodiment of the present disclosure.
[0047] Optionally, the first video may be a video shot by the electronic device. For example, the electronic device may shoot a video in real time to obtain the first video, or the first video may be a video pre-stored by the electronic device, which is not limited in the embodiments of the present disclosure. Optionally, the first video may be a video sent to the electronic device by other devices. For example, the first video may be a video sent by a server to the electronic device, or the first video may be a video in a database, and the electronic device may obtain the video in the database, which is not limited in the embodiments of the present disclosure.
[0048] Optionally, the first video may include at least one subject. For example, the subject may be a human body, limbs, etc. in the first video, which is not limited in the present embodiment. Optionally, the subject may include an object. For example, if the subject is a human body in the first video, the object may include the face, left hand, right hand, left leg, right leg, etc. of the human body, which is not limited in the present embodiment. Figure 1 Taking the illustrated embodiment as an example, the first frame image in the video may include a subject, and the objects in the subject may include a human face, limbs, torso, etc.
[0049] The target object may be the object to be pursued in the first video. For example, the subject in the first video includes a human face, a left hand, and a right hand. If the object to be pursued is a human face, the electronic device may determine that the target object is a human face.
[0050] Optionally, the electronic device may determine the target object based on the user's operation. For example, if the subject in the first video includes a face, a left hand, and a right hand, if the user clicks on the face, the electronic device may determine that the object to be tracked is the face, that is, the target object is the face; if the user clicks on the left hand, the electronic device may determine that the object to be tracked is the left hand, that is, the target object is the left hand.
[0051] It should be noted that in the embodiment of the present disclosure, after the user determines the target object to be tracked, the tracking process of the target object will be interrupted because some video frames in the video will lose the target object (for example, the subject leaves the shooting area during a certain period of time, etc.), and the electronic device needs to solve the problem of continuing to track the target object.
[0052] Optionally, the tracking anomaly of the target object may refer to the electronic device being unable to accurately track the target object in the first video frame image. For example, if the target object in the first video frame image is lost, the electronic device is unable to accurately track the target object, and the electronic device is tracking the target object anomaly; if multiple subjects in the first video frame image overlap, the electronic device is also unable to accurately track the target object, and the electronic device is tracking the target object anomaly (when the electronic device tracks the target object, it first determines the subject where the target object is located, and then determines the target object in the subject. If multiple subjects overlap, the electronic device cannot accurately determine the subject where the target object is located, and thus cannot track the target object).
[0053] Optionally, the first video frame image may be an image among a plurality of consecutive video frame images in the first video that track the target object abnormally. For example, if 10 consecutive video frame images in the first video track the target object abnormally, the electronic device may determine the first video frame image among the 10 video frame images. For example, if the tracking of the target object in the 10th frame image - the 20th frame image in the first video is abnormal, the first video frame image may be the 10th frame image, the 20th frame image, or any one of the 10th frame image - the 20th frame image, and the embodiments of the present disclosure are not limited to this.
[0054] It should be noted that in actual application, when the target object in multiple consecutive video frame images is tracked abnormally, the electronic device can determine the last video frame image as the first video frame image, thereby facilitating the tracking of the target object in subsequent video frame images and improving the tracking accuracy of the target object.
[0055] Next, combine Figure 3 , the first video frame image is described.
[0056] Figure 3 A schematic diagram of a first video frame image provided by an embodiment of the present disclosure. Figure 3, including a video. The video includes the first frame image, the second frame image, the third frame image and the fourth frame image, and the first frame image and the second frame image include the user. If the electronic device ( Figure 3 If the target object is determined to be the user's face (not shown), the electronic device can detect the face in the first frame image and the second frame image, but cannot detect the face in the third frame image and the fourth frame image. Therefore, the electronic device can determine that the first video frame image can be the third frame image or the fourth frame image.
[0057] It should be noted that, since the subject overlap also causes the electronic device to track the target object abnormally, Figure 3 Taking the illustrated embodiment as an example, if the first frame image includes two users and the two users overlap, the electronic device may also determine the first frame image as the first video frame image.
[0058] S202: Acquire a plurality of second video frame images following the first video frame image in the first video.
[0059] Among them, the second video frame image may be an image after the first video frame image. For example, the second video frame image may be all video frame images included within 10 seconds after the first video frame image, and the embodiments of the present disclosure are not limited to this. For example, the first video may include 100 frames of images. If the first video frame image is the 10th frame image, the second video frame image may be multiple images after the 10th frame image. For example, if the first video frame image is the 10th frame image, the second video frame image may be the 11th frame image, the 12th frame image, ..., the 50th frame image, etc., and the embodiments of the present disclosure are not limited to this.
[0060] Optionally, the electronic device may acquire the second video frame image based on any feasible implementation method, which is not limited in the embodiments of the present disclosure.
[0061] S203: Detect a target object in the first video frame image and / or the plurality of second video frame images to obtain a detection result of the target object.
[0062] The detection result of the target object may include the target object or exclude the target object. For example, if the target object exists in the first video frame image, the detection result of the target object in the first video frame image is that the target object is included in the first video frame image; if the target object does not exist in the first video frame image, the detection result of the target object in the first video frame image is that the target object is not included in the first video frame image.
[0063] It should be noted that since the tracking of the target object will also be abnormal when the subjects overlap, when the target object is a face, if the torsos of the two subjects in the video frame image overlap and the faces do not overlap, the face tracking of the video frame image will also be abnormal (that is, the video frame image is the first video frame image). However, the target object (that is, the face) can also be detected in the video frame image.
[0064] Among them, the electronic device can obtain the detection result of the target object based on the following feasible implementation method: obtain the tracking anomaly information of the target object corresponding to the first video frame image, detect the target object in the first video frame image and / or multiple second video frame images according to the tracking anomaly information, and obtain the detection result of the target object.
[0065] The tracking abnormality information may be an overlap of a subject where the target object is located or a loss of the target object. For example, the first video frame image may be an image with abnormal tracking of the target object. If multiple subjects in the first video frame image overlap, or the first video frame image does not include the target object, the tracking abnormality of the target object in the first video frame image may be caused.
[0066] Optionally, the subject overlap where the target object is located may be that at least one subject has an overlapping portion with the subject where the target object is located. For example, the first video may include user A and user B. If the user touches the face of user A, the electronic device may determine that the target object in the first video is the face of user A. If the torso of user B in the video frame image blocks the torso of user A, the electronic device may determine that the video frame image is the first video frame image, and the tracking abnormality information of the video frame image may be that the subject overlaps where the target object is located.
[0067] Next, combine Figure 4 , explaining the situation where the subject where the target object is located overlaps.
[0068] Figure 4 A schematic diagram of a subject overlap where a target object is provided in an embodiment of the present disclosure. Figure 4 , including an electronic device. The video played by the electronic device includes a first frame image, a second frame image, and a third frame image, and the target object may be the face of user A. The first frame image of the video may include user A, the second frame image of the video may include user B, and the third frame image of the video may include user A and user B. Since there is an overlapping portion between user A and user B in the third frame image, the electronic device cannot detect the complete user A in the third frame image, and the electronic device may determine that the third frame image is the first video frame image, and the tracking abnormality information of the third frame image may be an overlap of the subject where the target object is located.
[0069] Optionally, the target object loss may refer to the first video frame image not including the target. For example, the first video may include user A and user B, and the target object is the face of user A. If the electronic device does not record user A within a period of time, the electronic device may determine the first video frame image in the video frame image corresponding to the period of time, and determine the tracking anomaly information of the first video frame image as the target object loss. For example, the target object is the user's face, if the 10th to 20th frames of the first video do not include the user's face, the electronic device may determine the 20th frame as the first video frame image, and determine the tracking anomaly information of the 20th frame as the target object loss.
[0070] Next, combine Figure 5 , explaining the situation where the target object is lost.
[0071] Figure 5 This is another schematic diagram of target object loss provided by the embodiment of the present disclosure. Figure 5 , including an electronic device. The video played by the electronic device includes a first frame image, a second frame image, and a third frame image, and the target object is a user's face. The electronic device can detect the user's face in the first frame image, and the electronic device can also detect the user's face in the second frame image. However, since the third frame image of the video does not include the user, the electronic device cannot detect the face (target object) in the third frame image. Therefore, the electronic device's tracking of the target object in the third frame image is abnormal. The electronic device can determine the third frame image as the first video frame image, and determine the tracking abnormality information of the third frame image as the target object is lost.
[0072] It should be noted that after the electronic device determines the first video frame image, the electronic device may determine the tracking abnormality information of the first video frame image based on any feasible implementation method, and the embodiments of the present disclosure are not limited to this.
[0073] Optionally, after the electronic device determines the tracking anomaly information of the first video frame image, it can detect the target object in the first video frame image and / or the second video frame image based on the tracking anomaly information, and then obtain the detection result of the target object. For example, if the target object has been lost in the first video frame image, the electronic device can re-detect the target object in subsequent video frame images (such as a scene where the user leaves the shooting area and returns). If multiple users overlap in the first video frame image, resulting in tracking anomalies, the electronic device can re-detect the target object in the first video frame image (such as a scene where the target object is a human face, but overlapping limbs do not block the face).
[0074] S204: re-track the target object in the first video according to the detection result.
[0075] Optionally, the electronic device can re-track the target object in the first video according to the following feasible implementation method: if the detection result is that the first video frame image or multiple second video frame images include the target object, a selection box corresponding to the target object is displayed, and the target object is re-tracked in response to a touch operation on the selection box.
[0076] Among them, if the first video frame image or the second video frame image includes the target object, the electronic device can display a selection box corresponding to the target object in the first video frame image or the second video frame image, and after the user clicks the selection box, the electronic device can re-track the target object. For example, if the detection result of the first video frame image is that the target object is included in the first video frame image (e.g., the subject where the target object is located overlaps, but the target object is not blocked), the electronic device can display a selection box including the target object, and when the user clicks the selection box, the electronic device can re-track the target object. For example, if the detection result of any second video frame image is that the target object is included in the second video frame image (e.g., the target object reappears), the electronic device can display a selection box including the target object, and when the user clicks the selection box in the second video frame image, the electronic device can re-track the target object.
[0077] Next, combine Figure 6 , the process of re-tracking the target object is explained.
[0078] Figure 6 A schematic diagram of a process of re-tracking a target object provided by an embodiment of the present disclosure. Figure 6 , including an electronic device. The target object may be a user's face. After the target object is lost in the first video frame image, the electronic device detects the user and the user's face in a subsequent video frame. The electronic device may generate and display a selection box including the user's face in the video frame. When the user clicks the selection box, the electronic device may re-track the user's face in the video. In this way, when the target object reappears in the video, the electronic device may continue to track the target object in the video, avoiding interruption of the tracking of the target object and improving the accuracy and flexibility of the tracking of the target object.
[0079] The disclosed embodiment provides a video processing method, in which an electronic device can determine a first video frame image in which the tracking of a target object is abnormal in a first video, and obtain multiple second video frame images after the first video frame image. The electronic device can obtain tracking abnormality information of the target object corresponding to the first video frame image, and detect the target object in the first video frame image and / or the second video frame image based on the tracking abnormality information to obtain a detection result of the target object. The electronic device can re-track the target object in the first video based on the detection result. In this way, when the tracking of the target object in the first video frame image is abnormal, the electronic device can re-detect the target object in the first video based on the tracking abnormality information, and re-track the target object, which can improve the tracking accuracy of the target object.
[0080] exist Figure 2 Based on the embodiment shown below, combined with Figure 7 , a method for detecting a target object in a first video frame image and / or multiple second video frame images and obtaining a detection result of the target object in the above-mentioned video processing method is described in detail.
[0081] Figure 7 A schematic diagram of a method for determining a detection result of a target object provided by an embodiment of the present disclosure. Figure 7 The method flow includes:
[0082] S701: Obtain tracking abnormality information of a target object corresponding to a first video frame image.
[0083] Optionally, the tracking exception information is that the subject where the target object is located overlaps or the target object is lost.
[0084] It should be noted that the execution process of step S701 may refer to the execution process of step S203, and the embodiment of the present disclosure will not be described in detail here.
[0085] According to the tracking abnormality information, a target object is detected in the first video frame image and / or the plurality of second video frame images to obtain a detection result of the target object.
[0086] S702: Detect a target object in the first video frame image and / or the plurality of second video frame images according to the tracking abnormality information to obtain a detection result of the target object.
[0087] Optionally, the electronic device detects the target object in the first video frame image and / or the plurality of second video frame images according to the tracking abnormality information, and obtains a detection result of the target object, and there are the following two situations:
[0088] Case 1: The tracking anomaly information is the subject overlap where the target object is located.
[0089] If the tracking abnormality information is an overlap of the subject where the target object is located, the electronic device can detect the target object in the first video frame image, or the electronic device can detect the target object in the first video frame image and multiple second video frame images to obtain a detection result corresponding to the target object.
[0090] Among them, the electronic device detects the target object in the first video frame image, or detects the target object in the first video frame image and multiple second video frame images. Specifically, it can be: determining a detection result corresponding to the target object in the first video frame image, if the detection result corresponding to the target object in the first video frame image is that the first video frame image includes the target object, then stopping detecting the target object in the multiple second video frame images, if the detection result corresponding to the target object in the first video frame image is that the first video frame image does not include the target object, then detecting the target object in the multiple second video frame images.
[0091] Optionally, if the tracking anomaly information of the first video frame image is that the target object has a main body overlap, then the target object of the electronic device has two situations: occluded or unoccluded. If the target object is not occluded, the electronic device can detect the target object in the first video frame image, so the electronic device does not need to detect the target object in the second video frame image. If the target object is also occluded, the electronic device cannot detect the target object in the first video frame image, and the electronic device can re-detect the target object in multiple second video frame images. For example, the first video includes user A and user B, and the target object is the face of user A. If the torsos of user A and user B overlap in the first video frame image, and the face of user A does not overlap with the face of user B, the electronic device can detect the face of user A in the first video frame image and continue to track the face of user A. If the face of user A in the first video frame image also overlaps with the face of user B, the electronic device cannot detect the face of user A in the first video frame image. Therefore, the electronic device can detect the face of user A in multiple second video frame images, and re-track the face of user A after detecting the face of user A.
[0092] Next, combine Figure 8A-B , in this case, the process of detecting the target object is explained.
[0093] Fig. 8A A schematic diagram of a process for detecting a target object provided by an embodiment of the present disclosure. Fig. 8A , including an electronic device. The video frame displayed by the electronic device may include user A and user B, and the target object is the face of user A. The torsos of user A and user B in the video frame overlap, so the video frame may be a first video frame image, and the tracking abnormality information is the overlap of the main body where the target object is located.
[0094] See also Fig. 8A , the electronic device detects the target object in the video frame. Since user B does not block the face of user A, although user A and user B partially overlap, the electronic device can also detect the face of user A in the video frame. Therefore, the electronic device can determine that the detection result of the target object in the video frame is that the video frame includes the target object.
[0095] Figure 8B This is another schematic diagram of a process for detecting a target object provided by an embodiment of the present disclosure. Figure 8B , including an electronic device. The first frame displayed by the electronic device may include user A and user B, and the target object is the face of user A. User A and user B overlap in the first frame, so the first frame may be a first video frame image, and the tracking abnormality information of the first frame is the overlap of the subject where the target object is located.
[0096] See also Figure 8B , the electronic device detects the target object in the video frame. Since user B blocks the face of user A, the electronic device cannot detect the face of user A in the first frame. The electronic device can determine that the detection result of the target object in the first frame is that the target object is not included in the first frame.
[0097] See also Figure 8B , the electronic device can detect the face of user A in the 2nd frame, the 3rd frame, ..., and the 10th frame (the second video frame image) in sequence. If the electronic device detects the face of user A in the 10th frame, the electronic device can determine that the detection result of the target object in the 10th frame is that the target object is included in the 10th frame. In this way, even after the electronic device loses the target object, it can continue to detect the target object in the video, thereby improving the accuracy of target object tracking.
[0098] Case 2: The tracking exception information is the subject overlap where the target object is located.
[0099] If the tracking abnormality information is that the target object is lost, the electronic device can detect the target object in multiple second video frame images to obtain a detection result corresponding to the target object.
[0100] For example, if the tracking anomaly information of the first video frame image is that the target object is lost, it means that the target object is not included in the first video frame image. Therefore, the electronic device can perform target object detection processing on multiple frames subsequent to the first video frame image, and then obtain the detection result corresponding to the target object.
[0101] Next, combine Fig. 9 , in this case, the process of determining the detection result of the target object is explained.
[0102] Fig. 9 A schematic diagram of a detection result of determining a target object provided by an embodiment of the present disclosure. Fig. 9 , including electronic devices. Among them, the target object can be the user's face. The 10th frame displayed by the electronic device does not include the user, and the first 9 frames do not include the user. Therefore, the electronic device can determine that the 10th frame is the first video frame image, and the tracking abnormality information is that the target object is lost. The electronic device can continue to detect the user's face in the 11th frame, the 12th frame, ..., the 30th frame. Since the electronic device detects the user's face in the 30th frame, the electronic device can determine that the detection result of the 30th frame is that the 30th frame includes the target object.
[0103] Optionally, in the above-mentioned situations 1 and 2, the electronic device can detect the target object based on the following feasible implementation methods: determine the object type of the target object, determine an object detection algorithm based on the object type, and detect the target object in the first video frame image or the second video frame image based on the object detection algorithm.
[0104] For example, if the target object is a face, the object type may be a face type; if the target object is a left hand, the object type may be a limb type. The electronic device may determine the object type based on any feasible implementation method, and the embodiments of the present disclosure are not limited to this.
[0105] For example, if the object type of the target object is a face type, the electronic device can determine that the object detection algorithm is a face detection algorithm, and based on the face detection algorithm, detect the target object in the video frame image to obtain a detection result; if the object type of the target object is a limb type, the electronic device can determine that the object detection algorithm is a limb detection algorithm, and based on the limb detection algorithm, detect the target object in the video frame image to obtain a detection result.
[0106] It should be noted that, for other video frames in the first video, the electronic device can process the video frames according to the same object detection algorithm, which will not be elaborated in the embodiment of the present disclosure.
[0107] It should be noted that when the tracking abnormality information is that the target object is lost, the electronic device can detect the target object in the second video frame image in sequence until the detection result of the second video frame image is that the second video frame image includes the target object and stops.
[0108] It should be noted that, during the process of detecting the target object in the second video frame images in sequence, if the target object is not detected in multiple second video frame images, the electronic device can determine that the target object in the first video is lost and report an error. For example, if the target object is not included in the second video frame images included within 10 seconds after the first video frame image, the electronic device can determine that the target object is lost.
[0109] The disclosed embodiment provides a method for determining the detection result of a target object, obtaining tracking anomaly information of the target object corresponding to a first video frame image, if the tracking anomaly information is an overlap of the subject where the target object is located, the electronic device can detect the target object in the first video frame image, or the electronic device can detect the target object in the first video frame image and multiple second video frame images to obtain the detection result corresponding to the target object, if the tracking anomaly information is that the target object is lost, the electronic device can detect the target object in multiple second video frame images to obtain the detection result corresponding to the target object. In this way, the electronic device can flexibly determine the detection result of the target object based on the tracking anomaly information, thereby improving the accuracy and flexibility of the target object detection result.
[0110] Based on any one of the above embodiments, the above video processing method also includes a process of editing the video frame image in the first video. Fig.10 , a method for editing and processing the video frame images in the first video is described in detail.
[0111] Fig.10 A schematic diagram of a method for editing a video frame image provided by an embodiment of the present disclosure. Fig.10 The method flow includes:
[0112] S1001: Determine a target display position of a target object in a video frame image.
[0113] The target display position may be a fixed display position of the target object in the video. For example, if the electronic device needs to fix the target object at the center of the video, the target display position may be the center of the video; if the electronic device needs to fix the target object at the upper left corner of the video, the target display position may be the upper left corner of the video.
[0114] Optionally, the electronic device may determine the target display position based on the user's operation. For example, if the user selects a face in the first frame image, the electronic device may determine the display position of the face in the first frame image as the target display position; if the user selects the left hand in the tenth frame image, the electronic device may determine the display position of the left hand in the tenth frame image as the target display position.
[0115] Optionally, the electronic device may determine the target display position of the target object based on any feasible implementation manner, which is not limited in the embodiments of the present disclosure.
[0116] S1002: Edit the video frame images in the first video to obtain a second video.
[0117] The display position of the target object in the video frame image of the second video is the same as the target display position. For example, if the target object is a human face and the target display position is the center of the first video, the electronic device can edit the video frame image in the first video to obtain the second video, wherein the human face in each video frame image in the second video is located at the center of the video frame image, so that the position of the human face in the video can be fixed, thereby achieving the effect of video motion display.
[0118] Optionally, the electronic device can perform cropping and position movement processing on the video frame image in the first video according to the target display position to obtain the video frame image in the second video, wherein the display position of the target object in the video frame image in the second video is the same as the target display position. In this way, the second video can have the effect of camera movement, reducing the difficulty of obtaining the camera movement video.
[0119] For example, if the electronic device crops the video frame image in the first video and moves the video frame image obtained after the cropping process, the video frame image in the second video is obtained. For example, the target display position is the center of the first video, if the display position of the target object in another video frame image of the first video is on the upper side, the electronic device can crop the lower area of the video frame image and move the cropped video frame image downward, thereby obtaining the video frame image in the second video, and the display position of the target object in the video frame image of the second video is the center.
[0120] It should be noted that the editing operation of the electronic device on the video frame image in the first video may also include a rotation operation, a zoom operation, etc., which is not limited in the embodiment of the present disclosure.
[0121] The disclosed embodiment provides a method for editing a video frame image, determining a target display position of a target object in a video frame image, and editing the video frame image in a first video to obtain a second video, wherein the display position of the target object in the video frame image of the second video is the same as the target display position. In this way, the electronic device can obtain a video with a camera movement effect by post-processing the video, thereby reducing the difficulty and cost of obtaining the camera movement video.
[0122] Fig.11 A schematic diagram of the structure of a video processing device provided by an embodiment of the present disclosure. Fig.11 The video processing device 10 includes a determination module 11, an acquisition module 12, a detection module 13 and a processing module 14, wherein:
[0123] The determination module 11 is used to determine a first video frame image in a first video, wherein the tracking of the target object in the first video frame image is abnormal;
[0124] The acquisition module 12 is used to acquire a plurality of second video frame images following the first video frame image in the first video;
[0125] The detection module 13 is used to detect the target object in the first video frame image and / or the plurality of second video frame images to obtain a detection result of the target object;
[0126] The processing module 14 is used for re-tracking the target object in the first video according to the detection result.
[0127] According to one or more embodiments of the present disclosure, the detection module 13 is specifically used for:
[0128] Acquire tracking abnormality information of a target object corresponding to the first video frame image, wherein the tracking abnormality information is that a subject where the target object is located overlaps or the target object is lost;
[0129] According to the tracking abnormality information, a target object is detected in the first video frame image and / or the plurality of second video frame images to obtain a detection result of the target object.
[0130] According to one or more embodiments of the present disclosure, the detection module 13 is specifically used for:
[0131] If the tracking abnormality information is an overlap of the subject where the target object is located, the target object is detected in the first video frame image, or the target object is detected in the first video frame image and the plurality of second video frame images to obtain a detection result corresponding to the target object;
[0132] If the tracking abnormality information is that the target object is lost, the target object is detected in the plurality of second video frame images to obtain a detection result corresponding to the target object.
[0133] According to one or more embodiments of the present disclosure, the detection module 13 is specifically used for:
[0134] Determine a detection result corresponding to the target object in the first video frame image;
[0135] If the detection result corresponding to the target object in the first video frame image is that the first video frame image includes the target object, stopping detecting the target object in the plurality of second video frame images;
[0136] If the detection result corresponding to the target object in the first video frame image is that the first video frame image does not include the target object, the target object is detected in the multiple second video frame images.
[0137] According to one or more embodiments of the present disclosure, the detection module 13 is specifically used for:
[0138] determining an object type of the target object;
[0139] Determining an object detection algorithm according to the object type;
[0140] According to the object detection algorithm, the target object is detected in the first video frame image or the second video frame image.
[0141] According to one or more embodiments of the present disclosure, the processing module 14 is specifically used for:
[0142] If the detection result is that the first video frame image or the plurality of second video frame images include a target object, displaying a selection box corresponding to the target object;
[0143] In response to a touch operation on the selection box, the target object is tracked again.
[0144] According to one or more embodiments of the present disclosure, the processing module 14 is further configured to:
[0145] Determining a target display position of the target object in the video frame image;
[0146] The video frame images in the first video are edited to obtain a second video; wherein the display positions of the target objects in the video frame images of the second video are all the same as the target display positions.
[0147] The video processing device provided in the embodiment of the present disclosure may be used to execute the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, which will not be described in detail in this embodiment.
[0148] Fig.12 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Fig.12, which shows a schematic diagram of the structure of an electronic device 1200 suitable for implementing the embodiment of the present disclosure, and the electronic device 1200 may be an electronic device or a server. The electronic device may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.12 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0149] like Fig.12 As shown, the electronic device 1200 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1201, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1202 or a program loaded from a storage device 1208 to a random access memory (RAM) 1203. Various programs and data required for the operation of the electronic device 1200 are also stored in the RAM 1203. The processing device 1201, the ROM 1202, and the RAM 1203 are connected to each other via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.
[0150] Typically, the following devices may be connected to the I / O interface 1205: input devices 1206 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 1207 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1208 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1209. The communication device 1209 may allow the electronic device 1200 to communicate with other devices wirelessly or by wire to exchange data. Although Fig.12 The electronic device 1200 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0151] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 1209, or installed from a storage device 1208, or installed from a ROM 1202. When the computer program is executed by the processing device 1201, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0152] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, 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 above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0153] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0154] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0155] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0156] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0157] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".
[0158] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0159] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. 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.
[0160] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0161] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0162] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0163] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as a terminal device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0164] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the terminal device.
[0165] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0166] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of the relevant laws and regulations. The data may include information, parameters and messages, such as flow switching indication information.
[0167] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0168] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0169] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
[0170] In a first aspect, one or more embodiments of the present disclosure provide a video processing method, the method comprising:
[0171] Determining a first video frame image in a first video, wherein tracking of a target object in the first video frame image is abnormal;
[0172] Acquire a plurality of second video frame images following the first video frame image in the first video;
[0173] Detecting a target object in the first video frame image and / or the plurality of second video frame images to obtain a detection result of the target object;
[0174] According to the detection result, the target object in the first video is tracked again.
[0175] According to one or more embodiments of the present disclosure, detecting the target object in the first video frame image and / or the plurality of second video frame images to obtain the detection result of the target object includes:
[0176] Acquire tracking abnormality information of a target object corresponding to the first video frame image, wherein the tracking abnormality information is that a subject where the target object is located overlaps or the target object is lost;
[0177] According to the tracking abnormality information, a target object is detected in the first video frame image and / or the plurality of second video frame images to obtain a detection result of the target object.
[0178] According to one or more embodiments of the present disclosure, detecting a target object in the first video frame image and / or a plurality of second video frame images according to the tracking abnormality information to obtain a detection result of the target object includes:
[0179] If the tracking abnormality information is an overlap of the subject where the target object is located, the target object is detected in the first video frame image, or the target object is detected in the first video frame image and the plurality of second video frame images to obtain a detection result corresponding to the target object;
[0180] If the tracking abnormality information is that the target object is lost, the target object is detected in the plurality of second video frame images to obtain a detection result corresponding to the target object.
[0181] According to one or more embodiments of the present disclosure, detecting a target object in the first video frame image, or detecting a target object in the first video frame image and the plurality of second video frame images, includes:
[0182] Determine a detection result corresponding to the target object in the first video frame image;
[0183] If the detection result corresponding to the target object in the first video frame image is that the first video frame image includes the target object, stopping detecting the target object in the plurality of second video frame images;
[0184] If the detection result corresponding to the target object in the first video frame image is that the first video frame image does not include the target object, the target object is detected in the multiple second video frame images.
[0185] According to one or more embodiments of the present disclosure, the detecting a target object includes:
[0186] determining an object type of the target object;
[0187] Determining an object detection algorithm according to the object type;
[0188] According to the object detection algorithm, the target object is detected in the first video frame image or the second video frame image.
[0189] According to one or more embodiments of the present disclosure, re-tracking the target object in the first video according to the detection result includes:
[0190] If the detection result is that the first video frame image or the plurality of second video frame images include a target object, displaying a selection box corresponding to the target object;
[0191] In response to a touch operation on the selection box, the target object is tracked again.
[0192] According to one or more embodiments of the present disclosure, after re-tracking the target object in the first video, the method further includes:
[0193] Determining a target display position of the target object in the video frame image;
[0194] The video frame images in the first video are edited to obtain a second video; wherein the display positions of the target objects in the video frame images of the second video are all the same as the target display positions.
[0195] In a second aspect, one or more embodiments of the present disclosure provide a video processing device, the video processing device comprising a determination module, an acquisition module, a detection module and a processing module, wherein:
[0196] The determination module is used to determine a first video frame image in a first video, wherein the tracking of the target object in the first video frame image is abnormal;
[0197] The acquisition module is used to acquire a plurality of second video frame images after the first video frame image in the first video;
[0198] The detection module is used to detect the target object in the first video frame image and / or the plurality of second video frame images to obtain a detection result of the target object;
[0199] The processing module is used to re-track the target object in the first video according to the detection result.
[0200] According to one or more embodiments of the present disclosure, the detection module is specifically used for:
[0201] Acquire tracking abnormality information of a target object corresponding to the first video frame image, wherein the tracking abnormality information is that a subject where the target object is located overlaps or the target object is lost;
[0202] According to the tracking abnormality information, a target object is detected in the first video frame image and / or the plurality of second video frame images to obtain a detection result of the target object.
[0203] According to one or more embodiments of the present disclosure, the detection module is specifically used for:
[0204] If the tracking abnormality information is an overlap of the subject where the target object is located, the target object is detected in the first video frame image, or the target object is detected in the first video frame image and the plurality of second video frame images to obtain a detection result corresponding to the target object;
[0205] If the tracking abnormality information is that the target object is lost, the target object is detected in the plurality of second video frame images to obtain a detection result corresponding to the target object.
[0206] According to one or more embodiments of the present disclosure, the detection module is specifically used for:
[0207] Determine a detection result corresponding to the target object in the first video frame image;
[0208] If the detection result corresponding to the target object in the first video frame image is that the first video frame image includes the target object, stopping detecting the target object in the plurality of second video frame images;
[0209] If the detection result corresponding to the target object in the first video frame image is that the first video frame image does not include the target object, the target object is detected in the multiple second video frame images.
[0210] According to one or more embodiments of the present disclosure, the detection module is specifically used for:
[0211] determining an object type of the target object;
[0212] Determining an object detection algorithm according to the object type;
[0213] According to the object detection algorithm, the target object is detected in the first video frame image or the second video frame image.
[0214] According to one or more embodiments of the present disclosure, the processing module is specifically used to:
[0215] If the detection result is that the first video frame image or the plurality of second video frame images include a target object, displaying a selection box corresponding to the target object;
[0216] In response to a touch operation on the selection box, the target object is tracked again.
[0217] According to one or more embodiments of the present disclosure, the processing module is further configured to:
[0218] Determining a target display position of the target object in the video frame image;
[0219] The video frame images in the first video are edited to obtain a second video; wherein the display positions of the target objects in the video frame images of the second video are all the same as the target display positions.
[0220] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;
[0221] The memory stores computer-executable instructions;
[0222] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the video processing method as described in the first aspect and various possible aspects of the first aspect.
[0223] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the video processing method as described in the first aspect and various possible aspects of the first aspect are implemented.
[0224] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the video processing method as described in the first aspect and various possible aspects of the first aspect.
[0225] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0226] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0227] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A video processing method, characterized in that: include: Determining a first video frame image in a first video, wherein tracking of a target object in the first video frame image is abnormal; Acquire a plurality of second video frame images following the first video frame image in the first video; Detecting a target object in the first video frame image and / or the plurality of second video frame images to obtain a detection result of the target object; According to the detection result, the target object in the first video is tracked again.
2. The method according to claim 1, characterized in that The detecting the target object in the first video frame image and / or the plurality of second video frame images to obtain the detection result of the target object includes: Acquire tracking abnormality information of the target object corresponding to the first video frame image, wherein the tracking abnormality information is that a subject where the target object is located overlaps or the target object is lost; According to the tracking abnormality information, a target object is detected in the first video frame image and / or the plurality of second video frame images to obtain a detection result of the target object.
3. The method according to claim 2, characterized in that The detecting a target object in the first video frame image and / or a plurality of second video frame images according to the tracking abnormality information to obtain a detection result of the target object includes: If the tracking abnormality information is an overlap of the subject where the target object is located, the target object is detected in the first video frame image, or the target object is detected in the first video frame image and the plurality of second video frame images to obtain a detection result corresponding to the target object; If the tracking abnormality information is that the target object is lost, the target object is detected in the plurality of second video frame images to obtain a detection result corresponding to the target object.
4. The method according to claim 3, characterized in that Detecting a target object in the first video frame image, or detecting a target object in the first video frame image and the plurality of second video frame images, comprises: Determine a detection result corresponding to the target object in the first video frame image; If the detection result corresponding to the target object in the first video frame image is that the first video frame image includes the target object, stopping detecting the target object in the plurality of second video frame images; If the detection result corresponding to the target object in the first video frame image is that the first video frame image does not include the target object, the target object is detected in the multiple second video frame images.
5. The method according to claim 3, characterized in that: The detection target object includes: determining an object type of the target object; Determining an object detection algorithm according to the object type; According to the object detection algorithm, the target object is detected in the first video frame image or the second video frame image.
6. The method according to any one of claims 1 to 5, characterized in that: The re-tracking the target object in the first video according to the detection result includes: If the detection result is that the first video frame image or the plurality of second video frame images include a target object, displaying a selection box corresponding to the target object; In response to a touch operation on the selection box, the target object is tracked again.
7. The method according to any one of claims 1 to 5, characterized in that: After re-tracking the target object in the first video, the method further includes: Determining a target display position of the target object in the video frame image; The video frame images in the first video are edited to obtain a second video; wherein the display positions of the target objects in the video frame images of the second video are all the same as the target display positions.
8. A video processing device, characterized in that: It includes a determination module, an acquisition module, a detection module and a processing module, wherein: The determination module is used to determine a first video frame image in a first video, wherein the tracking of the target object in the first video frame image is abnormal; The acquisition module is used to acquire a plurality of second video frame images after the first video frame image in the first video; The detection module is used to detect the target object in the first video frame image and / or the plurality of second video frame images to obtain a detection result of the target object; The processing module is used to re-track the target object in the first video according to the detection result.
9. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the video processing 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-executable instructions. When the processor executes the computer-executable instructions, the video processing method according to any one of claims 1 to 7 is implemented.