CN109561215B - Method, device, terminal and storage medium for controlling beautifying function - Google Patents
Method, device, terminal and storage medium for controlling beautifying function Download PDFInfo
- Publication number
- CN109561215B CN109561215B CN201811527506.2A CN201811527506A CN109561215B CN 109561215 B CN109561215 B CN 109561215B CN 201811527506 A CN201811527506 A CN 201811527506A CN 109561215 B CN109561215 B CN 109561215B
- Authority
- CN
- China
- Prior art keywords
- beautifying
- function
- treatment
- beautifying function
- image frame
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/77—Retouching; Inpainting; Scratch removal
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/161—Detection; Localisation; Normalisation
- G06V40/166—Detection; Localisation; Normalisation using acquisition arrangements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/168—Feature extraction; Face representation
- G06V40/169—Holistic features and representations, i.e. based on the facial image taken as a whole
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/76—Television signal recording
Landscapes
- Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Signal Processing (AREA)
- General Health & Medical Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Computer Networks & Wireless Communication (AREA)
- Studio Devices (AREA)
- Image Processing (AREA)
Abstract
The disclosure relates to a method, a device, a terminal and a storage medium for controlling a beautifying function, and belongs to the technical field of video shooting. The method comprises the following steps: continuously acquiring shot image frames; determining whether each shot image frame comprises a face image meeting the preset size requirement; and when it is determined that the image frames continuously shot within the preset time length do not comprise the face images meeting the preset size requirement and the beautifying function is in an open state, closing the beautifying function and stopping beautifying the subsequently shot image frames. By adopting the method and the device, the shot video can be clearer.
Description
Technical Field
The present disclosure relates to the field of video shooting technologies, and in particular, to a method, an apparatus, a terminal, and a storage medium for controlling a beauty function.
Background
Nowadays, video shooting is very common in people's lives. In order to make the effect of the shot video better, most camera-type applications default to the user to open the beautifying function. However, sometimes it is not necessary to activate the beauty function, such as when a landscape is photographed. The beautifying function is started under the condition that beautifying processing is not needed, the calculated amount is increased, and the shooting definition is influenced.
In the related art, a switch button is provided on a photographing interface, and a beauty function is turned on or off by manually clicking the switch button. Therefore, under the condition that the beautifying function needs to be started, the user clicks the switch button to start the beautifying function. Under the condition that the beautifying function is not required to be started, the user clicks the switch button to turn off the beautifying function.
According to the technical scheme in the related art, the user needs to manually turn on and turn off the beautifying function, but the user often turns on the beautifying function without beautifying because the user does not know when to turn off the beautifying function or forgets to turn off the beautifying function, so that the calculated amount is increased, and the shooting definition is influenced.
Disclosure of Invention
The present disclosure provides a method, an apparatus, a terminal, and a storage medium for controlling a beauty function, which can overcome a technical problem that a user often turns on the beauty function without performing beauty processing.
According to a first aspect of the embodiments of the present disclosure, there is provided a method of controlling a beauty function, including:
continuously acquiring shot image frames;
determining whether each shot image frame comprises a face image meeting the preset size requirement;
and when it is determined that the image frames continuously shot within the preset time length do not comprise the face images meeting the preset size requirement and the beautifying function is in an open state, closing the beautifying function and stopping beautifying the subsequently shot image frames.
Optionally, when it is determined that none of the image frames continuously shot within the preset duration includes a face image meeting a preset size requirement, and the beautifying function is in an on state, the beautifying function is turned off, and after the beautifying processing on the subsequently shot image frames is stopped, the method further includes:
and displaying closing prompt information on a shooting interface, wherein the closing prompt information is used for prompting that the current beautifying function is closed.
Optionally, after determining whether each captured image frame includes a face image meeting a preset size requirement, the method further includes:
and when any image frame is determined to comprise a face image meeting the preset size requirement and the beautifying function is in a closed state, starting the beautifying function, and performing beautifying processing on any image frame and subsequently shot image frames.
Optionally, when it is determined that any image frame includes a face image meeting a preset size requirement and the beautifying function is in an off state, the method further includes the following steps of, after performing beautifying processing on the image frame and subsequently captured image frames:
and displaying starting prompt information on a shooting interface, wherein the starting prompt information is used for prompting that the current beautifying function is started.
Optionally, the performing a beautifying process on any image frame and the subsequently captured image frames includes:
and performing beautifying processing on image areas corresponding to the face images in any image frame and the subsequently shot image frames.
Optionally, the determining whether each captured image frame includes a face image meeting a preset size requirement includes:
after receiving an automatic control instruction of a beautifying function, determining whether each shot image frame comprises a face image meeting the preset size requirement;
optionally, the method further includes:
and after receiving a beautifying function closing instruction, stopping the processing of determining whether each shot image frame comprises a face image meeting the preset size requirement, and closing the beautifying function if the beautifying function is in an opening state.
Optionally, the beautifying treatment comprises one or more of whitening treatment, skin polishing treatment, face thinning treatment, acne removing treatment, sharpening treatment, skin tendering treatment, pupil beautifying treatment and makeup treatment.
According to a second aspect of the embodiments of the present disclosure, there is provided an apparatus for controlling a beauty function, comprising
An acquisition unit configured to continuously acquire captured image frames;
a determining unit configured to determine whether a face image meeting a preset size requirement is included in each captured image frame;
and the closing unit is configured to close the beautifying function and stop performing beautifying processing on subsequently shot image frames when it is determined that none of the continuously shot image frames in the preset time length comprises a face image meeting the preset size requirement and the beautifying function is in an open state.
Optionally, the apparatus further comprises:
and the closing prompting unit is configured to display closing prompting information on the shooting interface, wherein the closing prompting information is used for prompting that the current beautifying function is closed.
Optionally, the apparatus further comprises:
and the opening unit is configured to open the beautifying function and perform beautifying processing on any image frame and subsequently shot image frames when the beautifying function is in an off state and the beautifying function is determined to comprise a face image meeting the preset size requirement.
Optionally, the apparatus further comprises:
the starting prompting unit is configured to display starting prompting information on a shooting interface, wherein the starting prompting information is used for prompting that the current beautifying function is started.
Optionally, the starting unit is configured to:
and performing beautifying processing on image areas corresponding to the face images in any image frame and the subsequently shot image frames.
Optionally, the determining unit is configured to:
and after receiving the automatic control instruction of the beautifying function, determining whether each shot image frame comprises a face image meeting the preset size requirement.
Optionally, the closing unit is further configured to:
and after receiving a beautifying function closing instruction, stopping the processing of determining whether each shot image frame comprises a face image meeting the preset size requirement, and closing the beautifying function if the beautifying function is in an opening state.
Optionally, the beautifying treatment comprises one or more of whitening treatment, skin polishing treatment, face thinning treatment, acne removing treatment, sharpening treatment, skin tendering treatment, pupil beautifying treatment and makeup treatment.
According to a third aspect of the embodiments of the present disclosure, there is provided a terminal, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
the method of the first aspect of the embodiments of the present disclosure is performed.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium, wherein instructions, when executed by a processor of a mobile terminal, enable the mobile terminal to perform the method of the first aspect of the embodiments of the present disclosure.
According to a fifth aspect of embodiments of the present disclosure, there is provided an application program comprising one or more instructions executable by a processor of a server to perform the method of the first aspect of embodiments of the present disclosure.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
in the embodiment of the disclosure, when a user shoots a non-portrait video when the beautifying function is in an on state, and when the terminal determines that none of the image frames continuously shot within a preset time length includes a face image meeting a preset size requirement, the terminal closes the beautifying function in time, and stops beautifying the subsequently shot image frames. Therefore, the terminal can automatically close the beautifying function in time under the condition that the beautifying processing is not needed, the calculated amount cannot be increased, and the shooting definition cannot be influenced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a flow chart illustrating a method of controlling a beauty function according to an exemplary embodiment.
Fig. 2 is a block diagram illustrating an apparatus for controlling a beauty function according to an example embodiment.
Fig. 3 is a block diagram illustrating a structure of a terminal according to an exemplary embodiment.
Fig. 4 is a schematic diagram illustrating a video recording interface according to an example embodiment.
Fig. 5 is a schematic diagram illustrating a video recording interface according to an example embodiment.
Fig. 6 is a schematic diagram illustrating a video recording interface according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The embodiment of the disclosure provides a method for controlling a beautifying function, which can be implemented by a terminal, wherein the terminal can be a mobile terminal such as a mobile phone, a tablet computer or other video recording devices.
The terminal is provided with an application program for shooting videos, and the application program can be carried by the terminal or downloaded by a user. The application program has a beautifying function. When a user wants to shoot a video, the user clicks a recording button to enter a shooting view-finding interface, and then the user can click a starting button to enter a video recording interface. The terminal can decide to turn on or turn off the beautifying function according to the information of the face image in the image frame shot by the camera. After the recording is finished, the user can click the storage button to store the recorded video, and can click the release button to release the recorded video to the network.
Fig. 1 is a flowchart illustrating a method of controlling a beauty function, as shown in fig. 1, for use in a terminal, according to an exemplary embodiment, including the following steps.
In step 101, captured image frames are continuously acquired.
The image frames shot are image frames shot by a camera on the terminal.
In implementation, when a user wants to record a video, the user can open an application program for shooting the video, click a recording button to enter a shooting view interface, and at the moment, the terminal acquires an image frame shot by the camera, and the image frame is displayed on the shooting view interface after being transferred to a subsequent step for processing every time one image frame is acquired. When a user wants to start recording a video, the user clicks a start button to enter a video recording interface, at the moment, the terminal acquires an image frame shot by the camera, and the image frame is displayed on the video recording interface after being transferred to the subsequent steps for processing every time one image frame is acquired. The terminal continuously acquires image frames shot by the camera, and transfers to the subsequent steps for processing every time one image frame is acquired, and then the processed image frame is displayed on a shooting view-finding interface or a video recording interface.
In step 102, it is determined whether a face image meeting a preset size requirement is included in each captured image frame.
In implementation, after each captured image frame is obtained, the terminal uses the face recognition library to perform face recognition on the image frame, and when the face image cannot be recognized in the image frame, it is determined that the image frame does not include the face image meeting the size requirement. And when the face image is identified in the image frame, judging whether the size of the face image meets the preset size requirement.
The preset size requirement may be a minimum size requirement for the face image. Based on this minimum size requirement, it is possible to prevent the image frame containing only the face image of an excessively small size from being subjected to the beauty processing. The face image with the small size is processed, human eyes cannot see the effect, and the calculation amount of the terminal is increased. Moreover, when the size of the face image is too small, the user is not always shooting the face image video, and the beautifying function does not need to be turned on.
The preset size requirement may be a minimum area requirement for the face image, or a minimum number of pixel points included in the face image. The preset size requirement can also make requirements on the area of the face image and the number of contained pixel points, namely the area of the face image and the contained pixel points are required to reach a minimum value.
When the preset size requirement is the minimum area requirement on the face image, if only one face image is identified in the shot image frame, judging whether the area of the face image in the shot image frame is larger than the preset minimum area, and if not, determining that the face image meeting the preset size requirement is not included in the image frame. And if the area of the face image in the shot image frame is larger than the minimum area, determining that the image frame comprises the face image meeting the preset size requirement. When a plurality of face images are identified in a shot image frame, the area of each face image is sequentially compared with the minimum area, when the area of one face image is larger than the minimum area, the comparison of the area of the subsequent face image with the minimum area is stopped, and the image frame is determined to comprise the face image meeting the preset size requirement. And when the areas of all the face images in the shot image frame are smaller than or equal to the minimum area, determining that the image frame does not include the face images meeting the preset size requirement.
When the preset size requirement is the requirement for the minimum number of pixel points contained in the face image, if only one face image is identified in the shot image frame, whether the number of the pixel points contained in the face image in the shot image frame is greater than the preset minimum number is judged, and if the number of the pixel points contained in the face image in the shot image frame is not greater than the preset minimum number, the face image meeting the preset size requirement is determined not to be contained in the image frame. And if the number of pixel points contained in the face image in the shot image frame is more than the minimum number, determining that the image frame comprises the face image meeting the preset size requirement. When a plurality of face images are identified in a shot image frame, the number of pixel points contained in each face image is sequentially compared with the minimum number, when the number of the pixel points contained in one face image is greater than the minimum number, the comparison of the number of the pixel points contained in the subsequent face image with the minimum number is stopped, and the face image meeting the preset size requirement in the image frame is determined. And when the number of pixel points contained in all the face images in the shot image frame is less than or equal to the minimum number, determining that the face images meeting the preset size requirement are not included in the image frame.
When the preset size requirement requires that the area of the face image and the contained pixel points both reach a minimum value, if only one face image is identified in the shot image frame, firstly, whether the number of the pixel points contained in the face image in the shot image frame is greater than a preset minimum number is judged, and if not, the face image meeting the preset size requirement is determined not to be contained in the image frame. If the number of the pixel points contained in the face image in the shot image frame is larger than the minimum number, continuously judging whether the area of the face image in the shot image frame is larger than a preset minimum area, and if not, determining that the face image meeting the preset size requirement is not contained in the image frame. And when the number of pixel points contained in the face image in the shot image frame is more than the minimum number and the area is more than the minimum area, determining that the image frame comprises the face image meeting the preset size requirement. If a plurality of face images are identified in the shot image frame, the judgment is sequentially carried out on pixel points included in each face image and the area of the face image, when the number of the pixel points included in one face image is larger than the minimum number and the area is larger than the minimum area, the judgment of the subsequent face image is stopped, and the face image meeting the preset size requirement is determined to be included in the image frame. And when the number of pixel points contained in all the face images in the shot image frame and the area of the face images are not simultaneously larger than the minimum value, determining that the face images meeting the preset size requirement are not included in the image frame.
When the preset size requirement requires that the area of the face image and the contained pixel points both reach a minimum value, if only one face image is identified in the shot image frame, whether the area of the face image in the shot image frame is larger than the minimum area or not can be judged, and if the area of the face image in the shot image frame is not larger than the minimum area, the face image meeting the preset size requirement is determined not to be included in the image frame. If the area of the face image in the shot image frame is larger than the minimum area, whether the number of pixel points contained in the face image in the shot image frame is larger than the minimum number or not is continuously judged, and if the number of pixel points contained in the face image in the shot image frame is not larger than the minimum number, the face image meeting the preset size requirement is determined not to be contained in the image frame. And when the area of the face image in the shot image frame is larger than the minimum area and the number of the contained pixel points is larger than the minimum number, determining that the image frame comprises the face image meeting the preset size requirement. If a plurality of face images are identified in the shot image frame, the number of pixel points included in each face image and the area of the face image are sequentially judged, when the number of the pixel points included in one face image is larger than the minimum number and the area is larger than the minimum area, the judgment of the subsequent face image is stopped, and the face image meeting the preset size requirement is determined to be included in the image frame. And when the number of pixel points contained in all the face images in the shot image frame and the area of the face images are not simultaneously larger than the minimum value, determining that the face images meeting the preset size requirement are not included in the image frame.
Optionally, the on-off of the beautifying processing can be controlled through a switch control, and the processing of the process is performed only when the switch control is operated to be opened, and the corresponding processing process can be as follows: after receiving an automatic control instruction of a beautifying function, determining whether each shot image frame comprises a face image meeting the preset size requirement; and after receiving a beautifying function closing instruction, stopping the processing of determining whether each shot image frame comprises a face image meeting the preset size requirement, and closing the beautifying function if the beautifying function is in an opening state.
In implementation, a switch control of the beauty function is arranged on the terminal, and the switch control can be displayed in a shooting and framing interface and a video recording interface. The user can click the switch control to correspondingly control the beauty function. When a user wants to start the beauty function, the user clicks the switch control to start the beauty automatic setting function, at the moment, the terminal receives an automatic control instruction of the beauty function, the terminal does not start the beauty function immediately, but starts to determine whether each shot image frame comprises a face image meeting the preset size requirement, and determines whether to start the beauty function based on a determined result.
When a user wants to close the beautifying function, the user clicks the switch control to close the beautifying function, at the moment, the terminal immediately stops determining whether each shot image frame comprises a face image meeting the preset size requirement, if the beautifying function is in an open state, the terminal immediately closes the beautifying function, and if the beautifying function is in a closed state, the terminal maintains the beautifying function in the closed state.
In step 103, when it is determined that none of the image frames continuously shot within the preset duration includes a face image meeting the preset size requirement and the beautifying function is in an on state, the beautifying function is turned off, and the beautifying processing on the subsequently shot image frames is stopped.
Wherein the skin caring treatment comprises one or more of whitening treatment, skin grinding treatment, face thinning treatment, acne removing treatment, sharpening treatment, skin tendering treatment, pupil beautifying treatment and make-up treatment.
In implementation, when it is determined that a face image meeting the preset size requirement is included in the captured image frames, the terminal may determine whether a time interval from a last time when the captured image frames including the face image meeting the preset size requirement is detected is longer than a preset time interval. And when the time length is judged to be greater than the preset time length and the beautifying function is in the opening state, the terminal closes the beautifying function. And when the time length is judged to be greater than the preset time length and the beautifying function is in the closed state, the terminal maintains the beautifying function in the closed state. And when the duration is judged to be less than the preset duration, the terminal maintains the existing state of the beautifying function.
In the embodiment of the disclosure, when a user shoots a non-portrait video when the beautifying function is in an on state, and when the terminal determines that none of the image frames continuously shot within a preset time length includes a face image meeting a preset size requirement, the terminal closes the beautifying function in time, and stops beautifying the subsequently shot image frames. Therefore, the terminal can automatically close the beautifying function in time under the condition that the beautifying processing is not needed, the calculated amount cannot be increased, and the shooting definition cannot be influenced.
The preset duration is used for preventing pictures in the shooting view interface and the video recording interface from frequently flickering. In a shot image frame, sometimes a face image meeting the preset size requirement frequently appears and disappears, if the face image meeting the preset size requirement disappears, the beautifying function is immediately closed, and in this case, pictures in a shooting view interface or a video recording interface frequently flicker. Therefore, when the face image meeting the preset size requirement cannot be detected in all the image frames shot within the preset time, the beautifying function is closed, and the frequent flicker of the image can be prevented. The preset time is not suitable for being too long, otherwise, the beautifying function cannot be closed in time, and the effect of controlling the beautifying function cannot be achieved. The preset time is not too short, otherwise, the effect of preventing the picture from frequently flickering is not achieved. Optionally, the preset time period may be 2 s.
Optionally, after the beauty function is switched from the on state to the off state, a closing prompt message may be displayed on the shooting view interface and the video recording interface to prompt the user terminal that the beauty function is closed. The corresponding process may be as follows: and when it is determined that the image frames continuously shot within the preset time length do not comprise the face images meeting the preset size requirement and the beautifying function is in an open state, closing the beautifying function, stopping beautifying the subsequently shot image frames, and displaying closing prompt information on a shooting interface.
Wherein, the close prompt message is used for prompting that the current beautifying function is closed. The shooting interface can be a shooting view interface or a video recording interface.
In implementation, the close prompt message may be an image message or a text message. The display duration of the closing prompt message can be preset, and in order to prevent the closing prompt message from influencing the normal shooting of the user on the shooting view interface or the video recording interface, the preset display duration is not suitable to be too long. Optionally, the preset display time period may be 2 s. And when the self-beautifying function is switched from the open state to the closed state within the preset display duration, immediately stopping displaying the closing prompt message if the self-beautifying function is switched from the closed state to the open state.
And under the condition that the beautifying function is in the closed state, closing prompt information can be always displayed on the shooting view interface or the video recording interface, so that the user is reminded that the beautifying function is in the closed state at the moment. In order to prevent the closing prompt message from affecting the normal shooting of the user on the shooting view interface or the video recording interface, the closing prompt message can be displayed on the shooting interface or semi-transparently displayed on the shooting interface. As shown in fig. 4, the close prompt message "the beauty function is closed" is displayed in the lower right corner of the shooting interface.
Optionally, in order to ensure that the face images meeting the preset size requirement can be beautified, when the terminal detects the face images meeting the preset size requirement, the face beautifying function should be immediately started. The corresponding process may be as follows: and when any image frame is determined to comprise a face image meeting the preset size requirement and the beautifying function is in a closed state, starting the beautifying function, and performing beautifying processing on the image frame and the subsequently shot image frames.
In implementation, when a face image meeting the preset size requirement is detected in a shot image frame, if the beautifying function is in an off state, the beautifying function is immediately turned on, and the current time is determined as the time when the face image meeting the preset size requirement is detected in the shot image frame last time. And if the beautifying function is in the opening state, maintaining the beautifying function in the opening state, and determining the current time as the time when the face image meeting the preset size requirement is detected to be included in the shot image frame last time.
Optionally, in order to obtain a better shooting effect, only the face image in the image frame may be subjected to a beautifying process, and the corresponding process may be as follows: and when any image frame is determined to comprise the face image meeting the preset size requirement and the beautifying function is in a closed state, the beautifying function is started, and the beautifying processing is carried out on the image area corresponding to the face image in any image frame and the subsequently shot image frames.
In implementation, after detecting that a captured image frame includes a face image meeting a preset size requirement, an image area corresponding to the face image in the image frame is obtained through a face recognition library, where the image area may be a rectangular area, and then, only the image area corresponding to the face image in the image frame is subjected to beautifying processing.
When a plurality of face images are identified in a shot image frame, whether the size of each face image meets the preset size requirement or not needs to be judged, then, corresponding areas of all the face images meeting the preset size requirement in the image frame are obtained, and then, only the areas are subjected to beautifying processing. As shown in fig. 5, the terminal recognizes three face images, wherein the sizes of two face images meet the preset size requirement, so that the image areas corresponding to the two face images are subjected to the beautifying processing, and the other face image whose size does not meet the preset size requirement is not subjected to the beautifying processing.
Based on the setting, the face image in the video is more beautiful in beauty treatment, and the non-face image is more natural without beauty treatment.
Optionally, after the beautifying function is switched from the off state to the on state, an on prompt message may be displayed on the shooting view interface and the video recording interface to prompt the user terminal that the beautifying function is already on. The corresponding process may be as follows: and when any image frame is determined to comprise a face image meeting the preset size requirement and the beautifying function is in a closed state, starting the beautifying function, carrying out beautifying processing on any image frame and subsequently shot image frames, and displaying start prompt information on a shooting interface.
Wherein, the starting prompt message is used for prompting that the current beautifying function is closed. The shooting interface can be a shooting view interface or a video recording interface.
In implementation, the start prompt message may be image message or text message, and the type of the start prompt message may be consistent with that of the close prompt message. The display duration of the start prompt message can be preset, and in order to prevent the start prompt message from influencing the normal shooting of a user on a shooting view interface or a video recording interface, the preset display duration is not suitable to be too long. Optionally, the preset display time period may be 2 s. And when the self-beautifying function is switched from the closed state to the open state within the preset display duration, immediately stopping displaying the opening prompt message if the self-beautifying function is switched from the open state to the closed state.
And under the condition that the beautifying function is in the open state, always displaying the open prompt message on the shooting view interface or the video recording interface, thereby reminding the user that the beautifying function is in the open state at the moment. In order to prevent the start prompt message from influencing the normal shooting of the user on the shooting view interface or the video recording interface, the start prompt message can be displayed at the corner of the shooting interface or semi-transparently displayed on the shooting interface. The display modes of the closing prompt message and the opening prompt message can be consistent. As shown in fig. 6, the start prompt message "the beauty function is turned on" is displayed in the lower right corner of the shooting interface.
Fig. 2 is a block diagram illustrating an apparatus for controlling a beauty function according to an example embodiment. Referring to fig. 2, the apparatus includes an acquisition unit 201, a determination unit 202, and a shutdown unit 203.
An acquisition unit 201 configured to continuously acquire captured image frames;
a determination unit 202 configured to determine whether a face image meeting a preset size requirement is included in each captured image frame;
and the closing unit 203 is configured to close the beautifying function and stop performing beautifying processing on subsequently shot image frames when it is determined that none of the continuously shot image frames in the preset time period includes a face image meeting the preset size requirement and the beautifying function is in an open state.
Optionally, the apparatus further comprises:
a close prompting unit 204 configured to display close prompting information on the shooting interface, wherein the close prompting information is used for prompting that the current beautifying function is closed.
Optionally, the apparatus further comprises:
the opening unit 205 is configured to, when it is determined that any image frame includes a face image meeting a preset size requirement and the beautifying function is in an off state, open the beautifying function and perform beautifying processing on the image frame and subsequently captured image frames.
Optionally, the apparatus further comprises:
the starting prompting unit 206 is configured to display starting prompting information on the shooting interface, wherein the starting prompting information is used for prompting that the current beautifying function is started.
Optionally, the starting unit is configured to:
and performing beautifying processing on image areas corresponding to the face images in any image frame and the subsequently shot image frames.
Optionally, the determining unit 202 is configured to:
and after receiving the automatic control instruction of the beautifying function, determining whether each shot image frame comprises a face image meeting the preset size requirement.
Optionally, the closing unit 203 is further configured to:
and after receiving a beautifying function closing instruction, stopping the processing of determining whether each shot image frame comprises a face image meeting the preset size requirement, and closing the beautifying function if the beautifying function is in an opening state.
Optionally, the beautifying treatment comprises one or more of whitening treatment, skin polishing treatment, face thinning treatment, acne removing treatment, sharpening treatment, skin tendering treatment, pupil beautifying treatment and makeup treatment.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 3 is a block diagram illustrating a structure of a terminal according to an exemplary embodiment. The terminal 300 may be a portable mobile terminal such as: smart phones, tablet computers. The terminal 300 may also be referred to by other names such as user equipment, portable terminal, etc.
Generally, the terminal 300 includes: a processor 301 and a memory 302.
The processor 301 may include one or more processing cores, such as a 4-core processor, a 9-core processor, and so on. The processor 301 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 301 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 301 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 301 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
In some embodiments, the terminal 300 may further include: a peripheral interface 303 and at least one peripheral. Specifically, the peripheral device includes: at least one of radio frequency circuitry 304, touch display screen 305, camera 306, audio circuitry 307, positioning components 308, and power supply 309.
The peripheral interface 303 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 301 and the memory 302. In some embodiments, processor 301, memory 302, and peripheral interface 303 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 301, the memory 302 and the peripheral interface 303 may be implemented on a separate chip or circuit board, which is not limited by the embodiment.
The Radio Frequency circuit 304 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 304 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 304 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 304 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 304 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: the world wide web, metropolitan area networks, intranets, generations of mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 304 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The touch display screen 305 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. Touch display screen 305 also has the ability to capture touch signals on or over the surface of touch display screen 305. The touch signal may be input to the processor 301 as a control signal for processing. The touch screen display 305 is used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the touch display screen 305 may be one, providing the front panel of the terminal 300; in other embodiments, the touch display screen 305 may be at least two, respectively disposed on different surfaces of the terminal 300 or in a folded design; in still other embodiments, the touch display 305 may be a flexible display disposed on a curved surface or on a folded surface of the terminal 300. Even more, the touch screen display 305 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The touch Display screen 305 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and the like.
The camera assembly 306 is used to capture images or video. Optionally, camera assembly 306 includes a front camera and a rear camera. Generally, a front camera is used for realizing video call or self-shooting, and a rear camera is used for realizing shooting of pictures or videos. In some embodiments, the number of the rear cameras is at least two, and each of the rear cameras is any one of a main camera, a depth-of-field camera and a wide-angle camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize a panoramic shooting function and a VR (Virtual Reality) shooting function. In some embodiments, camera assembly 306 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The positioning component 308 is used to locate the current geographic Location of the terminal 300 to implement navigation or LBS (Location Based Service). The Positioning component 308 may be a Positioning component based on the Global Positioning System (GPS) in the united states, the beidou System in china, or the galileo System in russia.
The power supply 309 is used to supply power to the various components in the terminal 300. The power source 309 may be alternating current, direct current, disposable batteries, or rechargeable batteries. When the power source 309 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the terminal 300 also includes one or more sensors 310. The one or more sensors 310 include, but are not limited to: acceleration sensor 311, gyro sensor 312, pressure sensor 313, fingerprint sensor 314, optical sensor 315, and proximity sensor 316.
The acceleration sensor 311 may detect the magnitude of acceleration in three coordinate axes of a coordinate system established with the terminal 300. For example, the acceleration sensor 311 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 301 may control the touch display screen 305 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 311. The acceleration sensor 311 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 312 may detect a body direction and a rotation angle of the terminal 300, and the gyro sensor 312 may cooperate with the acceleration sensor 311 to acquire a 3D motion of the user on the terminal 300. The processor 301 may implement the following functions according to the data collected by the gyro sensor 312: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
The pressure sensor 313 may be disposed on a side bezel of the terminal 300 and/or an underlying layer of the touch display screen 305. When the pressure sensor 313 is disposed at the side frame of the terminal 300, a user's grip signal of the terminal 300 can be detected, and left-right hand recognition or shortcut operation can be performed according to the grip signal. When the pressure sensor 313 is disposed at the lower layer of the touch display screen 305, the operability control on the UI interface can be controlled according to the pressure operation of the user on the touch display screen 305. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 314 is used for collecting a fingerprint of a user to identify the identity of the user according to the collected fingerprint. Upon identifying that the user's identity is a trusted identity, processor 301 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings, etc. The fingerprint sensor 314 may be disposed on the front, back, or side of the terminal 300. When a physical button or a vendor Logo is provided on the terminal 300, the fingerprint sensor 314 may be integrated with the physical button or the vendor Logo.
The optical sensor 315 is used to collect the ambient light intensity. In one embodiment, the processor 301 may control the display brightness of the touch screen display 305 based on the ambient light intensity collected by the optical sensor 315. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 305 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 305 is turned down. In another embodiment, the processor 301 may also dynamically adjust the shooting parameters of the camera head assembly 306 according to the ambient light intensity collected by the optical sensor 315.
A proximity sensor 316, also known as a distance sensor, is typically provided on the front face of the terminal 300. The proximity sensor 316 is used to collect the distance between the user and the front surface of the terminal 300. In one embodiment, when the proximity sensor 316 detects that the distance between the user and the front surface of the terminal 300 gradually decreases, the processor 301 controls the touch display screen 305 to switch from the bright screen state to the dark screen state; when the proximity sensor 316 detects that the distance between the user and the front surface of the terminal 300 gradually becomes larger, the processor 301 controls the touch display screen 305 to switch from the breath screen state to the bright screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 3 is not intended to be limiting of terminal 300 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
In an embodiment of the present disclosure, a non-transitory computer-readable storage medium is also provided, and when executed by a processor of a server, the instructions in the storage medium enable the server to execute the steps of the method for controlling a beauty function.
In an embodiment of the present disclosure, an application program is further provided, where the application program includes one or more instructions that can be executed by a processor of a server to perform the steps of the method for controlling a beauty function.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.
Claims (14)
1. A method for controlling a beautifying function is applied to a terminal, and a switch control of the beautifying function is arranged on the terminal, and the method comprises the following steps:
continuously acquiring shot image frames;
when the clicking operation of the user on the switch control is detected, an automatic control instruction of the beautifying function is received, the terminal does not immediately start the beautifying function, and starts to determine whether each shot image frame comprises a face image meeting the preset size requirement;
when any image frame is determined to comprise a face image meeting the preset size requirement and the beautifying function is in a closed state, the beautifying function is started, and the beautifying processing is carried out on any image frame and the subsequently shot image frames;
the method further comprises the following steps:
and when it is determined that the image frames continuously shot within the preset time length do not comprise the face images meeting the preset size requirement and the beautifying function is in an open state, closing the beautifying function and stopping beautifying the subsequently shot image frames.
2. The method of claim 1, wherein when it is determined that none of the image frames continuously captured within the preset duration includes a face image meeting a preset size requirement and the beautifying function is in an on state, the method further comprises:
and displaying closing prompt information on a shooting interface, wherein the closing prompt information is used for prompting that the current beautifying function is closed.
3. The method of claim 1, wherein when it is determined that any image frame includes a face image meeting a preset size requirement and the beauty function is in an off state, the method further comprises the following steps:
and displaying starting prompt information on a shooting interface, wherein the starting prompt information is used for prompting that the current beautifying function is started.
4. The method for controlling a beauty function according to claim 1, wherein the beautifying processing of the any image frame and the image frames taken subsequently comprises:
and performing beautifying processing on image areas corresponding to the face images in any image frame and the subsequently shot image frames.
5. The method of controlling a beauty function of claim 1, further comprising:
and after receiving a beautifying function closing instruction, stopping the processing of determining whether each shot image frame comprises a face image meeting the preset size requirement, and closing the beautifying function if the beautifying function is in an opening state.
6. The method of claim 1, wherein the beautifying treatment comprises one or more of a whitening treatment, a dermabrasion treatment, a face thinning treatment, an acne treatment, a sharpening treatment, a skin rejuvenation treatment, a pupil beautifying treatment, and a makeup treatment.
7. The utility model provides a device for controlling beauty function, its characterized in that is applied to the terminal, be provided with the switch controlling part of beauty function on the terminal, the device includes:
an acquisition unit configured to continuously acquire captured image frames;
the determining unit is configured to receive an automatic control instruction of the beautifying function when the clicking operation of the switch control by the user is detected, not immediately start the beautifying function, and start to determine whether each shot image frame comprises a face image meeting the preset size requirement;
the opening unit is configured to open the beautifying function and perform beautifying processing on any image frame and subsequently shot image frames when the beautifying function is in a closed state and the beautifying function is determined to comprise a face image meeting the preset size requirement;
and the closing unit is configured to close the beautifying function and stop performing beautifying processing on subsequently shot image frames when it is determined that none of the continuously shot image frames in the preset time length comprises a face image meeting the preset size requirement and the beautifying function is in an open state.
8. The apparatus for controlling beauty functions of claim 7, further comprising:
and the closing prompting unit is configured to display closing prompting information on the shooting interface, wherein the closing prompting information is used for prompting that the current beautifying function is closed.
9. The apparatus for controlling beauty functions of claim 7, further comprising:
the starting prompting unit is configured to display starting prompting information on a shooting interface, wherein the starting prompting information is used for prompting that the current beautifying function is started.
10. The apparatus for controlling a beauty function according to claim 7, wherein the opening unit is configured to:
and performing beautifying processing on image areas corresponding to the face images in any image frame and the subsequently shot image frames.
11. The apparatus for controlling a beauty function of claim 7, wherein the closing unit is further configured to:
and after receiving a beautifying function closing instruction, stopping the processing of determining whether each shot image frame comprises a face image meeting the preset size requirement, and closing the beautifying function if the beautifying function is in an opening state.
12. The device for controlling beauty functions according to claim 7, wherein the beauty treatment comprises one or more of a whitening treatment, a dermabrasion treatment, a face thinning treatment, an acne removal treatment, a sharpening treatment, a skin tendering treatment, a pupil treatment and a makeup treatment.
13. A terminal, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
performing the method of any one of claims 1-6.
14. A non-transitory computer readable storage medium having instructions therein which, when executed by a processor of a mobile terminal, enable the mobile terminal to perform the method of any of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811527506.2A CN109561215B (en) | 2018-12-13 | 2018-12-13 | Method, device, terminal and storage medium for controlling beautifying function |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811527506.2A CN109561215B (en) | 2018-12-13 | 2018-12-13 | Method, device, terminal and storage medium for controlling beautifying function |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109561215A CN109561215A (en) | 2019-04-02 |
CN109561215B true CN109561215B (en) | 2021-03-23 |
Family
ID=65869959
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811527506.2A Active CN109561215B (en) | 2018-12-13 | 2018-12-13 | Method, device, terminal and storage medium for controlling beautifying function |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109561215B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112346606A (en) * | 2019-08-06 | 2021-02-09 | 北京小米移动软件有限公司 | Picture processing method and device and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106354303A (en) * | 2016-08-23 | 2017-01-25 | 维沃移动通信有限公司 | Photographed method of mobile terminal and mobile terminal |
CN107493504A (en) * | 2017-09-19 | 2017-12-19 | 北京奇虎科技有限公司 | Video data real-time processing method, device and computing device based on layering |
CN107862274A (en) * | 2017-10-31 | 2018-03-30 | 广东欧珀移动通信有限公司 | Beautifying method, device, electronic device and computer-readable storage medium |
WO2018182130A1 (en) * | 2017-03-31 | 2018-10-04 | 주식회사 에프앤디파트너스 | System and provision method for self-beauty app platform using ar |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI465825B (en) * | 2012-06-27 | 2014-12-21 | Acer Inc | Image capturing device and capturing method with light assistance |
CN103841323A (en) * | 2014-02-20 | 2014-06-04 | 小米科技有限责任公司 | Shooting parameter allocation method and device and terminal device |
CN106326849A (en) * | 2016-08-17 | 2017-01-11 | 北京小米移动软件有限公司 | Beauty processing method and device |
CN107231529A (en) * | 2017-06-30 | 2017-10-03 | 努比亚技术有限公司 | Image processing method, mobile terminal and storage medium |
-
2018
- 2018-12-13 CN CN201811527506.2A patent/CN109561215B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106354303A (en) * | 2016-08-23 | 2017-01-25 | 维沃移动通信有限公司 | Photographed method of mobile terminal and mobile terminal |
WO2018182130A1 (en) * | 2017-03-31 | 2018-10-04 | 주식회사 에프앤디파트너스 | System and provision method for self-beauty app platform using ar |
CN107493504A (en) * | 2017-09-19 | 2017-12-19 | 北京奇虎科技有限公司 | Video data real-time processing method, device and computing device based on layering |
CN107862274A (en) * | 2017-10-31 | 2018-03-30 | 广东欧珀移动通信有限公司 | Beautifying method, device, electronic device and computer-readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109561215A (en) | 2019-04-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108401124B (en) | Video recording method and device | |
CN110929651A (en) | Image processing method, image processing device, electronic equipment and storage medium | |
CN109829864B (en) | Image processing method, device, equipment and storage medium | |
CN110992327A (en) | Lens contamination state detection method and device, terminal and storage medium | |
CN109859102B (en) | Special effect display method, device, terminal and storage medium | |
CN109325924B (en) | Image processing method, device, terminal and storage medium | |
CN111028144B (en) | Video face changing method and device and storage medium | |
CN109803165A (en) | Method, apparatus, terminal and the storage medium of video processing | |
CN110868642B (en) | Video playing method, device and storage medium | |
CN110225390B (en) | Method, device, terminal and computer-readable storage medium for video preview | |
CN108848405B (en) | Image processing method and device | |
CN110956580A (en) | Image face changing method and device, computer equipment and storage medium | |
CN108172176B (en) | Page refreshing method and device for ink screen | |
CN110677713B (en) | Video image processing method and device and storage medium | |
CN110889391B (en) | Method, device, computing device and storage medium for processing face images | |
CN110891181B (en) | Live broadcast picture display method and device, storage medium and terminal | |
CN112015612B (en) | Method and device for acquiring stuck information | |
CN109561215B (en) | Method, device, terminal and storage medium for controlling beautifying function | |
CN109005359B (en) | Video recording method, apparatus and storage medium | |
CN111860064A (en) | Target detection method, device and equipment based on video and storage medium | |
CN111669611B (en) | Image processing method, device, terminal and storage medium | |
CN111064994B (en) | Video image processing method and device and storage medium | |
CN108881715B (en) | Starting method and device of shooting mode, terminal and storage medium | |
CN108881739B (en) | Image generation method, device, terminal and storage medium | |
CN110717365B (en) | Method and device for obtaining picture |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |