CN107767333B - Method and equipment for beautifying and photographing and computer storage medium - Google Patents
Method and equipment for beautifying and photographing and computer storage medium Download PDFInfo
- Publication number
- CN107767333B CN107767333B CN201711024359.2A CN201711024359A CN107767333B CN 107767333 B CN107767333 B CN 107767333B CN 201711024359 A CN201711024359 A CN 201711024359A CN 107767333 B CN107767333 B CN 107767333B
- Authority
- CN
- China
- Prior art keywords
- face
- adjusting
- background
- area
- beautifying
- 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
- 238000000034 method Methods 0.000 title claims abstract description 72
- 230000003796 beauty Effects 0.000 claims abstract description 83
- 230000015654 memory Effects 0.000 claims description 43
- 238000004891 communication Methods 0.000 claims description 22
- 230000001815 facial effect Effects 0.000 claims description 16
- 230000002087 whitening effect Effects 0.000 claims description 14
- 210000004709 eyebrow Anatomy 0.000 claims description 12
- 210000004209 hair Anatomy 0.000 claims description 12
- 238000001514 detection method Methods 0.000 claims description 9
- 238000005498 polishing Methods 0.000 claims description 6
- 238000012545 processing Methods 0.000 abstract description 29
- 230000006870 function Effects 0.000 description 16
- 238000010586 diagram Methods 0.000 description 14
- 210000001508 eye Anatomy 0.000 description 14
- 230000000694 effects Effects 0.000 description 10
- 230000001360 synchronised effect Effects 0.000 description 8
- 230000008569 process Effects 0.000 description 5
- 238000012512 characterization method Methods 0.000 description 4
- 230000009467 reduction Effects 0.000 description 4
- 238000013528 artificial neural network Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000036544 posture Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 238000003708 edge detection Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- 238000010295 mobile communication Methods 0.000 description 2
- 210000000056 organ Anatomy 0.000 description 2
- 230000005236 sound signal Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 235000019800 disodium phosphate Nutrition 0.000 description 1
- 210000000887 face Anatomy 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 238000001990 intravenous administration Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000003062 neural network model Methods 0.000 description 1
- 238000010079 rubber tapping Methods 0.000 description 1
- 230000011664 signaling Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000001629 suppression Effects 0.000 description 1
- 238000010897 surface acoustic wave method Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/04—Context-preserving transformations, e.g. by using an importance map
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
- G06F3/0482—Interaction with lists of selectable items, e.g. menus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/04847—Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/50—Image enhancement or restoration using two or more images, e.g. averaging or subtraction
-
- 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
-
- 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20212—Image combination
- G06T2207/20221—Image fusion; Image merging
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30196—Human being; Person
- G06T2207/30201—Face
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- General Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Oral & Maxillofacial Surgery (AREA)
- General Health & Medical Sciences (AREA)
- Multimedia (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Processing (AREA)
Abstract
The invention discloses a method for beautifying and photographing, which comprises the following steps: extracting a background area and a face area from the acquired real-time image; adjusting the background area according to a default background adjusting parameter and a default background adjusting mode to obtain a beautifying background area, and adjusting the face area according to a default face adjusting parameter and a default face adjusting mode to obtain a beautifying face area; combining the beautifying background area with the beautifying face area to obtain a beautifying real-time image; and storing the beauty real-time image according to the photographing instruction to form a beauty photographed picture. The invention also discloses a device for beautifying and photographing and a computer readable storage medium. The invention can carry out face beautifying processing with pertinence, so that the image is real and not exaggerated, the checked user cannot easily see the whole face beautifying trace, and the naturalness of face beautifying photographing is improved.
Description
Technical Field
The invention relates to the technical field of image processing, in particular to a method and equipment for beautifying and photographing and a computer storage medium.
Background
Nowadays, people record the living intravenous drip by taking a picture; with the continuous development of intelligent terminals, more and more intelligent terminals such as intelligent mobile phones, digital cameras, tablet computers and the like can be used for photographing; when users use the intelligent terminals to take photos, more and more intelligent terminal manufacturers have built-in beauty functions in order to take satisfactory photos; at present, the beauty cameras are widely used, most of the beauty cameras are fool type one-key beauty, convenience can be brought to users, but the effect is changed integrally; for example, when a user takes a picture, the user only wants to perform facial beautification processing on the face and does not want to perform facial beautification processing on the background part, but the existing facial beautification camera can only perform overall facial beautification processing and cannot perform targeted facial beautification processing, so that the user who looks over can easily see the overall facial beautification trace, the shot facial beautification photo is not real enough, and the effect is exaggerated.
Disclosure of Invention
In view of the above, embodiments of the present invention are intended to provide a method, an apparatus, and a computer-readable storage medium for beautifying and photographing.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
the invention provides a method for beautifying and photographing, which comprises the following steps:
extracting a background area and a face area from the acquired real-time image;
adjusting the background area according to a default background adjusting parameter and a default background adjusting mode to obtain a beautifying background area, and adjusting the face area according to a default face adjusting parameter and a default face adjusting mode to obtain a beautifying face area;
combining the beautifying background area with the beautifying face area to obtain a beautifying real-time image;
and storing the beauty real-time image according to the photographing instruction to form a beauty photographed picture.
In the foregoing solution, before the adjusting the background area according to the default background adjustment parameter and the default background adjustment manner, the method further includes:
acquiring an input current background adjusting mode and current background adjusting parameters;
updating the default background adjusting mode to be a current background adjusting mode, and updating the default background adjusting parameter to be the current background adjusting parameter;
the adjusting the background area according to the default background adjusting parameter and the default background adjusting mode comprises:
and adjusting the background area according to the current background adjusting parameter and the current background adjusting mode.
In the foregoing solution, the default background adjustment manner includes: a reduced contrast mode, a blurred background mode, or a reduced saturation mode.
In the foregoing solution, before the adjusting the face region according to the default face adjustment parameter and the default face adjustment mode, the method further includes:
acquiring an input current face adjusting mode and current face adjusting parameters;
updating the default face adjustment mode to the current face adjustment mode, and updating the default face adjustment parameter to the current face adjustment parameter;
the adjusting the face area according to the default face adjusting parameter and the face adjusting mode comprises the following steps:
and adjusting the face area according to the current face adjusting parameters and the current face adjusting mode.
In the above scheme, the default face adjustment method includes: at least one of a spot removing mode, a whitening mode or a refinishing mode; wherein, the re-polishing mode is as follows: and forming a mode that the light source presents different brightness on the face according to different distances from the light source to each detection point on the face.
In the foregoing solution, before the adjusting the face region according to the default face adjustment parameter and the default face adjustment mode, the method further includes:
identifying a feature region of a face in the face region, the feature region of the face comprising: hair region, eyebrow region, eye region, nose region, mouth region, chin region, and face region;
acquiring input characteristic region parameters of the adjusted face;
adjusting the characteristic region of the face according to the characteristic region parameter of the adjusted face to obtain the characteristic region of the beautifying face;
the combining the beauty background area and the beauty face area to obtain a beauty real-time image comprises:
and combining the beautifying background area, the beautifying face area and the feature area of the beautifying face to obtain the beautifying real-time image.
In the foregoing solution, the obtaining of the input feature region parameter of the adjusted face includes:
and acquiring the characteristic region parameters of the adjusted face input in a voice mode.
The invention also provides a device for beautifying and taking pictures, which comprises: an interface, a processor, a memory and a communication bus;
the communication bus is used for realizing connection communication among the interface, the processor and the memory;
the processor is used for executing the program for beautifying and photographing stored in the memory so as to realize the following steps:
extracting a background area and a face area from the acquired real-time image;
adjusting the background area according to a default background adjusting parameter and a default background adjusting mode to obtain a beautifying background area, and adjusting the face area according to a default face adjusting parameter and a default face adjusting mode to obtain a beautifying face area;
combining the beautifying background area with the beautifying face area to obtain a beautifying real-time image;
and storing the beauty real-time image according to the photographing instruction to form a beauty photographed picture.
In the foregoing solution, the processor is further configured to execute the program for beautifying and photographing, so as to implement the following steps:
identifying a feature region of a face in the face region, the feature region of the face comprising: hair region, eyebrow region, eye region, nose region, mouth region, chin region, and face region;
acquiring input characteristic region parameters of the adjusted face;
adjusting the characteristic region of the face according to the characteristic region parameter of the adjusted face to obtain the characteristic region of the beautifying face;
the combining the beauty background area and the beauty face area to obtain a beauty real-time image comprises:
and combining the beautifying background area, the beautifying face area and the feature area of the beautifying face to obtain the beautifying real-time image.
The present invention also provides a computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to perform the steps of the method for beauty photography according to any one of claims 1 to 7.
The method, the equipment and the computer storage medium for beautifying and photographing provided by the invention extract the background area and the face area from the acquired real-time image; adjusting the background area according to the default background adjusting parameter and the default background adjusting mode to obtain a beautifying background area, and adjusting the face area according to the default face adjusting parameter and the default face adjusting mode to obtain a beautifying face area; combining the beautifying background area with the beautifying face area to obtain a beautifying real-time image; storing the beauty real-time image according to the photographing instruction to form a beauty photographed image; the method has the advantages that the background area and the face area in the image are separated, the face beautifying processing is respectively carried out according to the corresponding parameters and modes of the background area and the face area, the face beautifying processing can be carried out in a targeted mode, the image can be real and not exaggerated, the whole face beautifying trace is not easy to see by a user who looks over, and the naturalness of face beautifying photographing is improved.
Drawings
Fig. 1 is a schematic hardware configuration diagram of an alternative mobile terminal implementing various embodiments of the present invention;
fig. 2 is a schematic structural diagram of a communication network system in which a mobile terminal can operate according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a first embodiment of a method for beautifying and photographing according to the present invention;
FIG. 4 is a flowchart illustrating a second embodiment of the method for beautifying and photographing according to the present invention;
FIG. 5 is a diagram illustrating a second embodiment of a method for facial beautification and photography according to the present invention;
FIG. 6 is a diagram illustrating a menu of options provided in a second embodiment of the method for beautifying and photographing according to the present invention;
FIG. 7 is a diagram illustrating a restore button provided in a second embodiment of the method for beautifying and taking pictures according to the present invention;
FIG. 8 is a schematic structural diagram of an embodiment of an apparatus for beautifying and taking pictures according to the present invention;
fig. 9 is a schematic structural diagram of an embodiment of the apparatus for beautifying and taking pictures according to the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like, and a fixed terminal such as a Digital TV, a desktop computer, and the like.
The following description will be given by way of example of a mobile terminal, and it will be understood by those skilled in the art that the construction according to the embodiment of the present invention can be applied to a fixed type terminal, in addition to elements particularly used for mobile purposes.
Referring to fig. 1, fig. 1 is a schematic diagram of a hardware structure of an optional mobile terminal for implementing various embodiments of the present invention, where the mobile terminal 100 may include: RF (Radio Frequency) unit 101, WiFi module 102, audio output unit 103, a/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 1 is not intended to be limiting of mobile terminals, which may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink information of a base station and then process the downlink information to the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA2000(Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division duplex Long Term Evolution), and TDD-LTE (Time Division duplex Long Term Evolution).
WiFi belongs to short-distance wireless transmission technology, and the mobile terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 102, and provides wireless broadband internet access for the user. Although fig. 1 shows the WiFi module 102, it is understood that it does not belong to the essential constitution of the mobile terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive audio or video signals. The a/V input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, the Graphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 may receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and may be capable of processing such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or a backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 1071 (e.g., an operation performed by the user on or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display panel 1061 are shown in fig. 1 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and external devices.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described in detail herein.
In order to facilitate understanding of the embodiments of the present invention, a communication network system on which the mobile terminal of the present invention is based is described below.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a communication Network system capable of being operated by a mobile terminal according to an embodiment of the present invention, where the communication Network system is an LTE system of a universal mobile telecommunications technology, and the LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and an IP service 204 of an operator, which are in communication connection in sequence.
Specifically, the UE201 may be the terminal 100 described above, and is not described herein again.
The E-UTRAN202 includes eNodeB2021 and other eNodeBs 2022, among others. Among them, the eNodeB2021 may be connected with other eNodeB2022 through backhaul (e.g., X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide the UE201 access to the EPC 203.
The EPC203 may include an MME (Mobility Management Entity) 2031, an HSS (Home Subscriber Server) 2032, other MMEs 2033, an SGW (Serving gateway) 2034, a PGW (PDN gateway) 2035, and a PCRF (Policy and Charging Rules Function) 2036, and the like. The MME2031 is a control node that handles signaling between the UE201 and the EPC203, and provides bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location register (not shown) and holds subscriber specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034, PGW2035 may provide IP address assignment for UE201 and other functions, and PCRF2036 is a policy and charging control policy decision point for traffic data flow and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
The IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem), or other IP services, among others.
Although the LTE system is described as an example, it should be understood by those skilled in the art that the present invention is not limited to the LTE system, but may also be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the above mobile terminal hardware structure and communication network system, the present invention provides various embodiments of the method.
Example one
If the terminal for beauty photography described in the embodiment of the present invention has an operating system, the operating system may be UNIX, Linux, Windows, Mac OS X, Android (Android), Windows Phone, or the like.
Application software (APP) is a third-party Application program of the intelligent terminal, and a user can work, entertain, acquire information and the like through various Application software, and the formats of the APP include ipa, pxl, deb, apk and the like.
Fig. 3 is a flowchart of a first embodiment of a method for facial beautification photographing according to the present invention, as shown in fig. 1, the method for facial beautification photographing according to the present invention can be applied to a terminal for facial beautification photographing (hereinafter referred to as a terminal), and the method includes the following steps:
The terminal obtains a real-time image which is wanted to be shot of a user through the camera, and after the real-time image is obtained, a background area and a face area of the real-time image are extracted from the current real-time image.
Specifically, if a portrait exists in the real-time image, the terminal may identify a background region and a face region in the real-time image by using a multi-level edge detection algorithm, where the background region is a region other than the face region in the real-time image.
The face region is a region where face feature information of a person is located, and usually, the face feature information includes visual feature information, pixel statistical feature information, face image transformation coefficient feature information, face image algebraic feature information and the like; the extraction of the face feature information is performed according to some feature information of the face.
The methods for extracting face feature information are classified into two main categories: one is a knowledge-based characterization method; the other is a characterization method based on algebraic features or statistical learning; the knowledge-based characterization method mainly obtains feature data which is helpful for face classification according to shape description of face organs and distance characteristics between the face organs, wherein feature components of the feature data generally comprise Euclidean distances, curvatures, angles and the like between feature points; the human face is composed of parts such as hair, eyebrows, eyes, a nose, a mouth, a chin, a face and the like, geometric description of the parts and the structural relationship among the parts can be used as important characteristic information for identifying the human face, and the characteristic information is called as geometric characteristic information; the knowledge-based face characterization mainly comprises a geometric feature-based method and a template matching method.
After obtaining each local feature information of the face, dividing the face region into feature regions including but not limited to the following faces based on each local feature information: hair region, eyebrow region, eye region, nose region, mouth region, chin region, and face region.
And 302, adjusting the background area according to the default background adjusting parameter and the default background adjusting mode to obtain a beautifying background area, and adjusting the face area according to the default face adjusting parameter and the default face adjusting mode to obtain a beautifying face area.
After a background area and a face area in a real-time image are divided by the terminal, the background area is adjusted according to default background adjusting parameters and a default background adjusting mode to obtain a beautifying background area; meanwhile, the terminal can adjust the face area according to the default face adjusting parameters and the default face adjusting mode to obtain the face area with the face beautifying effect.
The default background adjusting parameters and the default face adjusting parameters can be set in advance by a user according to actual requirements; default background adjustment modes include, but are not limited to: at least one of a contrast reduction mode, a blurred background mode, or a saturation reduction mode; default face adjustment modes include, but are not limited to: at least one of a spot removing mode, a whitening mode or a refinishing mode; wherein, the polishing mode again is: and forming a mode that the light source presents different brightness on the face according to different distances from the light source to each detection point on the face.
By separating the background area from the face area in the image and performing the beautifying processing aiming at the background area and the face area respectively, the beautifying processing can be performed with pertinence, so that the image is real and not exaggerated, and the naturalness is improved.
For example, the background adjusting parameters are 10 levels, which are 1 to 10 levels, the whitening effect is greater when the number of levels is higher, and the default background adjusting parameters can be set to 5 levels by the user in advance; the first face adjusting parameter has 10 grades which are 1 to 10 grades, the higher the grade is, the larger the whitening effect is, and the default face adjusting parameter can be set to 3 grades by a user in advance; the default background adjusting mode predetermined by a user is a fuzzy background mode, and the default face adjusting mode predetermined by the user is a whitening mode; after a background area and a face area in a real-time image are divided by the terminal, the background area is adjusted according to 5-level background adjusting parameters and a fuzzy background mode to obtain a beautifying background area, and the face area is adjusted according to 3-level face adjusting parameters and a whitening mode to obtain a beautifying face area.
It should be noted that, the above is only an example, and specific default background adjustment parameters, default face adjustment parameters, default background adjustment modes, and default face adjustment modes may be set according to actual requirements, which is not limited herein.
And step 303, combining the beautifying background area with the beautifying face area to obtain a beautifying real-time image.
The terminal combines the beauty background area and the beauty face area obtained in the step 302 to obtain a processed beauty real-time image.
And step 304, storing the beauty real-time image according to the photographing instruction to form a beauty photographing picture.
And the terminal stores the beauty real-time image obtained in the step 303 according to the photographing instruction to form a beauty photographed image, and stores the beauty photographed image in the terminal for the user to view and use.
According to the method for beautifying and photographing, provided by the embodiment of the invention, a background area and a face area are extracted from an acquired real-time image; adjusting the background area according to the default background adjusting parameter and the default background adjusting mode to obtain a beautifying background area, and adjusting the face area according to the default face adjusting parameter and the default face adjusting mode to obtain a beautifying face area; combining the beautifying background area with the beautifying face area to obtain a beautifying real-time image; storing the beauty real-time image according to the photographing instruction to form a beauty photographed image; the method has the advantages that the background area and the face area in the image are separated, the face beautifying processing is respectively carried out according to the corresponding parameters and modes of the background area and the face area, the face beautifying processing can be carried out in a targeted mode, the image can be real and not exaggerated, the whole face beautifying trace is not easy to see by a user who looks over, and the naturalness of face beautifying photographing is improved.
To further illustrate the object of the present invention, the above embodiments are further illustrated.
Example two
Fig. 4 is a flowchart of a second embodiment of the method for facial beautification photographing according to the present invention, and as shown in fig. 4, the method for facial beautification photographing according to the embodiment of the present invention is applied to a smart phone, and the method may include the following steps:
The smart phone acquires a real-time image which a user wants to shoot through a camera, after the real-time image is acquired, whether a face exists in the real-time image or not is firstly confirmed, if the face exists, a background area and a face area in the real-time image are identified in the current real-time image by adopting a multi-level edge detection algorithm, and the background area and the face area of the real-time image are extracted, wherein the background area is an area which is not a face area in the real-time image.
The intelligent mobile phone extracts each local feature information of the face in the face region by using a neural network algorithm, and after each local feature information of the face is obtained, the face region is divided into feature regions including but not limited to the following face based on each local feature information: hair region, eyebrow region, eye region, nose region, mouth region, chin region, and face region.
The neural network algorithm has the capabilities of large-scale parallel, distributed storage and processing, self-organization, self-adaptation and self-learning, and is particularly suitable for processing the problems of inaccurate and fuzzy information processing which needs to consider many factors and conditions simultaneously; thus, the trained neural network model can identify attribute feature information of a feature region on the face; in addition, because the neural network can obtain a better model, the method can be more suitable for acquiring the attribute feature information of the feature region in the images of different illumination and different human face postures, and the acquisition accuracy is improved.
Fig. 5 is a schematic diagram of recognizing a feature region of a face according to a second embodiment of the method for beautifying and photographing, as shown in fig. 5, a smart phone recognizes a hair region, an eyebrow region, an eye region, a nose region, a mouth region, a chin region, and a face region in a face region; these areas of the respective local feature information are indicated by black boxes.
And step 403, acquiring the input current background adjusting mode and current background adjusting parameter, and acquiring the input current face adjusting mode and current face adjusting parameter.
The intelligent mobile phone can provide a background adjusting mode and an option menu of a face adjusting mode for the user, and after the user selects the current background adjusting mode, the user can also provide the option menu of the current background adjusting parameter for the user to select and determine the parameter; after the user selects the current face adjusting mode, an option menu of the current face adjusting parameters is provided for the user, and the user can select and determine the parameters; wherein, the background adjusting method includes but is not limited to: a contrast reduction mode, a background blurring mode or a saturation reduction mode; the face adjustment methods include but are not limited to: a spot removing mode, a whitening mode or a refinishing mode; the refinishing mode is as follows: and forming a mode that the light source presents different brightness on the face according to different distances from the light source to each detection point on the face.
Fig. 6 is a schematic diagram of providing an option menu according to a second embodiment of the method for beautifying and taking a picture, as shown in fig. 6, a smart phone provides a user with an option menu of a background adjustment mode and a face adjustment mode above a current picture for the user to select.
Optionally, the user may input the current background adjustment mode and the current background adjustment parameter to the smartphone through a voice input mode, and input the current face adjustment mode and the current face adjustment parameter to the smartphone through a voice input mode.
For example, the user selects the determined current background adjusting mode as a fuzzy background mode, and sets the current background adjusting parameters to be 5 levels, wherein the background adjusting parameters have 10 levels, which are 1 to 10 levels, and the higher the level is, the greater the whitening effect is; the user selects the determined current face adjusting mode as a whitening mode, and the set current face adjusting parameters are in 3 levels, wherein the number of the face adjusting parameters is 10 in total and is in 1-10 levels, and the whitening effect is larger when the number of the levels is higher.
After the adjustment mode and the adjustment parameter input by the user are obtained, the smart phone updates the default background adjustment mode to the current background adjustment mode, updates the default background adjustment parameter to the current background adjustment parameter, updates the default face adjustment mode to the current face adjustment mode, and updates the default face adjustment parameter to the current face adjustment parameter.
The intelligent mobile phone provides a user with a feature region of the face and an option menu corresponding to the feature region parameters of the face, wherein the feature region of the face comprises a hair region, an eyebrow region, an eye region, a nose region, a mouth region, a chin region and a face region; the smart phone provides the regions for the user to select and determine, and if the user feels that one or more feature regions do not need beautifying processing, the feature regions can be shielded without subsequent processing.
After the user selects a certain characteristic region, the smart phone can continuously present the characteristic region parameters corresponding to the characteristic region for the user to select and determine.
Preferably, the user can input the feature region of the face and the parameters of the corresponding feature region into the smart phone in a voice mode.
As shown in fig. 6, the smartphone provides the user with a feature area option of the face above the current screen; for example, if the user selects and determines the eye option, the smartphone will continue to provide the user with parameters corresponding to the eyes, the parameters are used for processing the eyes, the parameters are classified into 10 levels, the level 1 is the original size of the eyes, and the magnification ratio is larger and larger as the level is higher.
After the user determines each processing mode and processing parameter, the smart phone can adjust the background area according to the current background adjusting parameter and the current background adjusting mode to obtain a beautifying background area, adjust the face area according to the current face adjusting parameter and the current face adjusting mode to obtain a beautifying face area, and adjust the feature area of the face according to the feature area parameter of the adjusted face to obtain the feature area of the beautifying face.
And the smart phone combines the beautifying background area, the beautifying face area and the feature area of the beautifying face obtained in the step 406 to finally obtain a beautifying real-time image.
Preferably, a restoration button is provided on the beauty real-time image, and the restoration button is used for switching and comparing the beauty real-time image with the original real-time image, so that a user can conveniently check the beauty effect in real time, and the follow-up operation is facilitated.
Fig. 7 is a schematic diagram of providing a restore button according to a second embodiment of the method for taking a picture of beauty in the present invention, and as shown in fig. 7, a "restore" button is provided at the lower right corner of the real-time image of beauty, which is convenient for a user to switch and compare the real-time image of beauty with the original real-time image, and view the beauty effect in real time.
And step 408, storing the beauty real-time image according to the photographing instruction to form a beauty photographing picture.
After receiving a photographing instruction input by a user, the smart phone stores the beauty real-time image to form a beauty photographing picture.
Generally, the face beautification is excessive, the overall brightness is excessive, particularly the background, so that a user can only finely adjust the background in a non-face range as far as possible after checking the face features by using the scheme, the outline contrast is enhanced, and the background is blurred; in addition, the user can respectively carry out the beautifying processing of different degrees on each characteristic region in the face, the difference of the characteristic regions of each face is fully considered, and the beautifying processing effect is improved.
According to the method for beautifying and photographing, provided by the embodiment of the invention, a background area and a face area are extracted from an acquired real-time image; identifying a characteristic region of a face in the face region; acquiring an input current background adjusting mode and current background adjusting parameters, and acquiring an input current face adjusting mode and current face adjusting parameters; updating the default background adjusting mode to be the current background adjusting mode, updating the default background adjusting parameter to be the current background adjusting parameter, updating the default face adjusting mode to be the current face adjusting mode, and updating the default face adjusting parameter to be the current face adjusting parameter; acquiring input characteristic region parameters of the adjusted face; adjusting the background area according to the current background adjusting parameters and the current background adjusting mode to obtain a beautifying background area, adjusting the face area according to the current face adjusting parameters and the current face adjusting mode to obtain a beautifying face area, and adjusting the feature area of the face according to the feature area parameters of the face to obtain the feature area of the beautifying face; combining the beautifying background area, the beautifying face area and the feature area of the beautifying face to obtain a beautifying real-time image; storing the beauty real-time image according to the photographing instruction to form a beauty photographed image; the method has the advantages that the background area and the face area in the image are separated, the specific face characteristic area of the face area is subdivided, the face beautifying processing is respectively carried out according to the corresponding parameters and modes aiming at the background area, the face area and the face characteristic area, the face beautifying processing can be carried out in a targeted mode, the image can be real and not exaggerated, the checked user cannot easily see the whole face beautifying trace, and the naturalness and the effect of the face beautifying photographing are improved.
EXAMPLE III
Fig. 8 is a schematic structural diagram of an embodiment of a facial beautification photographing apparatus according to the present invention, and as shown in fig. 8, an embodiment of a facial beautification photographing apparatus 08 according to the present invention includes:
an extraction module 81, configured to extract a background region and a face region from the acquired real-time image;
the adjusting module 82 is configured to adjust the background area according to a default background adjusting parameter and a default background adjusting mode to obtain a beauty background area, and adjust the face area according to a default face adjusting parameter and a default face adjusting mode to obtain a beauty face area;
a combining module 83, configured to combine the beauty background area and the beauty face area to obtain a real-time beauty image;
and the forming module 84 is used for storing the beauty real-time image according to the photographing instruction to form a beauty photographing picture.
Further, the apparatus further comprises:
an obtaining module 85, configured to obtain an input current background adjusting mode and a current background adjusting parameter;
an updating module 86, configured to update the default background adjustment mode to a current background adjustment mode, and update the default background adjustment parameter to the current background adjustment parameter;
the adjusting module 82 is specifically configured to adjust the background area according to the current background adjusting parameter and the current background adjusting mode.
Further, the default background adjustment manner includes: a reduced contrast mode, a blurred background mode, or a reduced saturation mode.
Further, the obtaining module 85 is further configured to obtain an input current face adjusting mode and current face adjusting parameters;
the updating module 86 is further configured to update the default face adjustment mode to the current face adjustment mode, and update the default face adjustment parameter to the current face adjustment parameter;
the adjusting module 82 is specifically configured to adjust the face region according to the current face adjusting parameter and the current face adjusting mode.
Further, the default face adjustment method includes: at least one of a spot removing mode, a whitening mode or a refinishing mode; wherein, the re-polishing mode is as follows: and forming a mode that the light source presents different brightness on the face according to different distances from the light source to each detection point on the face.
Further, the apparatus further comprises:
a recognition module 87, configured to recognize a feature region of a face in the face region, where the feature region of the face includes: hair region, eyebrow region, eye region, nose region, mouth region, chin region, and face region;
the obtaining module 85 is further configured to obtain a feature region parameter of the input adjusted face;
the adjusting module 82 is further configured to adjust the feature region of the face according to the feature region parameter of the adjusted face, so as to obtain a feature region of the beauty face;
the combining module 83 is specifically configured to combine the beauty background region, the beauty face region, and the feature region of the beauty face to obtain the beauty real-time image.
Further, the obtaining module 85 is specifically configured to obtain a feature region parameter of the adjusted face input in a voice manner.
The apparatus of this embodiment may be configured to implement the technical solutions of the above-described method embodiments, and the implementation principles and technical effects are similar, which are not described herein again.
Example four
Fig. 9 is a schematic structural diagram of an embodiment of the apparatus for beauty photography according to the present invention, and as shown in fig. 9, an embodiment of the apparatus 09 for beauty photography according to the present invention includes: an interface 91, a processor 92, a memory 93, and a communication bus 94;
wherein, the communication bus 94 is used for realizing the connection communication among the interface 91, the processor 92 and the memory 93;
the processor 92 is configured to execute the program for beautifying and photographing stored in the memory 93, so as to implement the following steps:
extracting a background area and a face area from the acquired real-time image;
adjusting the background area according to a default background adjusting parameter and a default background adjusting mode to obtain a beautifying background area, and adjusting the face area according to a default face adjusting parameter and a default face adjusting mode to obtain a beautifying face area;
combining the beautifying background area with the beautifying face area to obtain a beautifying real-time image;
and storing the beauty real-time image according to the photographing instruction to form a beauty photographed picture.
Further, the processor 92 is further configured to execute the program for beautifying and photographing, so as to implement the following steps:
acquiring an input current background adjusting mode and current background adjusting parameters;
updating the default background adjusting mode to be a current background adjusting mode, and updating the default background adjusting parameter to be the current background adjusting parameter;
the processor 92 is configured to execute the program for beautifying and photographing, so as to specifically implement the following steps:
and adjusting the background area according to the current background adjusting parameter and the current background adjusting mode.
Further, the default background adjustment manner includes: a reduced contrast mode, a blurred background mode, or a reduced saturation mode.
Further, the processor 92 is further configured to execute the program for beautifying and photographing, so as to implement the following steps:
acquiring an input current face adjusting mode and current face adjusting parameters;
updating the default face adjustment mode to the current face adjustment mode, and updating the default face adjustment parameter to the current face adjustment parameter;
the processor 92 is configured to execute the program for beautifying and photographing, so as to specifically implement the following steps:
and adjusting the face area according to the current face adjusting parameters and the current face adjusting mode.
Further, the default face adjustment method includes: at least one of a spot removing mode, a whitening mode or a refinishing mode; wherein, the re-polishing mode is as follows: and forming a mode that the light source presents different brightness on the face according to different distances from the light source to each detection point on the face.
Further, the processor 92 is further configured to execute the program for beautifying and photographing, so as to implement the following steps:
identifying a feature region of a face in the face region, the feature region of the face comprising: hair region, eyebrow region, eye region, nose region, mouth region, chin region, and face region;
acquiring input characteristic region parameters of the adjusted face;
adjusting the characteristic region of the face according to the characteristic region parameter of the adjusted face to obtain the characteristic region of the beautifying face;
further, the processor 92 is configured to execute the program for beautifying and photographing, so as to specifically implement the following steps:
and combining the beautifying background area, the beautifying face area and the feature area of the beautifying face to obtain the beautifying real-time image.
Further, the processor 92 is configured to execute the program for beautifying and photographing, so as to specifically implement the following steps:
and acquiring the characteristic region parameters of the adjusted face input in a voice mode.
As shown in fig. 9, the device 09 for beauty photography can be a mobile phone, a computer, a digital broadcast terminal, an information transceiver device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.; it will be appreciated that the communication bus 94 includes a power bus, a control bus, and a status signal bus in addition to a data bus, but for clarity of illustration, the various buses are labeled as communication bus 94 in fig. 9.
The interface 91 may include a display, a keyboard, a mouse, a track ball, a click wheel, a key, a button, a touch pad, a touch screen, or the like.
It will be appreciated that the memory 93 can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory; among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage; volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM, Double Data Synchronous Random Access Memory), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM, Enhanced Synchronous Dynamic Random Access Memory), Synchronous link Dynamic Random Access Memory (DRAM, Synchronous Dynamic Random Access Memory), Direct Memory (DRmb Random Access Memory); the memory 93 described in connection with the embodiments of the invention is intended to comprise, without being limited to, these and any other suitable types of memory.
The memory 93 in the embodiment of the present invention is used to store various types of data to support the operation of the device 09 for beauty photography; examples of such data include: any computer program for operating on the beauty-photographing device 09, such as operating systems and application programs, contact data, phonebook data, messages, pictures, videos, and the like; the operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks; the application programs may include various application programs such as a Media Player (Media Player), a Browser (Browser), etc. for implementing various application services; the program for implementing the method of the embodiment of the present invention may be included in the application program.
The method disclosed by the above embodiment of the present invention may be applied to the processor 92, or implemented by the processor 92; the processor 92 may be an integrated circuit chip having signal processing capabilities; in implementation, the steps of the above method may be performed by instructions in the form of hardware integrated logic circuits or software in the processor 92; the Processor 92 may be a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.; processor 92 may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present invention; a general purpose processor may be a microprocessor or any conventional processor or the like; the steps of the method disclosed by the embodiment of the invention can be directly embodied as the execution of a hardware decoding processor, or the combination of hardware and software modules in the decoding processor; the software modules may be located in a storage medium located in memory 93, and processor 92 reads the information in memory 93 and performs the steps of the aforementioned methods in conjunction with its hardware.
In an exemplary embodiment, the beautifying and photographing Device 09 can be implemented by one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, Micro Controllers (MCUs), microprocessors (microprocessors), or other electronic components for performing the aforementioned methods.
The device of this embodiment may be configured to implement the technical solutions of the above-described method embodiments, and the implementation principles and technical effects are similar, which are not described herein again.
The invention also provides a computer readable storage medium, which can be a Memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface Memory, optical disk or CD-ROM; or various devices including one or any combination of the above memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.; the computer readable storage medium stores one or more programs, which are executable by one or more processors, to implement the steps of:
extracting a background area and a face area from the acquired real-time image;
adjusting the background area according to a default background adjusting parameter and a default background adjusting mode to obtain a beautifying background area, and adjusting the face area according to a default face adjusting parameter and a default face adjusting mode to obtain a beautifying face area;
combining the beautifying background area with the beautifying face area to obtain a beautifying real-time image;
and storing the beauty real-time image according to the photographing instruction to form a beauty photographed picture.
Further, the one or more programs are also executable by the one or more processors to perform the steps of:
acquiring an input current background adjusting mode and current background adjusting parameters;
updating the default background adjusting mode to be a current background adjusting mode, and updating the default background adjusting parameter to be the current background adjusting parameter;
the one or more programs are executable by the one or more processors to implement the steps of:
and adjusting the background area according to the current background adjusting parameter and the current background adjusting mode.
Further, the default background adjustment manner includes: a reduced contrast mode, a blurred background mode, or a reduced saturation mode.
Further, the one or more programs are also executable by the one or more processors to perform the steps of:
acquiring an input current face adjusting mode and current face adjusting parameters;
updating the default face adjustment mode to the current face adjustment mode, and updating the default face adjustment parameter to the current face adjustment parameter;
the one or more programs are executable by the one or more processors to implement the steps of:
and adjusting the face area according to the current face adjusting parameters and the current face adjusting mode.
Further, the default face adjustment method includes: at least one of a spot removing mode, a whitening mode or a refinishing mode; wherein, the re-polishing mode is as follows: and forming a mode that the light source presents different brightness on the face according to different distances from the light source to each detection point on the face.
Further, the one or more programs are also executable by the one or more processors to perform the steps of:
identifying a feature region of a face in the face region, the feature region of the face comprising: hair region, eyebrow region, eye region, nose region, mouth region, chin region, and face region;
acquiring input characteristic region parameters of the adjusted face;
adjusting the characteristic region of the face according to the characteristic region parameter of the adjusted face to obtain the characteristic region of the beautifying face;
the one or more programs are executable by the one or more processors to implement the steps of:
and combining the beautifying background area, the beautifying face area and the feature area of the beautifying face to obtain the beautifying real-time image.
Further, the one or more programs are executable by the one or more processors to implement the steps of:
and acquiring the characteristic region parameters of the adjusted face input in a voice mode.
The computer-readable storage medium of this embodiment may be used to implement the technical solutions of the above-mentioned method embodiments, and the implementation principles and technical effects are similar, which are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.
Claims (9)
1. A method for beauty photography, the method comprising:
extracting a background area and a face area from the acquired real-time image; the human face area is an area where human face feature information is located, and the background area is an area of a non-human face area in the real-time image;
adjusting the background area according to a default background adjusting parameter and a default background adjusting mode to obtain a beautifying background area, and adjusting the face area according to a default face adjusting parameter and a default face adjusting mode to obtain a beautifying face area;
combining the beautifying background area with the beautifying face area to obtain a beautifying real-time image;
storing the beauty real-time image according to a photographing instruction to form a beauty photographed image;
before the adjusting the background area according to the default background adjusting parameter and the default background adjusting mode, the method further includes:
acquiring an input current background adjusting mode and current background adjusting parameters;
updating the default background adjusting mode to be a current background adjusting mode, and updating the default background adjusting parameter to be the current background adjusting parameter;
the adjusting the background area according to the default background adjusting parameter and the default background adjusting mode comprises:
and adjusting the background area according to the current background adjusting parameter and the current background adjusting mode.
2. The method of claim 1, wherein the default background adjustment comprises: a reduced contrast mode, a blurred background mode, or a reduced saturation mode.
3. The method of claim 1, wherein prior to said adjusting the face region according to default face adjustment parameters and default face adjustment modes, the method further comprises:
acquiring an input current face adjusting mode and current face adjusting parameters;
updating the default face adjustment mode to the current face adjustment mode, and updating the default face adjustment parameter to the current face adjustment parameter;
the adjusting the face area according to the default face adjusting parameter and the face adjusting mode comprises the following steps:
and adjusting the face area according to the current face adjusting parameters and the current face adjusting mode.
4. The method of claim 1, wherein the default face adjustment mode comprises: at least one of a spot removing mode, a whitening mode or a refinishing mode; wherein, the re-polishing mode is as follows: and forming a mode that the light source presents different brightness on the face according to different distances from the light source to each detection point on the face.
5. The method of claim 1, wherein prior to said adjusting the face region according to default face adjustment parameters and default face adjustment modes, the method further comprises:
identifying a feature region of a face in the face region, the feature region of the face comprising: hair region, eyebrow region, eye region, nose region, mouth region, chin region, and face region;
acquiring input characteristic region parameters of the adjusted face;
adjusting the characteristic region of the face according to the characteristic region parameter of the adjusted face to obtain the characteristic region of the beautifying face;
the combining the beauty background area and the beauty face area to obtain a beauty real-time image comprises:
and combining the beautifying background area, the beautifying face area and the feature area of the beautifying face to obtain the beautifying real-time image.
6. The method of claim 5, wherein the obtaining the input feature region parameters of the adjusted face comprises:
and acquiring the characteristic region parameters of the adjusted face input in a voice mode.
7. An apparatus for beauty photography, the apparatus comprising: an interface, a processor, a memory and a communication bus;
the communication bus is used for realizing connection communication among the interface, the processor and the memory;
the processor is used for executing the program for beautifying and photographing stored in the memory so as to realize the following steps:
extracting a background area and a face area from the acquired real-time image; the human face area is an area where human face feature information is located, and the background area is an area of a non-human face area in the real-time image;
adjusting the background area according to a default background adjusting parameter and a default background adjusting mode to obtain a beautifying background area, and adjusting the face area according to a default face adjusting parameter and a default face adjusting mode to obtain a beautifying face area;
combining the beautifying background area with the beautifying face area to obtain a beautifying real-time image;
storing the beauty real-time image according to a photographing instruction to form a beauty photographed image;
before the background area is adjusted according to the default background adjusting parameters and the default background adjusting mode, acquiring the input current background adjusting mode and the current background adjusting parameters;
updating the default background adjusting mode to be a current background adjusting mode, and updating the default background adjusting parameter to be the current background adjusting parameter;
the adjusting the background area according to the default background adjusting parameter and the default background adjusting mode comprises:
and adjusting the background area according to the current background adjusting parameter and the current background adjusting mode.
8. The apparatus of claim 7, wherein the processor is further configured to execute the program for facial beautification photographing to perform the steps of:
identifying a feature region of a face in the face region, the feature region of the face comprising: hair region, eyebrow region, eye region, nose region, mouth region, chin region, and face region;
acquiring input characteristic region parameters of the adjusted face;
adjusting the characteristic region of the face according to the characteristic region parameter of the adjusted face to obtain the characteristic region of the beautifying face;
the combining the beauty background area and the beauty face area to obtain a beauty real-time image comprises:
and combining the beautifying background area, the beautifying face area and the feature area of the beautifying face to obtain the beautifying real-time image.
9. A computer readable storage medium, storing one or more programs, the one or more programs being executable by one or more processors to perform the steps of the method of beauty photography as claimed in any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711024359.2A CN107767333B (en) | 2017-10-27 | 2017-10-27 | Method and equipment for beautifying and photographing and computer storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711024359.2A CN107767333B (en) | 2017-10-27 | 2017-10-27 | Method and equipment for beautifying and photographing and computer storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107767333A CN107767333A (en) | 2018-03-06 |
CN107767333B true CN107767333B (en) | 2021-08-10 |
Family
ID=61270807
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711024359.2A Active CN107767333B (en) | 2017-10-27 | 2017-10-27 | Method and equipment for beautifying and photographing and computer storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107767333B (en) |
Families Citing this family (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109011138A (en) * | 2018-05-07 | 2018-12-18 | 北京全贵医疗科技有限公司 | Physical therapy of head method and device based on head image |
CN110555794B (en) * | 2018-05-31 | 2021-07-23 | 北京市商汤科技开发有限公司 | Image processing method and device, electronic equipment and storage medium |
CN108932704B (en) * | 2018-06-19 | 2020-10-02 | Oppo广东移动通信有限公司 | Picture processing method, picture processing device and terminal equipment |
CN109361848B (en) * | 2018-09-07 | 2021-05-11 | Oppo广东移动通信有限公司 | Image processing method and device, storage medium and electronic equipment |
CN109120850B (en) * | 2018-09-20 | 2021-10-22 | 维沃移动通信有限公司 | Image processing method and mobile terminal |
CN109584177A (en) * | 2018-11-26 | 2019-04-05 | 北京旷视科技有限公司 | Face method of modifying, device, electronic equipment and computer readable storage medium |
CN109544444A (en) * | 2018-11-30 | 2019-03-29 | 深圳市脸萌科技有限公司 | Image processing method, device, electronic equipment and computer storage medium |
CN109584152A (en) * | 2018-11-30 | 2019-04-05 | 深圳市脸萌科技有限公司 | Image processing method, device, electronic equipment and computer readable storage medium |
CN109583385A (en) * | 2018-11-30 | 2019-04-05 | 深圳市脸萌科技有限公司 | Face image processing process, device, electronic equipment and computer storage medium |
CN109559274A (en) * | 2018-11-30 | 2019-04-02 | 深圳市脸萌科技有限公司 | Image processing method, device, electronic equipment and computer readable storage medium |
CN109903248B (en) * | 2019-02-20 | 2021-04-16 | 厦门美图之家科技有限公司 | Method for generating automatic white balance model and image processing method |
CN110047053A (en) * | 2019-04-26 | 2019-07-23 | 腾讯科技(深圳)有限公司 | Portrait Picture Generation Method, device and computer equipment |
CN110443769B (en) * | 2019-08-08 | 2022-02-08 | Oppo广东移动通信有限公司 | Image processing method, image processing device and terminal equipment |
CN111402154A (en) * | 2020-03-10 | 2020-07-10 | 北京字节跳动网络技术有限公司 | Image beautifying method and device, electronic equipment and computer readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8982180B2 (en) * | 2011-03-31 | 2015-03-17 | Fotonation Limited | Face and other object detection and tracking in off-center peripheral regions for nonlinear lens geometries |
CN105187724A (en) * | 2015-09-17 | 2015-12-23 | 努比亚技术有限公司 | Mobile terminal and method for processing images |
CN105608699A (en) * | 2015-12-25 | 2016-05-25 | 联想(北京)有限公司 | Image processing method and electronic device |
CN106331492A (en) * | 2016-08-29 | 2017-01-11 | 广东欧珀移动通信有限公司 | Image processing method and terminal |
CN107231529A (en) * | 2017-06-30 | 2017-10-03 | 努比亚技术有限公司 | Image processing method, mobile terminal and storage medium |
-
2017
- 2017-10-27 CN CN201711024359.2A patent/CN107767333B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8982180B2 (en) * | 2011-03-31 | 2015-03-17 | Fotonation Limited | Face and other object detection and tracking in off-center peripheral regions for nonlinear lens geometries |
CN105187724A (en) * | 2015-09-17 | 2015-12-23 | 努比亚技术有限公司 | Mobile terminal and method for processing images |
CN105608699A (en) * | 2015-12-25 | 2016-05-25 | 联想(北京)有限公司 | Image processing method and electronic device |
CN106331492A (en) * | 2016-08-29 | 2017-01-11 | 广东欧珀移动通信有限公司 | Image processing method and terminal |
CN107231529A (en) * | 2017-06-30 | 2017-10-03 | 努比亚技术有限公司 | Image processing method, mobile terminal and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN107767333A (en) | 2018-03-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107767333B (en) | Method and equipment for beautifying and photographing and computer storage medium | |
CN108830062B (en) | Face recognition method, mobile terminal and computer readable storage medium | |
CN110706179B (en) | Image processing method and electronic equipment | |
CN109743504B (en) | Auxiliary photographing method, mobile terminal and storage medium | |
CN108024065B (en) | Terminal shooting method, terminal and computer readable storage medium | |
CN107231470B (en) | Image processing method, mobile terminal and computer readable storage medium | |
CN108712603B (en) | Image processing method and mobile terminal | |
CN109685740A (en) | Method and device, mobile terminal and the computer readable storage medium of face normalization | |
CN108549853B (en) | Image processing method, mobile terminal and computer readable storage medium | |
CN107133939A (en) | A kind of picture synthesis method, equipment and computer-readable recording medium | |
TW202009761A (en) | Identification method and apparatus and computer-readable storage medium | |
CN109739602A (en) | A kind of mobile terminal wallpaper setting method and device, mobile terminal and storage medium | |
CN112995467A (en) | Image processing method, mobile terminal and storage medium | |
CN107465873B (en) | Image information processing method, equipment and storage medium | |
CN108156374A (en) | A kind of image processing method, terminal and readable storage medium storing program for executing | |
CN107979727A (en) | A kind of document image processing method, mobile terminal and computer-readable storage medium | |
CN109471579A (en) | Terminal screen arrangement information method of adjustment, device, mobile terminal and storage medium | |
CN108200332A (en) | A kind of pattern splicing method, mobile terminal and computer readable storage medium | |
CN108459799A (en) | A kind of processing method of picture, mobile terminal and computer readable storage medium | |
CN107368253B (en) | Picture zooming display method, mobile terminal and storage medium | |
CN109739414B (en) | Picture processing method, mobile terminal and computer readable storage medium | |
CN108600639B (en) | Portrait image shooting method, terminal and computer readable storage medium | |
CN113301252B (en) | Image photographing method, mobile terminal and computer readable storage medium | |
CN107743198B (en) | Photographing method, terminal and storage medium | |
CN109859115A (en) | A kind of image processing method, terminal and computer readable storage medium |
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 |