Video clip processing method, device, electronic device and storage medium
By detecting and cropping video clips taken by the drone, the user's face is placed in the video center, solving the problem of cumbersome processing of video clips in the prior art and improving processing efficiency and reliability.
Patent Information
- Application Number
- CN202411376875.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-09-30
AI Technical Summary
The process of processing existing drone video clips is cumbersome, resulting in low processing efficiency. Users need to spend a lot of time manually editing to place faces in the center of the video, affecting the user experience.
By obtaining user face features, using the object detection algorithm to detect face features in the original video clip, determine the cropping area and crop the video, place the face in the center, and generate the target video clip.
Reduces video clip editing time, improves processing efficiency, and reduces the influence of human factors through automated processes, improving the reliability of video clips.
Smart Images

Figure CN118900350B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a video clip processing method, device, electronic device and storage medium. Background Art
[0002] A drone, or unmanned aerial vehicle, is an unmanned aircraft controlled by a radio remote control device and a self-contained program control device, or operated completely or intermittently autonomously by an onboard computer. In unmanned travel photography, using drones to shoot videos is a new, creative and visually impactful way of shooting. This shooting method breaks the limitations of traditional photography, allowing users to capture scenery and record moments from unprecedented angles and heights.
[0003] However, the processing process of the target video clips of existing drones is cumbersome, which is not conducive to improving the processing efficiency of the target video clips. The reason is that the original video clips shot by existing drones cannot place the user in the center of the picture, resulting in poor video effects and affecting user experience. Users need to spend a lot of time manually editing the original video clips to obtain the target video clips, which not only consumes human resources and time resources, but also requires professional skills. Therefore, the processing process of the target video clips of existing drones is cumbersome, which is not conducive to improving the processing efficiency of the target video clips. Summary of the invention
[0004] The embodiments of the present application provide a video clip processing method, device, electronic device and storage medium to solve the technical problem that the processing process of the target video clips of the above-mentioned existing drones is cumbersome and is not conducive to improving the processing efficiency of the target video clips.
[0005] In a first aspect, an embodiment of the present application provides a video clip processing method, which is applied to an electronic device, wherein the electronic device is connected to a drone, and the video clip processing method includes:
[0006] Obtaining user facial features of the user facial image, obtaining the original video clip shot by the drone, decomposing the original video clip into multiple frames of original images, and using a target detection algorithm to detect whether the current facial features of the original image are the user facial features;
[0007] When the current facial feature is the facial feature of the user, the image width, image height, and face frame of the original image are obtained, an initial cropping area is determined according to the face frame, a vertical coordinate of a center point, a horizontal coordinate of a center point, an initial height, and an initial width of the initial cropping area are obtained, and a final width and a final height are determined according to the initial height or the initial width;
[0008] Generate a model based on the central point ordinate, the final height and the preset final upper boundary coordinate to generate the final upper boundary coordinate;
[0009] Generate a model according to the image height, the center point ordinate, the final height and a preset final lower boundary coordinate to generate a final lower boundary coordinate;
[0010] Generate a model according to the horizontal coordinate of the center point, the final width and the preset final left boundary coordinate to generate the final left boundary coordinate;
[0011] Generate a model according to the image width, the horizontal coordinate of the center point, the final width and a preset final right boundary coordinate to generate a final right boundary coordinate;
[0012] The final cropping area is determined by the final upper boundary coordinate, the final lower boundary coordinate, the final left boundary coordinate and the final right boundary coordinate, the original image is cropped according to the final cropping area, the cropped original image is set as a target image with the user's facial features at the center position, and a target video clip is synthesized based on the target image.
[0013] In a possible implementation manner of the first aspect, acquiring the user facial features of the user facial image, acquiring the original video clip shot by the drone, decomposing the original video clip into multiple frames of original images, and using a target detection algorithm to detect whether the current facial features of the original image are the user facial features, includes:
[0014] Connecting to a user device, acquiring the user face image sent by the user device, performing feature extraction on the user face image, and generating user face features of the user face image;
[0015] The original video clip shot by the drone is obtained, the original video clip is decomposed into multiple frames of original images, and the target detection algorithm is used to detect whether the current facial features of the original image are the facial features of the user.
[0016] In a possible implementation manner of the first aspect, acquiring the image width, image height, and face frame of the original image, determining an initial cropping area according to the face frame, acquiring a ordinate of a center point, abscissa of a center point, an initial height, and an initial width of the initial cropping area, and determining a final width and a final height according to the initial height or the initial width, includes:
[0017] Obtaining the image width, image height, and face frame of the original image;
[0018] According to the face frame, obtaining initial upper boundary coordinates, initial lower boundary coordinates, initial left boundary coordinates, and initial right boundary coordinates;
[0019] Determine the initial clipping area by using the initial upper boundary coordinate, the initial lower boundary coordinate, the initial left boundary coordinate, and the initial right boundary coordinate;
[0020] Obtain the center point ordinate, center point abscissa, initial height, and initial width of the initial cropping area;
[0021] The ratio between the image width and the image height is taken as the aspect ratio, and a final width and a final height are determined according to the aspect ratio, the initial height or the initial width.
[0022] In a possible implementation manner of the first aspect, acquiring, according to the face frame, initial upper boundary coordinates, initial lower boundary coordinates, initial left boundary coordinates, and initial right boundary coordinates includes:
[0023] Generate an initial upper boundary coordinate by generating a model according to the upper boundary coordinate of the face frame, the face height, and a preset initial upper boundary coordinate;
[0024] Generate an initial lower boundary coordinate according to the lower boundary coordinate of the face frame, the face height, the image height and a preset initial lower boundary coordinate generation model;
[0025] Generate an initial left boundary coordinate according to the left boundary coordinate of the face frame, the face width and a preset initial left boundary coordinate generation model;
[0026] The initial right boundary coordinates are generated according to the right boundary coordinates of the face frame, the face width, the image height and a preset initial right boundary coordinate generation model.
[0027] In a possible implementation manner of the first aspect, obtaining the vertical coordinate of the center point, the horizontal coordinate of the center point, the initial height, and the initial width of the initial cropping area includes:
[0028] Taking the average value between the initial upper boundary coordinate and the initial lower boundary coordinate as the ordinate of the center point of the initial clipping area;
[0029] Taking the average value between the initial left boundary coordinate and the initial right boundary coordinate as the horizontal coordinate of the center point of the initial clipping area;
[0030] The difference between the initial upper boundary coordinate and the initial lower boundary coordinate is used as the initial height of the initial clipping area;
[0031] The difference between the initial left boundary coordinate and the initial right boundary coordinate is used as the initial width of the initial clipping area.
[0032] In a possible implementation manner of the first aspect, taking a ratio between the image width and the image height as an aspect ratio, and determining a final width and a final height according to the aspect ratio, the initial height, or the initial width, includes:
[0033] Taking the ratio between the image width and the image height as the aspect ratio, multiplying the initial height by the aspect ratio to generate a final width, and setting the initial height to the final height;
[0034] Alternatively, the ratio between the image width and the image height is taken as the aspect ratio, the initial width is divided by the aspect ratio to generate a final height, and the initial width is set as the final width.
[0035] In a possible implementation manner of the first aspect, the target detection algorithm includes one of a YOLOV10 algorithm, a YOLOV9 algorithm, an SSD algorithm, or a combination thereof.
[0036] In a second aspect, an embodiment of the present application provides a video clip processing device, which is applied to an electronic device, wherein the electronic device is connected to a drone, and includes:
[0037] The first acquisition module is used to acquire the user's facial features of the user's facial image, acquire the original video clip shot by the drone, decompose the original video clip into multiple frames of original images, and use a target detection algorithm to detect whether the current facial features of the original image are the user's facial features;
[0038] A second acquisition module is used for, when the current facial feature is the facial feature of the user, acquiring the image width, image height, and face frame of the original image, determining an initial cropping area according to the face frame, acquiring the vertical coordinate of the center point, the horizontal coordinate of the center point, the initial height, and the initial width of the initial cropping area, and determining a final width and a final height according to the initial height or the initial width;
[0039] A first generating module, used to generate a model according to the central point ordinate, the final height and a preset final upper boundary coordinate, and generate the final upper boundary coordinate;
[0040] A second generating module is used to generate a model according to the image height, the central point ordinate, the final height and a preset final lower boundary coordinate to generate the final lower boundary coordinate;
[0041] A third generating module, used to generate a model according to the horizontal coordinate of the center point, the final width and the preset final left boundary coordinate, and generate the final left boundary coordinate;
[0042] A fourth generating module, used to generate a model according to the image width, the horizontal coordinate of the center point, the final width and a preset final right boundary coordinate, and generate the final right boundary coordinate;
[0043] A synthesis module is used to determine a final cropping area through the final upper boundary coordinate, the final lower boundary coordinate, the final left boundary coordinate and the final right boundary coordinate, crop the original image according to the final cropping area, set the cropped original image as a target image with the user's facial features at the center, and synthesize a target video clip based on the target image.
[0044] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the video clip processing method of the first aspect when executing the computer program.
[0045] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the video clip processing method of the first aspect is implemented.
[0046] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the video clip processing method of the first aspect.
[0047] The beneficial effects of the embodiments of the present application lie in two aspects. On the one hand, the final cropping area is determined by the final upper boundary coordinates, the final lower boundary coordinates, the final left boundary coordinates and the final right boundary coordinates, the original image is cropped according to the final cropping area, the cropped original image is set as a target image with the user's facial features at the center position, and a target video clip is synthesized based on the target image. Since no manual editing is required, the editing time of the target video clip is reduced, which is conducive to improving the processing efficiency of the target video clip. On the other hand, through automatic synthesis, it will not be affected by human factors, which is conducive to improving the reliability of the target video clip. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0049] Figure 1 A diagram of an application scenario of the video clip processing method provided in an embodiment of the present application;
[0050] Figure 2 is a flowchart of a video clip processing method provided in an embodiment of the present application;
[0051] Figure 3 A flowchart for obtaining a user's face image provided in an embodiment of the present application;
[0052] Figure 4 A schematic block diagram of a video clip processing device provided in an embodiment of the present application;
[0053] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0055] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0056] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0057] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0058] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0059] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0060] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0061] In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the fact that they can be implemented by ordinary technicians in this field. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0062] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0063] The video clip processing method provided in the embodiments of the present application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), etc. The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.
[0064] See also Figure 1 , Figure 1 The application scenario diagram of the video clip processing method provided in the embodiment of the present application is described in detail as follows:
[0065] The electronic device is connected to the drone, and the electronic device obtains the original video clip shot by the drone.
[0066] For the sake of illustration, an example is given below:
[0067] The drone's built-in wireless communication module will start and broadcast a specific wireless signal.
[0068] The electronic device will search for and identify the wireless signal and establish a secure communication link by entering a preset password or performing automatic pairing.
[0069] Once the connection is established, the electronic device and the drone will transmit control instructions and original video clips through the wireless network. The original video clips are encapsulated and transmitted through the communication protocol to ensure the integrity and timeliness of the original video clips.
[0070] In an embodiment of the present application, the electronic device can be connected to a drone to obtain original video clips shot by the drone.
[0071] See also Figure 2 , Figure 2 1 is a flow chart of a video clip processing method provided in an embodiment of the present application. The method can be applied to an electronic device connected to a drone.
[0072] like Figure 2 As shown, the video clip processing method provided in the embodiment of the present application includes the following steps, which are described in detail as follows:
[0073] S201, obtaining a user's facial features of a user's facial image, obtaining an original video clip shot by the drone, decomposing the original video clip into multiple frames of original images, and using a target detection algorithm to detect whether a current facial feature of the original image is a facial feature of the user;
[0074] The electronic device obtains the user's facial features from the user's facial image and obtains the original video clip shot by the drone.
[0075] For the sake of illustration, an example is given below:
[0076] The electronic device sends a video acquisition request to the drone via a wireless network;
[0077] The drone receives the video acquisition request and returns the original video clip to the electronic device via the wireless network;
[0078] The electronic device receives the original video clip returned by the drone through a wireless network, decomposes the original video clip into multiple frames of original images, and uses a target detection algorithm to detect whether the current facial features of the original image are the facial features of the user.
[0079] S202, when the current facial feature is the user's facial feature, obtaining the image width, image height, and face frame of the original image, determining an initial cropping area according to the face frame, obtaining the ordinate of the center point, the abscissa of the center point, the initial height, and the initial width of the initial cropping area, and determining a final width and a final height according to the initial height or the initial width;
[0080] The initial clipping area is the initial clipping area.
[0081] The final width is the width of the final cropped area.
[0082] The final height is the height of the final clipping area.
[0083] The step of obtaining the image width, image height, and face frame of the original image, determining an initial cropping area according to the face frame, obtaining the vertical coordinate of the center point, the horizontal coordinate of the center point, the initial height, and the initial width of the initial cropping area, and determining the final width and final height according to the initial height or the initial width includes:
[0084] Obtaining the image width, image height, and face frame of the original image;
[0085] According to the face frame, obtaining initial upper boundary coordinates, initial lower boundary coordinates, initial left boundary coordinates, and initial right boundary coordinates;
[0086] Determine the initial clipping area by using the initial upper boundary coordinate, the initial lower boundary coordinate, the initial left boundary coordinate, and the initial right boundary coordinate;
[0087] Obtain the center point ordinate, center point abscissa, initial height, and initial width of the initial cropping area;
[0088] The ratio between the image width and the image height is taken as the aspect ratio, and a final width and a final height are determined according to the aspect ratio, the initial height or the initial width.
[0089] Wherein, obtaining the initial upper boundary coordinate, the initial lower boundary coordinate, the initial left boundary coordinate, and the initial right boundary coordinate according to the face frame includes:
[0090] Generate an initial upper boundary coordinate by generating a model according to the upper boundary coordinate of the face frame, the face height, and a preset initial upper boundary coordinate;
[0091] Generate an initial lower boundary coordinate according to the lower boundary coordinate of the face frame, the face height, the image height and a preset initial lower boundary coordinate generation model;
[0092] Generate an initial left boundary coordinate according to the left boundary coordinate of the face frame, the face width and a preset initial left boundary coordinate generation model;
[0093] The initial right boundary coordinates are generated according to the right boundary coordinates of the face frame, the face width, the image height and a preset initial right boundary coordinate generation model.
[0094] For the sake of illustration, an example is given below:
[0095] Generate an initial upper boundary coordinate by generating a model according to the upper boundary coordinate of the face frame, the face height, and a preset initial upper boundary coordinate;
[0096] Among them, the initial upper boundary coordinate generation model is:
[0097] Initial upper boundary coordinate y0 = max(upper boundary coordinate of face frame - 2 times of face height, 0)
[0098] Among them, the initial lower boundary coordinate generation model is:
[0099] Initial lower boundary coordinate y1 = min(lower boundary coordinate of face frame + 6 times of face height, image height);
[0100] Generate an initial lower boundary coordinate according to the lower boundary coordinate of the face frame, the face height, the image height and a preset initial lower boundary coordinate generation model;
[0101] Among them, the initial left boundary coordinate generation model is:
[0102] Initial left boundary coordinate x0 = max(left boundary coordinate of face frame - face width, 0);
[0103] Generate an initial left boundary coordinate according to the left boundary coordinate of the face frame, the face width and a preset initial left boundary coordinate generation model;
[0104] Among them, the initial right boundary coordinate generation model is:
[0105] Initial right boundary coordinate x1 = min(right boundary coordinate of face frame + face width, image width);
[0106] The step of obtaining the vertical coordinate of the center point, the horizontal coordinate of the center point, the initial height, and the initial width of the initial cropping area includes:
[0107] Taking the average value between the initial upper boundary coordinate and the initial lower boundary coordinate as the ordinate of the center point of the initial clipping area;
[0108] Taking the average value between the initial left boundary coordinate and the initial right boundary coordinate as the horizontal coordinate of the center point of the initial clipping area;
[0109] The difference between the initial upper boundary coordinate and the initial lower boundary coordinate is used as the initial height of the initial clipping area;
[0110] The difference between the initial left boundary coordinate and the initial right boundary coordinate is used as the initial width of the initial clipping area.
[0111] For ease of explanation, the calculation process of the center point ordinate is given as follows:
[0112] center y =(y0+y1) / 2;
[0113] For the sake of explanation, the calculation process of the horizontal coordinate of the center point is as follows:
[0114] center x =(x0+x1) / 2;
[0115] For ease of explanation,
[0116] For ease of explanation, the calculation process of the initial width and initial height is as follows:
[0117] crop height = y1- y0;
[0118] crop width = x1- x0;
[0119] crop height is the initial width, crop width is the initial width.
[0120] The method of taking the ratio between the image width and the image height as the aspect ratio and determining the final width and the final height according to the aspect ratio, the initial height or the initial width includes:
[0121] Taking the ratio between the image width and the image height as the aspect ratio, multiplying the initial height by the aspect ratio to generate a final width, and setting the initial height to the final height;
[0122] Alternatively, the ratio between the image width and the image height is taken as the aspect ratio, the initial width is divided by the aspect ratio to generate the final height, and the initial width is set as the final width.
[0123] For ease of explanation, the calculation process of the aspect ratio is as follows:
[0124] Aspect ratio = image width / image height.
[0125] For ease of explanation, the calculation process of the final height and final width is as follows:
[0126] Final height = initial width / aspect ratio, final width = initial width; or,
[0127] Final height = initial width, final width = initial height × aspect ratio.
[0128] S203, generating a model according to the central point ordinate, the final height and the preset final upper boundary coordinates to generate the final upper boundary coordinates;
[0129] Exemplarily, the final upper boundary coordinate generation model is:
[0130] ;
[0131] Among them, center y is the vertical coordinate of the center point; new y0 is the final upper boundary coordinate; new cropheight is the final height.
[0132] S204, generating a model according to the image height, the central point ordinate, the final height and a preset final lower boundary coordinate to generate a final lower boundary coordinate;
[0133] Exemplarily, the final lower boundary coordinate generation model is:
[0134] ;
[0135] Among them, img height is the image height, center yis the vertical coordinate of the center point, new cropheight is the final height, new y1 is the final lower boundary coordinate;
[0136] S205, generating a model according to the horizontal coordinate of the center point, the final width and the preset final left boundary coordinate to generate the final left boundary coordinate;
[0137] Exemplarily, the final left boundary coordinate generation model is:
[0138] ;
[0139] Among them, center x is the horizontal coordinate of the center point, new cropwidth is the final width, new x0 is the final left boundary coordinate;
[0140] S206, generating a model according to the image width, the horizontal coordinate of the center point, the final width and the preset final right boundary coordinate to generate the final right boundary coordinate;
[0141] Exemplarily, the final right boundary coordinate generation model is:
[0142] ;
[0143] Among them, img width is the image width, center x is the horizontal coordinate of the center point, new cropwidth is the final width, new x1 is the final right boundary coordinate.
[0144] S207, determining a final cropping area through the final upper boundary coordinate, the final lower boundary coordinate, the final left boundary coordinate, and the final right boundary coordinate, cropping the original image according to the final cropping area, setting the cropped original image as a target image with the user's facial features at the center, and synthesizing a target video clip based on the target image.
[0145] Among them, the final cropping area is the final cropping area.
[0146] The final upper boundary coordinates are the upper boundary coordinates of the final clipping area.
[0147] The final lower boundary coordinates are the lower boundary coordinates of the final clipping area.
[0148] The final left boundary coordinates are the left boundary coordinates of the final clipping area.
[0149] The final right boundary coordinates are the right boundary coordinates of the final clipping area.
[0150] Exemplarily, determining a final cropping area through the final upper boundary coordinate, the final lower boundary coordinate, the final left boundary coordinate, and the final right boundary coordinate, cropping the original image according to the final cropping area, setting the cropped original image as a target image with the user's facial features at the center, and synthesizing a target video clip based on the target image, includes:
[0151] Determine a final clipping area by using the final upper boundary coordinate, the final lower boundary coordinate, the final left boundary coordinate, and the final right boundary coordinate;
[0152] Calculating the current coordinates of the user's facial features in the original image, adjusting the position of the final cropping area, and after the current coordinates coincide with the center coordinates of the final cropping area, cropping the original image according to the final cropping area, and setting the cropped original image as a target image with the user's facial features at the center;
[0153] In the original video segment, the target image replaces the original image before cropping, and the original video segment in which the target image replaces the original image before cropping is used as the target video segment.
[0154] The method of cropping the original image according to the final cropping area and setting the cropped original image as a target image in which the user's facial features are at the center includes:
[0155] Detect whether the final cropped area exceeds the screen boundary. When it is detected that the final cropped area exceeds the screen boundary, adjust the size and position of the final cropped area to match the screen boundary, crop the original image according to the adjusted final cropped area, and set the cropped original image as a target image with the user's facial features at the center.
[0156] For the sake of illustration, the following are examples:
[0157] For example, the original video segment is divided into 100 frames of original images, the 90th frame of the original image is cropped by the final cropping area, the cropped 90th frame of the original image is used as the target image, the target image replaces the 90th frame of the original image before cropping, and the original video segment in which the target image replaces the 90th frame of the original image before cropping is used as the target video segment;
[0158] For example, the original video segment is divided into 1000 frames of original images, 900 frames of original images are cropped by the final cropping area, the cropped 900 frames of original images are used as 900 frames of target images, the 900 frames of target images replace the 900 frames of original images before cropping, and the original video segment in which the 900 frames of target images replace the 900 frames of original images before cropping is used as the target video segment;
[0159] For example, the original video clip is divided into 2000 frames of original images, 1800 frames of original images are cropped through the final cropping area, the cropped 1800 frames of original images are used as 1800 frames of target images, the 1800 frames of target images replace the 1800 frames of original images before cropping, and the original video clip in which the 1800 frames of target images replace the 1800 frames of original images before cropping is used as the target video clip.
[0160] Among them, during the process of unmanned travel photography, the electronic device obtains the original video clips taken by the drone and crops the original video clips into target video clips in which the user's facial features are always in the center, which is conducive to improving the efficiency of unmanned travel photography and user experience.
[0161] The beneficial effects of the embodiments of the present application lie in two aspects. On the one hand, the final cropping area is determined by the final upper boundary coordinates, the final lower boundary coordinates, the final left boundary coordinates and the final right boundary coordinates, the original image is cropped according to the final cropping area, the cropped original image is set as a target image with the user's facial features at the center position, and a target video clip is synthesized based on the target image. Since no manual editing is required, the editing time of the target video clip is reduced, which is conducive to improving the processing efficiency of the target video clip. On the other hand, through automatic synthesis, it will not be affected by human factors, which is conducive to improving the reliability of the target video clip.
[0162] See also Figure 3 , Figure 3 The flowchart for obtaining a user face image provided in the embodiment of the present application is described in detail as follows:
[0163] S301, connecting to a user device, acquiring the user face image sent by the user device, performing feature extraction on the user face image, and generating user face features of the user face image;
[0164] After obtaining the user face image uploaded by the user, face detection and feature extraction are performed on the user face image to generate user face features of the user face image.
[0165] S302, obtaining the original video clip shot by the drone, decomposing the original video clip into multiple frames of original images, and using the target detection algorithm to detect whether the current facial features of the original image are the facial features of the user.
[0166] The target detection algorithm includes one of the YOLOV10 algorithm, the YOLOV9 algorithm, and the SSD algorithm, or a combination thereof.
[0167] Among them, the YOLOV10 algorithm is the 10th version of the YOLO series algorithm.
[0168] Among them, the YOLOV9 algorithm is the 9th version of the YOLO series algorithm.
[0169] Among them, YOLO is the abbreviation of You Only Look Once, which means that when the algorithm detects targets in an image, it only needs to look at the image once to complete the target positioning and classification tasks at the same time.
[0170] Among them, the full English name of the SSD algorithm is: Single Shot MultiBox Detector, and the full Chinese name is: Single-order multi-layer target detection model.
[0171] In the embodiment of the present application, the target detection algorithm is used to detect whether the current facial features of the original image are the facial features of the user, which can improve the detection efficiency of facial features.
[0172] For the video clip processing method described in the above embodiment, please refer to Figure 4 , Figure 4 A schematic block diagram of a video clip processing device provided in an embodiment of the present application, Figure 4 The video clip processing apparatus 400 shown can be applied to Figure 1 The electronic device in the application scenario diagram shown below takes the electronic device as an example. Figure 4 The video segment processing device 400 shown is described in detail. The video segment processing device 400 may include a first acquisition module 401, a second acquisition module 402, a first generation module 403, a second generation module 404, a third generation module 405, a fourth generation module 406, and a synthesis module 407.
[0173] The first acquisition module 401 is used to acquire the user's facial features of the user's facial image, acquire the original video clip shot by the drone, decompose the original video clip into multiple frames of original images, and use a target detection algorithm to detect whether the current facial features of the original image are the user's facial features;
[0174] A second acquisition module 402 is used for, when the current facial feature is the user's facial feature, acquiring the image width, image height, and face frame of the original image, determining an initial cropping area according to the face frame, acquiring the ordinate of the center point, the abscissa of the center point, the initial height, and the initial width of the initial cropping area, and determining a final width and a final height according to the initial height or the initial width;
[0175] A first generating module 403 is used to generate a model according to the central point ordinate, the final height and the preset final upper boundary coordinates to generate the final upper boundary coordinates;
[0176] A second generating module 404 is used to generate a model according to the image height, the central point ordinate, the final height and a preset final lower boundary coordinate to generate the final lower boundary coordinate;
[0177] The third generation module 405 is used to generate a model according to the horizontal coordinate of the center point, the final width and the preset final left boundary coordinate to generate the final left boundary coordinate;
[0178] A fourth generating module 406 is used to generate a model according to the image width, the horizontal coordinate of the center point, the final width and a preset final right boundary coordinate to generate the final right boundary coordinate;
[0179] The synthesis module 407 is used to determine the final cropping area through the final upper boundary coordinates, the final lower boundary coordinates, the final left boundary coordinates and the final right boundary coordinates, crop the original image according to the final cropping area, set the cropped original image as a target image with the user's facial features at the center position, and synthesize a target video clip based on the target image.
[0180] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0181] The beneficial effects of the embodiments of the present application lie in two aspects. On the one hand, the final cropping area is determined by the final upper boundary coordinates, the final lower boundary coordinates, the final left boundary coordinates and the final right boundary coordinates, the original image is cropped according to the final cropping area, the cropped original image is set as a target image with the user's facial features at the center position, and a target video clip is synthesized based on the target image. Since no manual editing is required, the editing time of the target video clip is reduced, which is conducive to improving the processing efficiency of the target video clip. On the other hand, through automatic synthesis, it will not be affected by human factors, which is conducive to improving the reliability of the target video clip.
[0182] See also Figure 5 , Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0183] like Figure 5 As shown, Figure 5 The electronic device 2 includes: at least one processor 20, a memory 21, and a computer program 22 stored in the memory 21 and executable on the at least one processor 20, and when the processor 20 executes the computer program 22, the steps in any of the above-mentioned method embodiments are implemented.
[0184] The electronic device 2 may include, but is not limited to, a processor 20 and a memory 21. Those skilled in the art will appreciate that Figure 5 It is only an example of the electronic device 2 and does not constitute a limitation on the electronic device 2. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0185] The processor 20 is used to run the computer program 22 stored in the memory 21, and implement the following steps when executing the computer program 22:
[0186] Obtaining user facial features of the user facial image, obtaining the original video clip shot by the drone, decomposing the original video clip into multiple frames of original images, and using a target detection algorithm to detect whether the current facial features of the original image are the user facial features;
[0187] When the current facial feature is the facial feature of the user, the image width, image height, and face frame of the original image are obtained, an initial cropping area is determined according to the face frame, a vertical coordinate of a center point, a horizontal coordinate of a center point, an initial height, and an initial width of the initial cropping area are obtained, and a final width and a final height are determined according to the initial height or the initial width;
[0188] Generate a model based on the central point ordinate, the final height and the preset final upper boundary coordinate to generate the final upper boundary coordinate;
[0189] Generate a model according to the image height, the center point ordinate, the final height and a preset final lower boundary coordinate to generate a final lower boundary coordinate;
[0190] A model is generated based on the horizontal coordinate of the center point, the final width and the preset final left boundary coordinate to generate the final left boundary coordinate; a model is generated based on the image width, the horizontal coordinate of the center point, the final width and the preset final right boundary coordinate to generate the final right boundary coordinate; a final cropping area is determined by the final upper boundary coordinate, the final lower boundary coordinate, the final left boundary coordinate and the final right boundary coordinate, the original image is cropped based on the final cropping area, the cropped original image is set as a target image with the user's facial features at the center position, and a target video clip is synthesized based on the target image.
[0191] In some embodiments, the processor 20 is configured to: connect to a user device, obtain the user face image sent by the user device, extract features from the user face image, and generate user face features of the user face image;
[0192] The original video clip shot by the drone is obtained, the original video clip is decomposed into multiple frames of original images, and the target detection algorithm is used to detect whether the current facial features of the original image are the facial features of the user.
[0193] In some embodiments, the processor 20 is configured to implement:
[0194] Obtaining the image width, image height, and face frame of the original image;
[0195] According to the face frame, obtaining initial upper boundary coordinates, initial lower boundary coordinates, initial left boundary coordinates, and initial right boundary coordinates;
[0196] Determine the initial clipping area by using the initial upper boundary coordinate, the initial lower boundary coordinate, the initial left boundary coordinate, and the initial right boundary coordinate;
[0197] Obtain the center point ordinate, center point abscissa, initial height, and initial width of the initial cropping area;
[0198] The ratio between the image width and the image height is taken as the aspect ratio, and a final width and a final height are determined according to the aspect ratio, the initial height or the initial width.
[0199] In some embodiments, the processor 20 is used to implement: generating a model according to the upper boundary coordinates of the face frame, the face height, and a preset initial upper boundary coordinate, and generating the initial upper boundary coordinates;
[0200] Generate an initial lower boundary coordinate according to the lower boundary coordinate of the face frame, the face height, the image height and a preset initial lower boundary coordinate generation model;
[0201] Generate an initial left boundary coordinate according to the left boundary coordinate of the face frame, the face width and a preset initial left boundary coordinate generation model;
[0202] The initial right boundary coordinates are generated according to the right boundary coordinates of the face frame, the face width, the image height and a preset initial right boundary coordinate generation model.
[0203] In some embodiments, the processor 20 is configured to implement:
[0204] Taking the average value between the initial upper boundary coordinate and the initial lower boundary coordinate as the ordinate of the center point of the initial clipping area;
[0205] Taking the average value between the initial left boundary coordinate and the initial right boundary coordinate as the horizontal coordinate of the center point of the initial clipping area;
[0206] The difference between the initial upper boundary coordinate and the initial lower boundary coordinate is used as the initial height of the initial clipping area;
[0207] The difference between the initial left boundary coordinate and the initial right boundary coordinate is used as the initial width of the initial clipping area.
[0208] In some embodiments, the processor 20 is configured to implement:
[0209] Taking the ratio between the image width and the image height as the aspect ratio, multiplying the initial height by the aspect ratio to generate a final width, and setting the initial height to the final height;
[0210] Alternatively, the ratio between the image width and the image height is taken as the aspect ratio, the initial width is divided by the aspect ratio to generate a final height, and the initial width is set as the final width.
[0211] In some embodiments, the processor 20 is configured to implement:
[0212] The target detection algorithm includes one of the YOLOV10 algorithm, the YOLOV9 algorithm, and the SSD algorithm, or a combination thereof.
[0213] The processor 20 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0214] In some embodiments, the memory 21 may be an internal storage unit of the electronic device 2, such as a hard disk or memory of the electronic device 2. In other embodiments, the memory 21 may also be an external storage device of the electronic device 2, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 2. Further, the memory 21 may also include both an internal storage unit and an external storage device of the electronic device 2. The memory 21 is used to store an operating system, an application program, a boot loader, data, and other programs, such as the program code of the computer program. The memory 21 may also be used to temporarily store data that has been output or is to be output.
[0215] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0216] An embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0217] The computer-readable storage medium stores program codes, which can be called by a processor to execute the video clip processing method described in the above method embodiment.
[0218] The computer-readable storage medium has a storage space for program codes.
[0219] The program code includes the code of any step in the video clip processing method described in the above method embodiment.
[0220] For example, the program code is called by the processor and can execute the following steps:
[0221] Obtaining user facial features of the user facial image, obtaining the original video clip shot by the drone, decomposing the original video clip into multiple frames of original images, and using a target detection algorithm to detect whether the current facial features of the original image are the user facial features;
[0222] When the current facial feature is the facial feature of the user, the image width, image height, and face frame of the original image are obtained, an initial cropping area is determined according to the face frame, a vertical coordinate of a center point, a horizontal coordinate of a center point, an initial height, and an initial width of the initial cropping area are obtained, and a final width and a final height are determined according to the initial height or the initial width;
[0223] Generate a model based on the central point ordinate, the final height and the preset final upper boundary coordinate to generate the final upper boundary coordinate;
[0224] Generate a model according to the image height, the center point ordinate, the final height and a preset final lower boundary coordinate to generate a final lower boundary coordinate;
[0225] Generate a model according to the horizontal coordinate of the center point, the final width and the preset final left boundary coordinate to generate the final left boundary coordinate;
[0226] Generate a model according to the image width, the horizontal coordinate of the center point, the final width and a preset final right boundary coordinate to generate a final right boundary coordinate;
[0227] The final cropping area is determined by the final upper boundary coordinate, the final lower boundary coordinate, the final left boundary coordinate and the final right boundary coordinate, the original image is cropped according to the final cropping area, the cropped original image is set as a target image with the user's facial features at the center position, and a target video clip is synthesized based on the target image.
[0228] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0229] The computer-readable storage medium may also be an external storage device of the video clip processing device or the electronic device, for example, a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), a non-transitory computer-readable storage medium (non-transitory computer-readable storage medium), etc., equipped on the video clip processing device or the electronic device.
[0230] Since the computer program stored in the computer-readable storage medium can execute any one of the video clip processing methods provided in the embodiments of the present application, the computer-readable storage medium can achieve the beneficial effects that can be achieved by any one of the video clip processing methods provided in the embodiments of the present application. Please refer to the previous embodiments for details and will not be repeated here.
[0231] An embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the above-mentioned video clip processing method.
[0232] The computer program product is loaded into the electronic device and can execute the following steps:
[0233] Obtaining user facial features of the user facial image, obtaining the original video clip shot by the drone, decomposing the original video clip into multiple frames of original images, and using a target detection algorithm to detect whether the current facial features of the original image are the user facial features;
[0234] When the current facial feature is the facial feature of the user, the image width, image height, and face frame of the original image are obtained, an initial cropping area is determined according to the face frame, a vertical coordinate of a center point, a horizontal coordinate of a center point, an initial height, and an initial width of the initial cropping area are obtained, and a final width and a final height are determined according to the initial height or the initial width;
[0235] Generate a model based on the central point ordinate, the final height and the preset final upper boundary coordinate to generate the final upper boundary coordinate;
[0236] Generate a model according to the image height, the center point ordinate, the final height and a preset final lower boundary coordinate to generate a final lower boundary coordinate;
[0237] Generate a model according to the horizontal coordinate of the center point, the final width and the preset final left boundary coordinate to generate the final left boundary coordinate;
[0238] Generate a model according to the image width, the horizontal coordinate of the center point, the final width and a preset final right boundary coordinate to generate a final right boundary coordinate;
[0239] The final cropping area is determined by the final upper boundary coordinate, the final lower boundary coordinate, the final left boundary coordinate and the final right boundary coordinate, the original image is cropped according to the final cropping area, the cropped original image is set as a target image with the user's facial features at the center position, and a target video clip is synthesized based on the target image.
[0240] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
[0241] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0242] Based on such understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to an electronic device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electrical carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.
[0243] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0244] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A video clip processing method, characterized in that: Applied to an electronic device, the electronic device is connected to a drone, and the video clip processing method includes: Obtaining user facial features of the user facial image, obtaining the original video clip shot by the drone, decomposing the original video clip into multiple frames of original images, and using a target detection algorithm to detect whether the current facial features of the original image are the user facial features; When the current facial feature is the facial feature of the user, the image width, image height, and face frame of the original image are obtained, an initial cropping area is determined according to the face frame, a vertical coordinate of a center point, a horizontal coordinate of a center point, an initial height, and an initial width of the initial cropping area are obtained, and a final width and a final height are determined according to the initial height or the initial width; Generate a model based on the central point ordinate, the final height and the preset final upper boundary coordinate to generate the final upper boundary coordinate; Generate a model according to the image height, the center point ordinate, the final height and a preset final lower boundary coordinate to generate a final lower boundary coordinate; Generate a model according to the horizontal coordinate of the center point, the final width and the preset final left boundary coordinate to generate the final left boundary coordinate; Generate a model according to the image width, the horizontal coordinate of the center point, the final width and a preset final right boundary coordinate to generate a final right boundary coordinate; The final cropping area is determined by the final upper boundary coordinate, the final lower boundary coordinate, the final left boundary coordinate and the final right boundary coordinate, the original image is cropped according to the final cropping area, the cropped original image is set as a target image with the user's facial features at the center position, and a target video clip is synthesized based on the target image.
2. The video clip processing method according to claim 1, characterized in that: The step of obtaining the user's facial features of the user's facial image, obtaining the original video clip shot by the drone, decomposing the original video clip into multiple frames of original images, and using a target detection algorithm to detect whether the current facial features of the original image are the user's facial features, includes: Connecting to a user device, acquiring the user face image sent by the user device, performing feature extraction on the user face image, and generating user face features of the user face image; The original video clip shot by the drone is obtained, the original video clip is decomposed into multiple frames of original images, and the target detection algorithm is used to detect whether the current facial features of the original image are the facial features of the user.
3. The video clip processing method according to claim 1, characterized in that: The step of obtaining the image width, image height, and face frame of the original image, determining an initial cropping area according to the face frame, obtaining the vertical coordinate of the center point, the horizontal coordinate of the center point, the initial height, and the initial width of the initial cropping area, and determining a final width and a final height according to the initial height or the initial width includes: Obtaining the image width, image height, and face frame of the original image; According to the face frame, obtaining initial upper boundary coordinates, initial lower boundary coordinates, initial left boundary coordinates, and initial right boundary coordinates; Determine the initial clipping area by using the initial upper boundary coordinate, the initial lower boundary coordinate, the initial left boundary coordinate, and the initial right boundary coordinate; Obtain the center point ordinate, center point abscissa, initial height, and initial width of the initial cropping area; The ratio between the image width and the image height is taken as the aspect ratio, and a final width and a final height are determined according to the aspect ratio, the initial height or the initial width.
4. The video clip processing method according to claim 3, characterized in that: The step of obtaining the initial upper boundary coordinate, the initial lower boundary coordinate, the initial left boundary coordinate, and the initial right boundary coordinate according to the face frame includes: Generate an initial upper boundary coordinate based on the upper boundary coordinate of the face frame, the face height, and a preset initial upper boundary coordinate generation model; Generate an initial lower boundary coordinate according to the lower boundary coordinate of the face frame, the face height, the image height and a preset initial lower boundary coordinate generation model; Generate an initial left boundary coordinate according to the left boundary coordinate of the face frame, the face width and a preset initial left boundary coordinate generation model; The initial right boundary coordinate is generated according to the right boundary coordinate of the face frame, the face width, the image height and a preset initial right boundary coordinate generation model.
5. The video clip processing method according to claim 3, characterized in that: The obtaining of the center point ordinate, the center point abscissa, the initial height, and the initial width of the initial clipping area includes: Taking the average value between the initial upper boundary coordinate and the initial lower boundary coordinate as the ordinate of the center point of the initial clipping area; Taking the average value between the initial left boundary coordinate and the initial right boundary coordinate as the horizontal coordinate of the center point of the initial clipping area; The difference between the initial upper boundary coordinate and the initial lower boundary coordinate is used as the initial height of the initial clipping area; The difference between the initial left boundary coordinate and the initial right boundary coordinate is used as the initial width of the initial clipping area.
6. The video clip processing method according to claim 3, characterized in that: The method of taking the ratio between the image width and the image height as the aspect ratio and determining the final width and the final height according to the aspect ratio, the initial height or the initial width includes: Taking the ratio between the image width and the image height as the aspect ratio, multiplying the initial height by the aspect ratio to generate a final width, and setting the initial height to the final height; Alternatively, the ratio between the image width and the image height is taken as the aspect ratio, the initial width is divided by the aspect ratio to generate a final height, and the initial width is set as the final width.
7. The video segment processing method according to any one of claims 1 to 6, characterized in that: The target detection algorithm includes one of the YOLOV10 algorithm, the YOLOV9 algorithm, and the SSD algorithm, or a combination thereof.
8. A video clip processing device, characterized in that: Applicable to electronic equipment, the electronic equipment is connected to a drone, and includes: The first acquisition module is used to acquire the user's facial features of the user's facial image, acquire the original video clip shot by the drone, decompose the original video clip into multiple frames of original images, and use a target detection algorithm to detect whether the current facial features of the original image are the user's facial features; A second acquisition module is used for, when the current facial feature is the facial feature of the user, acquiring the image width, image height, and face frame of the original image, determining an initial cropping area according to the face frame, acquiring the vertical coordinate of the center point, the horizontal coordinate of the center point, the initial height, and the initial width of the initial cropping area, and determining a final width and a final height according to the initial height or the initial width; A first generating module, used to generate a model according to the central point ordinate, the final height and a preset final upper boundary coordinate, and generate the final upper boundary coordinate; A second generating module is used to generate a model according to the image height, the central point ordinate, the final height and a preset final lower boundary coordinate to generate the final lower boundary coordinate; A third generating module, used to generate a model according to the horizontal coordinate of the center point, the final width and the preset final left boundary coordinate, and generate the final left boundary coordinate; A fourth generating module, used to generate a model according to the image width, the horizontal coordinate of the center point, the final width and a preset final right boundary coordinate, and generate the final right boundary coordinate; A synthesis module is used to determine a final cropping area through the final upper boundary coordinate, the final lower boundary coordinate, the final left boundary coordinate and the final right boundary coordinate, crop the original image according to the final cropping area, set the cropped original image as a target image with the user's facial features at the center, and synthesize a target video clip based on the target image.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the video segment processing method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the video segment processing method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Video picture clipping method and device
CN113436072A
Face cutting optimization method of adaptive expansion coefficient
CN114359301A
Video image processing method and device, storage medium and unmanned vehicle
CN116052115A
Video cropping method and device
WO2020073860A1
