Video processing methods, apparatus, and electronic devices

The video processing method and device allow electronic devices to achieve camera work effects by maintaining consistent object positioning, eliminating the need for auxiliary equipment and reducing production costs.

JP2026521367APending Publication Date: 2026-06-30BEIJING ZITIAO NETWORK TECH CO LTD

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
BEIJING ZITIAO NETWORK TECH CO LTD
Filing Date
2024-07-31
Publication Date
2026-06-30

Smart Images

  • Figure 2026521367000001_ABST
    Figure 2026521367000001_ABST
Patent Text Reader

Abstract

This disclosure provides a video processing method, apparatus, and electronic device, the method comprising acquiring a first video frame image in a first video, determining a target object in the first video frame image, and editing the video frames in the first video based on the display position of the target object in the first video frame image to obtain a second video, wherein the display positions of the target object in the video frame images of the second video are all the same as the display positions of the target object in the first video frame image, thereby reducing the cost of acquiring camera work shooting video.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] (Cross-reference to Related Applications) This application claims the priority of a Chinese invention patent application with the theme of "Video Processing Method, Apparatus and Electronic Device" and application number 2023109527531, which was filed on July 31, 2023. All the content of this application is incorporated herein by reference.

[0002] (Field of the Invention) Embodiments of the present disclosure relate to the field of video processing technology, and particularly to video processing methods, apparatuses, and electronic devices.

Background Art

[0003] Camera work shooting is a method of shooting by moving the shooting lens so that the shooting object in the video is located at a fixed position on the screen. For example, by moving the lens, the shooting object can always be located at the center of the screen.

[0004] Currently, an electronic device can achieve camera work shooting by means of an auxiliary shooting device. For example, the auxiliary shooting device may be a smart selfie stick. After the user determines the shooting object in the video, when the shooting object moves, the electronic device can control the movement of the smart selfie stick so that the position of the shooting object on the screen of the electronic device does not change. However, the above method needs to be realized by an auxiliary shooting device, but the auxiliary shooting device is difficult to carry, has a relatively high cost, and further increases the cost of camera work shooting videos.

Summary of the Invention

Means for Solving the Problems

[0005] According to a first aspect, the Disclosure provides a video processing method which includes acquiring a first video frame image in a first video, determining a target object in the first video frame image, and editing the video frames in the first video based on the display position of the target object in the first video frame image to obtain a second video, wherein the display positions of the target object in the video frame images of the second video are all the same as the display positions of the target object in the first video frame image.

[0006] According to a second aspect, the Disclosure provides a video processing device comprising an acquisition module, a determination module, and a processing module, wherein the acquisition module is used to acquire a first video frame image in a first video; the determination module is used to determine a target object in the first video frame image; and the processing module is used to edit the video frames in the first video based on the display position of the target object in the first video frame image 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 display position of the target object in the first video frame image.

[0007] According to a third aspect, embodiments of the present disclosure provide an electronic device including a processor and memory, wherein the memory stores computer execution instructions, and the processor causes at least one processor to execute the computer execution instructions stored in the memory, thereby enabling the processor to execute the first aspect and various video processing methods relating to the first aspect.

[0008] According to a fourth aspect, embodiments of the present disclosure provide a computer-readable storage medium in which computer execution instructions are stored, and when a processor executes the computer execution instructions, various video processing methods described in the first aspect and related to the first aspect are realized.

[0009] According to a fifth aspect, embodiments of the present disclosure provide a computer program product which includes a computer program that, when executed by a processor, implements the first aspect and various video processing methods related to the first aspect. [Brief explanation of the drawing]

[0010] To more clearly illustrate the embodiments of this disclosure or the prior art, the following is a brief introduction of the drawings that may be used in the description of the embodiments or the prior art. It is obvious that the drawings in the following description are of some embodiments of this disclosure, and a person skilled in the art can obtain other drawings based on these, without any creative effort. [Figure 1] This is a schematic diagram of an application scenario according to the embodiments of this disclosure. [Figure 2] This is a flowchart of a video processing method according to an embodiment of the disclosure. [Figure 3] This is a schematic diagram illustrating the process for determining the checkboxes according to the embodiments of this disclosure. [Figure 4] This is a schematic diagram of the process for determining the target object according to the embodiments of this disclosure. [Figure 5] This is a schematic diagram showing how to determine the target body according to the embodiments of this disclosure. [Figure 6] This is a schematic diagram showing the addition of keyframes according to the embodiments of this disclosure. [Figure 7] This is a schematic diagram of a method for determining a third video frame image according to an embodiment of the present disclosure. [Figure 8] This is a schematic diagram of the target body according to the embodiment of the disclosure. [Figure 9] This is a schematic diagram of the backtrack of the front frame according to the embodiments of the present disclosure. [Figure 10] This is a schematic diagram of the video processing method according to an embodiment of the present disclosure. [Figure 11]This is a schematic diagram of the structure of a video processing device according to an embodiment of the present disclosure. [Figure 12] This is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. [Modes for carrying out the invention]

[0011] This disclosure provides a video processing method, apparatus, and electronic device to solve the technical problem in the prior art of the relatively high cost of camera work video.

[0012] This disclosure provides a video processing method, apparatus, and electronic device. The electronic device can acquire a first video frame image in a first video and determine a target object in the first video frame image. Based on the display position of the target object in the first video frame image, the electronic device can edit the video frame in the first video to obtain a second video. Here, the display position of the target object in the video frame image of the second video is the same as the display position of the target object in the first video frame image. Based on the above method, the electronic device can process the video frame in the first video based on a video post-processing scheme to obtain a second video with camera work effects. Therefore, it is possible to obtain a video with camera work effects without requiring users to have relatively extensive camera work experience, and the difficulty of acquiring camera work videos can be reduced. Furthermore, it is not necessary to attach equipment to assist in shooting camera work videos during the process of acquiring camera work videos, and the cost of acquiring camera work videos can be reduced.

[0013] Illustrative embodiments are described in detail here, and examples are shown in the drawings. Where the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings refer to the same or similar elements. The embodiments described in the following illustrated embodiments are not limited to all embodiments consistent with the present disclosure. On the contrary, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure, as described in detail in the appended claims.

[0014] For ease of understanding, the concepts related to the embodiments of this disclosure will be explained below.

[0015] Electronic devices: devices having wireless transmission and reception capabilities. Electronic devices may be deployed on land, indoors or outdoors, handheld, wearable or in-vehicle, and on water (e.g., on a steamship). The electronic devices may include mobile phones, tablet computers, computers with wireless transmission and reception capabilities, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, in-vehicle electronic devices, wireless terminals in self-driving systems, radio sub-devices in remote medical systems, wireless electronic devices in smart grids, wireless electronic devices in transportation safety, wireless electronic devices in smart cities, wireless electronic devices in smart homes, wearable electronic devices, and the like. Electronic devices relating to embodiments of this disclosure may be called terminals, user equipment (UE), access electronic devices, in-vehicle terminals, industrial control terminals, UE units, UE stations, mobile stations, remote stations, remote electronic devices, mobile devices, UE electronic devices, wireless communication devices, UE agents, or UE equipment. Electronic devices may be fixed or mobile.

[0016] In related technologies, electronic devices can achieve camerawork shooting using auxiliary shooting equipment. For example, an electronic device can be attached to a smart selfie stick and connected to it. The electronic device can control the movement of the smart selfie stick, and after the electronic device has determined the subject to be filmed, if the subject moves to the left, the electronic device controls the smart selfie stick to rotate to the left. If the subject moves to the right, the electronic device controls the smart selfie stick to rotate to the right. In this way, when playing back the camerawork video, the position of the subject on the electronic device's screen does not change. However, the above camerawork shooting requires the use of auxiliary shooting equipment. However, auxiliary shooting equipment is difficult to carry and relatively expensive, and the cost of the camerawork video is also relatively high.

