Portrait capturing method, portrait capturing device, electronic equipment and storage medium

CN120075599AActive Publication Date: 2025-05-30HONOR DEVICE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311552784.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-20
Publication Date
2025-05-30
Estimated Expiration
2043-11-20

Smart Images

  • Figure CN120075599A_ABST
    Figure CN120075599A_ABST
Patent Text Reader

Abstract

The invention discloses a portrait capturing method, a portrait capturing device, electronic equipment and a storage medium, and the method comprises the steps: obtaining a current frame image which comprises a target portrait; obtaining target face frame information of the target portrait according to the current frame image; when it is determined that the current frame image is the motion scene image, target motion portrait information of the target portrait is captured according to the target face frame information; and generating a target moving portrait image according to the target moving portrait information. According to the method, in the shooting process of shooting the portrait image of the target portrait in the moving state, portrait capturing is carried out on the target portrait according to the target face frame information of the target portrait; the situation that the target portrait cannot be captured when the target portrait is captured according to the initial motion position of the target portrait captured by the camera is avoided, it is guaranteed that the camera always captures the target portrait, and the shooting success rate of shooting the portrait image is increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular, to a method for capturing a portrait, a portrait capture device, an electronic device, and a storage medium. Background Art

[0002] Portrait image shooting refers to the process in which an electronic device uses a camera to capture a target portrait, obtains target portrait information, and generates a corresponding target portrait image based on the target portrait information. Portrait capture refers to the process in which the camera focuses on the target portrait at the target portrait position according to the captured target portrait position to obtain target portrait information.

[0003] However, during the process of shooting a portrait image of a target portrait, when the target portrait is in a moving state, the camera focuses on the target portrait at the starting movement position according to the captured starting movement position of the target portrait. Due to the communication delay of the electronic device, when the camera focuses at the starting movement position, the target portrait has left the starting movement position, and the camera does not capture the target portrait at the starting movement position, resulting in the failure of portrait image shooting. Summary of the Invention

[0004] In view of this, embodiments of the present application provide a method for capturing a portrait, a portrait capture device, an electronic device, and a storage medium to overcome the problems of the prior art.

[0005] In a first aspect, an embodiment of the present application provides a method for capturing a portrait. The method for capturing a portrait includes: obtaining a current frame image, where the current frame image includes a target portrait; obtaining target face frame information of the target portrait according to the current frame image; when it is determined that the current frame image is a moving scene image, capturing target moving portrait information of the target portrait according to the target face frame information; and generating a target moving portrait image according to the target moving portrait information.

[0006] The solution provided by the present application, during the process of shooting a portrait image of a target portrait in a moving state, captures the target portrait according to the target face frame information of the target portrait, avoiding the situation where the target portrait cannot be captured when capturing the target portrait according to the starting movement position of the target portrait captured by the camera. Since the target face frame information is real-time information of the target portrait, it ensures that the camera always captures the target portrait, improving the shooting success rate of shooting a portrait image.

[0007] Wherein, in some optional embodiments, the method for capturing a portrait further includes: when it is determined that the current frame image is a static scene image, obtaining the focusing information of the current frame image; capturing target static portrait information of the target portrait according to the target face frame information and the focusing information; and generating a target static portrait image according to the target static portrait information.

[0008] The solution provided in this embodiment realizes portrait capture of a target portrait in a static state during the process of taking a portrait image. According to the target face frame information and focusing information of the target portrait, the target portrait is captured. Since the target face frame information is real-time information of the target portrait, it ensures that the camera always captures the target portrait, improving the shooting success rate of taking the portrait image. And it ensures focusing on the target face area, avoiding the situation where when focusing on an area outside the target face area, the area image outside the target face area image in the captured portrait image is clearer, ensuring that the target face area image in the captured portrait image is clearer and improving the shooting quality of taking the portrait image.

[0009] Among them, in some alternative embodiments, the portrait capture method further includes: when it is determined that the current frame image does not meet the preset condition, determining the adjustment parameters of the camera according to the focusing information, where the preset condition is used to represent the condition for the current frame image to be a clear image, and the adjustment parameters are used to represent the parameters for adjusting the camera when adjusting the current frame image to a clear image; controlling the camera to move according to the adjustment parameters.

[0010] The solution provided in this embodiment realizes real-time adjustment of the camera when it is determined that the current frame image is a blurred image, ensuring that the next frame image obtained is a clear image, which is beneficial to improving the image acquisition quality of obtaining subsequent frame images.

[0011] Among them, in some alternative embodiments, before determining the adjustment parameters of the camera according to the focusing information when it is determined that the current frame image does not meet the preset condition, the portrait capture method further includes: determining the image focal length of the current frame image according to the target face frame information; when the image focal length is not within the current lens focal length range of the camera, determining that the current frame image does not meet the preset condition.

[0012] The solution provided in this embodiment realizes judging the image quality of the current frame image according to the image focal length of the current frame image and the current lens focal length range, which can ensure a relatively high accuracy in judging the image quality of the current frame image.

[0013] Among them, in some alternative embodiments, when it is determined that the current frame image does not meet the preset condition, determining the adjustment parameters of the camera according to the focusing information includes: when it is determined that the current frame image does not meet the preset condition, obtaining the lens resolution of the camera; calculating the adjustment parameters of the camera according to the lens resolution and the focusing information.

[0014] The solution provided in this embodiment realizes calculating the adjustment parameters of the camera according to the focusing information and the lens resolution of the camera, which can ensure a relatively high accuracy of the calculated adjustment parameters.

[0015] Among them, in some alternative embodiments, obtaining the focusing information of the current frame image includes: when it is determined that the target face corresponding to the target face frame information meets the portrait capture condition, obtaining the target face frame area according to the target face frame information; determining the target face frame area as the focusing information of the current frame image.

[0016] The solution provided in this embodiment realizes that when it is determined that the current frame image is a static scene image and the target face meets the portrait capture requirement, the target face frame area corresponding to the target face frame information is determined as the focusing information of the current frame image, which is beneficial to improving the capture success rate of capturing the target static portrait information.

[0017] Among them, in some alternative embodiments, obtaining the focusing information of the current frame image further includes: when it is determined that the target face corresponding to the target face frame information does not meet the portrait capture requirement, obtaining the center point of the target face frame corresponding to the target face frame information; determining the center point of the target face frame as the focusing information.

[0018] The solution provided in this embodiment realizes that when it is determined that the current frame image is a static scene image and the target face does not meet the portrait capture requirement, the center point of the target face frame corresponding to the target face frame information is determined as the focusing message of the current frame image, ensuring the central correction of the target face frame information, and can make up for the problem that the captured target static portrait information is blurred due to the too small target face, which is beneficial to improving the capture quality of capturing the target static portrait information.

[0019] Among them, in some alternative embodiments, before obtaining the focusing information of the current frame image, the portrait capture method further includes: obtaining the target face data according to the target face frame information; when the target face data is greater than or equal to the data threshold, determining that the target face corresponding to the target face frame information meets the portrait capture requirement.

[0020] The solution provided in this embodiment realizes the judgment of the portrait capture requirement of the target face according to the target face data, ensuring a relatively high judgment accuracy of the judgment of the portrait capture requirement of the target face.

[0021] Among them, in some alternative embodiments, when it is determined that the current frame image is a moving scene image, before capturing the target moving portrait information of the target portrait according to the target face frame information, the portrait capture method further includes: obtaining the first optical flow coordinate of the target pixel point in the current frame image; obtaining the second optical flow coordinate of the target pixel point in the next frame image, where the next frame image is the next frame of the current frame image; determining that the current frame image is a moving scene image according to the first optical flow coordinate and the second optical flow coordinate.

[0022] The solution provided in this embodiment realizes determining that the current frame image is a moving scene image based on the optical flow coordinates of the target pixel points in adjacent frame images, which can improve the accuracy of judging the scene state of the current frame image.

[0023] Among them, in some alternative embodiments, determining that the current frame image is a moving scene image according to the first optical flow coordinate and the second optical flow coordinate includes: calculating the coordinate difference between the first optical flow coordinate and the second optical flow coordinate; when the coordinate difference is greater than or equal to the difference threshold, determining that the current frame image is a moving scene image.

[0024] The solution provided in this embodiment realizes determining that the current frame image is a moving scene image based on the change of the optical flow coordinates of the target pixel points in adjacent frame images, and improves the accuracy of judging the scene state of the current frame image.

[0025] Among them, in some alternative embodiments, obtaining the first optical flow coordinate of the target pixel point in the current frame image includes: determining the target pixel point in the current frame image; performing optical flow detection on the target pixel point in the current frame image to obtain the corresponding first optical flow coordinate.

[0026] Among them, in some alternative embodiments, obtaining the second optical flow coordinate of the target pixel point in the next frame image includes: obtaining the next frame image of the current frame image to get the next frame image; performing optical flow detection on the target pixel point in the next frame image to obtain the corresponding second optical flow coordinate.

[0027] Among them, in some alternative embodiments, before obtaining the target face frame information corresponding to the target portrait according to the current frame image, the portrait capture method further includes: performing regional cropping on the current frame image to obtain a cropped frame image; obtaining the target face frame information of the target portrait according to the current frame image includes: performing face detection on the cropped frame image to obtain the target face frame information of the target portrait.

[0028] The solution provided in this embodiment realizes face detection of the cropped frame image obtained by cropping the current frame image, ensures that the cropped frame image better meets the requirements of face detection, and improves the detection accuracy of face detection.

[0029] In a second aspect, an embodiment of the present application provides a portrait capture method. The portrait capture method includes: obtaining a current frame image, where the current frame image includes a target portrait; obtaining the target face frame information of the target portrait according to the current frame image; when it is determined that the current frame image is a static scene image, obtaining the focusing information of the current frame image; capturing the target static portrait information of the target portrait according to the target face frame information and the focusing information; generating a target static portrait image according to the target static portrait information.

[0030] The solution provided in this embodiment realizes portrait capture of a target portrait in a static state during the process of taking a portrait image. According to the target face frame information and focusing information of the target portrait, the target portrait is captured. Since the target face frame information is real-time information of the target portrait, it ensures that the camera always captures the target portrait, improving the shooting success rate of taking a portrait image. And it ensures focusing on the target face area, avoiding the situation where when focusing on an area outside the target face area, the area image outside the target face area image in the captured portrait image is clearer, ensuring that the target face area image in the captured portrait image is clearer and improving the shooting quality of taking a portrait image.

[0031] Among them, in some alternative embodiments, the portrait capture method further includes: when it is determined that the current frame image does not meet the preset conditions, determining the adjustment parameters of the camera according to the focusing information, where the preset conditions are used to characterize the conditions for the current frame image to be a clear image, and the adjustment parameters are used to characterize the parameters for adjusting the camera when adjusting the current frame image to a clear image; controlling the camera to move according to the adjustment parameters.

[0032] Among them, in some alternative embodiments, before determining the adjustment parameters of the camera according to the focusing information when it is determined that the current frame image does not meet the preset conditions, the portrait capture method further includes: determining the image focal length of the current frame image according to the target face frame information; when the image focal length is not within the current lens focal length range of the camera, determining that the current frame image does not meet the preset conditions.

[0033] Among them, in some alternative embodiments, determining the adjustment parameters of the camera according to the focusing information when it is determined that the current frame image does not meet the preset conditions includes: when it is determined that the current frame image does not meet the preset conditions, obtaining the lens resolution of the camera; calculating the adjustment parameters of the camera according to the lens resolution and the focusing information.

[0034] Among them, in some alternative embodiments, obtaining the focusing information of the current frame image includes: when it is determined that the target face corresponding to the target face frame information meets the portrait capture conditions, obtaining the target face frame area according to the target face frame information; determining the target face frame area as the focusing information of the current frame image.

[0035] Among them, in some alternative embodiments, obtaining the focusing information of the current frame image further includes: when it is determined that the target face does not meet the portrait capture requirements, obtaining the center point of the target face frame corresponding to the target face frame information; determining the center point of the target face frame as the focusing information.

[0036] Among them, in some alternative embodiments, before obtaining the focusing information of the current frame image, the portrait capture method further includes: obtaining target face data according to the target face frame information; when the target face data is greater than or equal to the data threshold, determining that the target face corresponding to the target face frame information meets the portrait capture requirement.

[0037] In a third aspect, an embodiment of the present application provides a portrait capture device, which includes a first acquisition module, a second acquisition module, a moving portrait information capture module, and a moving portrait image generation module. The first acquisition module is used to acquire a current frame image, and the current frame image includes a target portrait; the second acquisition module is used to acquire the target face frame information of the target portrait according to the current frame image; the moving portrait information capture module is used to capture the target moving portrait information of the target portrait according to the target face frame information when it is determined that the current frame image is a moving scene image; the moving portrait image generation module is used to generate a corresponding target moving portrait image according to the target moving portrait information.

[0038] In a fourth aspect, an embodiment of the present application provides a portrait capture device, which includes a first acquisition module, a second acquisition module, a third acquisition module, a static portrait information capture module, and a static portrait image generation module. The first acquisition module is used to acquire a current frame image, and the current frame image includes a target portrait; the second acquisition module is used to acquire the target face frame information of the target portrait according to the current frame image; the third acquisition module is used to acquire the focusing information of the current frame image when it is determined that the current frame image is a static scene image; the static portrait information capture module is used to capture the target static portrait information of the target portrait according to the target face frame information and the focusing information; the static portrait image generation module is used to generate a target static portrait image according to the target static portrait information.

[0039] In a fifth aspect, an embodiment of the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the electronic device executes the portrait capture method provided in the first aspect or the second aspect as described above.

[0040] In a sixth aspect, an embodiment of the present application provides a chip, which is applied to an electronic device. The chip includes a processor, and the processor is used to read and execute a computer program stored in the memory. When the computer program is executed by the processor, the electronic device can execute the portrait capture method provided in the first aspect or the second aspect as described above.

[0041] Among them, in some alternative embodiments, the chip further includes a memory, and the memory is connected to the processor through a circuit or a wire.

[0042] Among them, in some alternative embodiments, the chip further includes a communication interface.

[0043] In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium. Program code is stored in the computer-readable storage medium, and the program code can be called and executed by an electronic device to perform the portrait capture method provided in the first aspect or the second aspect as described above.

[0044] In an eighth aspect, an embodiment of the present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device is caused to execute the portrait capture method provided in the first aspect or the second aspect as described above.

[0045] It can be understood that for the beneficial effects of the above third aspect to the eighth aspect, reference can be made to the relevant descriptions in the first aspect or the second aspect as described above, and details are not elaborated herein. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0047] Figure 1 A schematic diagram of a scenario of the portrait capture method provided by the prior art is shown.

[0048] Figure 2 A schematic diagram of an application scenario of the electronic device provided by an embodiment of the present application is shown.

[0049] Figure 3 A schematic diagram of the structure of a software system of the electronic device provided by an embodiment of the present application is shown.

[0050] Figure 4 A schematic diagram of a process of the portrait capture method provided by an embodiment of the present application is shown.

[0051] Figure 5 A schematic diagram of an application scenario of capturing moving portrait information of a capture target in the portrait capture method provided by an embodiment of the present application is shown.

[0052] Figure 6 Another schematic diagram of a process of the portrait capture method provided by an embodiment of the present application is shown.

[0053] Figure 7 A schematic diagram of the structure of a software system of the electronic device provided by an embodiment of the present application is shown.

[0054] Figure 8 Still another schematic diagram of a process of the portrait capture method provided by an embodiment of the present application is shown.

[0055] Figure 9 Shows a structural block diagram of a portrait capture device provided by an embodiment of the present application.

[0056] Figure 10 Shows another structural block diagram of a portrait capture device provided by an embodiment of the present application.

[0057] Figure 11 Shows a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.

[0058] Figure 12 Shows a functional block diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0059] The following details the implementation manners of the present application. The examples of the implementation manners are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements with the same or similar functions throughout. The implementation manners described below with reference to the accompanying drawings are exemplary only for explaining the present application and should not be construed as limiting the present application.

[0060] The following disclosure provides many different implementation manners or examples for implementing different structures of the present application. To simplify the disclosure of the present application, the components and settings of specific examples are described below. Of course, they are only examples and are not intended to limit the present application. In addition, the present application may repeat reference numerals and / or reference letters in different examples. Such repetition is for the purpose of simplification and clarity and does not itself indicate the relationship between the various implementation manners and / or settings discussed.

[0061] Portrait image capture refers to the process in which an electronic device uses a camera to capture a target portrait, obtains target portrait information, and generates a corresponding target portrait image based on the target portrait information. Portrait capture refers to the process in which a camera focuses on the target portrait at the target portrait position according to the captured target portrait position of the target portrait to obtain target portrait information.

[0062] However, during the process of portrait image capture of a target portrait, when the target portrait is in a moving state, the camera focuses on the target portrait at the starting movement position according to the captured starting movement position of the target portrait. Due to the communication delay of the electronic device, when the camera focuses at the starting movement position, the target portrait has left the starting movement position, and the camera does not capture the target portrait at the starting movement position, resulting in the failure of portrait image capture.

[0063] As an example, such as Figure 1As shown, it shows a schematic diagram of a scenario of existing portrait capture. During the process of the target portrait moving from the target portrait position A to position B, when the electronic device uses the camera to capture the portrait image of the target portrait, the camera focuses on the target portrait at the target portrait position A according to the captured target portrait position A of the target portrait. However, due to the communication delay of the electronic device, when the camera focuses at the target portrait position A, the target portrait has moved to position B, and the camera cannot capture the target portrait at the target portrait position A, resulting in the failure of portrait image capture.

[0064] In view of the above problems, the portrait capture method, portrait capture device, electronic device and storage medium provided in the embodiments of the present application. The portrait capture method obtains a current frame image, the current frame image includes a target portrait, and according to the current frame image, obtains the target face frame information of the target portrait, and when it is determined that the current frame image is a motion scene image, captures the target motion portrait information of the target portrait according to the target face frame information, and generates a target motion portrait image according to the target motion portrait information, realizing portrait capture of the target portrait in a motion state during the process of capturing the portrait image of the target portrait, avoiding the failure to capture the target portrait when capturing the target portrait according to the starting motion position of the target portrait captured by the camera. Since the target face frame information is the real-time information of the target portrait, it is ensured that the camera always captures the target portrait, and the success rate of capturing the portrait image is improved.

[0065] Next, the technical solutions in the embodiments of the present application will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present application.

[0066] The portrait capture method provided in the embodiments of the present application can be applied to the electronic device 100. The electronic device 100 may include various terminal devices, and the terminal device may also be referred to as a terminal (Terminal), a user equipment (UE), a mobile station (MS), a mobile terminal (MT), etc. As Figure 2 shown, it shows a schematic diagram of an application scenario of the electronic device 100.

[0067] The terminal device can be a mobile phone, a sweeping robot, a drone, a smart TV, a wearable device, a personal digital assistant (PDA), a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, etc. The type of the terminal device is not limited here, and can be specifically set according to actual needs.

[0068] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiments of the present application, the Android system with a layered architecture is taken as an example to exemplarily illustrate the software structure of the electronic device 100.

[0069] Please refer to Figure 3 , which shows a schematic structural diagram of the software system of the electronic device 100 provided by an embodiment of the present application. The software system includes several layers, each layer has a clear role and division of labor, and the layers communicate with each other through software interfaces. In some embodiments, as Figure 3 shown, the Android system can include four layers, from top to bottom are the applications (APP) layer, the framework (FWK) layer, the hardware abstraction layer (HAL), and the driver layer. The APP layer communicates with the FWK layer through the Android Interface Definition Language (AIDL) protocol. The FWK layer also communicates with the HAL layer through the AIDL protocol. The HAL layer also communicates with the Driver layer through the AIDL protocol.

[0070] Among them, the APP layer can include a series of application program packages. In some embodiments, the APP layer can include applications such as camera, gallery, video, calendar, call, map, navigation, Bluetooth, music, etc.

[0071] The FWK layer provides application programming interfaces (APIs) and programming frameworks for application programs in the APP layer. Some predefined functions may be included in the FWK layer. In some embodiments, the FWK layer may include a window manager, a content provider, a view system, a resource manager, a camera service manager, etc. The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc. The content provider is used to store and obtain data, and make this data accessible to application programs. The data may include videos, images, audio, incoming and outgoing calls, browsing history and bookmarks, phone books, etc. The view system includes visible controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build application programs. The display interface can be composed of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures. The resource manager provides various resources for application programs, such as localized strings, icons, pictures, layout files, video files, and so on. The Camera Service manager is used to manage camera application programs and provide camera photographing services for camera application programs.

[0072] The HAL layer defines the interface of the hardware "driver". For example, the camera HAL module reduces the coupling degree between the Android operating system and the hardware.

[0073] The Driver layer is used to provide drivers for different hardware devices. For example, the Driver layer may include a camera driver. The camera driver is used to manage the camera chip, such as initialization, control, parameter configuration, monitoring, data interaction, etc.

[0074] It should be noted that although the embodiments of the present application are described by taking the Android system as an example, its basic principle is equally applicable to electronic devices 100 based on operating systems such as iOS and Windows.

[0075] Please refer to Figure 4 , which shows a flowchart of a portrait capture method provided by an embodiment of the present application. In a specific embodiment, the portrait capture method may be applied to the electronic device 100. Hereinafter, taking the electronic device 100 as an example, the Figure 4 shown process will be elaborated in detail. The portrait capture method may include the following steps S110 to step S140.

[0076] Step S110: Obtain the current frame image.

[0077] In an embodiment of the present application, the electronic device may include a camera. When the user needs to capture a portrait image, a capture instruction may be sent to the electronic device. The electronic device receives and responds to the capture instruction, controls the camera to capture, and obtains the current frame image.

[0078] Among them, the current frame image includes a target portrait, and the target portrait may be one or more. The camera may be any one of a white light camera, an infrared camera, a laser camera, etc. The type of the camera is not limited here, and it can be specifically set according to actual needs.

[0079] In some embodiments, the electronic device may include an input panel. When the user needs to capture a portrait image, a capture instruction may be input on the input panel of the electronic device, and the electronic device receives the capture instruction through the input panel.

[0080] In some embodiments, the electronic device may include a voice recognition module. When the user needs to capture a portrait image, a voice message carrying a capture instruction may be emitted within the voice collection range of the voice recognition module. The electronic device collects the voice message through the voice recognition module and performs voice recognition on the voice message to obtain the capture instruction.

[0081] In some embodiments, the client is connected to the electronic device through a network and performs data interaction with the electronic device through the network. When the user needs to capture a portrait image, a capture instruction may be sent to the client. The client receives and responds to the capture instruction, forwards the capture instruction to the electronic device through the network, and the electronic device receives the capture instruction forwarded by the client.

[0082] Among them, the client may be any one of a mobile client (for example, a mobile phone client, a personal digital assistant (PDA) client, a tablet personal computer (Tablet PC) client, a laptop client, a smart watch client, a smart bracelet client, or a wearable client, etc.) or a fixed client (for example, a desktop computer client, a smart panel client, etc.). The type of the client is not limited here, and it can be specifically set according to actual needs.

[0083] The network can be any one of a ZigBee network, a Bluetooth (BT) network, a Wireless Fidelity (Wi-Fi) network, a Thread network, a Long Range Radio (LoRa) network, a Low-Power Wide-Area Network (LPWAN), an infrared network, a Narrow Band Internet of Things (NB-IoT), a Controller Area Network (CAN), a Digital Living Network Alliance (DLNA) network, a Wide Area Network (WAN), a Local Area Network (LAN), a Metropolitan Area Network (MAN), or a Wireless Personal Area Network (WPAN), etc. The type of the network is not limited here, and can be specifically set according to actual requirements.

[0084] Step S120: Obtain the target face frame information of the target portrait according to the current frame image.

[0085] In the embodiment of the present application, after the electronic device obtains the current frame image, it can obtain the target face frame information of the target portrait according to the current frame image.

[0086] Specifically, after the electronic device obtains the current frame image, it can perform face detection on the target portrait in the current frame image to obtain the target face frame information of the target portrait.

[0087] In some embodiments, after the electronic device obtains the current frame image, it can perform face feature extraction on the target portrait in the current frame image to obtain the target face features, and generate the corresponding target face frame information according to the face features.

[0088] In some embodiments, a face detection model is pre-stored in the electronic device. After the electronic device obtains the current frame image, it can input the current frame image into the face detection model. The face detection model receives and responds to the current frame image, performs face detection on the target portrait in the current frame image to obtain the corresponding target face frame information, and outputs the target face frame information to the electronic device. The electronic device receives the target face frame information output by the face detection model.

[0089] Among them, the face detection model can be trained based on historical frame images marked with historical face frame information. The face detection model can be a Convolutional Neural Networks (CNN) model, a Deep Belief Networks (DBN) model, a Stacked Auto Encoder Networks (SAE) model, a Recurrent Neural Networks (RNN) model, a Deep Neural Networks (DNN) model, a Long Short-Term Memory (LSTM) network model, or a Gated Recurring Units (GRU) model, etc. The type of the face detection model is not limited here and can be specifically set according to actual needs.

[0090] In some embodiments, after the electronic device obtains the current frame image, it can perform face detection on the target portrait in the current frame image to obtain unique face frame information, and determine the unique face frame information as the target face frame information.

[0091] In some embodiments, after the electronic device obtains the current frame image, it can perform face detection on the target portrait in the current frame image to obtain multiple face frame information. When receiving a selection operation by the user on any one of the multiple face frame information, the any one of the face frame information is determined as the target face frame information.

[0092] In some embodiments, after the electronic device obtains the current frame image, it can perform regional cropping on the current frame image to obtain a cropped frame image, and perform face detection on the cropped frame image to obtain the target face frame information of the target portrait, which can ensure that the cropped frame image better meets the requirements of face detection and improves the detection accuracy of face detection.

[0093] Among them, the electronic device performs edge cropping on the current frame image with the criterion of always retaining the target portrait in the current frame image to obtain a cropped frame image.

[0094] In some embodiments, after the electronic device obtains the target face frame information of the target portrait according to the current frame image, it may obtain the first optical flow coordinates of the target pixel points in the current frame image, and obtain the second optical flow coordinates of the target pixel points in the next frame image. The next frame image is the next frame of the current frame image, and determine whether the current frame image is a motion scene image according to the first optical flow coordinates and the second optical flow coordinates, which realizes determining whether the current frame image is a motion scene image according to the optical flow coordinates of the target pixel points in adjacent frame images, and can improve the accuracy of judging the scene state of the current frame image.

[0095] Specifically, the electronic device may determine the target pixel points in the current frame image, and perform optical flow detection on the target pixel points in the current frame image to obtain the corresponding first optical flow coordinates.

[0096] Among them, the target pixel points can be pixel points arbitrarily selected by the user in the current frame image, or pixel points arbitrarily selected by the electronic device in the current frame image, or reference pixel points preset by the user, etc. The selection method of the target pixel points is not limited here, and can be specifically set according to actual needs.

[0097] The electronic device may obtain the next frame image of the current frame image to obtain the next frame image, and perform optical flow detection on the target pixel points in the next frame image to obtain the corresponding second optical flow coordinates.

[0098] The electronic device may calculate the coordinate difference between the first optical flow coordinates and the second optical flow coordinates, and determine whether the current frame image is a motion scene image according to the coordinate difference and the difference threshold. When the coordinate difference is greater than or equal to the difference threshold, it is determined that the current frame image is a motion scene image; when the coordinate difference is less than the difference threshold, it is determined that the current frame image is a static scene image. It realizes determining whether the current frame image is a motion scene image according to the change of the optical flow coordinates of the target pixel points in adjacent frame images, and improves the accuracy of judging the scene state of the current frame image.

[0099] The difference threshold can be used to represent the minimum coordinate difference for the current frame image to be a motion scene image. The difference threshold can be a coordinate difference preset by the user, or a coordinate difference automatically generated by the electronic device according to multiple portrait image shooting processes, etc. The setting method of the difference threshold is not limited here, and can be specifically set according to actual needs.

[0100] Step S130: When it is determined that the current frame image is a motion scene image, capture the target motion portrait information of the target portrait according to the target face frame information.

[0101] In an embodiment of the present application, after the electronic device obtains the target face frame information of the target portrait according to the current frame image, when it is determined that the current frame image is a motion scene image, it may capture the target motion portrait information of the target portrait according to the target face frame information. As Figure 5 shown, it shows a schematic diagram of an application scenario for capturing target motion portrait information.

[0102] Specifically, after the electronic device obtains the target face frame information of the target portrait according to the current frame image, it may obtain the first optical flow coordinates of the target pixel points in the current frame image, and obtain the second optical flow coordinates of the target pixel points in the next frame image, and determine whether the current frame image is a motion scene image according to the first optical flow coordinates and the second optical flow coordinates. When it is determined that the current frame image is a motion scene image according to the first optical flow coordinates and the second optical flow coordinates, it captures the target motion portrait information of the target portrait according to the target face frame information, realizing that when it is determined that the current frame image is a motion scene image, the target motion portrait information of the target portrait is captured according to the target face frame information, which can ensure that the camera always captures the target portrait and is beneficial to improving the shooting success rate of capturing portrait images.

[0103] In some embodiments, after the electronic device obtains the target face frame information of the target portrait according to the current frame image, and when it is determined that the current frame image is a motion scene image, it may focus on the current frame image according to the target face frame information to obtain the target motion portrait pixel information of the target portrait, and determine the target motion portrait pixel information as the target motion portrait information, realizing that during the process of capturing a portrait image, when it is determined that the current frame image is a motion scene image, the target motion portrait information of the target portrait is captured according to the target face frame information of the target portrait in the current frame image, ensuring that the camera always captures the target portrait and is beneficial to improving the shooting success rate of capturing portrait images.

[0104] In some embodiments, after the electronic device obtains the target face frame information of the target portrait according to the current frame image, and when it is determined that the current frame image is a motion scene image, it may focus on the current frame image according to the target face frame information to obtain the target motion portrait pixel information of the target portrait, and perform portrait blurring processing, beauty processing, and filter processing on the target motion portrait pixel information respectively to obtain the target motion portrait information, realizing that during the process of capturing a portrait image, when it is determined that the current frame image is a motion scene image, the target motion portrait information of the target portrait is captured according to the target face frame information of the target portrait in the current frame image, ensuring that the camera always captures the target portrait and is beneficial to improving the shooting success rate of capturing portrait images. Further, by performing portrait blurring processing, beauty processing, and filter processing on the target motion portrait pixel information respectively, it is beneficial to improve the image quality of the captured portrait image.

[0105] Step S140: Generate a target moving portrait image based on the target moving portrait information.

[0106] In an embodiment of the present application, when the electronic device determines that the current frame image is a moving scene image, after capturing the target moving portrait information of the target portrait according to the target face frame information, a target moving portrait image can be generated according to the target moving portrait information, realizing that during the process of capturing a portrait image of a target portrait in a moving state, the target portrait is captured according to the target face frame information of the target portrait, avoiding the situation where the target portrait cannot be captured when capturing the target portrait according to the starting moving position of the target portrait captured by the camera. Since the target face frame information is the real-time information of the target portrait, it ensures that the camera always captures the target portrait, and improves the success rate of capturing the portrait image.

[0107] In some embodiments, after the electronic device generates a target moving portrait image according to the target moving portrait information, the target moving portrait image can be decoded into a first target portrait image matching the camera client, and the first target portrait image is displayed on the camera client, realizing the display of the first target portrait image converted from the target moving portrait image on the camera client, so as to facilitate the user to view the captured portrait image and improve the shooting experience of the user for capturing the portrait image.

[0108] The solution provided in this embodiment realizes that during the process of capturing a portrait image of a target portrait in a moving state, the target portrait is captured according to the target face frame information of the target portrait by obtaining the current frame image, where the current frame image includes the target portrait, and according to the current frame image, obtaining the target face frame information of the target portrait, and when it is determined that the current frame image is a moving scene image, capturing the target moving portrait information of the target portrait according to the target face frame information, and generating a target moving portrait image according to the target moving portrait information. This avoids the situation where the target portrait cannot be captured when capturing the target portrait according to the starting moving position of the target portrait captured by the camera. Since the target face frame information is the real-time information of the target portrait, it ensures that the camera always captures the target portrait, and improves the success rate of capturing the portrait image.

[0109] Please refer to Figure 6 , which shows a flowchart of a portrait capturing method provided in another embodiment of the present application. In a specific embodiment, the portrait capturing method can be applied to the electronic device 100. Taking the electronic device 100 as an example below, the Figure 6 shown process will be elaborated in detail. The portrait capturing method may include the following steps S210 to step S270.

[0110] Step S210: Obtain the current frame image.

[0111] Step S220: According to the current frame image, obtain the target face frame information of the target portrait.

[0112] Step S230: When it is determined that the current frame image is a moving scene image, capture the target moving portrait information of the target portrait according to the target face frame information.

[0113] Step S240: Generate a target moving portrait image according to the target moving portrait information.

[0114] In this embodiment, the content of steps S210, S220, S230, and S240 can refer to the corresponding steps in the foregoing embodiments, and will not be elaborated here.

[0115] Step S250: When it is determined that the current frame image is a static scene image, obtain the focusing information of the current frame image.

[0116] In this embodiment, after the electronic device obtains the target face frame information of the target portrait according to the current frame image, when it is determined that the current frame image is a static scene image, it can obtain the focusing information of the current frame image.

[0117] Among them, the focusing information can be the target face frame area or the center point of the target face frame, etc. The focusing information can be used to represent the focusing method of the camera for the current frame image. The focusing method can include area focusing corresponding to the target face frame area and center focusing corresponding to the center point of the target face frame, which is not limited here.

[0118] In some embodiments, after the electronic device obtains the target face frame information of the target portrait according to the current frame image, when it is determined that the current frame image is a static scene image, it can determine whether the target face corresponding to the target face frame information meets the portrait capture requirements, and when it is determined that the target face corresponding to the target face frame information meets the portrait capture requirements, obtain the target face frame area corresponding to the target face frame information, and determine the target face frame area as the focusing information of the current frame image, realizing that when it is determined that the current frame image is a static scene image and the target face meets the portrait capture requirements, the target face frame area corresponding to the target face frame information is determined as the focusing information of the current frame image, which is beneficial to improving the capture success rate of capturing the target static portrait information.

[0119] Among them, the electronic device can obtain target face data according to the target face frame information, and determine whether the target face corresponding to the target face frame information meets the portrait capture requirement according to the target face data and the data threshold, realizing the judgment of the portrait capture requirement of the target face according to the target face data, and ensuring a relatively high judgment accuracy for judging the portrait capture requirement of the target face.

[0120] When the target face data is greater than or equal to the data threshold, it is determined that the target face corresponding to the target face frame information meets the portrait capture requirement; when the target face data is less than the data threshold, it is determined that the target face corresponding to the target face frame information does not meet the portrait capture requirement.

[0121] The data threshold can be used to represent the minimum face data for the target face to meet the portrait capture requirement. The data threshold can be the face data preset by the user, or the face data automatically generated by the electronic device according to multiple portrait image shooting processes, etc. The setting method of the data threshold is not limited here, and it can be specifically set according to actual needs.

[0122] In some embodiments, after the electronic device obtains the target face frame information of the target portrait according to the current frame image, when it is determined that the current frame image is a static scene image, it can determine whether the target face corresponding to the target face frame information meets the portrait capture requirement, and when it is determined that the target face does not meet the portrait capture requirement, obtain the center point of the target face frame corresponding to the target face frame information, and determine the center point of the target face frame as the focusing information, realizing that when it is determined that the current frame image is a static scene image and the target face does not meet the portrait capture requirement, the center point of the target face frame corresponding to the target face frame information is determined as the focusing message of the current frame image, ensuring the central correction of the target face frame information, and can make up for the problem that the captured target static portrait information is blurred due to the too small target face, which is beneficial to improving the capture quality of the target static portrait information.

[0123] Step S260: Capture the target static portrait information of the target portrait according to the target face frame information and the focusing information.

[0124] In this embodiment, when the electronic device determines that the current frame image is a static scene image, after obtaining the focusing information of the current frame image, it can capture the target static portrait information of the target portrait according to the target face frame information and the focusing information.

[0125] Specifically, when the electronic device determines that the current frame image is a still scene image, after obtaining the focusing information of the current frame image, it can perform focusing on the current frame image according to the target face frame information and the focusing information, obtain the target still portrait pixel information of the target portrait, and determine the target still portrait pixel information as the target still portrait information. This realizes that during the process of capturing a portrait image, when it is determined that the current frame image is a still scene image, according to the target face frame information and the focusing information of the target portrait in the current frame image, the target still portrait information of the target portrait is captured, ensuring that the camera always captures the target portrait and improving the shooting success rate of capturing the portrait image. And it ensures that focusing is performed on the target face area, avoiding the situation where when focusing on an area outside the target face area, the area image outside the target face area in the captured portrait image is clearer, which is beneficial to capturing a portrait image with a clearer face area image and is beneficial to improving the shooting quality of capturing the portrait image.

[0126] In some embodiments, the focusing information is the target face frame area. When the electronic device determines that the current frame image is a still scene image, after obtaining the target face frame area of the current frame image, it can perform area focusing on the current frame image according to the target face frame information and the target face frame area, obtain the target still portrait pixel information of the target portrait, and determine the target still portrait pixel information as the target still portrait information.

[0127] In some embodiments, the focusing information is the center point of the target face frame. When the electronic device determines that the current frame image is a still scene image, after obtaining the center point of the target face frame of the current frame image, it can perform center focusing on the current frame image according to the target face frame information and the center point of the target face frame, obtain the target still portrait pixel information of the target portrait, and determine the target still portrait pixel information as the target still portrait information.

[0128] In some embodiments, when the electronic device determines that the current frame image is a still scene image, after obtaining the focusing information of the current frame image, it can perform focusing on the current frame image according to the target face frame information and the focusing information, obtain the target still portrait pixel information of the target portrait, and perform portrait blurring processing, beauty processing, and filter processing on the target still portrait pixel information respectively to obtain the target still portrait information, achieving, during the process of capturing a portrait image, when it is determined that the current frame image is a still scene image, according to the target face frame information and the focusing information corresponding to the current frame image, capturing the corresponding target still portrait information, ensuring focusing on the target face area, and avoiding the situation where when focusing on an area outside the target face area, the area image outside the target face area image in the captured portrait image is clearer, which is beneficial to capturing a portrait image with a clearer face area image and is beneficial to improving the shooting quality of the captured portrait image. Further, by performing portrait blurring processing, beauty processing, and filter processing on the target still portrait pixel information respectively, it is beneficial to improving the image quality of the captured portrait image.

[0129] Step S270: Generate a target still portrait image according to the target still portrait information.

[0130] In this embodiment, after the electronic device captures the target still portrait information of the target portrait according to the target face frame information and the focusing information, it can generate a target still portrait image according to the target still portrait information, achieving, during the process of capturing a portrait image of a target portrait in a static state, capturing the target portrait according to the target face frame information and the focusing information of the target portrait. Since the target face frame information is the real-time information of the target portrait, it ensures that the camera always captures the target portrait, improving the shooting success rate of the captured portrait image. And it ensures focusing on the target face area, avoiding the situation where when focusing on an area outside the target face area, the area image outside the target face area image in the captured portrait image is clearer, ensuring that the target face area image of the captured portrait image is clearer and improving the shooting quality of the captured portrait image.

[0131] In some embodiments, when the electronic device determines that the current frame image is a still scene image, after obtaining the focusing information of the current frame image, it can determine whether the current frame image meets a preset condition, and when it is determined that the current frame image does not meet the preset condition, determine the adjustment parameters of the camera according to the focusing information, and control the camera to move according to the adjustment parameters, achieving real-time adjustment of the camera when it is determined that the current frame image is a blurred image, ensuring that the next frame image obtained is a clear image, which is beneficial to improving the image acquisition quality of the subsequent frames obtained.

[0132] Among them, the preset condition can be used to characterize the condition for the current frame image to be a clear image, and the adjustment parameter can be used to characterize the parameter for adjusting the camera when adjusting the current frame image to a clear image. The adjustment parameter can be any one of adjusting the Hall current or adjusting the Hall voltage, etc., which is not limited here.

[0133] The electronic device can determine the image focal length of the current frame image according to the target face frame information, and determine whether the current frame image meets the preset condition according to the image focal length and the current lens focal length range of the camera corresponding to the current frame image, realizing the judgment of the image quality of the current frame image according to the image focal length and the current lens focal length range of the current frame image, which can ensure a relatively high accuracy in judging the image quality of the current frame image.

