Video processing method and apparatus, and electronic device
By detecting and processing tracking exceptions in video frame images in video processing, and re-tracking of target objects, the problem of low tracking accuracy when target objects are temporarily lost or subjects overlap is solved, and the tracking accuracy of target objects in video is improved .
Patent Information
- Application Number
- PCT/CN2024/108999
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-07-31
- Filing Date
- 2024-07-31
- Publication Date
- 2025-02-06
AI Technical Summary
In the prior art, in video processing, when the target object does not appear in any frame of video, the electronic device cannot continue to track the target object, resulting in poor tracking accuracy.
By determining the tracking exception in the video frame image, the subsequent frame images are acquired, and the target object is detected in these frame images, and the tracking is performed again.
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 CN2024108999_06022025_PF_FP_ABST
Abstract
Description
Video processing method, device and electronic equipment
[0001] This application claims priority to the Chinese invention patent application entitled “Video processing method, device and electronic device” and application number 2023109493643, filed on July 31, 2023. The entire contents of that application are incorporated by reference into this application. Technical Field
[0002] 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
[0003] By shooting videos using 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.
[0004] Currently, electronic devices can track a target object and then lock its display position to produce a video with a camera-like effect. For example, after tracking a face, an electronic device can lock its display position to achieve a camera-like 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, resulting in poor tracking accuracy.
[0005] Summary of the Invention
[0006] The present disclosure provides a video processing method, device, and electronic device for solving one or more technical problems in the prior art.
[0007] In a first aspect, an embodiment of the present disclosure provides a video processing method, which includes: determining a first video frame image in a first video, in which the tracking of a target object in the first video frame image is abnormal; obtaining multiple second video frame images after the first video frame image in the first video; detecting the target object in the first video frame image and / or the multiple second video frame images to obtain a detection result of the target object; and re-tracking the target object in the first video based on the detection result.
[0008] In a second aspect, an embodiment of the present disclosure provides a video processing device, which 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, in which the tracking of the target object in the first video frame image is abnormal; the acquisition module is used to acquire multiple 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 multiple second video frame images to obtain the detection result of the target object; the processing module is used to re-track the target object in the first video based on the detection result.
[0009] In a third aspect, an embodiment of the present disclosure provides an electronic device comprising: a processor and a memory; the memory stores computer-executable instructions; 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.
[0010] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the video processing method as described in the first aspect and various possible aspects of the first aspect are implemented.
[0011] 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. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. 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 any creative labor.
[0013] FIG1 is a schematic diagram of an application scenario provided by an embodiment of the present disclosure;
[0014] FIG2 is a flow chart of a video processing method provided by an embodiment of the present disclosure;
[0015] FIG3 is a schematic diagram of a first video frame image provided by an embodiment of the present disclosure;
[0016] FIG4 is a schematic diagram of overlapping entities where a target object is located, provided by an embodiment of the present disclosure;
[0017] FIG5 is a schematic diagram of another target object lost according to an embodiment of the present disclosure;
[0018] FIG6 is a schematic diagram of a process of re-tracking a target object provided by an embodiment of the present disclosure;
[0019] FIG7 is a schematic diagram of a method for determining a detection result of a target object provided by an embodiment of the present disclosure;
[0020] FIG8A is a schematic diagram of a process for detecting a target object according to an embodiment of the present disclosure;
[0021] FIG8B is a schematic diagram of another process for detecting a target object according to an embodiment of the present disclosure;
[0022] FIG9 is a schematic diagram of a detection result for determining a target object according to an embodiment of the present disclosure;
[0023] FIG10 is a flow chart of a method for editing a video frame image provided by an embodiment of the present disclosure;
[0024] FIG11 is a schematic structural diagram of a video processing device provided by an embodiment of the present disclosure;
[0025] FIG12 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] The present disclosure provides a video processing method, device and electronic device for determining a first video frame image in a first video. The tracking of a target object in the first video frame image is abnormal. A plurality of second video frame images following the first video frame image in the first video are obtained, and the 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. Based on the detection result, the target object in the first video is re-tracked. 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 a plurality of subsequent video frame images. When the target object reappears, the electronic device can re-track the target object, thereby improving the accuracy of tracking the target object.
[0027] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
[0028] To facilitate understanding, the concepts involved in the embodiments of the present disclosure are explained below.
[0029] Electronic device: is a device with wireless transceiver function. The electronic device can be deployed on land, including indoors or outdoors, handheld, wearable or vehicle-mounted; it can also be deployed on the water surface (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, an on-board electronic device, a wireless terminal in self-driving, a wireless electronic device in remote medical care, a wireless electronic device in a smart grid, a wireless electronic device in transportation safety, a wireless electronic device in a smart city, a wireless electronic device in a smart home, a wearable electronic device, etc. The electronic device involved in the embodiments of the present disclosure can also be called a terminal, 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 stationary or mobile.
[0030] In related technologies, when an electronic device obtains a camera-moving video, it can track the target object in the video. The display position of the target object is then locked 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, thereby obtaining a camera-moving video in which the position of the face in the video remains unchanged. However, the above method requires accurate tracking of 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. This results in low tracking accuracy of the target object by the electronic device, and the resulting camera-moving video has poor effect.
[0031] In order to solve the problems in the related art, an embodiment of the present disclosure provides a video processing method. The electronic device can 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. A plurality of second video frame images after the first video frame image in the first video are obtained, and tracking abnormality information of the target object corresponding to the first video frame image is obtained, wherein the tracking abnormality information is that the subject where the target object is located overlaps or the target object is lost. According to the tracking abnormality information, the 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. According to the detection result, the target object in the first video is re-tracked. 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. In this way, the tracking accuracy of the target object can be improved.
[0032] The application scenario of the embodiment of the present disclosure is described below with reference to FIG1 .
[0033] Figure 1 is a schematic diagram of an application scenario provided by an embodiment of the present disclosure. Referring to Figure 1 , the electronic device includes an electronic device. A video is input to the electronic device, wherein the first frame of the video includes a face (target object). When a user clicks on the user's face, the electronic device can adjust the display position of the face in each frame to fix the face's display position in the video. However, when the electronic device adjusts the display position of the face in the second frame, the face is lost in the second frame, and the electronic device cannot obtain the face's display position in the second frame. Therefore, the electronic device cannot process subsequent images. In this way, the electronic device can continue to detect faces in images after the second frame. Until the electronic device detects a face in the fifth frame, the electronic device can continue to adjust the face's display position in the fifth frame to fix the face's display position in the video. In this way, if the electronic device encounters an anomaly while tracking the target object in the video, the electronic device can continue tracking the target object in subsequent frames. Furthermore, by editing the image, the target object's display position in the video can be adjusted. This not only improves the accuracy of target object tracking, but also improves the quality of the captured camera video.
[0034] It should be noted that FIG1 is only an illustrative illustration of the application scenario of the embodiment of the present disclosure, and does not limit the application scenario of the embodiment of the present disclosure.
[0035] The following detailed description of the technical solution of the present disclosure and how the technical solution of the present disclosure solves the above-mentioned technical problems is provided with specific embodiments. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The embodiments of the present disclosure will be described below in conjunction with the accompanying drawings.
[0036] FIG2 is a flow chart of a video processing method provided by an embodiment of the present disclosure. Referring to FIG2 , the method may include:
[0037] S201: Determine a first video frame image in a first video.
[0038] The execution subject of the embodiment of the present disclosure can be an electronic device, or a video processing device set in the electronic device. Optionally, the video processing device can be implemented by software, or the video processing device can be implemented by a combination of software and hardware, which is not limited by the embodiment of the present disclosure.
[0039] Optionally, the first video may be a video captured by the electronic device. For example, the electronic device may capture a video in real time to obtain the first video. The first video may also 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 another device. 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. The electronic device may obtain the video in a database, which is not limited in the embodiments of the present disclosure.
[0040] 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, and the present embodiment of the disclosure does not limit this. 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, and the present embodiment of the disclosure does not limit this. For example, taking the embodiment shown in Figure 1 as an example, the first frame image in the video may include a subject, and the objects in the subject may include a face, limbs, torso, etc.
[0041] The target object may be an object to be tracked in the first video. For example, if the subject in the first video includes a face, a left hand, and a right hand, and the object to be tracked is a face, the electronic device may determine that the target object is a face.
[0042] Optionally, the electronic device can determine the target object based on a user's operation. For example, if the subject in the first video includes a face, a left hand, and a right hand, and the user clicks on the face, the electronic device can determine that the object to be tracked is the face. In other words, the target object is the face. If the user clicks on the left hand, the electronic device can determine that the object to be tracked is the left hand. In other words, the target object is the left hand.
[0043] It should be noted that in the disclosed embodiments, after the user determines the target object to be tracked, some video frames may lose the target object (for example, the subject leaves the shooting area for a period of time). As a result, the tracking process of the target object is interrupted, and the electronic device needs to solve the problem of continuing to track the target object.
[0044] 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's tracking anomaly of the target object occurs. 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's tracking anomaly of the target object occurs (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).
[0045] Optionally, the first video frame image may be an image among a plurality of consecutive video frame images in the first video that have abnormal tracking of the target object. For example, if 10 consecutive video frame images in the first video have abnormal tracking of the target object, 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 to 20th frame images 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 to 20th frame images, and this is not limited in the embodiments of the present disclosure.
[0046] 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.
[0047] The first video frame image is described below with reference to FIG3 .
[0048] FIG3 is a schematic diagram of a first video frame image provided by an embodiment of the present disclosure. Please refer to FIG3 , which includes a video. The video includes a first frame image, a second frame image, a third frame image, and a fourth frame image, and the first frame image and the second frame image include a user. If the electronic device (not shown in FIG3 ) determines that the target object is the face of the user, the electronic device can detect the face in the first frame image and the second frame image, and the electronic device 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.
[0049] It should be noted that subject overlap can also cause the electronic device to track the target object abnormally. Therefore, taking the embodiment shown in Figure 3 as an example, if the first frame image includes two users and the two users overlap, the electronic device can also determine the first frame image as the first video frame image.
[0050] S202: Acquire a plurality of second video frame images following the first video frame image in the first video.
[0051] The second video frame image may be an image following 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 present embodiment does not limit 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 following 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 present embodiment does not limit this.
[0052] Optionally, the electronic device may obtain the second video frame image based on any feasible implementation method, which is not limited in the embodiments of the present disclosure.
[0053] 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.
[0054] The target object detection result may include or exclude the target object. For example, if the target object exists in the first video frame image, the target object detection result for 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 target object detection result for the first video frame image is that the target object is not included in the first video frame image.
[0055] It should be noted that tracking of the target object can also be anomalies when subjects overlap. Therefore, if the target object is a face, and the torsos of two subjects in a video frame overlap but the faces do not, face tracking in that video frame will also be anomalies (i.e., that video frame is the first video frame). However, the target object (i.e., the face) can still be detected in that video frame.
[0056] The electronic device may obtain a target object detection result based on the following feasible implementation: obtaining tracking anomaly information of the target object corresponding to the first video frame image, detecting the target object in the first video frame image and / or multiple second video frames based on the tracking anomaly information, and obtaining a target object detection result.
[0057] The tracking anomaly information may include an overlap of the subject containing the target object or a missing target object. For example, the first video frame may be an image showing an anomaly in tracking the target object. If multiple subjects overlap in the first video frame, or if the first video frame does not include the target object, both will result in an anomaly in tracking the target object in the first video frame.
[0058] Optionally, the subject overlap where the target object is located may include at least one subject overlapping with the subject where the target object is located. For example, a first video may include user A and user B. If the user touches user A's face, the electronic device may determine that the target object in the first video is user A's face. If user B's torso in a video frame image obscures user A's torso, the electronic device may determine that the video frame image is the first video frame image, and the tracking anomaly information for the video frame image may be subject overlap where the target object is located.
[0059] The following describes the situation where the subjects where the target objects are located overlap with each other with reference to FIG. 4 .
[0060] Figure 4 is a schematic diagram of an overlapping subject where a target object is located, provided by an embodiment of the present disclosure. Please refer to Figure 4, which includes 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. The electronic device may determine that the third frame image is the first video frame image, and the tracking anomaly information of the third frame image may be that the subject where the target object is located overlaps.
[0061] Optionally, the target object is lost may refer to the target not being included in the first video frame image. 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 images corresponding to the period of time, and determine that the tracking anomaly information of the first video frame image is that the target object is lost. For example, if 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 that the 20th frame is the first video frame image, and determine that the tracking anomaly information of the 20th frame is that the target object is lost.
[0062] Next, the situation where the target object is lost is described with reference to FIG5 .
[0063] Figure 5 is a schematic diagram of another target object loss provided by an embodiment of the present disclosure. Please refer to Figure 5, which includes an electronic device. The video played by the electronic device includes the first frame image, the second frame image and the third frame image, and the target object is the 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. Therefore, the electronic device cannot detect the face (target object) in the third frame image, and 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.
[0064] It should be noted that after the electronic device determines the first video frame image, the electronic device may determine the tracking anomaly information of the first video frame image based on any feasible implementation method, which is not limited in the embodiments of the present disclosure.
[0065] 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 the subsequent video frame image (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 a tracking anomaly, 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).
[0066] S204: Re-track the target object in the first video according to the detection result.
[0067] Optionally, the electronic device may re-track the target object in the first video according to the following feasible implementation: if the detection result indicates that the first video frame image or multiple second video frames include the target object, a selection box corresponding to the target object is displayed. In response to a touch operation on the selection box, the target object is re-tracked.
[0068] 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. After the user clicks the selection box, the electronic device can track the target object again. 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 (such as, 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. When the user clicks the selection box, the electronic device can track the target object again. 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 (such as, the target object reappears), the electronic device can display a selection box including the target object. When the user clicks the selection box in the second video frame image, the electronic device can track the target object again.
[0069] The process of re-tracking the target object is described below with reference to FIG. 6 .
[0070] FIG6 is a schematic diagram of a process of re-tracking a target object provided by an embodiment of the present disclosure. Please refer to FIG6 , which includes 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 subsequent video frames. 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. This avoids interruptions in tracking the target object and improves the accuracy and flexibility of tracking the target object.
[0071] An embodiment of the present disclosure 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. This can improve the tracking accuracy of the target object.
[0072] Based on the embodiment shown in FIG2 , the 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 below in conjunction with FIG7 .
[0073] FIG7 is a schematic diagram of a method for determining a detection result of a target object provided by an embodiment of the present disclosure. Referring to FIG7 , the method flow includes:
[0074] S701: Acquire tracking abnormality information of a target object corresponding to a first video frame image.
[0075] Optionally, the tracking exception information is that the subject where the target object is located overlaps or the target object is lost.
[0076] It should be noted that the execution process of step S701 can refer to the execution process of step S203, and will not be further described in detail in the embodiment of the present disclosure.
[0077] 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.
[0078] 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, and obtain a detection result of the target object.
[0079] Optionally, the electronic device detects the target object in the first video frame image and / or the plurality of second video frame images based on the tracking anomaly information, and obtains the detection result of the target object in the following two situations:
[0080] Case 1: The tracking anomaly information is that the subject where the target object is located overlaps.
[0081] If the tracking anomaly information indicates that the subject where the target object is located overlaps, the electronic device may detect the target object in the first video frame image. Alternatively, the electronic device may detect the target object in the first video frame image and multiple second video frames to obtain a detection result corresponding to the target object.
[0082] 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 by 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.
[0083] Optionally, if the tracking anomaly information in the first video frame indicates that the target object has a main body overlap, the electronic device may detect the target object in either the obstructed or unobstructed state. If the target object is unobstructed, the electronic device can detect the target object in the first video frame, and therefore, the electronic device does not need to detect the target object in the second video frame. If the target object is also obstructed, the electronic device cannot detect the target object in the first video frame, and the electronic device may re-detect the target object in multiple second video frames. For example, the first video includes user A and user B, and the target object is user A's face. If the torsos of user A and user B overlap in the first video frame, and user A's face does not overlap with user B's face, the electronic device may detect user A's face in the first video frame and continue tracking user A's face. If user A's face also overlaps with user B's face in the first video frame, the electronic device cannot detect user A's face in the first video frame. Therefore, the electronic device may detect user A's face in multiple second video frames and, after detecting user A's face, re-track user A's face.
[0084] The process of detecting the target object in this case will be described below with reference to FIG. 8A and FIG. 8B .
[0085] Figure 8A is a schematic diagram of a target object detection process according to an embodiment of the present disclosure. Referring to Figure 8A , an electronic device is included. A 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 overlap in the video frame, so the video frame may be a first video frame image, and the tracking anomaly information indicates the overlap of the subject where the target object resides.
[0086] Referring to FIG8A , the electronic device detects the target object in the video frame. Since user B does not block user A's face, even though user A and user B partially overlap, the electronic device can still detect user A's face in the video frame. Therefore, the electronic device can determine that the target object detection result in the video frame indicates that the video frame includes the target object.
[0087] Figure 8B is a schematic diagram of another process for detecting a target object provided by an embodiment of the present disclosure. Referring to Figure 8B , an electronic device is included. 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 the first video frame image, and the tracking anomaly information in the first frame indicates an overlap of the subject where the target object resides.
[0088] 8B , the electronic device detects the target object in the video frame. Because user B blocks user A's face, the electronic device cannot detect user A's face in frame 1. The electronic device can determine that the target object detection result in frame 1 is that the target object is not included in frame 1.
[0089] Referring to FIG8B , the electronic device can sequentially detect the face of user A in the second, third, ..., and tenth frames (second video frame images). If the electronic device detects the face of user A in the tenth frame, the electronic device can determine that the target object detection result in the tenth frame indicates that the target object is included in the tenth 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.
[0090] Case 2: The tracking anomaly information is the subject overlap where the target object is located.
[0091] If the tracking abnormality information indicates that the target object is lost, the electronic device may detect the target object in a plurality of second video frame images to obtain a detection result corresponding to the target object.
[0092] For example, if the tracking anomaly information of the first video frame indicates that the target object is lost, it means that the first video frame does not include the target object. Therefore, the electronic device can perform target object detection processing on multiple frames subsequent to the first video frame to obtain a detection result corresponding to the target object.
[0093] The process of determining the detection result of the target object in this case will be described below with reference to FIG. 9 .
[0094] Figure 9 is a schematic diagram of a detection result for determining a target object provided by an embodiment of the present disclosure. Please refer to Figure 9, including an electronic device. The target object can be the face of a user. The 10th frame displayed by the electronic device does not include the user, and the previous 9 frames also 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.
[0095] Optionally, in the above-described cases 1 and 2, the electronic device may detect the target object based on the following feasible implementation: determining an object type of the target object; determining an object detection algorithm based on the object type; and detecting the target object in the first video frame image or the second video frame image based on the object detection algorithm.
[0096] 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 present disclosure is not limited thereto.
[0097] For example, if the target object's object type is a face, the electronic device may determine that the object detection algorithm is a face detection algorithm. Based on the face detection algorithm, the electronic device detects the target object in the video frame image to obtain a detection result. If the target object's object type is a limb, the electronic device may determine that the object detection algorithm is a limb detection algorithm. Based on the limb detection algorithm, the electronic device detects the target object in the video frame image to obtain a detection result.
[0098] 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 described in detail in the embodiment of the present disclosure.
[0099] 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 target object is included in the second video frame image.
[0100] It should be noted that, while the electronic device sequentially detects the target object in the second video frames, if the target object is not detected in multiple second video frames, the electronic device may determine that the target object in the first video has been lost and report an error. For example, if the target object is not included in any second video frames included within 10 seconds after the first video frame, the electronic device may determine that the target object is lost.
[0101] The embodiments of the present disclosure provide a method for determining the detection result of a target object, and obtaining tracking anomaly information of the target object corresponding to the first video frame image. If the tracking anomaly information is that the subject where the target object is located overlaps, 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. 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 a 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.
[0102] Based on any of the above embodiments, the above video processing method also includes a process of editing the video frame images in the first video. Below, in conjunction with Figure 10, the method of editing the video frame images in the first video is described in detail.
[0103] FIG10 is a flow chart of a method for editing a video frame image provided by an embodiment of the present disclosure. Referring to FIG10 , the method flow includes:
[0104] S1001: Determine a target display position of a target object in a video frame image.
[0105] 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.
[0106] 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, the electronic device may determine the display position of the face in the first frame as the target display position. If the user selects the left hand in the tenth frame, the electronic device may determine the display position of the left hand in the tenth frame as the target display position.
[0107] 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.
[0108] S1002: Edit the video frame images in the first video to obtain a second video.
[0109] The display position of the target object in the video frame images of the second video is the same as the target display position. For example, if the target object is a face and the target display position is the center of the first video, the electronic device can edit the video frame images in the first video to obtain the second video. The face in each video frame image in the second video is located at the center of the video frame image. In this way, the position of the face in the video can be fixed, thereby achieving the effect of video panning display.
[0110] Optionally, the electronic device can crop and move the video frame images in the first video based on the target display position to obtain the video frame images in the second video. The display position of the target object in the video frame images 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 a camera movement video.
[0111] For example, if an electronic device crops a video frame image in a first video and moves the resulting cropped video frame image to obtain a video frame image in a second video. For example, if the target display position is the center of the first video, and if the target object is displayed at the top in another video frame image of the first video, the electronic device can crop the lower area of the video frame image and move the cropped video frame image downward to obtain a video frame image in the second video. The target object is displayed at the center of the video frame image in the second video.
[0112] 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.
[0113] The disclosed embodiments provide a method for editing video frame images, which determines a target display position of a target object in a video frame image. The video frame images in a first video are edited to obtain a second video. The display positions of the target objects in the video frames of the second video are all identical to the target display positions. In this way, an 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.
[0114] FIG11 is a schematic diagram of the structure of a video processing device provided by an embodiment of the present disclosure. Referring to FIG11 , the video processing device 10 includes a determination module 11, an acquisition module 12, a detection module 13, and a processing module 14, wherein: the determination module 11 is used to determine that a first video frame image in a first video contains an abnormal tracking of a target object; the acquisition module 12 is used to acquire multiple second video frames following the first video frame image in the first video; the detection module 13 is used to detect the target object in the first video frame image and / or the multiple second video frames and obtain a detection result of the target object; and the processing module 14 is used to re-track the target object in the first video based on the detection result.
[0115] According to one or more embodiments of the present disclosure, the detection module 13 is specifically used to: obtain tracking abnormality information of the target object corresponding to the first video frame image, the tracking abnormality information being the overlapping of the subject where the target object is located or the loss of the target object; based on the tracking abnormality information, detect the target object in the first video frame image and / or the multiple second video frame images to obtain the detection result of the target object.
[0116] According to one or more embodiments of the present disclosure, the detection module 13 is specifically used to: if the tracking abnormality information is that the subject where the target object is located overlaps, then detect the target object in the first video frame image, or detect the target object in the first video frame image and the multiple 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, then detect the target object in the multiple second video frame images to obtain a detection result corresponding to the target object.
[0117] According to one or more embodiments of the present disclosure, the detection module 13 is specifically used to: determine the 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 target object is included in the first video frame image, stop 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 target object is not included in the first video frame image, detect the target object in the multiple second video frame images.
[0118] According to one or more embodiments of the present disclosure, the detection module 13 is specifically used to: 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.
[0119] According to one or more embodiments of the present disclosure, the processing module 14 is specifically used to: if the detection result is that the first video frame image or the multiple second video frame images include a target object, display a selection box corresponding to the target object; and re-track the target object in response to a touch operation on the selection box.
[0120] According to one or more embodiments of the present disclosure, the processing module 14 is also used to: determine the target display position of the target object in the video frame image; edit the video frame image in the 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.
[0121] The video processing device provided in the embodiment of the present disclosure can be used to execute the technical solution of the above-mentioned method embodiment. Its implementation principle and technical effects are similar and will not be described in detail in this embodiment.
[0122] FIG12 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. Please refer to FIG12 , which shows a schematic diagram of the structure of an electronic device 1200 suitable for implementing an embodiment of the present disclosure. 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, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. The electronic device shown in FIG12 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
[0123] As shown in FIG12 , 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 into 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.
[0124] Typically, the following devices may be connected to the I / O interface 1205: an input device 1206 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1207 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1208 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1209. The communication device 1209 may allow the electronic device 1200 to communicate with other devices wirelessly or by wire to exchange data. Although FIG12 shows an electronic device 1200 having various devices, it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.
[0125] 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 includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network via the communication device 1209, or installed from the storage device 1208, or installed from the 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 performed.
[0126] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, 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 that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport 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 thereof.
[0127] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0128] 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.
[0129] 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 a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through 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).
[0130] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two 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 box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0131] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."
[0132] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and 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 chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0133] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can 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 can 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.
[0134] It should be noted that the modifications of "one" and "multiple" 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, they should be understood as "one or more".
[0135] 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.
[0136] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this 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.
[0137] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the terminal device, application, server, or storage medium, that performs the operation of the disclosed technical solution, based on the prompt message.
[0138] As an optional but non-limiting implementation, in response to receiving a user's active request, 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 contain a selection control for the user to select "agree" or "disagree" to provide personal information to the terminal device.
[0139] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0140] 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 relevant laws and regulations. Data may include information, parameters and messages, such as flow switching indication information.
[0141] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. 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 the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0142] 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 have been 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.
[0143] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
[0144] In a first aspect, one or more embodiments of the present disclosure provide a video processing method, the method comprising: determining a first video frame image in a first video, wherein the tracking of a target object in the first video frame image is abnormal; obtaining a plurality of second video frame images following the first video frame image in the first video; detecting 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; and re-tracking the target object in the first video based on the detection result.
[0145] According to one or more embodiments of the present disclosure, detecting the target object in the first video frame image and / or the multiple second video frame images to obtain the detection result of the target object includes: obtaining tracking abnormality information of the target object corresponding to the first video frame image, the tracking abnormality information being that the subject where the target object is located overlaps or the target object is lost; detecting the target object in the first video frame image and / or the multiple second video frame images based on the tracking abnormality information to obtain the detection result of the target object.
[0146] According to one or more embodiments of the present disclosure, the target object is detected in the first video frame image and / or multiple second video frame images based on the tracking abnormality information to obtain the detection result of the target object, including: if the tracking abnormality information is that the subject where the target object is located overlaps, 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 multiple second video frame images to obtain the 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 multiple second video frame images to obtain the detection result corresponding to the target object.
[0147] 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 multiple second video frame images, includes: 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 target object is included in the first video frame image, 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 target object is not included in the first video frame image, detecting the target object in the multiple second video frame images.
[0148] According to one or more embodiments of the present disclosure, detecting the target object includes: determining the object type of the target object; determining an object detection algorithm based on the object type; and detecting the target object in the first video frame image or the second video frame image based on the object detection algorithm.
[0149] According to one or more embodiments of the present disclosure, re-tracking the target object in the first video based on the detection result includes: if the detection result is that the first video frame image or the multiple second video frame images include the target object, displaying a selection box corresponding to the target object; and re-tracking the target object in response to a touch operation on the selection box.
[0150] According to one or more embodiments of the present disclosure, after re-tracking the target object in the first video, the method further includes: determining the target display position of the target object in the video frame image; editing the video frame image in the first video to obtain a second video; wherein the display positions of the target objects in the video frame images of the second video are the same as the target display positions.
[0151] In a second aspect, one or more embodiments of the present disclosure provide a video processing device, which 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, in which the tracking of the target object in the first video frame image is abnormal; the acquisition module is used to acquire multiple 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 multiple second video frame images to obtain a detection result of the target object; and the processing module is used to re-track the target object in the first video based on the detection result.
[0152] According to one or more embodiments of the present disclosure, the detection module is specifically used to: obtain tracking abnormality information of the target object corresponding to the first video frame image, the tracking abnormality information being the overlapping of the subject where the target object is located or the loss of the target object; based on the tracking abnormality information, detect the target object in the first video frame image and / or the multiple second video frame images to obtain the detection result of the target object.
[0153] According to one or more embodiments of the present disclosure, the detection module is specifically used to: if the tracking abnormality information is that the subject where the target object is located overlaps, then detect the target object in the first video frame image, or detect the target object in the first video frame image and the multiple second video frame images to obtain the detection result corresponding to the target object; if the tracking abnormality information is that the target object is lost, then detect the target object in the multiple second video frame images to obtain the detection result corresponding to the target object.
[0154] According to one or more embodiments of the present disclosure, the detection module is specifically used to: determine the 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 target object is included in the first video frame image, stop 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 target object is not included in the first video frame image, detect the target object in the multiple second video frame images.
[0155] According to one or more embodiments of the present disclosure, the detection module is specifically used to: 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.
[0156] According to one or more embodiments of the present disclosure, the processing module is specifically used to: if the detection result is that the first video frame image or the multiple second video frame images include a target object, display a selection box corresponding to the target object; and re-track the target object in response to a touch operation on the selection box.
[0157] According to one or more embodiments of the present disclosure, the processing module is also used to: determine the target display position of the target object in the video frame image; edit the video frame image in the 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.
[0158] In a third aspect, an embodiment of the present disclosure provides an electronic device comprising: a processor and a memory; the memory stores computer-executable instructions; 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.
[0159] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the video processing method as described in the first aspect and various possible aspects of the first aspect are implemented.
[0160] 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.
[0161] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. 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 the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0162] 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 have been 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.
[0163] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. A video processing method, comprising: 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, wherein 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 comprises: 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, wherein the detecting the 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 the detection result of the target object comprises: 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, wherein detecting the target object in the first video frame image, or detecting the 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, wherein the detecting the target object comprises: 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, wherein re-tracking the target object in the first video according to the detection result comprises: 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, wherein after re-tracking the target object in the first video, the method further comprises: 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, comprising 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, comprising: 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, wherein the computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, the video processing method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Target tracking method and device, electronic equipment and computer readable storage medium
CN110555862A
Video target tracking method and device, storage medium and electronic equipment
CN112907628A
Target object loss judgment method and device, equipment and medium
CN116469028A
Category labelling method and device, and storage medium
US20220067379A1