[0017] To solve the problems in the related art, embodiments of the present disclosure provide a video processing method. An electronic device can obtain a first video frame image in a first video and determine a target object in the first video frame image. Based on the display position of the target object in the first video frame image, the electronic device performs trimming processing and position movement processing on a second video frame image in the first video to obtain a third video frame image in the second video, so that the display position of the target object in the third video frame image can be the same as the display position of the target object in the first video frame image. Based on the first video frame image and a plurality of third video frame images, a second video is obtained. In this way, since the display positions of the target object in the video frame images of the second video are all the same as the display position of the target object in the first video frame image, the electronic device can obtain a second video with a camera work effect based on the video post-processing method. That is, the user can obtain a video with a camera work effect without relatively much camera work experience, and the difficulty of obtaining a camera work video can be reduced. And, there is no need to attach a device for assisting in shooting a camera work video during the process of obtaining a camera work video, and further the cost of obtaining a camera work video can be reduced.

[0018] Hereinafter, the application scenario of the embodiments of the present disclosure will be described in conjunction with FIG. 1.

[0019] FIG. 1 is a schematic diagram of an application scenario according to an embodiment of the present disclosure. Referring to FIG. 1, an electronic device is included. Here, the electronic device can play a video. The video includes a user, and the target object may be the user's face. Based on the display position in the video frame image of the first frame of the user's face, the electronic device can perform trimming and position shifting processing on the video frame images of the second frame and the third frame in the video so that the relative position of the user's face in the video remains unchanged. In this way, when the electronic device obtains a video shot without camera work, a video with a camera work effect can be obtained by post-processing the video. A video with a camera work effect can be obtained without attaching a shooting device for auxiliary operation, and the cost of obtaining a camera work shot video can be reduced.

[0020] Note that FIG. 1 only exemplarily shows the application scenario of the embodiment of the present disclosure, and does not limit the application scenario of the embodiment of the present disclosure.

[0021] Hereinafter, the technical solution of the present disclosure and how the technical solution of the present disclosure solves the above technical problems will be described in detail with specific embodiments. Several specific embodiments below may be combined with each other, and for the same or similar concepts or processes, they may not be described any further in some embodiments. Hereinafter, embodiments of the present disclosure will be described in conjunction with the drawings.

[0022] FIG. 2 is a flowchart of a video processing method according to an embodiment of the present disclosure. Referring to FIG. 2, this method may include the following steps.

[0023] S201: Obtain a first video frame image in a first video.

[0024] The executable body of the embodiments of this disclosure may be an electronic device, or a video processing device provided in an electronic device. The video processing device may be implemented in software, or it may be implemented by combining software and hardware, and the embodiments of this disclosure are not limited to these.

[0025] Selectively, the first video may be a video captured by an electronic device. For example, an electronic device can capture a video in real time and obtain the first video. Selectively, the first video may be a video pre-stored in an electronic device. For example, an electronic device can pre-store video A and video B. When the electronic device edits video A, it determines video A to be the first video. When the electronic device edits video B, it determines video B to be the first video.

[0026] Selectively, the first video may be a video obtained based on a camera work shooting method, or the first video may be a video obtained based on a non-camera work shooting method, and the embodiments of this disclosure are not limited thereto.

[0027] Selectively, the first video frame image may be an image frame in the first video. For example, the first video frame image may be any video frame image in the first video, and the first image may be the video frame image of the current frame of the first video, and embodiments of the present disclosure are not limited thereto.

[0028] Selectively, the electronic device may determine the first video frame image based on user interaction. For example, if the user touches the video frame image of the first frame in the first video, the electronic device may determine the video frame image of the first frame as the first video frame image. If the user touches the video frame image of the tenth frame in the first video, the electronic device may determine the video frame image of the tenth frame as the first video frame image.

[0029] Furthermore, the electronic device may acquire a first video frame image in the first video based on any feasible implementation method, and the embodiments of this disclosure are not limited thereto.

[0030] S202 determines the target object in the first video frame image.

[0031] The target object may be an object whose display position is fixed. For example, if the electronic device fixes the display position of the face in the first video frame image, the electronic device can determine the target object to be the face in the first video frame image. If the electronic device fixes the display position of the left hand in the first video frame image, the electronic device can determine the target object to be the left hand in the first video frame image. If the electronic device fixes the display position of the right leg in the first video frame image, the electronic device can determine the target object to be the right leg in the first video frame image.

[0032] The electronic device can determine the target object in the first video frame image based on the following feasible implementations: It detects the selected objects in the first video frame image and determines the position of each selected object in the first video frame image. Based on the position of each selected object in the first video frame image, it generates checkboxes corresponding to each selected object within the first video frame image. In response to a touch operation on the checkboxes, it determines the selected object corresponding to the checkbox as the target object.

[0033] Selectively detecting a selection target in a first video frame image may specifically involve acquiring at least one selection target body in the first video frame image, responding to a touch operation on at least one selection target body, determining a target body from at least one selection target body, and determining an object included in the target body as the selection target.

[0034] The selected object may be a user included in the first video frame image. For example, if the first video frame image includes user A and user B, the first video frame image may include two selected objects. One selected object may be user A, and the other selected object may be user B. Selectively, the selected object may include at least one selected object. For example, the selected object may be a user, and the selected objects included in the selected object may be the user's face and body parts such as the user's limbs, and the embodiments of this disclosure are not limited thereto.

[0035] Selectively, the target body may be a selected body that the user touches. For example, the first video frame image may include a selected body A and a selected body B. When the user touches a selected body A, the electronic device can determine that the target body is selected body A. When the user touches a selected body B, the electronic device can determine that the target body is selected body B.

[0036] Selectively, the electronic device may detect objects contained within the target body and determine which objects within the target body are selected. For example, the electronic device may obtain the position of the target body in the first video frame image and determine the selected objects contained within the target body using a face detection algorithm and a limb detection algorithm. For example, the electronic device can input the position of the target body in the first video frame image and the first video frame image into a Bach algorithm. If the Bach algorithm can extract face keys and limb keys in the first video frame image, the electronic device can determine that the selected objects include a face and limbs.

[0037] Selectively, when determining the objects to be selected in the first video frame image, the electronic device can obtain the position of each selected object in the first video frame image. For example, if the electronic device extracts face keys and limb keys in the first video frame image based on the Bach algorithm, the electronic device can obtain the coordinates of the face keys and limb keys in the first video frame image based on the Bach algorithm. Furthermore, it can obtain the positions of the face and limbs in the first video frame image.

[0038] In the embodiments of this disclosure, the electronic device can identify 106 keys in a face using a face detection algorithm. After detecting a relatively large number of keys (e.g., 70 keys, 80 keys, etc., the embodiments of this disclosure are not limited thereto), the electronic device can determine the position of the face in the first video frame image. The electronic device can identify 18 keys in a limb using a limb detection algorithm, with each key corresponding to one limb (e.g., key 1 corresponds to the left hand, key 2 to the right hand, etc., the embodiments of this disclosure are not limited thereto). Based on the identified limb keys, the electronic device can determine the position of each limb in the first video frame image.

[0039] Selectively, an electronic device can generate checkboxes corresponding to each selected object within a first video frame image based on the position of each selected object in the first video frame image. For example, the electronic device can determine the position of each selected object in the first video frame image and then generate checkboxes corresponding to each selected object based on this position. The image within the checkbox area may include the selected objects. The size of the checkboxes may be arbitrarily set, and the shape of the checkboxes may be circular, square, etc., and embodiments of this disclosure are not limited thereto.

[0040] The process of determining the checkboxes will be explained below in conjunction with Figure 3.

[0041] Figure 3 is a schematic diagram of the process for determining checkboxes according to an embodiment of the present disclosure. Referring to Figure 3, an electronic device is included. The electronic device can display a first video frame image. The first video frame image includes a target body. The electronic device can obtain the position of the target body in the first video frame image and, based on a face detection algorithm, a limb detection algorithm, and the position of the target body in the first video frame image, can determine the selected object within the target body to be the face, left hand, right hand, left leg, and right leg.

[0042] Referring to Figure 3, the electronic device can determine the positions of the face, left hand, right hand, left leg, and right leg in the first video frame image. Based on the positions of the face, left hand, right hand, left leg, and right leg in the first video frame image, checkboxes containing the face image, the left hand image, the right hand image, the left leg image, and the right leg image can be generated within the first video frame image.

[0043] The system selectively responds to touch operations on checkboxes and determines the selected items corresponding to the checkboxes as the target. For example, if the target body in the first video frame image includes checkbox 1 and checkbox 2, when the user clicks checkbox 1, the electronic device can determine the selected items included in checkbox 1 as the target, and when the user clicks checkbox 2, the electronic device can determine the selected items included in checkbox 2 as the target.

[0044] The process of determining the target object will be explained below, in conjunction with Figure 4.

[0045] Figure 4 is a schematic diagram of the process for determining a target object according to an embodiment of the present disclosure. Referring to Figure 4, an electronic device is included. The electronic device can display a first video frame image. The selection objects included in the first video frame image may be the user's face, left hand, right hand, left leg, and right leg. The first video frame image further includes checkboxes corresponding to the face, the left hand, the right hand, the left leg, and the right leg. When the user clicks the checkbox corresponding to the face, the electronic device determines that the target object may be the face in the first video frame image.

[0046] Furthermore, if the area of ​​the checkbox is smaller than the preset threshold, the electronic device can remove the checkbox and cancel its display within the first video frame image. In this way, the display effect of the checkbox can be improved.

[0047] If the first video frame image selectively contains multiple selectable bodies, the electronic device can determine the target body based on the target body selected by the user. For example, in the course of an actual application, the first video frame image of the first video may contain multiple selectable bodies. The target body may be the selectable body on which the target body selected by the user is located. For example, the first video frame image may contain selectable body A, selectable body B, and selectable body C, where selectable body A is on the left side of the first video frame image, selectable body B is in the center of the first video frame image, and selectable body C is on the right side of the first video frame image. If the electronic device is the face of selectable body B with respect to the selected target body, the electronic device can determine selectable body B to be the target body.

[0048] The following describes the process of determining the target object based on the target object selected by the user, when the first video frame image contains multiple target objects, in conjunction with Figure 5.

[0049] Figure 5 is a schematic diagram for determining a target body according to an embodiment of the present disclosure. Referring to Figure 5, an electronic device is included. The electronic device can display a first video frame image. The first video frame image may include a target body 1 and a target body 2. The target of each target body may include a face, left hand, right hand, left leg, and right leg, and the first video frame image may include checkboxes corresponding to each target body. When a user clicks the checkbox corresponding to the face of target body 2, the electronic device can determine the target body in the first video frame image to be the face, and further determine the target body 2 on which this face is located to be the target body in the first video frame image.

[0050] In the embodiment shown in Figure 5, the first video frame image may include two target bodies. Therefore, the order of the target bodies in the first video frame image is from left to right: the first target body, the second target body, and when the electronic device determines the target body 2 to be the target body, the identifier of the target body is the second target body.

[0051] S203, based on the display position in the first video frame image of the target object, the video frame in the first video is edited to obtain the second video.

[0052] Selectively, the electronic device can determine a display position (e.g., key detection) in a first video frame image of a target object based on any viable implementation method. This display position may be a display position in the center of the first video frame image of the target object (for example, a position located in the center of the first video frame image of the target object may be a display position, and a position located in the first video frame image of the human eye of the target object may be a display position, etc.), and embodiments of the present disclosure are not limited thereto.

[0053] Selectively, the video frame image of the first video may include a second video frame image. The second video frame image may be any video frame image other than the first video frame image in the first video. For example, the first video may include video frame image 1, video frame image 2, video frame image 3, and video frame image 4. Once the electronic device determines that the first video frame image in the first video may be video frame image 3, the electronic device can determine that the second video frame images in the first video are video frame image 1, video frame image 2, and video frame image 4.

[0054] An electronic device can obtain a second video based on the following feasible implementation: Based on the display position in the first video frame image of the target, the second video frame image is trimmed and its position is shifted to obtain a third video frame image in the second video. This makes the display position in the first video frame image of the target the same as the display position in the first video frame image of the target. Based on the first video frame image and multiple third video frame images, the second video is obtained.

[0055] Selectively, the second video may be a video with camera work effects. For example, the second video may be a video with camera work effects after the electronic device has post-processed the first video. The second video may contain multiple third video frame images.

[0056] Selectively, the third video frame image may be a video frame image obtained after trimming and position shifting of the second video frame image. For example, an electronic device may trim the second video frame in the first video, and then position shift the resulting video frame to obtain the third video frame image. For example, the display position of the target first video frame image is at the center. If the display position of the target second video frame image is at the top, the electronic device can trim the lower region of the second video frame image, move the trimmed second video frame image downwards, and obtain the third video frame image. The display position of this third video frame image of the target is at the center of this third video frame image.

[0057] Selectively, the editing of video frames in the first video by the electronic device further includes scaling and / or rotating the second video frame images in the first video. For example, if the display position of a target object in a series of consecutive second video frame images is the same as (or close to, i.e., the difference between the two display positions is less than a preset threshold) the display position of the target object in the first video frame image, the electronic device can scale and / or rotate the series of consecutive second video frame images. Furthermore, a third video frame image is obtained in the second video to improve the camera work display effect of the second video.

[0058] Selectively, the electronic device can perform scaling and / or rotation on the second video frame image based on a keyframe insertion method. For example, with second video frame image 1, second video frame image 2, and second video frame image 3, the electronic device can insert a scaled keyframe between second video frame image 1 and second video frame image 3. When the electronic device plays back second video frame image 1, second video frame image 2, and second video frame image 3, it will have a scaling camera work display effect.

[0059] The process of adding keyframes will be explained below in conjunction with Figure 6.

[0060] Figure 6 is a schematic diagram illustrating the addition of keyframes according to an embodiment of the present disclosure. Referring to Figure 6, the diagram includes an image for the first frame, an image for the second frame, and an image for the third frame, with the main body included in each frame image. The movement of the main body in the second frame image and the third frame image is the same. Keyframes for a scaling effect are added at the positions of the second and third frames. When the video is played back, the effect between the second frame image and the third frame image is a scaling effect. That is, from the second frame of the video, the main body gradually shrinks, and from the third frame of the video, the main body gradually expands until it reaches the size of the third frame image. In this way, even if the movement of the main body between multiple image frames does not change, the video playback effect can be further improved by adding an animation effect with keyframes.

[0061] Selectively, an electronic device can obtain a second video by stitching together multiple third video frame images and a first video frame image after obtaining multiple third video frame images. For example, the first video includes video frame image 1, video frame image 2, and video frame image 3 (arranged in playback order). If the first video frame image is video frame image 2, the second video frame image may be video frame image 1 and video frame image 3. Based on the display position in the target video frame image 2 and the display position in the target video frame image 1, the electronic device can trim and move video frame image 1 to obtain video frame image A (third video frame image 1). Based on the display position in the target video frame image 2 and the display position in the target video frame image 3, the electronic device can trim and move video frame image 3 to obtain video frame image B (third video frame image 2). The electronic device can stitch together video frame image A, video frame image 2, and video frame image B to obtain the second video. The second video can incorporate camerawork effects, and furthermore, it can reduce the difficulty and cost of acquiring videos with camerawork effects.

[0062] Embodiments of this disclosure provide a video processing method in which an electronic device can acquire a first video frame image in a first video, detect a selection target in the first video frame image, and determine the position of each selection target in the first video frame image. Based on the position of each selection target in the first video frame image, a checkbox corresponding to each selection target is generated within the first video frame image. In response to a touch operation on the checkbox, the selection target corresponding to the checkbox is determined as the target target. Based on the display position of the target target in the first video frame image, the electronic device performs trimming and position shifting on the second video frame image to obtain a third video frame image in the second video, thereby making the display position of the target target in the third video frame image the same as the display position of the target target in the first video frame image. Based on the first video frame image and a plurality of third video frame images, a second video is obtained. In this way, the electronic device can obtain a second video with camera work effects based on the video post-processing method. Therefore, it is possible to obtain a video with camera work effects and reduce the difficulty of obtaining a camera work video without requiring the user to have relatively extensive camera work experience. This eliminates the need to attach auxiliary equipment for shooting camera work video during the process of acquiring camera work video, and further reduces the cost of acquiring camera work video.

[0063] In addition to the embodiment shown in Figure 2, a method for obtaining a third video frame image in the second video by performing trimming and position shifting on the second video frame image based on the display position in the first video frame image of the target object, in conjunction with Figure 7, will be described in detail below.

[0064] Figure 7 is a schematic diagram of a method for determining a third video frame image according to an embodiment of the present disclosure. Referring to Figure 7, the method flow includes the following steps:

[0065] S701 determines trimming and movement parameters corresponding to each second video frame image based on the display position of the target in the first video frame image.

[0066] The trimming parameter can specify the area in the second video frame image that is awaiting trimming. For example, if the area indicated by the trimming parameter is the upper half of the second video frame image, the area awaiting trimming in the second video frame image may be the upper half. If the area indicated by the trimming parameter is the left half of the second video frame image, the area awaiting trimming in the second video frame image may be the left half.

[0067] The movement parameter can specify the direction and distance of movement relative to the second video frame image. For example, if the movement parameter is set to 10 pixels to the right, the electronic device can determine the direction of movement of the second video frame image to the right and the distance of movement to be 10 pixels. If the movement parameter is set to 20 pixels upward, the electronic device can determine the direction of movement of the second video frame image to be upward and the distance of movement to be 20 pixels.

[0068] The movement parameters in the embodiments of this disclosure may be movement parameters of the second video frame image, or movement parameters of a trimmed image obtained after trimming the second video frame image. The embodiments of this disclosure are not limited to these.

[0069] The electronic device determines trimming and movement parameters for each second video frame image based on the display position of the target object in the first video frame image. Specifically, it may determine the display position of the target object in each second video frame image, and then determine trimming and movement parameters for multiple second video frame images based on the display position of the target object in the first video frame image and the display positions of the target object in multiple second video frame images.

[0070] The electronic device can determine the display position of a target object in each second video frame image based on the following feasible implementations: Determine the target object in the second video frame image for any one of the second video frame images. Determine multiple keypoints corresponding to the target object, and determine the display position of the target object in the second video frame image based on these keypoints.

[0071] For example, if the target is a face, the electronic device can process the second video frame image based on a face detection algorithm (processing an image that includes a cropped face, and embodiments of this disclosure are not limited thereto). Furthermore, it can obtain a plurality of face keys corresponding to faces in the second video frame image, and the coordinates of each face key in the second video frame image. Based on the coordinates of the plurality of face keys in the second video frame image, the electronic device can determine the display position of the target in the second video frame image.

[0072] For example, if the target is the left hand, the electronic device can process the second video frame image based on a limb detection algorithm (processing an image including a cropped left hand, and embodiments of this disclosure are not limited thereto). Furthermore, it can obtain a plurality of limb keys corresponding to the left hand in the second video frame image, and the coordinates of each limb key in the second video frame image. Based on the coordinates of the plurality of limb keys in the second video frame image, the electronic device can determine the display position of the target in the second video frame image.

[0073] Furthermore, the standard by which an electronic device determines the display position of a target object in the second video frame image is the same as the standard by which an electronic device determines the display position of a target object in the first video frame image. For example, if an electronic device determines the position of the center of a target object in the first video frame image as the display position of the target object in the first video frame image, the electronic device can determine the position of the center of a target object in the second video frame image as the display position of the target object in the second video frame image. For example, if the target object is a face, and the electronic device determines the position of the left eye of the face in the first video frame image as the display position of the face in the first video frame image, the electronic device can determine the position of the left eye of the face in the second video frame image as the display position of the face in the second video frame image.

[0074] Furthermore, after obtaining the target key using the Bach algorithm, the electronic device can perform lock information fusion on the position of the target key and the position of the target checkbox using the Lens algorithm. In this way, the stability of the key lock can be improved.

[0075] Furthermore, when locking the position of a target object, the electronic device can begin processing from the first video frame image in the first video. Therefore, the electronic device can acquire the target object in each video frame image in the first video.

[0076] There are two ways in which an electronic device can determine the target object in the second video frame image:

[0077] Case 1: The first video frame image is the video frame image of the first frame in the first video.

[0078] If the first video frame image is selectively the video frame image of the first frame in the first video, the electronic device can determine the target object in each second video frame image based on the target object and the target body on which the target object is located. For example, if the image in the first video is the image of the first frame in the first video, the electronic device can sequentially determine the target objects in the second video frame images based on the target object of the target body determined by the user in the first video frame image.

[0079] Selectively, the first video frame image and the second video frame image may contain at least one selected target body. The electronic device can determine the target body in each second video frame image and further determine the target body in each second video frame image based on the identifier of the target body in which the target object in the first video frame image is located. For example, if the first video contains one selected target body, the electronic device can determine that the target body in the first video frame image and the second video frame image may be this selected target body. If the first video contains three selected target bodies and the target body in the first video frame image is the second selected target body (the order may be from left to right or right to left, and embodiments of this disclosure are not limited thereto), the electronic device can determine that the target body in the second video frame image is the second selected target body.

[0080] Selectively, an electronic device can detect a target object on a target body after determining the target body in the second video frame image. For example, if the target object in the first video frame image is the face of the target body, the electronic device can determine that the target object in each second video frame image is the face of the target body. For example, if the first video contains three selectable target bodies, and the target body in the first video frame image is the second selectable target body, and the target object is the face of the second selectable target body, the electronic device can determine that the target object in each second video frame image may be the face of the second selectable target body.

[0081] Selectively, the electronic device can detect a target object within a second video frame image. For example, the electronic device can process the second video frame image based on the Bach algorithm and further obtain a target object in the second video frame image, and the embodiments of this disclosure are not limited thereto.

[0082] Note that the positions of multiple selection target bodies in the first video can be swapped, but the position of the target body does not change. For example, the first video frame image contains selection target body 1 and selection target body 2, and the target body is the second selection target body (selection target body 2, which is located to the right of selection target body 1). If, in any video frame image of the first video, selection target body 2 moves to the left of selection target body 1, then in this video frame image, the target body is the second selection target body. However, the second selection target body is selection target body 1.