[0134] When the image focal length is within the current lens focal length range, it is determined that the current frame image meets the preset condition; when the image focal length is not within the current lens focal length range, it is determined that the current frame image does not meet the preset condition.

[0135] When the electronic device determines that the current frame image does not meet the preset condition, it can obtain the lens resolution of the camera and calculate the adjustment parameter of the camera according to the lens resolution and the focusing information, realizing the calculation of the adjustment parameter of the camera according to the focusing information and the lens resolution of the camera, which can ensure a relatively high accuracy of the calculated adjustment parameter.

[0136] In some embodiments, after generating the target static portrait image according to the target static portrait information, the electronic device can decode the target static portrait image into a second target portrait image matching the camera client and display the second target portrait image on the camera client, realizing the display of the second target portrait image converted from the target static portrait image on the camera client, facilitating the user to view the captured portrait image and improving the shooting experience of the user for portrait image shooting.

[0137] In an application scenario, such as Figure 7 shown, the software system of the electronic device can include an APP layer, an FWK layer, a HAL layer, and a Driver layer. The APP layer includes the Android camera application installation package (Camera Android Application Package, Camera APK), the FWK layer includes the Camera Service, the HAL layer can include a pre-processing module, a face detection (Face Detect) module, an auto focus (Auto Focus) module, a portrait capture module, and a post-processing module, etc., and the Driver layer can include a lens sensor (Sensor) frame output sequence module and a module driver sequence module, etc.

[0138] Among them, the preprocessing module, the Face Detect module, the Auto Focus module, the portrait capture module, and the post-processing module are combined into the camera HAL module, and the Sensor frame output sequence module and the module driver sequence module are combined into the camera driver module.

[0139] When the user uses the electronic device to take a portrait image of the target portrait, the user can click on the camera application in the electronic device. The camera application responds to the user's click operation. The Camera APK sends a capture event instruction to the Camera Service based on the AIDL protocol. The Camera Service receives and responds to the Capture Event instruction, transparently transmits the preset image capture parameters to the preprocessing module based on the AIDL protocol. The preprocessing module receives and responds to the preset image capture parameters, converts the preset image capture parameters into the acquired image resolution, and sends the acquired image resolution to the Sensor frame output sequence module based on the AIDL protocol. The Sensor frame output sequence module receives and responds to the acquired image resolution, acquires the current frame image according to the acquired image resolution, and transmits the current frame image back to the preprocessing module based on the AIDL protocol. The preprocessing module receives and responds to the current frame image, performs regional cropping on the current frame image to obtain a cropped frame image, and sends the cropped frame image to the Face Detect module. The Face Detect module receives and responds to the cropped frame image, performs face detection on the cropped frame image to obtain the target face frame information. The Face Detect module also performs optical flow detection on the current frame image to obtain a first optical flow detection result indicating that the current frame image is a moving scene image and a second optical flow detection result indicating that the current frame image is a static scene image.

[0140] When the Face Detect module obtains the first optical flow detection result, it sends the target face frame information to the portrait capture module. The portrait capture module receives and responds to the target face frame information, captures the target portrait according to the target face frame information to obtain the target moving portrait information, and sends the target moving portrait information to the post-processing module. The post-processing module receives and responds to the target moving portrait information, generates a target moving portrait image, converts the target moving portrait image into a first target portrait image matching the Camera APK, and sends the first target portrait image to the Camera Service based on the AIDL protocol. The Camera Service receives and responds to the first target portrait image, transparently transmits the first target portrait image to the Camera APK. The Camera APK receives and responds to the first target portrait image, and displays the first target portrait image.

[0141] When the Face Detect module obtains the second optical flow detection result, it sends the target face frame information to the Auto Focus module and the portrait capture module respectively. The Auto Focus module receives and responds to the target face frame information, obtains the focusing information of the current frame image according to the target face frame information, and sends the focusing information to the portrait capture module. The portrait capture module receives and responds to the target face frame information and the focusing information, captures the target portrait according to the target face frame information and the focusing information, obtains the target static portrait information, and sends the target static portrait information to the subsequent processing module. The subsequent processing module receives and responds to the target static portrait information, generates a target static portrait image, converts the target static portrait image into a second target portrait image matching the Camera APK, and sends the second target portrait image to the Camera Service based on the AIDL protocol. The Camera Service receives and responds to the second target portrait image, transparently transmits the second target portrait image to the Camera APK. The Camera APK receives and responds to the second target portrait image and displays the second target portrait image.

[0142] Among them, when receiving the target face frame information, the Auto Focus module can also determine the image focal length of the current frame image according to the target face frame information, and determine whether the current frame image meets the preset conditions according to the image focal length and the current lens focal length range of the camera corresponding to the current frame image. When it is determined that the current frame image does not meet the preset conditions, the adjustment parameters of the camera are determined according to the focusing information, and the adjustment parameters are sent to the module driver sequence module based on the AIDL protocol. The module driver sequence module receives and responds to the adjustment parameters, and drives the camera to move according to the adjustment parameters.

[0143] The solution provided in this embodiment obtains the current frame image, and based on the current frame image, obtains the target face frame information of the target portrait. When it is determined that the current frame image is a moving scene image, the target moving portrait information of the target portrait is captured according to the target face frame information, and the target moving portrait image is generated according to the target moving portrait information. When it is determined that the current frame image is a static scene image, the focusing information of the current frame image is obtained, and the target static portrait information of the target portrait is captured according to the target face frame information and the focusing information, and the target static portrait image is generated according to the target static portrait information. During the process of capturing a portrait image of a target portrait in a static state, the target portrait is captured according to the target face frame information and the focusing information of the target portrait. Since the target face frame information is the real-time information of the target portrait, it is ensured that the camera always captures the target portrait, improving the success rate of capturing the portrait image. And it is ensured that the focus is on the target face area, avoiding the situation where when focusing on an area outside the target face area, the area image outside the target face area image in the captured portrait image is clearer, ensuring that the target face area image in the captured portrait image is clearer and improving the quality of the captured portrait image.

[0144] Please refer to Figure 8 , which shows the flowchart of the portrait capture method provided in another embodiment of the present application. In a specific embodiment, the portrait capture method can be applied to the electronic device 100. Hereinafter, taking the electronic device 100 as an example, the Figure 8 shown process will be elaborated in detail. The portrait capture method may include the following steps S310 to S350.

[0145] Step S310: Obtain the current frame image.

[0146] Step S320: Based on the current frame image, obtain the target face frame information of the target portrait.

[0147] Step S330: When it is determined that the current frame image is a static scene image, obtain the focusing information of the current frame image.

[0148] Step S340: Capture the target static portrait information of the target portrait according to the target face frame information and the focusing information.

[0149] Step S350: Generate a target static portrait image according to the target static portrait information.

[0150] In this embodiment, the contents of steps S310, S320, S330, S340, and S350 can refer to the corresponding steps in the foregoing embodiments and will not be elaborated here.

[0151] The solution provided in this embodiment obtains the current frame image, and based on the current frame image, obtains the target face frame information of the target person. When it is determined that the current frame image is a static scene image, it obtains the focus information of the current frame image, and captures the target static person information of the target person according to the target face frame information and the focus information, and generates a target static person image according to the target static person information. During the process of capturing a person image of a target person in a static state, it captures the target person according to the target face frame information and the focus information of the target person. Since the target face frame information is the real-time information of the target person, it ensures that the camera always captures the target person, improves the success rate of capturing the person image, and ensures that the focus is on the target face area, avoiding the situation where when focusing on an area outside the target face area, the area image outside the target face area image in the captured person image is clearer, ensuring that the target face area image in the captured person image is clearer and improving the quality of capturing the person image.

[0152] Please refer to Figure 9 , which shows a person capture device 300 provided by an embodiment of the present application. The person capture device 300 can be applied to an electronic device 100. Taking the electronic device 100 as an example below, Figure 9 the person capture device 300 shown is elaborated in detail. The person capture device 300 may include a first acquisition module 310, a second acquisition module 320, a moving person information capture module 330, and a moving person image generation module 340.

[0153] The first acquisition module 310 can be used to acquire the current frame image, and the current frame image includes the target person; the second acquisition module 320 can be used to acquire the target face frame information of the target person according to the current frame image; the moving person information capture module 330 can be used to capture the target moving person information of the target person according to the target face frame information when it is determined that the current frame image is a moving scene image; the moving person image generation module 340 can be used to generate a target moving person image according to the target moving person information.

[0154] In some embodiments, the person capture device 300 may further include a third acquisition module, a static person information capture module, and a static person image generation module.

[0155] The third acquisition module can be used to acquire the focus information of the current frame image when it is determined that the current frame image is a static scene image; the static person information capture module can be used to capture the target static person information of the target person according to the target face frame information and the focus information; the static person image generation module can be used to generate a target static person image according to the target static person information.

[0156] In some embodiments, the portrait capturing device 300 may further include a first determination module and a control module.

[0157] The first determination module may be configured to determine adjustment parameters of the camera according to the focusing information when it is determined that the current frame image does not meet a preset condition. The preset condition may be used to characterize the condition for the current frame image to be a clear image, and the adjustment parameters may be used to characterize the parameters for adjusting the camera when adjusting the current frame image to a clear image. The control module may be configured to control the movement of the camera according to the adjustment parameters.

[0158] In some embodiments, the portrait capturing device 300 may further include a second determination module and a third determination module.

[0159] The second determination module may be configured to determine the image focal length of the current frame image according to the target face frame information before the first determination module determines the adjustment parameters of the camera according to the focusing information when it is determined that the current frame image does not meet the preset condition. The third determination module may be configured to determine that the current frame image does not meet the preset condition when the image focal length is not within the current lens focal length range of the camera.

[0160] In some embodiments, the first determination module may include a first acquisition unit and a first calculation unit.

[0161] The first acquisition unit may be configured to acquire the lens resolution of the camera when it is determined that the current frame image does not meet the preset condition. The first calculation unit may be configured to calculate the adjustment parameters of the camera according to the lens resolution and the focusing information.

[0162] In some embodiments, the third acquisition module may include a second acquisition unit and a first determination unit.

[0163] The second acquisition unit may be configured to acquire the target face frame area according to the target face frame information when it is determined that the target face corresponding to the target face frame information meets the portrait capturing condition. The first determination unit may be configured to determine the target face frame area as the focusing information of the current frame image.

[0164] In some embodiments, the third acquisition module may further include a third acquisition unit and a second determination unit.

[0165] The third acquisition unit may be configured to acquire the center point of the target face frame corresponding to the target face frame information when it is determined that the target face corresponding to the target face frame information does not meet the portrait capturing requirement. The second determination unit may be configured to determine the center point of the target face frame as the focusing information.

[0166] In some embodiments, the portrait capturing device 300 may further include a fourth acquisition module and a fourth determination module.

[0167] The fourth acquisition module can be used to obtain target face data according to the target face frame information before the third acquisition module determines that the current frame image is a still scene image and then obtains the focusing information of the current frame image; the fourth determination module can be used to determine that the target face corresponding to the target face frame information meets the portrait capture requirement when the target face data is greater than or equal to the data threshold.

[0168] In some embodiments, the portrait capture device 300 may further include a fifth acquisition module, a sixth acquisition module, and a fifth determination module.

[0169] The fifth acquisition module can be used to obtain the first optical flow coordinates of the target pixel points in the current frame image before the moving portrait information capture module 330 determines that the current frame image is a moving scene image and then captures the target moving portrait information of the target portrait according to the target face frame information; the sixth acquisition module can be used to obtain the second optical flow coordinates of the target pixel points in the next frame image, where the next frame image is the next frame of the current frame image; the fifth determination module can be used to determine that the current frame image is a moving scene image according to the first optical flow coordinates and the second optical flow coordinates.

[0170] In some embodiments, the fifth determination module may include a second calculation unit and a third determination unit.

[0171] The second calculation unit can be used to calculate the coordinate difference between the first optical flow coordinates and the second optical flow coordinates; the third determination unit can be used to determine that the current frame image is a moving scene image when the coordinate difference is greater than or equal to the difference threshold.

[0172] In some embodiments, the fifth acquisition module may include a fourth determination unit and a first detection unit.

[0173] The fourth determination unit can be used to determine the target pixel points in the current frame image; the first detection unit can be used to perform optical flow detection on the target pixel points in the current frame image to obtain the corresponding first optical flow coordinates.

[0174] In some embodiments, the sixth acquisition module may include a fourth acquisition unit and a second detection unit.

[0175] The fourth acquisition unit can be used to obtain the next frame image of the current frame image to obtain the next frame image; the second detection unit can be used to perform optical flow detection on the target pixel points in the next frame image to obtain the corresponding second optical flow coordinates.

[0176] In some embodiments, the portrait capture device 300 may further include a cropping module.

[0177] The cropping module can be used to crop the current frame image to obtain a cropped frame image before the second acquisition module 320 obtains the target face frame information of the target portrait according to the current frame image.

[0178] In some embodiments, the second acquisition module 320 may include a third detection unit.

[0179] The third detection unit can be used to perform face detection on the cropped frame image to obtain the target face frame information of the target portrait.

[0180] The solution provided in this embodiment captures the target portrait by obtaining the current frame image, which includes the target portrait, and according to the current frame image, obtaining the target face frame information of the target portrait. When it is determined that the current frame image is a moving scene image, the target moving portrait information of the target portrait is captured according to the target face frame information, and the target moving portrait image is generated according to the target moving portrait information. During the process of capturing a portrait image of a target portrait in a moving state, the target portrait is captured according to the target face frame information of the target portrait, avoiding the situation where the target portrait cannot be captured when capturing the target portrait according to the starting movement position of the target portrait captured by the camera. Since the target face frame information is the real-time information of the target portrait, the target moving portrait information of the target portrait is captured, ensuring that the camera always captures the target portrait and improving the success rate of capturing the portrait image.

[0181] Please refer to Figure 10 , which shows a portrait capture device 500 provided by an embodiment of the present application. The portrait capture device 500 can be applied to an electronic device 100. Taking the electronic device 100 as an example below, Figure 10 the portrait capture device 500 shown is elaborated in detail. The portrait capture device 500 may include a first acquisition module 310, a second acquisition module 320, a third acquisition module 510, a static portrait information capture module 520, and a static portrait image generation module 530.

[0182] The first acquisition module 310 can be used to acquire a current frame image, which includes a target portrait; the second acquisition module 320 can be used to acquire the target face frame information of the target portrait according to the current frame image; the third acquisition module 510 can be used to acquire the focusing information of the current frame image when it is determined that the current frame image is a static scene image; the static portrait information capture module 520 can be used to capture the target static portrait information of the target portrait according to the target face frame information and the focusing information; the static portrait image generation module 530 can be used to generate a target static portrait image according to the target static portrait information.

[0183] In some embodiments, the portrait capture device 500 may further include a first determination module and a control module.

[0184] The first determination module can be used to determine the adjustment parameters of the camera according to the focusing information when it is determined that the current frame image does not meet the preset conditions. The preset conditions can be used to characterize the conditions for the current frame image to be a clear image, and the adjustment parameters can be used to characterize the parameters for adjusting the camera when adjusting the current frame image to a clear image. The control module can be used to control the movement of the camera according to the adjustment parameters.

[0185] In some embodiments, the portrait capturing device 300 may further include a second determination module and a third determination module.

[0186] The second determination module can be used to determine the image focal length of the current frame image according to the target face frame information before the first determination module determines the adjustment parameters of the camera according to the focusing information when it is determined that the current frame image does not meet the preset conditions. The third determination module can be used to determine that the current frame image does not meet the preset conditions when the image focal length is not within the current lens focal length range of the camera.

[0187] In some embodiments, the first determination module may include a first acquisition unit and a first calculation unit.

[0188] The first acquisition unit can be used to acquire the lens resolution of the camera when it is determined that the current frame image does not meet the preset conditions. The first calculation unit can be used to calculate the adjustment parameters of the camera according to the lens resolution and the focusing information.

[0189] In some embodiments, the third acquisition module may include a second acquisition unit and a first determination unit.

[0190] The second acquisition unit can be used to acquire the target face frame area according to the target face frame information when it is determined that the target face corresponding to the target face frame information meets the portrait capturing conditions. The first determination unit can be used to determine the target face frame area as the focusing information of the current frame image.

[0191] In some embodiments, the third acquisition module may further include a third acquisition unit and a second determination unit.

[0192] The third acquisition unit can be used to acquire the center point of the target face frame corresponding to the target face frame information when it is determined that the target face corresponding to the target face frame information does not meet the portrait capturing requirements. The second determination unit can be used to determine the center point of the target face frame as the focusing information.

[0193] In some embodiments, the portrait capturing device 300 may further include a fourth acquisition module and a fourth determination module.

[0194] The fourth acquisition module can be used to obtain target face data according to the target face frame information before obtaining the focusing information of the current frame image when the third acquisition module determines that the current frame image is a still scene image; the fourth determination module can be used to determine that the target face corresponding to the target face frame information meets the portrait capture requirement when the target face data is greater than or equal to the data threshold.

[0195] The solution provided in this embodiment obtains the current frame image, and according to the current frame image, obtains the target face frame information of the target portrait. When it is determined that the current frame image is a still scene image, the focusing information of the current frame image is obtained, and the target still portrait information of the target portrait is captured according to the target face frame information and the focusing information, and the target still portrait image is generated according to the target still portrait information. During the process of taking a portrait image of a target portrait in a static state, the target portrait is captured according to the target face frame information and the focusing information of the target portrait. Since the target face frame information is the real-time information of the target portrait, it is ensured that the camera always captures the target portrait, improving the success rate of taking a portrait image. And it is ensured that focusing is performed on the target face area, avoiding the situation where when focusing on an area outside the target face area, the area image outside the target face area image in the captured portrait image is clearer, ensuring that the target face area image in the captured portrait image is clearer and improving the quality of taking a portrait image.

[0196] It should be noted that the various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other. For device embodiments, since they are basically similar to method embodiments, they are described relatively simply. The relevant parts can refer to the partial description of the method embodiments. For any processing method described in the method embodiments, it can be implemented by the corresponding processing module in the device embodiments, and will not be elaborated one by one in the device embodiments.

[0197] In addition, the functional modules in each embodiment of the present application can be integrated into one processing module, or each module can exist physically alone, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules.

[0198] Please refer to Figure 11 which shows the hardware structure schematic diagram of the electronic device 100 provided in an embodiment of the present application. As Figure 11As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a Subscriber Identification Module (SIM) card interface 195, etc. Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0199] It can be understood that the structure schematically shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0200] Exemplarily, Figure 11 The illustrated processor 110 may include one or more processing units. For example, the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and / or a Neural-Network Processing Unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0201] Among them, the controller may be the nerve center and command center of the electronic device 100. The controller may generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching instructions and executing instructions.

[0202] A memory can also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0203] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an Inter-Integrated Circuit (I2C) interface, an Inter-Integrated Circuit Sound (I2S) interface, a Pulse Code Modulation (PCM) interface, a Universal Asynchronous Receiver / Transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a General Purpose Input / Output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and / or a Universal Serial Bus (USB) interface, etc.

[0204] In some embodiments, the I2C interface is a bidirectional synchronous serial bus, including a Serial Data Line (SDA) and a Serial Clock Line (SCL). The processor 110 may include multiple groups of I2C buses. The processor 110 may be respectively coupled to the touch sensor 180K, the charger, the flashlight, the camera 193, etc. through different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K through the I2C interface, enabling the processor 110 to communicate with the touch sensor 180K through the I2C bus interface to implement the touch function of the electronic device 100.

[0205] In some embodiments, the I2S interface can be used for audio communication. The processor 110 may include multiple groups of I2S buses. The processor 110 may be coupled to the audio module 170 through the I2S bus to implement communication between the processor 110 and the audio module 170.

[0206] In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through the I2S interface to implement the function of answering a call through a Bluetooth headset.

[0207] In some embodiments, the PCM interface may also be used for audio communication to sample, quantize, and encode an analog signal. The audio module 170 and the wireless communication module 160 may be coupled through the PCM bus interface.

[0208] In some embodiments, the audio module 170 may also transmit an audio signal to the wireless communication module 160 through the PCM interface to implement the function of answering a call through a Bluetooth headset. It should be understood that both the I2S interface and the PCM interface can be used for audio communication.

[0209] In some embodiments, the UART interface is a universal serial data bus for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. The UART interface is usually used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.

[0210] In some embodiments, the MIPI interface may be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), etc. The processor 110 and the camera 193 communicate through the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 100.

[0211] In some embodiments, the GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or a data signal. The GPIO interface can be used to connect the processor 110 to the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0212] Exemplarily, the USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect a headset to play audio through the headset. This interface can also be used to connect other electronic devices, such as AR devices, etc.

[0213] It can be understood that the interface connection relationships between the modules illustrated in the embodiments of the present application are only illustrative descriptions and do not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0214] The charging management module 140 is used to receive a charging input from a charger. Among them, the charger can be a wireless charger or a wired charger. In some embodiments of wired charging, the charging management module 140 can receive the charging input of the wired charger through the USB interface 130. In some embodiments of wireless charging, the charging management module 140 can receive the wireless charging input through the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device through the power management module 141.

[0215] The power management module 141 can be used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives the inputs from the battery 142 and / or the charging management module 140 and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, the wireless communication module 160, etc. The power management module 141 can also be used to monitor parameters such as the battery capacity, the number of battery cycles, and the battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be disposed in the same device.

[0216] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, and the baseband processor, etc.

[0217] Antenna 1 and Antenna 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example, Antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0218] The mobile communication module 150 can provide solutions for wireless communication applied to the electronic device 100, such as at least one of the following solutions: the second-generation (2G) mobile communication solution, the third-generation (3G) mobile communication solution, the fourth-generation (4G) mobile communication solution, and the fifth-generation (5G) mobile communication solution. The mobile communication module 150 can include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves through Antenna 1, perform processing such as filtering and amplification on the received electromagnetic waves, and then transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and the amplified signal is converted into electromagnetic waves and radiated out through Antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 can be disposed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 can be disposed in the same device.

[0219] The modulation and demodulation processor can include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Subsequently, the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays an image or video through the display screen 194. In some embodiments, the modulation and demodulation processor can be an independent device. In some other embodiments, the modulation and demodulation processor can be independent of the processor 110 and be disposed in the same device as the mobile communication module 150 or other functional modules.

[0220] The wireless communication module 160 may provide solutions for wireless communications applied to the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite systems (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 may also receive signals to be sent from the processor 110, perform frequency modulation on them, amplify them, and convert them into electromagnetic waves through the antenna 2 for radiation.

[0221] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 of electronic device 100 is coupled to wireless communication module 160, such that electronic device 100 can communicate with a network and other electronic devices through wireless communication technologies. The wireless communication technologies may include at least one of the following communication technologies: Global System For Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wide-band Code Division Multiple Access (WCDMA), Time-division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, IR technology. The GNSS may include at least one of the following positioning technologies: Global Positioning System (GPS), Global Navigation Satellite System (GLONASS), Beidou Navigation Satellite System (BDS), Quasi-zenith Satellite System (QZSS), Satellite Based Augmentation Systems (SBAS).

[0222] Electronic device 100 implements a display function through a GPU, display screen 194, and an application processor, etc. The GPU is a microprocessor for image processing. The GPU is connected to display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.

[0223] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light emitting diode (OLED), an active matrix organic light emitting diode, an active-matrix organic light emitting diode (AMOLED), a flexible light emitting diode (FLED), a Mini-LED, a Micro-LED, a Micro-OLED, a quantum dot light emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.

[0224] The electronic device 100 can implement the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor, etc.

[0225] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera photosensitive element. The optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. The ISP can also optimize parameters such as the exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.

[0226] The camera 193 is used to capture static images or videos. An object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in standard RGB, YUV, etc. formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0227] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.

[0228] The video codec is used to compress or decompress digital videos. The electronic device 100 can support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple coding formats, such as: Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0229] The NPU is a Neural Network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between human brain neurons, it can quickly process input information and can also continuously learn on its own. Through the NPU, applications such as intelligent cognition of the electronic device 100 can be realized, such as: image recognition, face recognition, speech recognition, text understanding, etc.

[0230] The external memory interface 120 can be used to connect an external memory card, such as a Secure Digital (SD) card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement the data storage function. For example, save files such as music and videos in the external memory card.

[0231] The internal memory 121 can be used to store computer-executable program code, and the executable program code includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. Among them, the program storage area can store the operating system, application programs required for at least one function (such as the sound playback function, the image playback function, etc.). The data storage area can store the data created during the use of the electronic device 100 (such as audio data, phone book, etc.). In addition, the internal memory 121 can include high-speed random access memory and can also include non-volatile memory, such as at least one disk storage device, flash memory device, Universal Flash Storage (UFS), etc.

[0232] The electronic device 100 can implement audio functions through the audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and the application processor, etc. For example, music playback, recording, etc.

[0233] The audio module 170 can be used to convert digital audio information into an analog audio signal for output, or to convert an analog audio input into a digital audio signal. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 can be disposed in the processor 110, or some functional modules of the audio module 170 can be disposed in the processor 110.

[0234] The speaker 170A, also known as the "loudspeaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or hands-free calls through the speaker 170A.

[0235] The receiver 170B, also known as the "earpiece", is used to convert an audio electrical signal into a sound signal. When the electronic device 100 answers a call or a voice message, the voice can be listened to by placing the receiver 170B close to the human ear.

[0236] The microphone 170C, also known as the "microphone" or "transmitter", is used to convert a sound signal into an electrical signal. When making a call or sending a voice message, the user can speak by bringing the mouth close to the microphone 170C to input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In some other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also implement a noise reduction function. In some other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C, which can collect sound signals, reduce noise, identify the sound source, and implement functions such as directional recording.

[0237] The headphone jack 170D is used to connect a wired headphone. The headphone jack 170D can be a USB interface 130, or a 3.5 mm Open Mobile Terminal Platform (OMTP) standard interface, or a Cellular Telecommunications Industry Association of the USA (CTIA) standard interface.

[0238] The pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor may include at least two parallel plates having conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example, when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, the instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.

[0239] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., the x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake during shooting. Exemplarily, when the shutter is pressed, the gyroscope sensor 180B detects the angle of jitter of the electronic device 100, calculates the distance that the lens module needs to compensate based on the angle, and enables the lens to cancel the jitter of the electronic device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenarios.

[0240] The barometric pressure sensor 180C is used to measure the barometric pressure. In some embodiments, the electronic device 100 calculates the altitude, aids in positioning, and navigation based on the barometric pressure value measured by the barometric pressure sensor 180C.

[0241] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D, and set features such as automatic flip unlocking according to the detected opening and closing state of the leather case or the opening and closing state of the flip.

[0242] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.

[0243] The distance sensor 180F is used to measure distance. The electronic device 100 can measure distance through infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure distance to achieve fast focusing.

[0244] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses the photodiode to detect the infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear for a call, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used for automatic unlocking and locking of the holster mode and pocket mode.

[0245] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access to application locks, fingerprint photography, fingerprint answering of incoming calls, etc.

[0246] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 executes a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 caused by low temperature. In still other embodiments, when the temperature is lower than yet another threshold, the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.

[0247] The touch sensor 180K, also known as the "touch panel". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also known as the "touch screen". The touch sensor 180K is used to detect touch operations acting thereon or nearby. The touch sensor 180K can transmit the detected touch operation to the application processor 110 to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In some other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, at a different position from that of the display screen 194.

[0248] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the sensed ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance during photography. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touch.

[0249] The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire vibration signals of the vibrating bone mass of the human vocal part. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure pulsation signals. In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone to form a bone conduction earphone. The audio module 170 can parse out voice signals based on the vibration signals of the vibrating bone mass of the human vocal part acquired by the bone conduction sensor 180M to implement the voice function. The application processor 110 can parse out heart rate information based on the blood pressure pulsation signals acquired by the bone conduction sensor 180M to implement the heart rate detection function.

[0250] The keys 190 include a power-on key, volume keys, etc. The keys 190 can be mechanical keys. They can also be touch keys. The electronic device 100 can receive key inputs to generate key signal inputs related to the user settings and function control of the electronic device 100.

[0251] The motor 191 can generate vibration prompts. The motor 191 can be used for incoming call vibration prompts and can also be used for touch vibration feedback. For example, touch operations on different applications (such as photography, audio playback, etc.) can correspond to different vibration feedback effects. Touch operations on different regions of the display screen 194 can also correspond to different vibration feedback effects for the motor 191. Different application scenarios (such as time reminder, receiving information, alarm clock, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0252] The indicator 192 can be an indicator light, which can be used to indicate the charging status, power change, and can also be used to indicate messages, missed calls, notifications, etc.

[0253] The SIM card interface 195 is used to connect the SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation from the electronic device 100. The electronic device 100 can support 1 or N SIM card interfaces 195, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communication. In some embodiments, the electronic device 100 uses an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0254] Please refer to Figure 12 , which shows a functional block diagram of an electronic device 100 according to an embodiment of the present application. As Figure 12 shown, the electronic device 100 includes: at least one processor 110 ( Figure 12 only one processor is shown in the figure), a memory 196, and a computer program 197 stored in the memory 196 and executable on at least one processor 110. When the processor 110 executes the computer program 197, the electronic device 100 implements the steps in any of the above methods.

[0255] Those skilled in the art can understand that Figure 12 is only an example of the electronic device 100 and does not constitute a limitation on the electronic device 100. In practice, the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or different components. For example, it may also include input / output devices, network access devices, etc.

[0256] The processor 110 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0257] The memory 196 may be an internal storage unit of the electronic device 100 in some embodiments, such as the hard disk or memory of the electronic device 100. The memory 196 may also be an external storage device of the electronic device 100 in other embodiments, such as a plug-in hard disk equipped on the electronic device 100, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Optionally, the memory 196 may also include both the internal storage unit and the external storage device of the electronic device 100. The memory 196 is used to store an operating system, application programs, a boot loader, data, and other programs, such as the program code of a computer program. The memory 196 may also be used to temporarily store data that has been output or is to be output.

[0258] It should be noted that for the content such as information interaction and execution process between the above-mentioned devices / units, since it is based on the same concept as the method embodiment of the present application, for its specific functions and the technical effects brought, reference may be specifically made to the method embodiment part, and details are not described herein again.

[0259] Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the above device can be divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiments can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of this application. The specific working processes of the units and modules in the above system can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0260] An embodiment of this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is called by an electronic device, the methods described in the foregoing method embodiments can be implemented.

[0261] An embodiment of this application also provides a computer program product. The computer-readable storage medium stores program code. When the computer program product runs on an electronic device, the electronic device is caused to execute the above-related steps to implement the methods described in the foregoing method embodiments.

[0262] If the above 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. Based on this understanding, to implement all or part of the processes in the above method embodiments of this application, a computer program can be used to instruct relevant hardware to complete. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the foregoing method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the photographing device / electronic device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk, or an optical disc, etc. In some jurisdictions, according to legislation and patent practice, the computer-readable medium cannot be an electrical carrier signal and a telecommunication signal.

[0263] In the above embodiments, the descriptions of the various embodiments each have their own emphasis. For parts not detailed or recorded in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

[0264] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0265] In the embodiments provided in this application, it should be understood that the disclosed apparatus / devices and methods can be implemented in other ways. For example, the apparatus / device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the apparatus or units can be in electrical, mechanical or other forms.

[0266] The units described above as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0267] It should be understood that when used in the specification of this application and the appended claims, the term "comprising" indicates the presence of the 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 their combinations.

[0268] It should also be understood that the term "and / or" used in the specification of this application and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0269] In addition, in the descriptions of the specification of this application and the appended claims, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.

[0270] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that a specific feature, structure, or characteristic described in connection with that embodiment is included in one or more embodiments of this application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different places in this specification do not necessarily all refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized. The terms "comprising", "including", "having" and their variants all mean "including but not limited to", unless otherwise specifically emphasized.

[0271] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit them; although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or equivalently replace some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of this application.

Claims

1. A method for capturing a human portrait, characterized in that, the method for capturing a human portrait includes: Obtaining a current frame image, where the current frame image includes a target human portrait; According to the current frame image, obtaining target face frame information of the target human portrait; When it is determined that the current frame image is a moving scene image, capturing target moving portrait information of the target human portrait according to the target face frame information; Generating a target moving portrait image according to the target moving portrait information.

2. The method for capturing a human portrait according to claim 1, characterized in that, the method for capturing a human portrait further includes: When it is determined that the current frame image is a static scene image, obtaining the focusing information of the current frame image; Capturing target static portrait information of the target human portrait according to the target face frame information and the focusing information; Generating a target static portrait image according to the target static portrait information.

3. The method for capturing a human portrait according to claim 2, characterized in that, the method for capturing a human portrait further includes: When it is determined that the current frame image does not meet a preset condition, determining an adjustment parameter of the camera according to the focusing information, where the preset condition is used to represent the condition that the current frame image is a clear image, and the adjustment parameter is used to represent the parameter for adjusting the camera when adjusting the current frame image to the clear image; Controlling the camera to move according to the adjustment parameter.

4. The method for capturing a human portrait according to claim 3, characterized in that, before determining the adjustment parameter of the camera according to the focusing information when it is determined that the current frame image does not meet the preset condition, the method for capturing a human portrait further includes: Determining the image focal length of the current frame image according to the target face frame information; When the image focal length is not within the current lens focal length range of the camera, determining that the current frame image does not meet the preset condition.

5. The method for capturing a human portrait according to claim 3 or 4, characterized in that, determining the adjustment parameter of the camera according to the focusing information when it is determined that the current frame image does not meet the preset condition includes: When it is determined that the current frame image does not meet the preset condition, obtaining the lens resolution of the camera; Calculating the adjustment parameter of the camera according to the lens resolution and the focusing information.

6. The method for capturing a human portrait according to any one of claims 2 to 5, characterized in that, obtaining the focusing information of the current frame image includes: When it is determined that the target human face corresponding to the target face frame information meets the human portrait capture condition, obtaining a target face frame area according to the target face frame information; Determining the target face frame area as the focusing information of the current frame image.

7. The method for capturing a human portrait according to any one of claims 2 to 6, characterized in that, obtaining the focusing information of the current frame image further includes: When it is determined that the target human face corresponding to the target face frame information does not meet the human portrait capture requirement, obtaining the center point of the target face frame corresponding to the target face frame information; Determining the center point of the target face frame as the focusing information.

8. The portrait capturing method according to any one of claims 2 to 7, characterized in that, before obtaining the focusing information of the current frame image, the portrait capturing method further includes: obtaining target face data according to the target face frame information; when the target face data is greater than or equal to a data threshold, determining that the target face corresponding to the target face frame information meets the portrait capturing requirement.

9. The portrait capturing method according to any one of claims 1 to 8, characterized in that, before capturing the target motion portrait information of the target portrait according to the target face frame information when determining that the current frame image is a motion scene image, the portrait capturing method further includes: obtaining the first optical flow coordinates of a target pixel point in the current frame image; obtaining the second optical flow coordinates of the target pixel point in the next frame image, where the next frame image is the next frame of the current frame image; determining that the current frame image is a motion scene image according to the first optical flow coordinates and the second optical flow coordinates.

10. The portrait capturing method according to claim 9, characterized in that, the determining that the current frame image is a motion scene image according to the first optical flow coordinates and the second optical flow coordinates includes: calculating the coordinate difference between the first optical flow coordinates and the second optical flow coordinates; when the coordinate difference is greater than or equal to a difference threshold, determining that the current frame image is a motion scene image.

11. The portrait capturing method according to claim 9 or 10, characterized in that, the obtaining the first optical flow coordinates of a target pixel point in the current frame image includes: determining the target pixel point in the current frame image; performing optical flow detection on the target pixel point in the current frame image to obtain corresponding first optical flow coordinates.

12. The portrait capturing method according to any one of claims 9 to 11, characterized in that, the obtaining the second optical flow coordinates of the target pixel point in the next frame image includes: obtaining the next frame image of the current frame image to obtain the next frame image; performing optical flow detection on the target pixel point in the next frame image to obtain corresponding second optical flow coordinates.

13. The portrait capturing method according to any one of claims 1 to 12, characterized in that, before obtaining the target face frame information of the target portrait according to the current frame image, the portrait capturing method further includes: performing regional cropping on the current frame image to obtain a cropped frame image; the obtaining the target face frame information of the target portrait according to the current frame image includes: performing face detection on the cropped frame image to obtain the target face frame information of the target portrait.

14. A portrait capturing method, characterized in that, the portrait capturing method includes: obtaining a current frame image, where the current frame image includes a target portrait; obtaining the target face frame information of the target portrait according to the current frame image; when determining that the current frame image is a static scene image, obtaining the focusing information of the current frame image; Capture the target still portrait information of the target portrait according to the target face frame information and the focusing information; Generate a target still portrait image according to the target still portrait information.

15. The portrait capture method according to claim 14, wherein, the portrait capture method further includes: When it is determined that the current frame image does not meet the preset conditions, determine the adjustment parameters of the camera according to the focusing information, where the preset conditions are used to characterize the condition that the current frame image is a clear image, and the adjustment parameters are used to characterize the parameters for adjusting the camera when adjusting the current frame image to the clear image; Control the movement of the camera according to the adjustment parameters.

16. The portrait capture method according to claim 15, wherein, Before determining the adjustment parameters of the camera according to the focusing information when it is determined that the current frame image does not meet the preset conditions, the portrait capture method further includes: Determine the image focal length of the current frame image according to the target face frame information; When the image focal length is not within the current lens focal length range of the camera, determine that the current frame image does not meet the preset conditions.

17. The portrait capture method according to claim 15 or 16, wherein, Determining the adjustment parameters of the camera according to the focusing information when it is determined that the current frame image does not meet the preset conditions includes: When it is determined that the current frame image does not meet the preset conditions, obtain the lens resolution of the camera; Calculate the adjustment parameters of the camera according to the lens resolution and the focusing information.

18. The portrait capture method according to any one of claims 14 to 17, wherein, Obtaining the focusing information of the current frame image includes: When it is determined that the target face corresponding to the target face frame information meets the portrait capture conditions, obtain the target face frame area according to the target face frame information; Determine the target face frame area as the focusing information of the current frame image.

19. The portrait capture method according to any one of claims 14 to 18, wherein, Obtaining the focusing information of the current frame image further includes: When it is determined that the target face does not meet the portrait capture requirements, obtain the center point of the target face frame corresponding to the target face frame information; Determine the center point of the target face frame as the focusing information.

20. The portrait capture method according to any one of claims 14 to 19, wherein, Before obtaining the focusing information of the current frame image, the portrait capture method further includes: Obtain target face data according to the target face frame information; When the target face data is greater than or equal to the data threshold, determine that the target face corresponding to the target face frame information meets the portrait capture requirements.

21. A portrait capture device, wherein, the portrait capture device includes: A first acquisition module for acquiring a current frame image, where the current frame image includes a target portrait; A second acquisition module for acquiring the target face frame information of the target portrait according to the current frame image; A moving portrait information capturing module, configured to capture target moving portrait information of the target portrait according to the target face frame information when it is determined that the current frame image is a moving scene image; A moving portrait image generating module, configured to generate a target moving portrait image according to the target moving portrait information.

22. A portrait capturing device, characterized in that, the portrait capturing device includes: A first obtaining module, configured to obtain a current frame image, where the current frame image includes a target portrait; A second obtaining module, configured to obtain target face frame information of the target portrait according to the current frame image; A third obtaining module, configured to obtain focusing information of the current frame image when it is determined that the current frame image is a static scene image; A static portrait information capturing module, configured to capture target static portrait information of the target portrait according to the target face frame information and the focusing information; A static portrait image generating module, configured to generate a target static portrait image according to the target static portrait information.

23. An electronic device, characterized in that, it includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the electronic device executes the portrait capturing method according to any one of claims 1 to 13 or any one of claims 14 to 20.

24. A computer-readable storage medium, characterized in that, the computer-readable storage medium stores program code, and the program code can be called by an electronic device to execute the portrait capturing method according to any one of claims 1 to 13 or any one of claims 14 to 20.

Citation Information

Patent Citations

  • Adjustingmethod and adjusting device of human face focusing definition

    CN105872363A

  • Face image capturing method, computer readable storage medium and terminal device

    CN109858384A

  • Face tracking method and system

    CN111339936A

  • Target detection method and device based on artificial intelligence

    CN112052837A

  • Image processing method and device, electronic equipment and computer readable storage medium

    CN112085686A