[0083] The target body will be explained below in conjunction with Figure 8.

[0084] Figure 8 is a schematic diagram of a target body according to an embodiment of the present disclosure. Referring to Figure 8, the device includes an electronic device. The electronic device can display an image of the third frame in a first video. The image of the third frame includes body 1 and body 2. In the image of the third frame, body 1 is the first body and body 2 is the second body. When the electronic device determines that the target body in the first video frame image is the first body, the electronic device determines that the target body in the image of the third frame is body 1. In the image of the fourth frame, body 1 and body 2 swap positions, so that body 2 becomes the first body and body 1 becomes the second body. Therefore, in the image of the fourth frame, the electronic device can determine that the target body is body 2.

[0085] In actual application, if the target body is the first body, the electronic device only needs to detect any body at the position of the first body in the second video frame image. There is no need to determine whether or not this body is the same as the target body.

[0086] Case 2: The first video frame image is the Nth frame image in the first video.

[0087] If the first video frame image is the Nth (an integer greater than 0)th frame image in the first video, the electronic device can determine the target object in each second video frame image within the first N-1 frames based on a backtracking scheme of the preceding frames. For example, if the first video frame image is the fifth video frame image, the electronic device can determine the target object in each second video frame image within the first four frames. Therefore, the electronic device can determine the target object in the second video frame images within the first four frames based on a backtracking scheme of the preceding frames. For second video frame images from the fifth frame onward, the electronic device can determine the target body and target object in the second video frame images from the fifth frame onward based on the method of Case 1. Embodiments of this disclosure are not limited thereto.

[0088] In this case, the electronic device can obtain the target object in each second video frame image of the first N-1 frames by backtracking the preceding frames. Therefore, when editing each video frame image in the first video, if the second video frame image is the first N-1 frame, the electronic device can directly determine the target object in this second video frame image. In this way, system resources can be saved and the accuracy of determining the target object can be improved.

[0089] Furthermore, the forward frame backtracking method may be such that, specifically, the electronic device performs interframe alignment processing on the first N-1 video frame images based on the target object of the first video frame image, and further obtains the target object in the first N-1 video frame images.

[0090] Furthermore, if the first video frame image is the image of the first frame in the first video, the electronic device can detect the target object in each second video frame image based on the target object in the first video frame image, and the embodiments of this disclosure are not limited thereto.

[0091] The following explains the backtrack scene of the forward frame in conjunction with Figure 9.

[0092] Figure 9 is a schematic diagram of a forward frame backtrack according to an embodiment of the present disclosure. Referring to Figure 9, the image includes a first frame image, a second frame image, and a third frame image. Each frame image contains the body, and the body's operation differs in each frame image. When the user selects a face in the third frame image that is the target object, the electronic device (not shown in Figure 9) can perform interframe alignment between the second frame image and the first frame image, and further determine the face of the body in the second frame image. After obtaining the face in the second frame image, the electronic device can perform interframe alignment between the second frame image and the first frame image, and further determine the body face in the first frame image. Furthermore, the target object is obtained from the first frame image and the second frame image.

[0093] Based on the display position of the target in the first video frame image and the display position of the target in multiple second video frame images, trimming parameters and movement parameters corresponding to the multiple second video frame images are determined. Specifically, for any one of the second video frame images, the display position of the target in the first video frame image and the display position of the target in the second video frame image may be processed based on an image transformation algorithm to obtain trimming parameters and movement parameters corresponding to the second video frame image. For example, an electronic device can process the display position of the target in the second video frame image and the display position of the target in the first video frame image based on an image warp algorithm, and further obtain trimming parameters and movement parameters corresponding to the second video frame image. Furthermore, based on the trimming parameters and movement parameters, trimming and position shifting operations can be performed on the second video frame image. The electronic device can then display the processed second video frame image (i.e., the third video frame image in the second video) so that the user can easily preview the processing results.

[0094] S702 performs trimming and positional shifting on multiple second video frame images based on multiple trimming parameters and multiple movement parameters corresponding to multiple second video frame images to obtain multiple third video frame images within the second video.

[0095] The electronic device can obtain multiple third video frame images within a second video based on the following feasible implementation: Starting from the first frame of the multiple second video frame images, trimming and position shifting processes are sequentially performed on the multiple second video frame images to obtain multiple third video frame images within the second video.

[0096] For example, when an electronic device locks onto a target object in the first video based on a Lens algorithm (i.e., by processing each video frame, the resulting second video will have the effect of the locked target object), the Lens algorithm needs to process from the image of the first frame of the first video. Therefore, the electronic device can process the second video frame images sequentially. For example, if the first video frame image is the image of the first frame in the first video, the electronic device can process the image of the second frame (second video frame image) based on trimming and translation parameters corresponding to the image of the second frame, and obtain a processed image corresponding to the image of the second frame (third video frame image in the second video). The electronic device can process the image of the third frame based on trimming and translation parameters corresponding to the image of the third frame, and obtain a processed image corresponding to the image of the third frame. The electronic device can obtain the second video by repeating the above steps until all second video frame image processing is complete.

[0097] Furthermore, when the electronic device processes a second video frame image, it can display a third video frame image corresponding to that second video frame image after processing each second video frame image. After processing multiple second video frame images, the electronic device can display multiple third video frame images corresponding to multiple second video frame images. Embodiments of this disclosure are not limited thereto. In this way, user preview is made easier and the user experience can be improved. Moreover, the electronic device can smoothly process multiple key points of the lock target using real-time trajectory image stabilization technology, thereby improving video stability.

[0098] Selectively, after the electronic device obtains the second video, it can play the second video for the user to preview. The electronic device can adjust the second video based on user input. For example, the user can perform operations such as rotation, scaling, and offsetting on each third video frame image of the second video. In response to user input, the electronic device can relock the target object in the third video frame image using the Lens algorithm. For example, if the user rotates the image of the first frame in the second video, the electronic device can perform the rotation process on the image of the first frame and obtain the rotated image of the first frame. Furthermore, after the user modifies the third video frame image, the electronic device can perform smoothing and image stabilization on the user's modification results to further improve the video's effect.

[0099] Selectively, when an electronic device processes each second video frame image by image warp, the electronic device can determine the trimming ratio, further constrain the warp matrix computing, achieve the technical effect of adaptive black edge removal of image frames, and improve the display effect of the second video. Selectively, when locking a target object, the electronic device can maintain a constant lock scale for the target object in each image frame, further improving the stability of the locking process.

[0100] The electronic device can determine the target object for each second video frame image, as well as the corresponding trimming and movement parameters for each second video frame image, and process the second video frame image based on the trimming and movement parameters. For example, if the user selects the face of the target object in the fifth frame image of the first video, the electronic device can obtain the face of the object from the first to fourth frames by backtracking the preceding frames. Based on the trimming and movement parameters of the images from the first to fourth frames, it can process the images from the first to fourth frames. When the electronic device processes the sixth frame image, it determines the position of the target object in the sixth frame image and determines the movement and trimming parameters for the sixth frame image. The electronic device processes the sixth frame image based on the movement and trimming parameters for the sixth frame image. After processing the sixth frame, the electronic device processes the seventh frame image. In this way, for subsequent frames, the electronic device processes the next frame image after processing the previous frame image. Furthermore, the processing results for each frame can be fed back in real time to further improve the effect of the second video.

[0101] Embodiments of this disclosure provide a method for determining a third video frame image and determining the display position of a target object in each second video frame image. Based on the display position of the target object in the first video frame image and the display positions of the target object in the multiple second video frame images, trimming parameters and movement parameters corresponding to the multiple second video frame images are determined. Starting from the first frame of the multiple second video frame images, trimming and position movement processing are performed sequentially on the multiple second video frame images to obtain multiple third video frame images in the second video, and further obtain the second video. In this way, the electronic device can start the editing process from the video frame image of the first frame of the first video, display the results of the editing process of each second video frame image in a timely manner, and improve the effect of the second video. Furthermore, the electronic device can obtain a second video with camera work effects without attaching auxiliary shooting equipment, and the cost of acquiring camera work video can be reduced.

[0102] In addition to any of the embodiments described above, the process of the video processing method will be explained below in conjunction with Figure 10.

[0103] Figure 10 is a schematic diagram of a video processing method according to an embodiment of the present disclosure. Referring to Figure 10, an electronic device is included. The electronic device can play back the first video after receiving it. When the first video is played back as an image of the third frame, the image of the third frame may include the main body, a checkbox for the main body's face, and checkboxes for the main body's left hand, the main body's right hand, the main body's left leg, and the main body's right leg.

[0104] Referring to Figure 10, when the user clicks the checkbox for the device's face, the electronic device determines the target to be the device's face. The electronic device can obtain the position of the device's face in the first frame and the position of the device's face in the second frame using a backtracking method of the forward frame. Based on the device's face selected by the user, the electronic device determines the position of the device's face in the fourth frame and the position of the device's face in the fifth frame.

[0105] Referring to Figure 10, the electronic device can determine the trimming and movement parameters corresponding to each image frame and process the image of the first frame based on the trimming and movement parameters corresponding to the image of the first frame. It processes the image of the second frame based on the trimming and movement parameters corresponding to the image of the second frame. It processes the image of the fourth frame based on the trimming and movement parameters corresponding to the image of the fourth frame. It processes the image of the fifth frame based on the trimming and movement parameters corresponding to the image of the fifth frame. Furthermore, a second video is obtained. In this way, the display position of the face in each video frame image in the second video is the same, further achieving the effect of camera work and reducing the difficulty of acquiring camera work video. And it reduces the cost of acquiring camera work video without attaching auxiliary shooting equipment.

[0106] Figure 11 is a schematic diagram of the structure of a video processing apparatus according to an embodiment of the present disclosure. Referring to Figure 11, the video processing apparatus 10 includes an acquisition module 11, a determination module 12, and a processing module 13, wherein the acquisition module 11 is used to acquire a first video frame image in a first video, the determination module 12 is used to determine a target object in the first video frame image, and the processing module 13 is used to edit the video frames in the first video based on the display position of the target object in the first video frame image 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 display position of the target object in the first video frame image.

[0107] Based on one or more embodiments of the present disclosure, the processing module 13 is used to perform trimming and position shifting on the second video frame image based on the display position of the target object in the first video frame image, to obtain a third video frame image in the second video such that the display position of the target object in the third video frame image is the same as the display position of the target object in the first video frame image, and to obtain the second video based on the first video frame image and a plurality of third video frame images.

[0108] Based on one or more embodiments of the present disclosure, the processing module 13 is specifically used to perform scaling and / or rotation on the second video frame image in the first video.

[0109] Based on one or more embodiments of the present disclosure, the processing module 13 is specifically used to determine trimming parameters and movement parameters corresponding to each of the second video frame images based on the display position of the target object in the first video frame image, and to perform trimming and positioning processing on the plurality of second video frame images based on the plurality of trimming parameters and the plurality of movement parameters corresponding to the plurality of second video frame images, thereby obtaining a plurality of third video frame images in the second video.

[0110] Based on one or more embodiments of the present disclosure, the processing module 13 is specifically used to determine the display position of the target object in each of the second video frame images, and to determine trimming parameters and movement parameters corresponding to the plurality of second video frame images based on the display position of the target object in the first video frame image and the display positions of the target object in the plurality of second video frame images.

[0111] Based on one or more embodiments of the present disclosure, the processing module 13 is used specifically for any one of the second video frame images, for determining the target object in the second video frame image, for determining a plurality of key points corresponding to the target object, and for determining the display position of the target object in the second video frame image based on the plurality of key points.

[0112] Based on one or more embodiments of the present disclosure, the processing module 13 is specifically used to sequentially perform trimming and positioning operations on the plurality of second video frame images, starting from the first frame of the plurality of second video frame images.

[0113] Based on one or more embodiments of the present disclosure, the acquisition module 11 is specifically used to detect selected objects in the first video frame image, determine the position of each selected object in the first video frame image, generate checkboxes corresponding to each selected object in the first video frame image based on the position of each selected object in the first video frame image, and respond to a touch operation on the checkbox to determine the selected object corresponding to the checkbox as the target object.

[0114] A video processing apparatus according to an embodiment of the present disclosure can be used to implement the technical proposal of the embodiment of the above method, and its implementation principle is similar to that of the technical effect, and this embodiment will not be described further here.

[0115] Figure 12 is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. Referring to Figure 12, a schematic diagram of the structure of an electronic device 1200 for realizing an embodiment of the present disclosure is shown, and this 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 (abbreviated as PDAs), tablet computers (abbreviated as Portable Android Devices, PADs), portable multimedia players (abbreviated as PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. The electronic device shown in Figure 12 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.

[0116] As shown in Figure 12, the electronic device 1200 may include a processing unit (e.g., a central processor, graphics processor, etc.) 1201, which can perform various appropriate operations and processes based on a program stored in a read-only memory (ROM) 1202, or based on a program loaded from a storage device 1208 into a random access memory (RAM) 1203. The RAM 1203 further stores various programs and data necessary for the operation of the electronic device 1200. The processing unit 1201, ROM 1202, and RAM 1203 are connected to each other by a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.

[0117] Typically, input devices 1206, such as touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, and gyroscopes; output devices 1207, such as liquid crystal displays (LCDs), speakers, and vibrators; storage devices 1208, such as magnetic tapes and hard disks; and communication devices 1209 can be connected to the I / O interface 1205. The communication device 1209 can allow the electronic device 1200 to communicate with other devices wirelessly or via wired connections to exchange data. While Figure 12 shows an electronic device 1200 with various devices, it should be understood that it is not required to implement or include all the devices shown. More or fewer devices may be implemented or included as alternatives.

[0118] In particular, according to embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product which includes a computer program contained on a computer-readable medium which includes program code for performing the method shown in the flowchart. In such embodiments, the computer program may be downloaded and installed from a network by 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 unit 1201, it performs the functions described above, which are limited to the methods of embodiments of the present disclosure.

[0119] The computer-readable medium in this disclosure may be a computer-readable signal medium, a computer-readable storage medium, or any combination of both. The computer-readable storage medium may be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage mediums may include, but are not limited to, an electrical connection having one or more wires, a portable computer magnetic disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact magnetic disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in conjunction with an instruction execution system, apparatus, or device. However, in this disclosure, the computer-readable signal medium is a data signal that may be included in the baseband or propagates as part of a carrier, where a computer-readable program code is carried. The data signal propagated in this manner may take multiple forms and may include, but are not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium may be any computer-readable medium other than a computer-readable storage medium, which may transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained in the computer-readable medium may be transmitted by any suitable medium, including, but are not limited to, wires, optical cables, RF (radio frequency), or any suitable combination thereof.

[0120] The computer-readable medium described above may be included in the electronic device described above, or it may exist independently without being incorporated into the electronic device.

[0121] The computer-readable medium contains one or more programs, and when these one or more programs are executed by the electronic device, the electronic device is made to perform the method shown in the above embodiment.

[0122] Selectively, embodiments of the present disclosure provide a computer-readable storage medium in which computer execution instructions are stored, and when a processor executes the computer execution instructions, the method shown in the above embodiments is implemented.

[0123] Selectively, embodiments of the present disclosure provide a computer program product, which includes a computer program, and when the computer program is executed by a processor, implement the methods shown in the above embodiments.

[0124] Computer program code for performing the operations of the Disclosure can be written in one or more programming languages ​​or a combination thereof, and such programming languages ​​include object-oriented programming languages—e.g., Java, Smalltalk, C++, and more broadly, formulaic programming languages—e.g., the "C" language or similar programming languages. The program code may run entirely on the user's computer, partially on the user's computer, run as a single, independent software package, run partially on the user's computer, partially on a remote computer, or run 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 it may be connected to an external computer (e.g., connected via the Internet using an Internet Service Provider).

[0125] The flowcharts and block diagrams in the drawings illustrate the feasible systematic architecture, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or portion of code, which contains one or more executable instructions for performing a defined logical function. Note that in some alternative implementations, the functions represented in a block may occur in an order different from the order shown in the drawing. For example, two blocks shown consecutively may actually be executed almost in parallel, or in reverse order depending on the related functions. Note that each block in a block diagram and / or flowchart, and combinations of blocks in a block diagram and / or flowchart, may be implemented by a system based on dedicated hardware for performing a defined function or operation, or by a combination of dedicated hardware and computer instructions.

[0126] The units described in embodiments of this disclosure may be implemented in software or in hardware. The unit names are not necessarily limiting to the units themselves. For example, the first acquisition unit may be further described as "a unit for acquiring at least two Internet Protocol addresses."

[0127] The functions described herein can be performed by at least partially one or more hardware logic components. For example, exemplary types of hardware logic components that can be used include, but are not limited to, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standards (ASSPs), systems on chips (SOCs), and complex programmable logic devices (CPLDs).

[0128] In the context of this disclosure, an instrument-readable medium may be a tangible medium that contains or stores programs used by or in conjunction with an instruction execution system, apparatus, or device. An instrument-readable medium may be an instrument-readable signal medium or an instrument-readable storage medium. An instrument-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any appropriate combination of the above. More specific examples of instrument-readable storage media include one or more wire-based electrical connections, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any appropriate combination of the above.

[0129] It should be noted that the modifications “one” and “multiple” as used in this disclosure are illustrative, not restrictive, and a person skilled in the art should understand that they should be understood as “one or more” unless otherwise explicitly stated in the context.

[0130] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are used for descriptive purposes only and are not intended to limit the scope of such messages or information.

[0131] To ensure understanding, before using any of the technical proposals disclosed in each embodiment of this disclosure, users must be notified in an appropriate manner in accordance with applicable laws and regulations regarding the types of personal information related to this disclosure, the scope of use, and the scenarios in which it may be used, and their permission must be obtained.

[0132] For example, in response to receiving a voluntary request from a user, prompt information is sent to the user to explicitly inform the user that the operation requested to be performed requires the acquisition and use of the user's personal information. This allows the user to autonomously choose whether or not to provide personal information to software or hardware such as terminal devices, application programs, servers, or storage media that perform the operation of the proposed technical method of this disclosure based on the prompt information.

[0133] As a selective but non-restrictive form of implementation, a method for responding to a user's voluntary request and sending prompt information to the user may be, for example, a pop-up window, in which the prompt information can be presented in text. The pop-up window may also include a selection control for the user to choose whether to "agree" or "disagree" to providing personal information to the terminal device.

[0134] To ensure that this is understood, the above notice and user permission process are illustrative only and not limited to the forms of implementation of this disclosure. Other methods that comply with applicable laws and regulations may be used to implement this disclosure.

[0135] To ensure clarity, all data relating to this proposed technology (including, but not limited to, the data itself, or the acquisition or use of the data) shall comply with the requirements of applicable laws, regulations, and related provisions. The data may include information, parameters, and messages, such as cut-streaming instruction information.

[0136] The above description is merely an explanation of preferred embodiments and operating technical principles of the present disclosure. Those skilled in the art should understand that the scope of the disclosure is not limited to technical proposals consisting of specific combinations of the above technical features, but at the same time should cover other technical proposals formed by arbitrarily combining the above technical features or their equivalent features without departing from the above-disclosed concept. For example, the above features are technical proposals in which they are substituted for each other by similar functional technical features disclosed (but not limited to) in the present disclosure.

[0137] While each operation is described in a specific procedure, it should not be understood that these operations require being performed in a specific procedure or order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although the above discussion includes some specific implementation details, these should not be interpreted as limiting the scope of this disclosure. Some of the features described in the context of individual embodiments can also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment can be implemented individually or in any appropriate subcombination. Therefore, it may be implemented in multiple embodiments.

[0138] While this subject matter is described in a language specific to structural features and / or methodological logical operation, it should be understood that the subject matter defined by the claims is not necessarily limited to the specific features and operation described above. Conversely, the specific features and operation described above are merely illustrative examples of how the claims can be realized.

[0139] According to a first aspect, one or more embodiments of the present disclosure provide a video processing method which includes acquiring a first video frame image in a first video, determining a target object in the first video frame image, and editing the video frames in the first video based on the display position of the target object in the first video frame image to obtain a second video, wherein the display positions of the target object in the video frame images of the second video are all the same as the display positions of the target object in the first video frame image.

[0140] Based on one or more embodiments of the present disclosure, the video frame image of the first video includes a second video frame image, and obtaining a second video by editing the video frame in the first video based on the display position of the target object in the first video frame image includes performing trimming and position shifting on the second video frame image based on the display position of the target object in the first video frame image to obtain a third video frame image in the second video such that the display position of the target object in the third video frame image is the same as the display position of the target object in the first video frame image, and obtaining the second video based on the first video frame image and a plurality of third video frame images.

[0141] Editing video frames in the first video according to one or more embodiments of the present disclosure further includes scaling and / or rotating the second video frame image in the first video.

[0142] Obtaining a third video frame image in the second video by performing trimming and position shifting on the second video frame image based on the display position of the target object in the first video frame image, according to one or more embodiments of the present disclosure, includes determining trimming parameters and position shifting parameters corresponding to each of the second video frame images based on the display position of the target object in the first video frame image, and performing trimming and position shifting on the plurality of second video frame images based on the plurality of trimming parameters and position shifting parameters corresponding to the plurality of second video frame images, thereby obtaining a plurality of third video frame images in the second video.

[0143] Determining trimming and movement parameters corresponding to each of the second video frame images based on the display position of the target object in the first video frame image, according to one or more embodiments of the present disclosure, includes determining the display position of the target object in each of the second video frame images, and determining trimming and movement parameters corresponding to the plurality of second video frame images based on the display position of the target object in the first video frame image and the display positions of the target object in the plurality of second video frame images.

[0144] Determining the display position of the target object in each of the second video frame images according to one or more embodiments of the present disclosure includes: relating to any one of the second video frame images; determining the target object in the second video frame image; determining a plurality of key points corresponding to the target object; and determining the display position of the target object in the second video frame image based on the plurality of key points.

[0145] Performing trimming and positioning operations on a plurality of second video frame images based on a plurality of trimming parameters and a plurality of movement parameters corresponding to a plurality of second video frame images, according to one or more embodiments of the present disclosure, includes performing trimming and positioning operations on the plurality of second video frame images sequentially, starting from the first frame of the plurality of second video frame images.

[0146] Determining a target object in a first video frame image according to one or more embodiments of the present disclosure includes detecting a selection object in the first video frame image and determining the position of each selection object in the first video frame image; generating checkboxes in the first video frame image corresponding to each selection object based on the position of each selection object in the first video frame image; and determining the selection object corresponding to the checkbox as the target object in response to a touch operation on the checkbox.

[0147] According to a second aspect, one or more embodiments of the present disclosure provide a video processing apparatus comprising an acquisition module, a determination module, and a processing module, wherein the acquisition module is used to acquire a first video frame image in a first video; the determination module is used to determine a target object in the first video frame image; and the processing module is used to edit the video frames in the first video based on the display position of the target object in the first video frame image 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 display position of the target object in the first video frame image.

[0148] Based on one or more embodiments of the present disclosure, the processing module is used to perform trimming and position shifting on the second video frame image based on the display position of the target object in the first video frame image, to obtain a third video frame image in the second video such that the display position of the target object in the third video frame image is the same as the display position of the target object in the first video frame image, and to obtain the second video based on the first video frame image and a plurality of third video frame images.

[0149] Based on one or more embodiments of the present disclosure, the processing module is specifically used to perform scaling and / or rotation on the second video frame image in the first video.

[0150] Based on one or more embodiments of the present disclosure, the processing module is used to determine trimming parameters and movement parameters corresponding to each of the second video frame images based on the display position of the target object in the first video frame image, and to perform trimming and positioning processing on the plurality of second video frame images based on the plurality of trimming parameters and the plurality of movement parameters corresponding to the plurality of second video frame images, thereby obtaining a plurality of third video frame images in the second video.

[0151] Based on one or more embodiments of the present disclosure, the processing module is used to determine the display position of the target object in each of the second video frame images, and to determine trimming parameters and movement parameters corresponding to the plurality of second video frame images based on the display position of the target object in the first video frame image and the display positions of the target object in the plurality of second video frame images.

[0152] Based on one or more embodiments of the present disclosure, the processing module is specifically used to determine the target object in any one of the second video frame images, to determine a plurality of key points corresponding to the target object, and to determine the display position of the target object in the second video frame image based on the plurality of key points.

[0153] Based on one or more embodiments of the present disclosure, the processing module is specifically used to sequentially perform trimming and positioning operations on the plurality of second video frame images, starting from the first frame of the plurality of second video frame images.

[0154] Based on one or more embodiments of the present disclosure, the acquisition module is used specifically to detect selected objects in the first video frame image, determine the position of each selected object in the first video frame image, generate checkboxes corresponding to each selected object in the first video frame image based on the position of each selected object in the first video frame image, and respond to a touch operation on the checkbox to determine the selected object corresponding to the checkbox as the target object.

[0155] According to a third aspect, an embodiment of the present disclosure provides an electronic device comprising a processor and a memory, the memory storing computer execution instructions, and the processor causing at least one processor to execute the computer execution instructions stored in the memory, thereby enabling the processor to execute the first aspect and various video processing methods relating to the first aspect.

[0156] According to a fourth aspect, embodiments of the present disclosure provide a computer-readable storage medium in which computer execution instructions are stored, and when a processor executes the computer execution instructions, various video processing methods relating to the first aspect are realized.

[0157] According to a fifth aspect, embodiments of the present disclosure provide a computer program product which includes a computer program which, when the computer program is executed by a processor, implements the first aspect and various video processing methods related to the first aspect.

[0158] The above description is merely an explanation of preferred embodiments and operating technical principles of the present disclosure. Those skilled in the art should understand that the scope of the disclosure is not limited to technical proposals consisting of specific combinations of the above technical features, but at the same time should cover other technical proposals formed by arbitrarily combining the above technical features or their equivalent features without departing from the above-disclosed concept. For example, the above features are technical proposals in which they are substituted for each other by similar functional technical features disclosed (but not limited to) in the present disclosure.

[0159] While each operation is described in a specific procedure, it should not be understood that these operations require to be performed in a specific procedure or order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although the above discussion includes some specific implementation details, these should not be interpreted as limiting the scope of this disclosure. Some of the features described in the context of individual embodiments can also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may be implemented individually or in any appropriate subcombination in multiple embodiments.

[0160] While this subject matter is described in a language specific to structural features and / or methodological logical operation, it should be understood that the subject matter defined by the claims is not necessarily limited to the specific features and operation described above. Conversely, the specific features and operation described above are merely illustrative examples of how the claims can be realized.

Claims

1. To obtain the first video frame image in the first video, Determining the target object in the first video frame image, A video processing method comprising editing the video frames in the first video based on the display position of the target object in the first video frame image to obtain a second video, wherein the display positions of the target object in the video frame images of the second video are all the same as the display positions of the target object in the first video frame image.

2. The video frame image of the first video mentioned above includes the second video frame image, Based on the display position of the target object in the first video frame image, editing the video frames in the first video to obtain a second video is: To obtain the third video frame image in the second video by performing trimming and position shifting on the second video frame image based on the display position of the target object in the first video frame image, such that the display position of the target object in the third video frame image is the same as the display position of the target object in the first video frame image, The method according to claim 1, comprising obtaining the second video based on the first video frame image and a plurality of third video frame images.

3. Editing the video frames in the aforementioned first video is The method according to claim 2, further comprising performing scaling and / or rotation on the second video frame image in the first video.

4. Based on the display position of the target object in the first video frame image, trimming and position shifting processes are performed on the second video frame image to obtain a third video frame image in the second video, Based on the display position of the target object in the first video frame image, trimming parameters and movement parameters corresponding to each of the second video frame images are determined, The method according to claim 2, comprising performing trimming and positioning operations on a plurality of second video frame images based on a plurality of trimming parameters and a plurality of movement parameters corresponding to a plurality of second video frame images, in order to obtain a plurality of third video frame images in the second video.

5. Determining trimming parameters and movement parameters corresponding to each of the second video frame images based on the display position of the target object in the first video frame image is: The display position of the target object is determined in each of the second video frame images, The method according to claim 4, further comprising determining trimming parameters and movement parameters corresponding to the plurality of second video frame images based on the display position of the target object in the first video frame image and the display position of the target object in the plurality of second video frame images.

6. Determining the display position of the target object in each of the aforementioned second video frame images is: For any one of the aforementioned second video frame images, The process involves determining the target object in the second video frame image and determining a plurality of key points corresponding to the target object, The method according to claim 5, further comprising determining the display position of the target object in the second video frame image based on the plurality of key points.

7. Performing trimming and positional movement processing on multiple second video frame images based on multiple trimming parameters and multiple movement parameters corresponding to multiple second video frame images is: The method according to any one of claims 4 to 6, further comprising performing trimming and position shifting operations on the plurality of second video frame images sequentially, starting from the first frame of the plurality of second video frame images.

8. Determining the target object in the first video frame image is The process involves detecting the selected object in the first video frame image and determining the position of each selected object in the first video frame image. Based on the position of each selected object in the first video frame image, a checkbox corresponding to each selected object is generated within the first video frame image, The method according to any one of claims 1 to 5, further comprising responding to a touch operation on the checkbox and determining the selection target corresponding to the checkbox as the target target.

9. An acquisition module for obtaining the first video frame image in the first video, A decision module for determining the target object in the first video frame image, A video processing device comprising: a processing module for editing video frames in the first video based on the display position of the target object in the first video frame image 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 display position of the target object in the first video frame image.

10. An electronic device comprising a processor and memory, The aforementioned memory stores computer execution instructions, The processor is an electronic device that causes the processor to execute the video processing method described in any one of claims 1 to 8 by executing computer execution instructions stored in the memory.

11. A computer-readable storage medium in which computer execution instructions are stored, wherein when a processor executes the computer execution instructions, the video processing method according to any one of claims 1 to 8 is realized.