WO2020134877A1 - 一种皮肤检测方法及电子设备 - Google Patents

一种皮肤检测方法及电子设备 Download PDF

Info

Publication number
WO2020134877A1
WO2020134877A1 PCT/CN2019/122317 CN2019122317W WO2020134877A1 WO 2020134877 A1 WO2020134877 A1 WO 2020134877A1 CN 2019122317 W CN2019122317 W CN 2019122317W WO 2020134877 A1 WO2020134877 A1 WO 2020134877A1
Authority
WO
WIPO (PCT)
Prior art keywords
pixel
electronic device
aging
interface
channel
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.)
Ceased
Application number
PCT/CN2019/122317
Other languages
English (en)
French (fr)
Inventor
郭知智
胡宏伟
郜文美
董辰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to EP19902077.7A priority Critical patent/EP3885968A4/en
Priority to US17/418,368 priority patent/US11759143B2/en
Publication of WO2020134877A1 publication Critical patent/WO2020134877A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/44Detecting, measuring or recording for evaluating the integumentary system, e.g. skin, hair or nails
    • A61B5/441Skin evaluation, e.g. for skin disorder diagnosis
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/103Measuring devices for testing the shape, pattern, colour, size or movement of the body or parts thereof, for diagnostic purposes
    • A61B5/1032Determining colour of tissue for diagnostic purposes
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/44Detecting, measuring or recording for evaluating the integumentary system, e.g. skin, hair or nails
    • A61B5/441Skin evaluation, e.g. for skin disorder diagnosis
    • A61B5/444Evaluating skin marks, e.g. mole, nevi, tumour, scar
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/74Details of notification to user or communication with user or patient; User input means
    • A61B5/742Details of notification to user or communication with user or patient; User input means using visual displays
    • A61B5/7425Displaying combinations of multiple images regardless of image source, e.g. displaying a reference anatomical image with a live image
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/74Details of notification to user or communication with user or patient; User input means
    • A61B5/742Details of notification to user or communication with user or patient; User input means using visual displays
    • A61B5/7435Displaying user selection data, e.g. icons in a graphical user interface
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction 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/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/00Two-dimensional [2D] image generation
    • G06T11/10Texturing; Colouring; Generation of textures or colours
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/00Two-dimensional [2D] image generation
    • G06T11/60Creating or editing images; Combining images with text
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0012Biomedical image inspection
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/50Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis
    • G06V10/507Summing image-intensity values; Histogram projection analysis
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • G06V40/169Holistic features and representations, i.e. based on the facial image taken as a whole
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • G06V40/171Local features and components; Facial parts ; Occluding parts, e.g. glasses; Geometrical relationships
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/24Indexing scheme for image data processing or generation, in general involving graphical user interfaces [GUIs]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30004Biomedical image processing
    • G06T2207/30088Skin; Dermal
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/03Recognition of patterns in medical or anatomical images

Definitions

  • the present application relates to the field of image processing technology, in particular to a skin detection method and electronic equipment.
  • Skin testing refers to the proper selection of appropriate skin care products and scientific testing of skin quality in order to protect your skin.
  • users can use professional optical equipment to detect their own blackheads, spots, wrinkles, pores, oil distribution and gloss, etc. to understand their skin health conditions, and then set up their own skin care program.
  • a detection application with a skin detection function.
  • the detection application is installed in mobile terminals such as mobile phones, users can use the detection application for skin detection.
  • the above detection application may collect the image information of the user's face through the camera of the mobile phone.
  • the mobile phone can use certain image processing algorithms to analyze skin problems such as spots and wrinkles on the user's face.
  • mobile phones can also provide users with corresponding skin care recommendations.
  • users cannot intuitively understand the specific changes that these skin problems have caused to the face in a period of time, resulting in low adoption of skin care suggestions provided by mobile phones.
  • This application provides a skin detection method and an electronic device, which can truly simulate the change of the skin problem in a period of time for the detected skin problem, so that the user can intuitively feel the change of the skin, thereby reminding the user to repair the occurrence of the problem in time Skin problems.
  • the present application provides a skin detection method, including: an electronic device acquiring a facial image of a user; the electronic device detects a skin problem occurring in the facial image; the electronic device prompts the user that a skin problem occurs on the face in the first interface.
  • An interface includes the above facial image; if it is detected that the user performs the first operation in the first interface, the electronic device may display a second interface, and the second interface includes the first facial simulation image after the aging of the skin problem; or, If it is detected that the user performs the second operation in the first interface, the electronic device may display a third interface, and the third interface includes the second facial simulation image after the skin problem is degraded.
  • the electronic device can simulate the aging/de-aging changes of the skin problem over a period of time for the detected skin problem (such as pigmentation problem, fine line problem, etc.), and the mobile phone can simulate the simulated aging/
  • the de-aged facial simulation images are displayed to the user, so that the user can intuitively and vividly feel the changes of their skin in the future, so as to remind the user to repair the skin problems in time and improve the user experience.
  • the above skin problem may specifically include a stain problem; at this time, the electronic device detects the skin problem appearing in the facial image, specifically including: the electronic device detects that the skin problem occurs in the facial image Color spots.
  • the method in response to the user's first operation in the first interface, before the electronic device displays the second interface, the method further includes: the electronic device performs an aging process on the stain area in the facial image, Obtaining a first facial simulation image; or, in response to a second operation of the user in the first interface, before the electronic device displays the third interface, the method further includes: the electronic device de-aging the stain area in the facial image After processing, a second face simulation image is obtained.
  • the pixel values of the L pixel channel, the a pixel channel, and the b pixel channel of the stain area after the aging process all increase, so that the color of the stain area is aged toward yellow after the aging process, thereby achieving the visual effect of stain aging.
  • the pixel values of the L pixel channel, the a pixel channel, and the b pixel channel of the stain area are reduced after the aging process, so that the color of the stain area is faded after the aging process, thereby achieving the visual effect of stain removal.
  • the above skin problems may specifically include fine lines; at this time, the electronic device detects the skin problems that appear in the facial image, including: the electronic device detects the fine lines that have fine lines in the facial image Pattern area.
  • the method in response to the user's first operation in the first interface, before the electronic device displays the second interface, the method further includes: the electronic device performs an aging process on the fine line area in the facial image, Obtaining a first facial simulation image; or, in response to a second operation of the user in the first interface, before the electronic device displays the third interface, the method further includes: the electronic device de-aging the fine-grained area in the facial image After processing, a second face simulation image is obtained.
  • the electronic device performs an aging process on the fine line area in the above facial image to obtain a first facial simulation image, which specifically includes: the electronic device obtains a change coefficient D of the fine line area;
  • the electronic device performs a de-aging process on the fine-line area in the facial image to obtain a second facial simulation image, which specifically includes: the electronic device obtains the variation coefficient D of the fine-line area in the facial image;
  • the electronic device performs the de-aging process on the B pixel channel in the fine-grain area to obtain the pixel values B', B of the B pixel channel after the de-aging
  • the pixel values of the R pixel channel, the G pixel channel and the B pixel channel of the fine line area are increased after the aging process, so that the fine line area is lightened and brightened after the aging process, thereby achieving the visual of fine line de aging effect.
  • the first interface may further include an aging progress bar and a slider.
  • the first operation refers to a sliding operation by the user dragging the slider on the aging progress bar; the method It may further include: if it is detected that the slider is dragged to the first position of the aging progress bar, the electronic device displays a first facial simulation image corresponding to the first position on the second interface; if it is detected that the slider is dragged Drag to the second position of the aging progress bar, and the electronic device displays the first face simulation image corresponding to the second position on the second interface.
  • the above-mentioned first interface may further include a de-aging progress bar and a slider.
  • the above-mentioned second operation refers to a sliding operation of the user dragging the slider on the de-aging progress bar;
  • the method may further include: if it is detected that the slider is dragged to the first position of the de-aging progress bar, the electronic device displays a second facial simulation image corresponding to the first position on the third interface; if it is detected that the slider is dragged Drag to the second position of the de-aging progress bar, the electronic device displays the second face simulation image corresponding to the second position on the third interface.
  • the electronic device can also display to the user facial images of the above-mentioned skin problems under different degrees of aging/de-aging, for example, the user can be shown the aging situation of the above-mentioned skin problems after different times, so that the user can dynamically Feel the aging/de-aging of current skin problems in the face over time.
  • the first interface further includes a scoring situation for skin problems in the facial image or skin care suggestions; or, the second interface further includes a score for skin problems in the first facial simulation image Situations or skin care suggestions; or, the third interface also includes a scoring situation or skin care suggestions for skin problems in the second facial simulation image, so as to intuitively remind the user to pay attention to skin problems on the face and repair them in time.
  • the present application provides an electronic device, including: a touch screen, one or more processors, one or more memories, and one or more computer programs; wherein the processor is coupled to the touch screen and the memory, the above one Or a plurality of computer programs are stored in the memory, and when the electronic device is running, the processor executes the one or more computer programs stored in the memory, so that the electronic device executes any of the skin detection methods described above.
  • the present application provides a computer storage medium, including computer instructions, which when executed on an electronic device, causes the electronic device to execute the skin detection method according to any one of the first aspects.
  • the present application provides a computer program product that, when the computer program product runs on an electronic device, causes the electronic device to perform the skin detection method according to any one of the first aspects.
  • the electronic device described in the second aspect provided above, the computer storage medium described in the third aspect, and the computer program product described in the fourth aspect are all used to perform the corresponding methods provided above, therefore
  • the beneficial effects that can be achieved refer to the beneficial effects in the corresponding method provided above, which will not be repeated here.
  • FIG. 1 is a schematic structural diagram 1 of an electronic device according to an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a photographing principle provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a color space conversion principle provided by an embodiment of the present application.
  • FIG. 4 is a schematic flowchart 1 of a skin detection method provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram 1 of a scenario of a skin detection method provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram 2 of a scenario of a skin detection method provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram 3 of a scenario of a skin detection method provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram 4 of a scenario of a skin detection method provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram 5 of a scenario of a skin detection method provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram 6 of a scenario of a skin detection method provided by an embodiment of the present application.
  • FIG. 11 is a schematic diagram 7 of a scenario of a skin detection method provided by an embodiment of the present application.
  • FIG. 12 is a schematic diagram 8 of a scenario of a skin detection method provided by an embodiment of the present application.
  • FIG. 13 is a schematic diagram 9 of a scenario of a skin detection method provided by an embodiment of the present application.
  • FIG. 14 is a second schematic flowchart of a skin detection method provided by an embodiment of the present application.
  • 15 is a schematic diagram 10 of a scenario of a skin detection method provided by an embodiment of this application.
  • 16 is a schematic diagram 11 of a scene of a skin detection method provided by an embodiment of the present application.
  • 17 is a schematic diagram 12 of a scene of a skin detection method provided by an embodiment of the present application.
  • FIG. 18 is a schematic diagram 13 of a scenario of a skin detection method provided by an embodiment of the present application.
  • 19 is a schematic diagram 14 of a scene of a skin detection method provided by an embodiment of the present application.
  • 20 is a schematic diagram 15 of a scenario of a skin detection method provided by an embodiment of the present application.
  • 21 is a schematic diagram 16 of a scene of a skin detection method provided by an embodiment of the present application.
  • FIG. 22 is a schematic diagram 17 of a scene of a skin detection method provided by an embodiment of the present application.
  • 23 is a second schematic structural diagram of an electronic device according to an embodiment of the present application.
  • a skin detection method provided by an embodiment of the present application may be applied to mobile phones, tablet computers, desktops, laptops, notebook computers, ultra-mobile personal computers (UMPCs), handheld computers, Electronic devices such as netbooks, personal digital assistants (personal digital assistants, PDAs), wearable electronic devices, and virtual reality devices are not limited in the embodiments of the present application.
  • UMPCs ultra-mobile personal computers
  • PDAs personal digital assistants
  • virtual reality devices are not limited in the embodiments of the present application.
  • FIG. 1 shows a schematic structural diagram of the mobile phone 100.
  • the mobile phone 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, key 190, motor 191, indicator 192, camera 193, display screen 194, and user Identification module (subscriber identification module, SIM) card interface 195 and so on.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an environment Light sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the mobile phone 100.
  • the mobile phone 100 may include more or fewer components than shown, or combine some components, or split some components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), and an image signal processor. (image)signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and/or neural-network processing unit (NPU) Wait.
  • the different processing units may be independent devices or may be integrated in one or more processors.
  • the controller may be the nerve center and command center of the mobile phone 100.
  • the controller can generate the operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetch and execution.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory may store instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. The repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • Interfaces can include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit, sound, I2S) interface, pulse code modulation (pulse code modulation (PCM) interface, universal asynchronous transceiver (universal) asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and /Or universal serial bus (USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transceiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL).
  • the processor 110 may include multiple sets of I2C buses.
  • the processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., respectively through different I2C bus interfaces.
  • the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to realize the touch function of the mobile phone 100.
  • the I2S interface can be used for audio communication.
  • the processor 110 may include multiple sets of I2S buses.
  • the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, to realize the function of answering the phone call through the Bluetooth headset.
  • the PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface to implement the function of answering the phone call through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • the UART interface is generally used to connect the processor 110 and the wireless communication module 160.
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193.
  • MIPI interface includes camera serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI) and so on.
  • the processor 110 and the camera 193 communicate through a CSI interface to implement the camera function of the mobile phone 100.
  • the processor 110 and the display screen 194 communicate through the DSI interface to realize the display function of the mobile phone 100.
  • the GPIO interface can be configured via software.
  • the GPIO interface can be configured as a control signal or a data signal.
  • the GPIO interface may be used to connect the processor 110 to the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like.
  • GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that conforms to the USB standard specifications, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc.
  • the USB interface 130 can be used to connect a charger to charge the mobile phone 100, and can also be used to transfer data between the mobile phone 100 and peripheral devices. It can also be used to connect headphones and play audio through the headphones.
  • the interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic description, and does not constitute a limitation on the structure of the mobile phone 100.
  • the mobile phone 100 may also use different interface connection methods in the foregoing embodiments, or a combination of multiple interface connection methods.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger.
  • the charging management module 140 may receive the charging input of the wired charger through the USB interface 130.
  • the charging management module 140 may receive wireless charging input through the wireless charging coil of the mobile phone 100. While the charging management module 140 charges the battery 142, it can also supply power to the electronic device through the power management module 141.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, internal memory 121, external memory, display screen 194, camera 193, wireless communication module 160, and the like.
  • the power management module 141 can also be used to monitor battery capacity, battery cycle times, battery health status (leakage, impedance) and other parameters.
  • the power management module 141 may also be disposed in the processor 110.
  • the power management module 141 and the charging management module 140 may also be set in the same device.
  • the wireless communication function of the mobile phone 100 can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
  • Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the mobile phone 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 can provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the mobile phone 100.
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), and the like.
  • the mobile communication module 150 can receive the electromagnetic wave from the antenna 1 and filter, amplify, etc. the received electromagnetic wave, and transmit it to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor and convert it to electromagnetic wave radiation through the antenna 1.
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110.
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low-frequency baseband signal to be transmitted into a high-frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
  • the demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is processed by the baseband processor and then passed to the application processor.
  • the application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194.
  • the modem processor may be a separate device.
  • the modem processor may be independent of the processor 110, and may be set in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (bluetooth, BT), and global navigation satellite systems that are applied to the mobile phone 100 (global navigation system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives the electromagnetic wave via the antenna 2, frequency-modulates and filters the electromagnetic wave signal, and sends the processed signal to the processor 110.
  • the wireless communication module 160 can also receive the signal to be transmitted from the processor 110, frequency-modulate it, amplify it, and convert it to electromagnetic waves through the antenna 2 to radiate it out.
  • the antenna 1 of the mobile phone 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the mobile phone 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include a global mobile communication system (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband Wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long-term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidou navigation system (BDS), and a quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite-based augmentation system (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS beidou navigation system
  • QZSS quasi-zenith satellite system
  • SBAS satellite-based augmentation system
  • the mobile phone 100 realizes a display function through a GPU, a display screen 194, and an application processor.
  • the GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations, and is used for graphics rendering.
  • the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos and the like.
  • the display screen 194 includes a display panel.
  • the display panel can use a liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active matrix organic light-emitting diode (active-matrix organic light-emitting diode) emitting diode, AMOLED, flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diode (QLED), etc.
  • the mobile phone 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • the mobile phone 100 can realize a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
  • the ISP processes the data fed back by the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted to the photosensitive element of the camera through the lens, and the optical signal is converted into an electrical signal. The photosensitive element of the camera transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. ISP can also optimize the algorithm of image noise, brightness and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be set in the camera 193.
  • the camera 193 is used to capture still images or videos.
  • the mobile phone 100 may include 1 or N cameras, and N is a positive integer greater than 1.
  • the camera 193 may be a front camera or a rear camera.
  • the camera 193 generally includes a lens and a sensor, which may be a CCD (charge-coupled device) or a CMOS (complementary metal oxide semiconductor), a complementary metal oxide semiconductor ) Wait for any photosensitive device.
  • the reflected light of the object passing through the lens can generate an optical image, and the optical image is projected onto the photosensitive element.
  • the photosensitive element converts the received optical signal into an electrical signal.
  • the camera 193 sends the obtained electrical signal to a DSP (Digital Signal Processing, digital signal processing) module for digital signal processing, and finally obtains a digital digital image.
  • the digital image can be output on the mobile phone 100 through the display screen 194, or the digital image can be stored in the internal memory 121.
  • the DSP can encode the electrical signal output by the photosensitive element through the RGB encoding mode to obtain a digital image in the RGB color space (which may be referred to as an RGB format image in subsequent embodiments).
  • the RGB coding mode is to obtain a variety of colors by changing the three pixel channels of red (R), green (G), and blue (B) and superimposing them.
  • RGB stands for red, green, and blue.
  • the RGB format image 1 includes 10*10 pixel units 301, and each pixel unit 301 includes three pixel channels of R, G, and B, and each pixel channel has a corresponding Pixel value.
  • the value range of each pixel channel is within [0, 255]. The larger the value, the lighter the corresponding color, and the smaller the value, the darker the corresponding color.
  • the mobile phone 100 may convert the RGB format image into a digital image in the Lab color space (which may be referred to as Lab format image in subsequent embodiments).
  • the L component in the Lab color space is used to represent the brightness of the pixel unit, the value range is [0, 100], indicating from pure black to pure white; a represents the range from red to green, and the value range is [127 , -128]; b represents the range from yellow to blue, the value range is [127, -128].
  • the image 2 still includes 10*10 pixel units 302.
  • each pixel unit 302 includes three pixel channels L, a, and b, and each pixel channel has a corresponding pixel value.
  • the three pixel channels L, a, and b are superimposed to form a pixel unit 302.
  • the color of the pixel unit 302 is more yellowish.
  • the video codec is used to compress or decompress digital video.
  • the mobile phone 100 may support one or more video codecs. In this way, the mobile phone 100 can play or record videos in various encoding formats, such as: moving picture experts group (moving picture experts, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
  • moving picture experts group moving picture experts, MPEG
  • MPEG2 moving picture experts, MPEG2, MPEG3, MPEG4, etc.
  • NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • the NPU can realize applications such as intelligent recognition of the mobile phone 100, such as image recognition, face recognition, voice recognition, and text understanding.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
  • the internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions.
  • the processor 110 executes instructions stored in the internal memory 121 to execute various functional applications and data processing of the mobile phone 100.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area may store an operating system, at least one function required application programs (such as sound playback function, image playback function, etc.).
  • the storage data area may store data (such as audio data, phone book, etc.) created during the use of the mobile phone 100 and the like.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash memory (UFS), and so on.
  • UFS universal flash memory
  • the mobile phone 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, and an application processor. For example, music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and also used to convert analog audio input into digital audio signal.
  • the audio module 170 can also be used to encode and decode audio signals.
  • the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
  • the speaker 170A also called “speaker” is used to convert audio electrical signals into sound signals.
  • the mobile phone 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also known as "handset" is used to convert audio electrical signals into sound signals.
  • the voice can be received by holding the receiver 170B close to the ear.
  • the microphone 170C also known as “microphone”, “microphone”, is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 170C through the human mouth, and input the sound signal to the microphone 170C.
  • the mobile phone 100 may be provided with at least one microphone 170C. In other embodiments, the mobile phone 100 may be provided with two microphones 170C. In addition to collecting sound signals, it may also achieve a noise reduction function. In other embodiments, the mobile phone 100 may also be provided with three, four, or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
  • the headset interface 170D is used to connect wired headsets.
  • the earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile electronic device (open mobile terminal) platform (OMTP) standard interface, and the American Telecommunications Industry Association (cellular telecommunications industry association of the United States, CTIA) standard interface.
  • OMTP open mobile electronic device
  • CTIA American Telecommunications Industry Association
  • the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
  • the pressure sensor 180A may be provided on the display screen 194.
  • the capacitive pressure sensor may be a parallel plate including at least two conductive materials. When force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The mobile phone 100 determines the strength of the pressure based on the change in capacitance. When a touch operation is applied to the display screen 194, the mobile phone 100 detects the intensity of the touch operation according to the pressure sensor 180A. The mobile phone 100 may calculate the touched position based on the detection signal of the pressure sensor 180A.
  • touch operations that act on the same touch position but have different touch operation intensities may correspond to different operation instructions. For example, when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
  • the gyro sensor 180B may be used to determine the movement posture of the mobile phone 100.
  • the angular velocity of the mobile phone 100 around three axes ie, x, y, and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyro sensor 180B detects the shaking angle of the mobile phone 100, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to counteract the shaking of the mobile phone 100 through reverse movement to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • the air pressure sensor 180C is used to measure air pressure.
  • the mobile phone 100 calculates the altitude using the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the mobile phone 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D.
  • the mobile phone 100 when the mobile phone 100 is a clamshell machine, the mobile phone 100 can detect the opening and closing of the clamshell according to the magnetic sensor 180D.
  • characteristics such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of acceleration of the mobile phone 100 in various directions (generally three axes). When the mobile phone 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to recognize the posture of electronic devices, and can be used in horizontal and vertical screen switching, pedometer and other applications.
  • the distance sensor 180F is used to measure the distance.
  • the mobile phone 100 can measure the distance by infrared or laser. In some embodiments, when shooting scenes, the mobile phone 100 may use the distance sensor 180F to measure distance to achieve fast focusing.
  • the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode.
  • the light emitting diode may be an infrared light emitting diode.
  • the mobile phone 100 emits infrared light outward through a light emitting diode.
  • the mobile phone 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the mobile phone 100. When insufficient reflected light is detected, the mobile phone 100 can determine that there is no object near the mobile phone 100.
  • the mobile phone 100 can use the proximity light sensor 180G to detect that the user is holding the mobile phone 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • the proximity light sensor 180G can also be used in leather case mode, pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 180L is used to sense the brightness of ambient light.
  • the mobile phone 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the mobile phone 100 is in a pocket to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the mobile phone 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, access to application lock, fingerprint photo taking, fingerprint answering call, and the like.
  • the temperature sensor 180J is used to detect the temperature.
  • the mobile phone 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the mobile phone 100 performs to reduce the performance of the processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection.
  • the mobile phone 100 when the temperature is lower than another threshold, the mobile phone 100 heats the battery 142 to avoid abnormal shutdown of the mobile phone 100 due to low temperature.
  • the mobile phone 100 when the temperature is below another threshold, the mobile phone 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
  • Touch sensor 180K also known as "touch panel”.
  • the touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 constitute a touch screen, also called a "touch screen”.
  • the touch sensor 180K is used to detect a touch operation acting on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • the visual output related to the touch operation can be provided through the display screen 194.
  • the touch sensor 180K may also be disposed on the surface of the mobile phone 100, which is different from the location where the display screen 194 is located.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180M can also contact the pulse of the human body and receive a blood pressure beating signal.
  • the bone conduction sensor 180M may also be provided in the earphone and combined into a bone conduction earphone.
  • the audio module 170 may parse out the voice signal based on the vibration signal of the vibrating bone block of the voice part acquired by the bone conduction sensor 180M to realize the voice function.
  • the application processor may analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M to implement the heart rate detection function.
  • the key 190 includes a power-on key, a volume key, and the like.
  • the key 190 may be a mechanical key. It can also be a touch button.
  • the mobile phone 100 can receive key input and generate key signal input related to user settings and function control of the mobile phone 100.
  • the motor 191 may generate a vibration prompt.
  • the motor 191 can be used for vibration notification of incoming calls and can also be used for touch vibration feedback.
  • touch operations applied to different applications may correspond to different vibration feedback effects.
  • the motor 191 can also correspond to different vibration feedback effects.
  • Different application scenarios for example: time reminder, receiving information, alarm clock, game, etc.
  • Touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, which can be used to indicate the charging state, the amount of power change, and can also be used to indicate messages, missed calls, notifications, and the like.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with the mobile phone 100.
  • the mobile phone 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • the SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
  • the same SIM card interface 195 can insert multiple cards at the same time. The types of the multiple cards may be the same or different.
  • the SIM card interface 195 can also be compatible with different types of SIM cards.
  • the SIM card interface 195 can also be compatible with external memory cards.
  • the mobile phone 100 interacts with the network through the SIM card to realize functions such as call and data communication.
  • the mobile phone 100 uses eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the mobile phone 100 and cannot be separated from the mobile phone 100.
  • the method includes steps S401-S405.
  • the mobile phone acquires the user's facial image.
  • a skin detection APP (or an APP with a skin detection function) can be installed in the mobile phone. If the operation of opening the skin detection APP by the user is detected, as shown in FIG. 5, the mobile phone can open the skin detection APP and display the interface 501 of the skin detection APP.
  • the interface 501 can be provided with a test button 502, which can be used to enable the skin detection function.
  • the mobile phone can call the camera APP to open the camera to capture the current shooting picture.
  • the mobile phone can display the captured shooting screen 601 in the preview interface 602.
  • the mobile phone may prompt the user to input the face into the shooting screen 601 by moving the mobile phone.
  • the mobile phone may prompt the user through the text in the preview interface 601 to take a face image using the front camera.
  • the mobile phone may prompt the user to look up at the rear camera in the form of voice, and adjust the distance between the mobile phone and the user, so that the mobile phone can capture the user's facial image in the shooting screen 601.
  • the mobile phone When the mobile phone captures the shooting screen 601, it can use a preset face detection algorithm to identify whether the shooting screen 601 contains a face that meets the preset size. If it detects that the shooting screen 601 contains a face of a preset size, the phone can automatically Perform a photographing operation to obtain the image in the current shooting screen 601, which contains the user's facial image. Of course, the user can also manually click the photographing button 603 in the preview interface 602. In response to the user's operation of clicking the photographing button 603, the mobile phone can save the photographed picture 601 acquired at this time as a photograph in the memory.
  • the mobile phone may also prompt the user to select a photo containing the user's face from the album. Furthermore, the mobile phone can extract the user's facial image through the face detection algorithm from the photo selected by the user.
  • the above facial images are still obtained by the mobile phone from the server or other electronic devices, which is not limited in the embodiments of the present application.
  • the mobile phone determines the stain area in the facial image.
  • a preset color spot detection algorithm can be used to extract the color spot area where the color spot exists in the face image.
  • the mobile phone may first prompt the user to select a detection item that needs to be detected, for example, the detection item may include stains, wrinkles, pimples, or blackheads. If it is detected that the user selects the detection item of detecting color spots, the mobile phone may use a preset color spot detection algorithm to extract the color spot areas where the color spots exist in the face image. It can be understood that a person skilled in the art may set the above-mentioned color spot detection algorithm according to actual experience or algorithms, and the embodiments of the present application do not make any limitation on this.
  • the mobile phone may first extract the region of interest (ROI) in the facial image. For example, as shown in FIG. 7, the mobile phone may determine the cheek area 702 in the facial image 701 as an ROI by extracting feature points in the facial image 701. Furthermore, the mobile phone may determine the candidate pixel unit in the cheek area 702 that may be a stain according to the pixel value of each pixel unit in the cheek area 702. There may be many ways for the mobile phone to determine the candidate pixel unit in the cheek area 702. The following provides three ways to determine the candidate pixel unit, which is not limited in this embodiment of the present application.
  • ROI region of interest
  • the first threshold Y1 may reflect the average level of the shade of the image in the cheek area 702. Furthermore, the mobile phone can compare the pixel value of each pixel unit in the cheek area 702 with the size of the first threshold Y1.
  • the mobile phone can determine the pixel unit p i as a candidate pixel unit of the color spot. In this way, the mobile phone can extract one or more candidate pixel units in the cheek area 702.
  • the mobile phone can compare the pixel value of each pixel unit in the detection frame with the size of the second threshold Y2. If the pixel value of the pixel unit p i is less than the second threshold Y2, it means that the pixel unit has a darker color in the current detection frame , The mobile phone can determine the pixel unit as a candidate pixel unit of the color spot. By traversing the above detection frame in the cheek area 702, the mobile phone can determine the candidate pixel unit in each detection frame, thereby obtaining one or more candidate pixel units in the entire cheek area 702.
  • Mode 3 The mobile phone may use the entire set of candidate pixel units determined in Mode 1 and the candidate pixel units determined in Mode 2 as all candidate pixel units in the cheek region 702.
  • the mobile phone may connect the plurality of candidate pixel units adjacent to each other to obtain one or more candidate stain areas in the face image 701.
  • the color spots on the face are generally round, and the size of the color spots is usually within a certain range. Therefore, after obtaining the above-mentioned candidate patch areas, the mobile phone can delete candidate patch areas with an area greater than the threshold 1 and an area smaller than the threshold 2 (threshold 1 is greater than the threshold 2) or irregularly shaped. At this time, one or more candidate colors remain
  • the spot area is the stain area in the facial image 701 described above.
  • the mobile phone displays a first interface containing the above-mentioned facial image, and prompts the user that a color spot problem appears on the first interface.
  • the mobile phone may display the first interface 801 containing the above facial image 701.
  • the mobile phone may prompt on the first interface 801 that the user's face has a stain problem.
  • the mobile phone may prompt the user on the first interface 801 through text that there is a stain problem on his face.
  • the mobile phone may also mark the determined stain area in the facial image 701 of the first interface 801 to help the user quickly locate the position where the stain appears on the face.
  • the mobile phone can also recommend corresponding skin care suggestions to the user in the first interface 801. For example, for color spots, mobile phones can prompt users to enhance sun protection or use whitening and freckle products.
  • the mobile phone may also score the color spot problem on the user's face according to the determined size, number, color depth and other parameters of the color spot area. Taking the full score of 100 as an example, the higher the score, the more serious the current stain problem. As shown in FIG. 9, the mobile phone can display the scoring situation of the color spot problem on the first interface 801, and intuitively remind the user to pay attention to the color spot problem on the face through the scoring level and repair it in time.
  • the mobile phone can also record the scoring of the color spot problem when the skin detection was performed one or more times recently. For example, when the user performs a skin test this time, the mobile phone scores 64 for the stain problem, and the last time the user performs a skin test, the score for the stain problem is 56 points, then, as shown in (b) in FIG. 8 , The mobile phone can display the last score on the problem of color spots, and prompt the user that the test result has increased by 8 points compared to the last test result, so as to prompt the user to change the skin condition by scoring.
  • the mobile phone determines through step S402 that the user's facial image does not contain a stain area, it means that the user's skin does not have a stain problem.
  • the mobile phone may also prompt the user that there is no color spot problem on the first interface.
  • the mobile phone detects other problems on the user's face based on the acquired facial images, such as skin problems such as blackheads, acne, or fine lines, the mobile phone can also prompt the user of the detected skin problems on the first interface. This application is implemented There are no restrictions on this.
  • the first interface 801 may further include an aging button 802 and a de-aging button 803 for color spots in the face image 701.
  • the mobile phone may simulate the aging situation of the lower stain area of the user without skin care by performing the following step S404.
  • the mobile phone can perform the following step S405 to simulate the improvement of the user's lower stain area under the condition of effective skin care, thereby intuitively reminding the user that the facial stain area is Changes in different situations improve the user experience of users.
  • the mobile phone displays a second interface, and the second interface includes the aging facial image of the stain area.
  • the foregoing first operation may be an operation in which the user clicks the aging button 802 in the first interface 801.
  • the above-mentioned first operation may also be a user's sliding or pressing operation on the first interface 801, which is not limited in this embodiment of the present application.
  • the mobile phone generally adopts the RGB encoding format when acquiring the above-mentioned facial image 701. Therefore, the facial image 701 in the first interface 801 is usually an image in RGB format. If it is detected that the user clicks the aging button 802 in the first interface 801, as shown in FIG. 9, the mobile phone may convert the facial image 701 in the RGB format to the facial image 901 in the Lab format.
  • Each pixel unit in the facial image 901 includes three independent pixel channels of L, a, and b, and each pixel channel has a corresponding pixel value (for example, the pixel value of the L pixel channel is L, the pixel of the a pixel channel The value is a, and the pixel value of the b pixel channel is b).
  • the ROI area in the face image 901 (that is, the cheek area) corresponds to the ROI area in the face image 701.
  • the mobile phone can calculate the change coefficient K1 of the L pixel channel in the stain area, the change coefficient K2 of the a pixel channel and the b pixel channel according to the pixel values of the three pixel channels L, a and b in each pixel unit in the cheek area Variation coefficient K3. Furthermore, the mobile phone can use the change coefficients K1, K2, and K3 to update the pixel values of the three pixel channels L, a, and b of each pixel unit in the stain area to complete the aging process of the stain area.
  • the mobile phone may calculate the average value M L of the pixel values of all L pixel channels in the cheek area 902. Moreover, the mobile phone may set a sliding window with a size of n*n in the cheek area 902, and the size of the sliding window is generally smaller than the size of the ROI (ie, the cheek area 902). Furthermore, the mobile phone can move the sliding window in a certain step in the cheek area 902, and there can be an overlapping area between two adjacent sliding windows. After each movement of the sliding window, if the current sliding window does not include the pixel unit in the stain area, the mobile phone may continue to move the sliding window to the next position.
  • the change coefficient K1 is taken The smaller the value, the greater the difference between the pixel mean j L of the stain area in the sliding window and the pixel mean m L of the entire sliding window, indicating that the stain area in the current window is more obvious, then the change coefficient K1 The value of is correspondingly larger.
  • the mobile phone can perform aging treatment on each L pixel channel of the color spot area in the current sliding window according to the above-mentioned change coefficient K1.
  • the mobile phone may update the pixel value L of the L pixel channel of the color spot area in the current sliding window to L'according to the following formula (1), and L'has a positive correlation with the change coefficient K1.
  • C1 is a preset constant.
  • the mobile phone can also update the pixel value of each L pixel channel in the corresponding stain area according to the above method.
  • the sliding window traverses the entire cheek area 902, as shown in FIG. 9, each L pixel channel in the cheek area in the cheek area undergoes an aging process, and its pixel value is updated to L'.
  • the coefficient threshold of the L pixel channel may also be set in the mobile phone in advance. After the mobile phone calculates the pixel value L'of each L pixel channel in the stain area in the current sliding window, it can also calculate the updated average value of each L'. If the average value of L'is less than the above-mentioned coefficient threshold P1, it means that the change of the L pixel channel of the current color spot area is very small, and it is difficult for the user to distinguish this subtle change by the naked eye. Therefore, the mobile phone can continue to iteratively update the pixel value of each L pixel channel in the color spot area using the above formula (1) until the average value of the pixel values of the updated L pixel channel is equal to or greater than the coefficient threshold P1.
  • the mobile phone can also calculate the change factor K2 of the a pixel channel in each sliding window according to the above method.
  • K2 M a / f a * (m a -j a)
  • M a is the average of pixel values of the pixels a cheek region of all channels
  • m a is the average of the pixel values of a pixel in the sliding window for all channels
  • J a is the average value of the pixel values of each a pixel channel in the stain area in the sliding window
  • f a is the variance of the pixel values of each a pixel channel in the stain area in the sliding window.
  • the mobile phone can perform the aging process on the a pixel channel of the stain area in each sliding window according to the above-mentioned change coefficient K2.
  • the mobile phone may update the pixel value a of each a pixel channel of the stain area in the sliding window to a′ according to the following formula (2), and a′ is positively correlated with the change coefficient K2 relationship.
  • C2 is a preset constant.
  • the coefficient threshold of the a pixel channel (for example, P2) can also be set in the mobile phone in advance. After the mobile phone calculates the pixel value a'of each a pixel channel of the stain area in the current sliding window, it can also update the average value of each a'. If the average value of a'is less than the above-mentioned coefficient threshold P2, it means that the change of the a pixel channel in the current color spot area is very small, and it is difficult for the user to distinguish this slight change by the naked eye. Therefore, the mobile phone may continue to iteratively update the pixel value of each a-pixel channel in the patch area using the above formula (2) until the average value of the pixel values of the updated a-pixel channel is equal to or greater than the coefficient threshold P2.
  • the mobile phone can also calculate the change coefficient K3 of the b-pixel channel in each sliding window according to the above method.
  • K3 M b /f b *(m b -j b )
  • M b is the average value of the pixel values of all b pixel channels in the cheek area
  • m b is the average value of the pixel values of all b pixel channels in the sliding window
  • J b is the average value of the pixel values of all b pixel channels in the stain area in the sliding window
  • f b is the variance of the pixel values of all b pixel channels in the stain area in the sliding window.
  • the mobile phone can perform aging processing on the b-pixel channel of the stain area in each sliding window according to the above-mentioned change coefficient K3.
  • the mobile phone may update the pixel value b of each b pixel channel of the stain area in the sliding window to b′ according to the following formula (3), and b′ is positively correlated with the change coefficient K3 relationship.
  • C3 is a preset constant.
  • the coefficient threshold of the b-pixel channel (for example, P3) can also be set in the mobile phone in advance. After the mobile phone calculates the pixel value b'of each b-pixel channel in the stain area in the current sliding window, the updated average value of each b'can also be updated. If the average value of b'is less than the above-mentioned coefficient threshold P3, it means that the change of the b pixel channel in the current color spot area is very small, and it is difficult for the user to distinguish this subtle change by the naked eye. Therefore, the mobile phone can continue to iteratively update the pixel value of each b-pixel channel in the color spot area using the above formula (3) until the average value of the pixel values of the updated b-pixel channel is equal to or greater than the coefficient threshold P3.
  • P3 the coefficient threshold of the b-pixel channel
  • the mobile phone can perform the aging process on the stain area in the face image 901 according to the change coefficients K1, K2, and K3, and obtain the face image 903 after the aging process.
  • the change coefficient determined by the mobile phone for the area where the stain is more obvious is relatively large, so that the pixel value of each pixel channel determined by the mobile phone according to the above formulas (1)-(3) is also relatively large, that is After aging, the color of the stain in this area is biased toward yellow, and the visual effect of stain enhancement is realized.
  • a mobile phone can set a fixed change coefficient K1 for the L pixel channel, a fixed change coefficient K2 for the a pixel channel, and a fixed change coefficient K3 for the b pixel channel, and then use the change coefficients K1, K2, and K3 to calculate the aging process
  • the pixel values of the color spot area are not limited in this embodiment of the present application.
  • the mobile phone may display the facial image 903 on the second interface 1001.
  • the aging facial image simulated by the mobile phone may be called a facial simulation image (for example, a first facial simulation image).
  • the mobile phone may use the Lab format to display the above facial image 903 on the second interface 1001, or may use the RGB format to display the above facial image 903 on the second interface 1001, which is not limited in this embodiment of the present application.
  • the mobile phone may also perform smooth filtering on the aging-processed facial image 903 to achieve smooth transition of the stain boundary in the facial image 903.
  • the user can intuitively see the aging facial image of the stain problem, thereby reminding the user to repair the stain problem on the face in time.
  • the mobile phone may also prompt the user on the second interface 1001 that the facial image 903 currently displayed by the user is a facial effect diagram when the stain is not repaired after a period of time (for example, two months).
  • the mobile phone can also score the stain problem in the aged facial image 903, and display the score result in the second interface 1001 to remind the user to repair the stain problem on the face in time.
  • the mobile phone may also display to the user on the second interface 1001 the aging situation of the above-mentioned stain problem after different time passes.
  • the user can drag the slider 1101 on the second interface 1001 to slide on the aging progress bar 1102.
  • the mobile phone can display the facial image 903 after the above-mentioned aging process, and the facial image 903 displayed at this time is that the user has not repaired the stain The skin condition two months after the problem.
  • the mobile phone can The position of the slider 1101 recalculates the aging of the above-mentioned stain problem. For example, the mobile phone may multiply the pixel value of each pixel unit calculated in FIG. 9 by the corresponding scale factor w (0 ⁇ w ⁇ 1) according to the position where the slider 1101 is located.
  • the mobile phone can use the slider 1101 in the aging progress bar
  • the mobile phone can calculate the pixel value of each pixel unit in the stain area of the facial image 1103, and further, as shown in FIG. 11, the mobile phone can display the facial image 1103 in the second interface 1001 according to the calculated pixel values , To show users the aging situation of color spots after one month. That is to say, while the user drags the slider 1101 to the aging button 802, the mobile phone can display the aging situation of the stain on the user's face at different times in chronological order, so that the user can dynamically feel the stain on the current face Problem aging over time.
  • the mobile phone displays a third interface, and the third interface includes the de-aged facial image of the stain area.
  • step S404 the method of aging the stain area is described.
  • step S405 the method of aging the stain area is described. That is to say, the skin detection method provided in the embodiment of the present application can simulate the change of the user's skin aging in a period of time, and can also simulate the change of the user's skin aging in a period of time.
  • the above-mentioned second operation may be an operation in which the user clicks the de-aging button 803 in the first interface 801 in FIG. 8.
  • the above-mentioned second operation may also be a user's sliding or pressing operation on the first interface 801, which is not limited in this embodiment of the present application.
  • the mobile phone may convert the facial image 701 in the RGB format to the facial image 901 in the Lab format.
  • the ROI area (ie, the cheek area) in the face image 901 corresponds to the ROI area in the face image 701.
  • the mobile phone can calculate the change coefficient K1 of the L pixel channel, the change coefficient K2 of the a pixel channel, and the change coefficient K3 of the b pixel channel according to the pixel values of the three pixel channels L, a, and b in each pixel unit in the cheek area.
  • the calculation methods of the change coefficients K1, K2, and K3 are the same as the calculation methods of the change coefficients K1, K2, and K3 in step S404, so details are not described here.
  • the mobile phone can perform de-aging processing on each of the L pixel channel, the a pixel channel, and the b pixel channel in the color spot area according to the aforementioned change coefficients K1, K2, and K3.
  • the mobile phone may update the pixel value L of each L pixel channel in the color spot area to L'according to the following formula (4), and L'has a negative correlation with the change coefficient K1.
  • the mobile phone can update the pixel value a of each a pixel channel in the color spot area to a'according to the following formula (5), and a'has a negative correlation with the change coefficient K2.
  • the mobile phone can update the pixel value b of each b pixel channel in the color spot area to b'according to the following formula (6), and b'has a negative correlation with the change coefficient K3.
  • the mobile phone performs a de-aging process on the color spot area of the face image 901 according to the change coefficients K1, K2, and K3 to obtain a face image 1201.
  • the change coefficient determined by the mobile phone for the area where the stain is more obvious is relatively large, so that the pixel value of each pixel channel determined by the mobile phone according to the above formulas (4)-(6) is relatively small, that is, the After aging, the color of the stain area becomes lighter, and the visual effect of diminishing the stain is realized.
  • the mobile phone can display the facial image 1201 obtained after the aging process of the stain area on the third interface 1202, so that the user can intuitively see the stain problem on the second interface 1001
  • the aging facial image is removed to remind the user to repair the color spots on the face in time.
  • the facial image after the decolorization of the stain area simulated by the mobile phone may be referred to as a facial simulation image (for example, a second facial simulation image).
  • the mobile phone can also display the scoring situation of the color spots in the facial image 1201 in the third interface 1202.
  • the mobile phone may also display to the user in the third interface 1202 the de-aging situation of the above-mentioned stain problem after different time passes.
  • the user can drag the slider 1301 on the third interface 1202 to slide on the de-aging progress bar 1302.
  • the mobile phone may display the facial image 1201 after the above-mentioned de-aging process.
  • the facial image 1201 is the skin condition of the user two months after repairing the stain problem.
  • the mobile phone If it is detected that the user drags the slider 1301 to a place near the de-aging button 803, for example, as shown in FIG. 13, when the user drags the slider 1301 to the middle point B of the de-aging progress bar 1302, the mobile phone The de-aging situation of the aforementioned stain problem can be recalculated according to the position where the slider 1301 is located. For example, the mobile phone may multiply the pixel value of each pixel unit in the color spot area of the face image 1201 by the corresponding scale factor w (0 ⁇ w ⁇ 1) according to the position where the slider 1301 is located. Furthermore, as shown in FIG. 13, the mobile phone can display the facial image 1303 on the second interface 1001 according to the calculated pixel values.
  • the facial image 1303 is the skin condition of the user after repairing the color spot problem for one month. That is to say, while the user drags the slider 1301 to the de-aging button 803, the mobile phone can display the de-aging situation of the color spots of the user's face at different times in chronological order, so that the user can dynamically feel the current face The ageing problem of color spots over time.
  • the aging and de-aging scenarios of the color spot problem in the user's facial image simulated by the mobile phone are exemplified. It can be understood that the mobile phone can also detect the user after acquiring the user's facial image (such as the above facial image 701). Other problems with the face. As shown in FIG. 14, in the following embodiments, the problem of detecting fine lines appearing on the face of the user will be described as an example.
  • S1401 The mobile phone determines the fine line area in the facial image.
  • a preset fine line detection algorithm can be used to extract the fine line area in the facial image where fine lines exist.
  • the color spot button 804 and the fine line button 805 are also provided in the first interface 801. If it is detected that the user clicks the fine lines button 805, the mobile phone may extract the fine line areas where fine lines exist in the facial image.
  • the mobile phone can automatically extract the fine-grained areas in the facial image where fine lines exist, which is not limited in the embodiments of the present application.
  • the above fine line detection algorithm may be a spiral pyramid algorithm, etc., those skilled in the art may set the above fine line detection algorithm according to actual experience or actual application scenarios, which is not limited in the embodiments of the present application.
  • the mobile phone displays a third interface containing the above facial image, and prompts the user that fine lines appear on the face in the third interface.
  • the mobile phone can display the user's facial image on the third interface 1501 and prompt the user on the third interface 1501 Has fine lines on her face.
  • the mobile phone may mark the determined fine line area in the facial image 1501 of the third interface 1501.
  • the mobile phone may score the fine lines appearing in the facial image 1501, and display the scoring result on the third interface 1501.
  • the mobile phone may also recommend corresponding skin care suggestions to the user in the display on the third interface 1501, such as enhancing hydration, using anti-wrinkle products, and the like.
  • the third interface 1501 may further include an aging button 1502 and a de-aging button 1503 for fine lines in the facial image 701. If it is detected that the user clicks on the aging button 1502, the mobile phone can simulate the aging of the fine lines area of the user without skin care by performing the following step S1403. Correspondingly, if it is detected that the user clicks the de-aging button 1503, the mobile phone can perform the following step S1404 to simulate the improvement of the color and fine lines of the user under effective skin care, thereby intuitively reminding the user of the facial fine lines area Changes in different situations improve the user experience of users.
  • the mobile phone displays a fourth interface, and the fourth interface includes the aging facial image of the fine line area.
  • the mobile phone can deepen the pixel unit of the determined fine line area.
  • the mobile phone may convert the facial image 701 in the RGB format to the facial image 1601 in the grayscale format.
  • Each pixel unit in the face image 1601 has a gray value G.
  • the mobile phone can determine the change coefficient D of the fine line area according to the gray value G of each pixel unit.
  • the mobile phone may normalize the gray value of each pixel unit in the facial image 1601, and then, the mobile phone may calculate the gray average value G p of each pixel unit in the face image 1601 after normalization.
  • the mobile phone can modify the pixel value of each R, G, B pixel channel of the fine line area in the facial image 701, so that the deepening of the fine line color becomes dark.
  • the mobile phone can display the updated facial image 1701 in the fine line area on the fourth interface 1702.
  • the face image 1701 may be referred to as a face simulation image (for example, a first face simulation image).
  • the mobile phone uses the above formula to reduce the pixel value of each pixel channel in the fine lines area, so that the fine lines area is deepened and darkened, thereby simulating the visual effect of fine lines aging.
  • the mobile phone may also display to the user on the fourth interface 1702 the aging situation of the above fine line problem after different time passes.
  • the user can drag the slider 1801 on the fourth interface 1702 to slide on the aging progress bar 1802.
  • the mobile phone can display the facial image of the fine lines aging after different time, so that the user can dynamically feel the aging situation of the current fine line problems over time.
  • the mobile phone can display the aging-processed facial image 1701.
  • the facial image 1701 is two months after the user did not repair it. Skin condition at the time of fine lines problems.
  • the mobile phone can multiply the pixel values of the R, G, and B pixel channels in the fine lines area of the facial image 1701 by the corresponding scale factor v (0 ⁇ v ⁇ 1), the facial image 1803 corresponding to the current slider position is obtained.
  • the facial image 1803 is the skin condition when the user does not fix the fine lines after one month.
  • the mobile phone displays a fifth interface, and the fifth interface includes the de-aged facial image of the fine line area.
  • the mobile phone can lighten the pixel unit of the determined fine line area.
  • the mobile phone can display the updated facial image 1901 of the fine line area on the fifth interface 1902.
  • the face image 1901 may be referred to as a face simulation image (for example, a second face simulation image).
  • the mobile phone increases the pixel value of each pixel channel in the fine line area through the above formula, so that the fine line area is lightened and brightened, thereby simulating the visual effect of fine line de-aging.
  • the mobile phone may also display to the user on the fifth interface 1902 the aging situation of the above fine line problem after different time passes.
  • the user can drag the slider 2001 on the fifth interface 1902 to slide on the de-aging progress bar 2002.
  • the mobile phone can display the facial image of the fine lines degrading after different time, so that the user can dynamically feel the degeneration of the fine lines in the current face over time.
  • the mobile phone can display the above-mentioned facial image 1901 after the de-aging process.
  • the facial image 1901 fixes the fine lines problem for the user Skin condition after two months.
  • the mobile phone can multiply the pixel values of the R, G, and B pixel channels in the fine lines area of the facial image 1901 by the corresponding scale factor v(0 ⁇ v ⁇ 1), a facial image 2003 corresponding to the current slider position is obtained.
  • the facial image 2003 is the skin condition of the user one month after repairing the fine lines problem.
  • the mobile phone after acquiring the user's facial image (for example, the aforementioned facial image 701), the mobile phone can determine not only the stain area in the facial image, but also the fine line area in the facial image. Furthermore, as shown in FIG. 21, while displaying the user's face image 701 on the interface 2101, the mobile phone can also prompt the user to have color spots and fine lines on the face.
  • the user's facial image for example, the aforementioned facial image 701
  • the mobile phone can determine not only the stain area in the facial image, but also the fine line area in the facial image. Furthermore, as shown in FIG. 21, while displaying the user's face image 701 on the interface 2101, the mobile phone can also prompt the user to have color spots and fine lines on the face.
  • the interface 2101 can also be provided with an aging button 2102 and a de-aging button 2103. If it is detected that the user clicks the aging button 2102, as shown in (a) of FIG. 22, the mobile phone can simulate the aging facial image 2201 of the above-mentioned stain problem and fine line problem through the above steps S404 and S1403. If it is detected that the user clicks the de-aging button 2103, as shown in (b) of FIG. 22, the mobile phone may simulate the above-described color spot problem and fine line problem de-aging facial image 2202 through the above steps S405 and S1404.
  • the mobile phone can simulate the changes in the aging/deaging of the skin problem over a period of time for the detected skin problem (such as the above-mentioned stain problem, fine line problem, etc.),
  • the mobile phone can display the simulated aging/de-aging facial images to the user, so that the user can intuitively and vividly feel the changes in his skin that may appear in the future for a period of time, thus reminding the user to repair the skin in time Problems to improve the user experience.
  • an embodiment of the present application discloses an electronic device, including: a touch screen 2301 including a touch-sensitive surface 2306 and a display screen 2307; one or more processors 2302; a memory 2303; one or more Application programs (not shown); and one or more computer programs 2304, the above devices can be connected through one or more communication buses 2305.
  • the one or more computer programs 2304 are stored in the above-mentioned memory 2303 and configured to be executed by the one or more processors 2302.
  • the one or more computer programs 2304 include instructions, which can be used to execute the above The skin detection method in steps S401-S405 or S1401-S104 in the embodiment should be applied.
  • the functional units in the embodiments of the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or software function unit.
  • the integrated unit may be stored in a computer-readable storage medium.
  • the technical solutions of the embodiments of the present application may essentially be part of or contribute to the existing technology or all or part of the technical solutions may be embodied in the form of software products, and the computer software products are stored in a storage
  • the medium includes several instructions to enable a computer device (which may be a personal computer, server, or network device, etc.) or processor to perform all or part of the steps of the methods described in the embodiments of the present application.
  • the foregoing storage media include: flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Multimedia (AREA)
  • Medical Informatics (AREA)
  • Surgery (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Pathology (AREA)
  • Animal Behavior & Ethology (AREA)
  • Biophysics (AREA)
  • Public Health (AREA)
  • Veterinary Medicine (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Dermatology (AREA)
  • General Engineering & Computer Science (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Radiology & Medical Imaging (AREA)
  • Quality & Reliability (AREA)
  • Dentistry (AREA)
  • Image Processing (AREA)

Abstract

本申请的实施例提供一种皮肤检测方法及电子设备,涉及图像处理技术领域,可针对检测出的皮肤问题真实模拟一段时间内该皮肤问题的变化情况,使用户可直观的感受到皮肤的变化情况,从而提醒用户及时修复出现的皮肤问题。该方法包括:电子设备获取用户的面部图像;电子设备检测所述面部图像中出现的皮肤问题;电子设备在第一界面中提示用户面部出现皮肤问题,第一界面中包括所述面部图像;响应于用户在所述第一界面中的第一操作,电子设备显示第二界面,第二界面中包括所述皮肤问题老化后的第一面部模拟图像;或者,响应于用户在所述第一界面中的第二操作,电子设备显示第三界面,第三界面中包括所述皮肤问题去老化后的第二面部模拟图像。

Description

一种皮肤检测方法及电子设备
本申请要求在2018年12月26日提交中国国家知识产权局、申请号为201811603196.8、发明名称为“一种皮肤检测方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及图像处理技术领域,尤其涉及一种皮肤检测方法及电子设备。
背景技术
皮肤检测(skin test)是指为了保护自己的皮肤,正确选用适合的护肤品,针对皮肤肤质进行科学的测试。一般,用户可使用专业的光学设备检测自己面部的黑头、斑点、皱纹、毛孔、油脂分布以及光泽度等项目了解自己的皮肤健康状况,进而设置合适自己的护肤方案。
目前,一些应用厂商推出了具有皮肤检测功能的检测应用(APP),如果手机等移动终端中安装了该检测应用,则用户可使用该检测应用进行皮肤检测。示例性的,上述检测应用可通过手机的摄像头采集用户面部的图像信息。进而,手机基于采集到的图像信息使用一定的图像处理算法可分析用户面部出现的斑点、皱纹等皮肤问题。针对这些皮肤问题手机还可向用户提供相应的护肤建议。但是,用户无法直观的了解到这些皮肤问题在一段时间内对面部造成的具体改变,导致用户对手机提供的护肤建议的采纳度不高。
发明内容
本申请提供一种皮肤检测方法及电子设备,可针对检测出的皮肤问题真实模拟一段时间内该皮肤问题的变化情况,使用户可直观的感受到皮肤的变化情况,从而提醒用户及时修复出现的皮肤问题。
为达到上述目的,本申请采用如下技术方案:
第一方面,本申请提供一种皮肤检测方法,包括:电子设备获取用户的面部图像;电子设备检测该面部图像中出现的皮肤问题;电子设备在第一界面中提示用户面部出现皮肤问题,第一界面中包括上述面部图像;如果检测到用户在第一界面中执行第一操作,电子设备可显示第二界面,第二界面中包括上述皮肤问题老化后的第一面部模拟图像;或者,如果检测到用户在第一界面中执行第二操作,电子设备可显示第三界面,第三界面中包括上述皮肤问题去老化后的第二面部模拟图像。
可以看出,电子设备可针对检测出的皮肤问题(例如色斑问题、细纹问题等)模拟该皮肤问题在一段时间内老化/去老化的变化情况,并且,手机可将模拟出的老化/去老化后的面部模拟图像展示给用户,使用户可直观、生动的感受到自己皮肤在未来一段时间内可能出现的变化情况,从而提醒用户及时修复出现的皮肤问题,提高用户的使用体验。
在一种可能的设计方法中,上述皮肤问题具体可包括色斑问题;此时,电子设备检测上述面部图像中出现的皮肤问题,具体包括:电子设备在上述面部图像中检测出现色斑问题的色斑区域。
在一种可能的设计方法中,响应于用户在第一界面中的第一操作,在电子设备显示上述第二界面之前,还包括:电子设备对上述面部图像中的色斑区域进行老化处理,得到第一面 部模拟图像;或者,响应于用户在第一界面中的第二操作,在电子设备显示上述第三界面之前,还包括:电子设备对上述面部图像中的色斑区域进行去老化处理,得到第二面部模拟图像。
示例性的,电子设备对上述面部图像中的色斑区域进行老化处理,得到第一面部模拟图像,具体包括:电子设备获取该色斑区域内L像素通道的变化系数K1、a像素通道的变化系数K2以及b像素通道的变化系数K3;电子设备对该色斑区域中的L像素通道进行老化处理,得到老化处理后L像素通道的像素值L’,L’=L+K1*C1*L,L为老化处理前L像素通道的像素值,C1为常数;电子设备对该色斑区域中的a像素通道进行老化处理,得到老化处理后a像素通道的像素值a’,a’=a+K2*C2*a,a为老化处理前a像素通道的像素值,C2为常数;电子设备对该色斑区域中的b像素通道进行老化处理,得到老化处理后b像素通道的像素值b’,b’=b+K3*C3*b,b为老化处理前b像素通道的像素值,C3为常数。
可以看出,老化处理后色斑区域的L像素通道、a像素通道和b像素通道的像素值均增加,使得色斑区域经老化处理后颜色偏向黄色,从而实现色斑老化的视觉效果。
示例性的,电子设备对上述面部图像中的该色斑区域进行去老化处理,得到第二面部模拟图像,具体包括:电子设备获取该色斑区域内L像素通道的变化系数K1、a像素通道的变化系数K2以及b像素通道的变化系数K3;电子设备对该色斑区域中的L像素通道进行去老化处理,得到去老化处理后L像素通道的像素值L’,L’=L-K1*C1*L,L为去老化处理前L像素通道的像素值,C1为常数;电子设备对该色斑区域中的a像素通道进行去老化处理,得到去老化处理后a像素通道的像素值a’,a’=a-K2*C2*a,a为去老化处理前a像素通道的像素值,C2为常数;电子设备对该色斑区域中的b像素通道进行去老化处理,得到去老化处理后b像素通道的像素值b’,b’=b-K3*C3*b,b为去老化处理前b像素通道的像素值,C3为常数。
可以看出,去老化处理后色斑区域的L像素通道、a像素通道和b像素通道的像素值均减小,使得色斑区域经老化处理后颜色淡化,从而实现色斑去老化的视觉效果。
在一种可能的设计方法中,上述皮肤问题具体可以包括细纹问题;此时,电子设备检测上述面部图像中出现的皮肤问题,包括:电子设备在上述面部图像中检测出现细纹问题的细纹区域。
在一种可能的设计方法中,响应于用户在第一界面中的第一操作,在电子设备显示上述第二界面之前,还包括:电子设备对上述面部图像中的细纹区域进行老化处理,得到第一面部模拟图像;或者,响应于用户在第一界面中的第二操作,在电子设备显示上述第三界面之前,还包括:电子设备对上述面部图像中的细纹区域进行去老化处理,得到第二面部模拟图像。
示例性的,电子设备对上述面部图像中的细纹区域进行老化处理,得到第一面部模拟图像,具体包括:电子设备获取该细纹区域的变化系数D;电子设备对该细纹区域中的R像素通道进行去老化处理,得到去老化处理后R像素通道的像素值R’,R’=R-C5*D,R为去老化处理前R像素通道的像素值,C5为常数;电子设备对该细纹区域中的G像素通道进行去老化处理,得到去老化处理后G像素通道的像素值G’,G’=G-C6*D,G为去老化处理前G像素通道的像素值,C6为常数;电子设备对该细纹区域中的B像素通道进行去老化处理,得到去老化处理后B像素通道的像素值B’,B’=B-C7*D,R为去老化处理前B像素通道的像素值,C7为常数。
可以看出,老化处理后细纹区域的R像素通道、G像素通道和B像素通道的像素值均减 小,使得细纹区域经老化处理后颜色加深变暗,从而实现细纹老化的视觉效果。
示例性的,电子设备对上述面部图像中的细纹区域进行去老化处理,得到第二面部模拟图像,具体包括:电子设备获取该面部图像中该细纹区域的变化系数D;电子设备对该细纹区域中的R像素通道进行去去老化处理,得到去去老化处理后R像素通道的像素值R’,R’=R+C5*D,R为去去老化处理前R像素通道的像素值,C5为常数;电子设备对该细纹区域中的G像素通道进行去去老化处理,得到去去老化处理后G像素通道的像素值G’,G’=G+C6*D,G为去去老化处理前G像素通道的像素值,C6为常数;电子设备对该细纹区域中的B像素通道进行去去老化处理,得到去去老化处理后B像素通道的像素值B’,B’=B+C7*D,R为去去老化处理前B像素通道的像素值,C7为常数。
可以看出,去老化处理后细纹区域的R像素通道、G像素通道和B像素通道的像素值均增加,使得细纹区域经老化处理后颜色淡化增亮,从而实现细纹去老化的视觉效果。
在一种可能的设计方法中,上述第一界面中还可以包括老化进度条和滑块,此时,上述第一操作是指用户拖动该滑块在老化进度条上的滑动操作;该方法还可以包括:若检测到滑块被拖动至老化进度条的第一位置,则电子设备在第二界面中显示与第一位置对应的第一面部模拟图像;若检测到该滑块被拖动至该老化进度条的第二位置,则电子设备在第二界面中显示与第二位置对应的第一面部模拟图像。
在一种可能的设计方法中,上述第一界面中还可以包括去老化进度条和滑块,此时,上述第二操作是指用户拖动滑块在去老化进度条上的滑动操作;该方法还可以包括:若检测到滑块被拖动至去老化进度条的第一位置,则电子设备在第三界面中显示与第一位置对应的第二面部模拟图像;若检测到滑块被拖动至去老化进度条的第二位置,则电子设备在第三界面中显示与第二位置对应的第二面部模拟图像。
也就是说,电子设备还可以向用户显示上述皮肤问题在不同程度的老化/去老化情况下的面部图像,例如,可向用户显示经过不同时间后上述皮肤问题的老化情况,使用户可以动态的感受到当前面部中皮肤问题随时间的老化/去老化情况。
在一种可能的设计方法中,上述第一界面中还包括对上述面部图像中皮肤问题的打分情况或护肤建议;或,第二界面中还包括对第一面部模拟图像中皮肤问题的打分情况或护肤建议;或,该第三界面中还包括对第二面部模拟图像中皮肤问题的打分情况或护肤建议,从而直观的提醒用户重视面部出现的皮肤问题并及时进行修复。
第二方面,本申请提供一种电子设备,包括:触摸屏、一个或多个处理器、一个或多个存储器、以及一个或多个计算机程序;其中,处理器与触摸屏和存储器均耦合,上述一个或多个计算机程序被存储在存储器中,当电子设备运行时,该处理器执行该存储器存储的一个或多个计算机程序,以使电子设备执行上述任一项所述的皮肤检测方法。
第三方面,本申请提供一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行如第一方面中任一项所述的皮肤检测方法。
第四方面,本申请提供一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行如第一方面中任一项所述的皮肤检测方法。
可以理解地,上述提供的第二方面所述的电子设备、第三方面所述的计算机存储介质,以及第四方面所述的计算机程序产品均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
附图说明
图1为本申请实施例提供的一种电子设备的结构示意图一;
图2为本申请实施例提供的一种拍照原理示意图;
图3为本申请实施例提供的一种颜色空间的转换原理示意图;
图4为本申请实施例提供的一种皮肤检测方法的流程示意图一;
图5为本申请实施例提供的一种皮肤检测方法的场景示意图一;
图6为本申请实施例提供的一种皮肤检测方法的场景示意图二;
图7为本申请实施例提供的一种皮肤检测方法的场景示意图三;
图8为本申请实施例提供的一种皮肤检测方法的场景示意图四;
图9为本申请实施例提供的一种皮肤检测方法的场景示意图五;
图10为本申请实施例提供的一种皮肤检测方法的场景示意图六;
图11为本申请实施例提供的一种皮肤检测方法的场景示意图七;
图12为本申请实施例提供的一种皮肤检测方法的场景示意图八;
图13为本申请实施例提供的一种皮肤检测方法的场景示意图九;
图14为本申请实施例提供的一种皮肤检测方法的流程示意图二;
图15为本申请实施例提供的一种皮肤检测方法的场景示意图十;
图16为本申请实施例提供的一种皮肤检测方法的场景示意图十一;
图17为本申请实施例提供的一种皮肤检测方法的场景示意图十二;
图18为本申请实施例提供的一种皮肤检测方法的场景示意图十三;
图19为本申请实施例提供的一种皮肤检测方法的场景示意图十四;
图20为本申请实施例提供的一种皮肤检测方法的场景示意图十五;
图21为本申请实施例提供的一种皮肤检测方法的场景示意图十六;
图22为本申请实施例提供的一种皮肤检测方法的场景示意图十七;
图23为本申请实施例提供的一种电子设备的结构示意图二。
具体实施方式
下面将结合附图对本实施例的实施方式进行详细描述。
示例性的,本申请实施例提供的一种皮肤检测方法可应用于手机、平板电脑、桌面型、膝上型、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、手持计算机、上网本、个人数字助理(personal digital assistant,PDA)、可穿戴电子设备、虚拟现实设备等电子设备,本申请实施例对此不做任何限制。
以手机100为上述电子设备举例,图1示出了手机100的结构示意图。
手机100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中,传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本申请实施例示意的结构并不构成对手机100的具体限定。在本申请另一些实施例中,手机100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分 某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
其中,控制器可以是手机100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现手机100的触摸功能。
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现手机100的拍 摄功能。处理器110和显示屏194通过DSI接口通信,实现手机100的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为手机100充电,也可以用于手机100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对手机100的结构限定。在本申请另一些实施例中,手机100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过手机100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
手机100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。手机100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在手机100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器 件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在手机100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,手机100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得手机100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
手机100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,手机100可以包括1个或N个显示屏194,N为大于1的正整数。
手机100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。在一些实施例中,手机100可以包括1个或N个摄像头,N为大于1的正整数。摄像头193可以是前置摄像头也可以是后置摄像头。如图2所示,摄像头193一般包括镜头(lens)和感光元件(sensor),该感光元件可以为CCD(charge-coupled device,电荷耦合元件)或者CMOS(complementary metal oxide  semiconductor,互补金属氧化物半导体)等任意感光器件。
仍如图2所示,在拍摄过程中,被拍摄物体的反射光线经过镜头后可生成光学图像,该光学图像投射到感光元件上,感光元件将接收到的光信号转换为电信号,进而,摄像头193将得到的电信号发送至DSP(Digital Signal Processing,数字信号处理)模块进行数字信号处理,最终得到数字的数字图像。该数字图像可通过显示屏194在手机100上输出,也可以将该数字图像存储在内部存储器121中。
一般,DSP可通过RGB编码模式对感光元件输出的电信号进行编码,得到在RGB颜色空间中的数字图像(后续实施例中可称为RGB格式图像)。其中,RGB编码模式是通过对红(R)、绿(G)、蓝(B)三个像素通道的变化以及它们相互之间的叠加得到各式各样的颜色,RGB分别代表红、绿、蓝三个像素通道的颜色。如图3中的(a)所示,RGB格式的图像1中包括10*10个像素单元301,每个像素单元301中包括R、G、B三个像素通道,每个像素通道都具有对应的像素值。例如,每个像素通道的取值范围在[0,255]内,当取值越大时说明对应的颜色越浅,当取值越小时说明对应的颜色越深。
示例性的,手机100可以将RGB格式图像转换为在Lab颜色空间中的数字图像(后续实施例中可称为Lab格式图像)。其中,Lab颜色空间中的L分量用于表示像素单元的亮度,取值范围是[0,100],表示从纯黑到纯白;a表示从红色到绿色的范围,取值范围是[127,-128];b表示从黄色到蓝色的范围,取值范围是[127,-128]。如图3中的(b)所示,手机100将上述RGB格式的图像1转换为Lab格式的图像2后,图像2中仍包括10*10个像素单元302。不同的是,每个像素单元302中包括L、a、b三个像素通道,每个像素通道都具有对应的像素值。L、a、b这三个像素通道叠加后形成了一个像素单元302,当L、a、b这三个像素通道叠加后的取值越大时,该像素单元302的颜色更偏向黄色。
另外,手机100可以将RGB格式图像转换为在灰度颜色空间中的数字图像(后续实施例中可称为灰度格式的图像)。如图3中的(c)所示,手机100可以根据灰度公式计算每个像素单元303的灰度值G,得到对应的灰度格式的图像3。示例性的,灰度公式G=R*0.299+G*0.587+B*0.114。
视频编解码器用于对数字视频压缩或解压缩。手机100可以支持一种或多种视频编解码器。这样,手机100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现手机100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展手机100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行手机100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储手机100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储 器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
手机100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。手机100可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当手机100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。手机100可以设置至少一个麦克风170C。在另一些实施例中,手机100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,手机100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。手机100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,手机100根据压力传感器180A检测所述触摸操作强度。手机100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。
陀螺仪传感器180B可以用于确定手机100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定手机100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测手机100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消手机100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。
气压传感器180C用于测量气压。在一些实施例中,手机100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。
磁传感器180D包括霍尔传感器。手机100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当手机100是翻盖机时,手机100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。
加速度传感器180E可检测手机100在各个方向上(一般为三轴)加速度的大小。当手机100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。
距离传感器180F,用于测量距离。手机100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,手机100可以利用距离传感器180F测距以实现快速对焦。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。手机100通过发光二极管向外发射红外光。手机100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定手机100附近有物体。当检测到不充分的反射光时,手机100可以确定手机100附近没有物体。手机100可以利用接近光传感器180G检测用户手持手机100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器180L用于感知环境光亮度。手机100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测手机100是否在口袋里,以防误触。
指纹传感器180H用于采集指纹。手机100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
温度传感器180J用于检测温度。在一些实施例中,手机100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,手机100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,手机100对电池142加热,以避免低温导致手机100异常关机。在其他一些实施例中,当温度低于又一阈值时,手机100对电池142的输出电压执行升压,以避免低温导致的异常关机。
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于手机100的表面,与显示屏194所处的位置不同。
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。手机100可以接收按键输入,产生与手机100的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和手机100的接触和分离。手机100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。手机100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,手机100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在手机100中,不能和手机100分离。
以下将结合附图详细阐述本申请实施例提供的一种皮肤检测方法,如图4所示,以手机为电子设备举例,该方法包括步骤S401-S405。
S401、手机获取用户的面部图像。
示例性的,手机中可安装皮肤检测APP(或具有皮肤检测功能的APP)。如果检测到用户打开该皮肤检测APP的操作,如图5所示,手机可打开皮肤检测APP并显示皮肤检测APP的界面501。界面501中可设置测一测的按钮502,该按钮502可用于开启皮肤检测的功能。
如果检测到用户点击上述按钮502,手机可调用相机APP打开摄像头捕捉当前的拍摄画面。如图6所示,手机可将捕捉到的拍摄画面601显示在预览界面602中。并且,手机可提示用户移动手机将面部输入至拍摄画面601中。例如,手机可在预览界面601中通过文字提示用户使用前置摄像头拍摄面部图像。又例如,手机可通过语音的形式提示用户平视后置摄像头,并调整手机与用户之间的距离,使得手机能够在拍摄画面601中捕捉到用户的面部图像。
手机在捕捉拍摄画面601时可使用预设的人脸检测算法识别拍摄画面601中是否包含满足预设大小的人脸,如果检测到拍摄画面601中包含预设大小的人脸,则手机可自动执行拍照操作获取当前拍摄画面601中的图像,该图像中包含用户的面部图像。当然,用户也可以手动点击预览界面602中的拍照按钮603,响应于用户点击拍照按钮603的操作,手机可将此时获取到的拍摄画面601作为照片保存在存储器中。
在另一些实施例中,手机检测到用户打开上述皮肤检测功能后,还可以提示用户从相册中选一张包含用户面部的照片。进而,手机可从用户选择的照片中通过人脸检测算法提取用户的面部图像。当然,上述面部图像还是手机从服务器或其他电子设备中获取的,本申请实施例对此不做任何限制。
S402、手机确定上述面部图像中的色斑区域。
手机获取到用户的面部图像后,可使用预设的色斑检测算法提取面部图像中存在色斑的色斑区域。或者,手机获取到用户的面部图像后,可先提示用户选择需要检测的检测项,例如,该检测项可包括色斑、皱纹、青春痘或黑头等。如果检测到用户选择检测色斑这一检测项,则手机可使用预设的色斑检测算法提取面部图像中存在色斑的色斑区域。可以理解的是,本领域技术人员可根据实际经验或算法设置上述色斑检测算法,本申请实施例对此不做任何限制。
示例性的,手机可先提取上述面部图像中的感兴趣区域(region of interest,ROI)。例如,如图7所示,手机可以通过提取面部图像701中的特征点,将面部图像701中的脸颊区域702确定为ROI。进而,手机可根据脸颊区域702中各个像素单元的像素值确定脸颊区域702内 可能是色斑的候选像素单元。其中,手机确定脸颊区域702内候选像素单元的方式可以有多种,以下提供三种确定候选像素单元的方式,本申请实施例对此不做任何限制。
方式一:手机可计算脸颊区域702中所有像素单元的像素值的均值j1和方差f1。进而,手机可计算用于筛选候选像素单元的第一阈值Y1,Y1=j1-c1*f1,其中c1为预设的常数。第一阈值Y1可反映出脸颊区域702内图像颜色深浅的平均水平。进而,手机可对比脸颊区域702中每个像素单元的像素值与第一阈值Y1的大小,如果像素单元p i的像素值小于第一阈值Y1,说明该像素单元在脸颊区域702内的颜色较深,则手机可将该像素单元p i确定为色斑的候选像素单元。这样,手机可在脸颊区域702中提取到一个或多个候选像素单元。
方式二:手机可设置一个大小为n*n的检测框,检测框的大小一般小于ROI(即脸颊区域702)的大小。进而,手机可在脸颊区域702内以一定的步长移动该检测框。每次移动检测框后,手机可计算当前检测框中所有像素单元的像素值的均值j2和方差f2。进而,手机可计算用于筛选候选像素单元的第二阈值Y2,Y2=j2-c2*f2,其中c2为预设的常数。第二阈值Y2可反映出当前检测框内图像颜色深浅的平均水平。进而,手机可对比检测框内每个像素单元的像素值与第二阈值Y2的大小,如果像素单元p i的像素值小于第二阈值Y2,说明该像素单元在当前检测框内的颜色较深,则手机可将该像素单元确定为色斑的候选像素单元。通过在脸颊区域702内遍历上述检测框,手机可确定每次检测框内的候选像素单元,从而得到整个脸颊区域702内的一个或多个候选像素单元。
方式三:手机可将方式一中确定的候选像素单元和方式二中确定的候选像素单元的全集作为脸颊区域702内的所有候选像素单元。
手机确定出上述脸颊区域702内的多个候选像素单元后,手机可将彼此相邻的多个候选像素单元连通,得到面部图像701中的一个或多个候选色斑区域。由于面部的色斑一般是圆形的,且色斑的大小通常在一定的范围内。因此,得到上述候选色斑区域后,手机可将面积大于阈值1、面积小于阈值2(阈值1大于阈值2)或形态不规则的候选色斑区域删除,此时剩余的一个或多个候选色斑区域即为上述面部图像701中的色斑区域。
S403、手机显示包含上述面部图像的第一界面,并在第一界面中提示用户面部出现色斑问题。
仍以上述面部图像701举例,如果手机确定出面部图像701内存在一个或多个色斑区域,则如图8所示,手机可显示包含上述面部图像701的第一界面801。并且,手机可在第一界面801中提示用户的面部存在色斑问题。
例如,如图8中的(a)所示,手机可通过文字在第一界面801中提示用户其面部存在色斑问题。或者,手机还可以在第一界面801的面部图像701中标记确定出的色斑区域,帮助用户快速定位面部出现色斑的位置。另外,手机还可以在第一界面801中向用户推荐相应的护肤建议。例如,对于色斑问题,手机可提示用户增强防晒或使用美白祛斑产品等。
又例如,手机还可以根据确定出的色斑区域的大小、数量、颜色深浅等参数为用户面部的色斑问题进行打分。以满分100分为例,当打分越高时说明当前的色斑问题越严重。如图9所示,手机可以在第一界面801中显示本次对色斑问题的打分情况,通过打分的高低直观的提醒用户重视面部出现的色斑问题并及时进行修复。
进一步地,手机还可以记录最近一次或多次进行皮肤检测时对色斑问题的打分情况。例如,本次用户进行皮肤检测时手机对色斑问题的打分为64分,上一次用户进行皮肤检测时对色斑问题的打分为56分,那么,仍如图8中的(b)所示,手机可显示上次对色斑问题的打 分,并提示用户本次检测结果比上次检测结果增加了8分,从而通过打分的方式提示用户皮肤状态的变化情况。
当然,如果手机通过步骤S402确定出用户的面部图像中不包含色斑区域,说明用户的皮肤没有出现色斑问题。手机也可在上述第一界面中提示用户面部没有出现色斑问题。或者,如果手机基于获取到的面部图像检测出用户面部存在其他问题,例如黑头、痘痘或细纹等皮肤问题,手机也可在第一界面中向用户提示检测到的皮肤问题,本申请实施例对此不做任何限制。
示例性的,仍如图8中的(a)或(b)所示,上述第一界面801中还可以包括针对面部图像701中色斑问题的老化按钮802和去老化按钮803。如果检测到用户点击老化按钮802,则手机可通过执行下述步骤S404,模拟用户在没有护肤的情况下面部色斑区域的老化情况。相应的,如果检测到用户点击去老化按钮803,则手机可通过执行下述步骤S405,模拟用户在有效护肤的情况下面部色斑区域的改善情况,从而直观的提醒用户其面部色斑区域在不同情况下的变化,提高用户的用户体验。
S404、若检测到用户在第一界面中的第一操作,则手机显示第二界面,第二界面中包括上述色斑区域老化后的面部图像。
示例性的,上述第一操作可以为用户点击第一界面801中老化按钮802的操作。当然,上述第一操作还可以是用户在第一界面801中的滑动或按压等操作,本申请实施例对此不做任何限制。
手机在获取上述面部图像701时一般采用的是RGB编码格式,因此,第一界面801中的面部图像701通常为RGB格式的图像。如果检测到用户在上述第一界面801中点击了老化按钮802,则如图9所示,手机可将RGB格式的面部图像701转换为Lab格式的面部图像901。面部图像901中的每个像素单元均包括L、a、b三个独立的像素通道,每个像素通道均有对应的像素值(例如,L像素通道的像素值为L,a像素通道的像素值为a,b像素通道的像素值为b)。并且,面部图像901中的ROI区域(即脸颊区域)与面部图像701中的ROI区域对应。
那么,手机可根据脸颊区域内各个像素单元中L、a、b三个像素通道的像素值,计算色斑区域中L像素通道的变化系数K1,a像素通道的变化系数K2以及b像素通道的变化系数K3。进而,手机可使用变化系数K1、K2和K3更新色斑区域中各个像素单元的L、a、b三个像素通道的像素值,完成对色斑区域的老化处理。
示例性的,手机可计算在脸颊区域902中所有L像素通道的像素值的平均值M L。并且,手机可在脸颊区域902内设置一个大小为n*n的滑动窗口,滑动窗口的大小一般小于ROI(即脸颊区域902)的大小。进而,手机可在脸颊区域902内以一定的步长移动该滑动窗口,相邻两个滑动窗口之间可以有重叠区域。每次移动该滑动窗口后,如果当前滑动窗口内不包括色斑区域中的像素单元,则手机可继续移动该滑动窗口至下一位置。
如果当前滑动窗口内包括色斑区域中的一个或多个像素单元,则手机可计算当前滑动窗口中位于色斑区域的所有L像素通道的像素值的均值j L和方差f L,以及当前滑动窗口中所有L像素通道的像素值的均值m L。进而,手机可计算当前滑动窗口中L像素通道的变化系数K1,K1=M L/f L*(m L-j L)。可以看出,当滑动窗口中色斑区域的像素均值j L与整个滑动窗口中的像素均值m L之间的差异越小时,说明当前窗口内色斑区域越不明显,则变化系数K1的取值也相应越小;当滑动窗口中色斑区域的像素均值j L与整个滑动窗口中的像素均值m L之间 的差异越大时,说明当前窗口内色斑区域越明显,则变化系数K1的取值也相应越大。
进而,手机可根据上述变化系数K1对当前滑动窗口内色斑区域的各个L像素通道进行老化处理。示例性的,手机可按照下述公式(1),将当前滑动窗口内色斑区域的L像素通道的像素值L更新为L’,L’与变化系数K1为正相关关系。
L’=L+K1*C1*L        公式(1)
其中,C1为预设的常数。
同理,手机将上述滑动窗口移动至下一位置时,手机也可按照上述方法更新对应的色斑区域内各个L像素通道的像素值。当滑动窗口遍历完整个脸颊区域902后,如图9所示,脸颊区域中位于色斑区域的每个L像素通道进行老化处理后其像素值更新为L’。
可以看出,当变化系数K1的取值越大时,对应的色斑区域相对较为明显。通过公式(1)计算出的更新后的L’的取值相对较大,使得色斑区域经老化处理后颜色偏向黄色,从而实现色斑老化的视觉效果。
在一些实施例中,还可以预先在手机中设置L像素通道的系数阈值(例如P1)。手机计算出当前滑动窗口内色斑区域中各个L像素通道的像素值L’后,还可以计算更新后的各个L’的平均值。如果L’的平均值小于上述系数阈值P1,说明对当前色斑区域的L像素通道改变的很小,用户通过肉眼很难分辨这种细微的变化。因此,手机可继续使用上述公式(1)迭代更新色斑区域内各个L像素通道的像素值,直至更新后的L像素通道的像素值的平均值等于或大于上述系数阈值P1为止。
类似的,手机还可以按照上述方法计算每个滑动窗口内a像素通道的变化系数K2。其中,K2=M a/f a*(m a-j a),M a为脸颊区域中所有a像素通道的像素值的平均值,m a为滑动窗口中所有a像素通道的像素值的均值,j a为滑动窗口中位于色斑区域的各个a像素通道的像素值的均值,f a为滑动窗口中位于色斑区域的各个a像素通道的像素值的方差。
进而,手机可根据上述变化系数K2对各个滑动窗口内色斑区域的a像素通道进行老化处理。示例性的,如图9所示,手机可按照下述公式(2),将滑动窗口内色斑区域的各个a像素通道的像素值a更新为a’,a’与变化系数K2为正相关关系。
a’=a+K2*C2*a       公式(2)
其中,C2为预设的常数。
同样,还可以预先在手机中设置a像素通道的系数阈值(例如P2)。手机计算出当前滑动窗口中色斑区域的各个a像素通道的像素值a’后,还可以更新后的各个a’的平均值。如果a’的平均值小于上述系数阈值P2,说明当前色斑区域内a像素通道的变化很小,用户通过肉眼很难分辨这种细微的变化。因此,手机可继续使用上述公式(2)迭代更新色斑区域中各个a像素通道的像素值,直至更新后的a像素通道的像素值的平均值等于或大于上述系数阈值P2为止。
类似的,手机还可以按照上述方法计算每个滑动窗口内b像素通道的变化系数K3。其中,K3=M b/f b*(m b-j b),M b为脸颊区域中所有b像素通道的像素值的平均值,m b为滑动窗口中所有b像素通道的像素值的均值,j b为滑动窗口中位于色斑区域的所有b像素通道的像素值的均值,f b为滑动窗口中位于色斑区域的所有b像素通道的像素值的方差。
进而,手机可根据上述变化系数K3对各个滑动窗口内色斑区域的b像素通道进行老化处理。示例性的,如图9所示,手机可按照下述公式(3),将滑动窗口内色斑区域的各个b像素通道的像素值b更新为b’,b’与变化系数K3为正相关关系。
b’=b+K3*C3*b       公式(3)
其中,C3为预设的常数。
同样,还可以预先在手机中设置b像素通道的系数阈值(例如P3)。手机计算出当前滑动窗口内色斑区域中各个b像素通道的像素值b’后,还可以更新后的各个b’的平均值。如果b’的平均值小于上述系数阈值P3,说明当前色斑区域中b像素通道的变化很小,用户通过肉眼很难分辨这种细微的变化。因此,手机可继续使用上述公式(3)迭代更新色斑区域中各个b像素通道的像素值,直至更新后的b像素通道的像素值的平均值等于或大于上述系数阈值P3为止。
至此,如图9所示,手机根据上述变化系数K1、K2和K3,可对上述面部图像901中的色斑区域进行老化处理,并得到老化处理后的面部图像903。在面部图像903中,手机为色斑较为明显的区域确定出的变化系数相对较大,使得手机按照上述公式(1)-(3)确定出的各像素通道的像素值也相对较大,即老化后该区域中色斑的颜色偏向黄色,实现色斑强化的视觉效果。
需要说明的是,上述实施例中手机对色斑区域进行老化处理的方法仅为实例性说明,本领域技术人员可根据实际应用场景或实际经验进行设置。例如,手机可为L像素通道设置固定的变化系数K1,为a像素通道设置固定的变化系数K2,为b像素通道设置固定的变化系数K3,进而使用变化系数K1、K2和K3计算老化处理后色斑区域的各个像素值,本申请实施例对此不做任何限制。
另外,手机确定出老化处理后的面部图像903后,如图10所示,手机可将面部图像903显示在第二界面1001中。本申请实施例中可将手机模拟出的上述色斑区域老化后的面部图像称为面部模拟图像(例如第一面部模拟图像)。例如,手机可使用Lab格式在第二界面1001中显示上述面部图像903,也可以使用RGB格式在第二界面1001中显示上述面部图像903,本申请实施例对此不做任何限制。在一些实施例中,手机还可以对老化处理后的面部图像903进行平滑滤波处理,使面部图像903中的色斑边界实现平滑过渡。在第二界面1001中用户可直观的看到色斑问题老化后的面部图像,从而提醒用户及时修复面部出现的色斑问题。
并且,手机还可在第二界面1001中提示用户当前显示的面部图像903为一段时间(例如二个月)后对色斑不做修复时的面部效果示意图。另外,手机还可以对老化后的面部图像903中的色斑问题进行打分,并将打分结果显示在第二界面1001中,提醒用户及时修复面部出现的色斑问题。
示例性的,手机还可以在第二界面1001中向用户显示经过不同时间后上述色斑问题的老化情况。如图11所示,用户可在第二界面1001中拖动滑块1101在老化进度条1102上滑动。当用户将滑块1101拖动至老化进度条1102的终点(即上述老化按钮802)时,手机可显示进行上述老化处理后的面部图像903,此时显示的面部图像903为用户没有修复色斑问题两个月后的皮肤状况。
如果检测到用户将滑块1101拖动至靠近老化按钮802的某一处,例如,如图11所示,用户将滑块1101拖动至位于老化进度条1102的中间点A时,手机可根据滑块1101所在的位置重新计算上述色斑问题的老化情况。例如,手机可根据滑块1101所在的位置对图9中计算出的各个像素单元的像素值乘以对应的比例系数w(0<w<1)。例如,如果上述面部图像903中像素单元1的L像素通道的像素值为160、a像素通道的像素值为96、b像素通道的像素值为244,则手机可根据滑块1101在老化进度条1102上的位置A确定比例系数w=0.5。进而, 手机可计算与位置A对应的老化后的面部图像1103中像素单元1的像素值包括:L像素通道的像素值为160*0.5=80、a像素通道的像素值为96*0.5=48、b像素通道的像素值为244*0.5=122。类似的,手机可计算出面部图像1103中色斑区域内每个像素单元的像素值,进而,如图11所示,手机可按照计算出的各个像素值在第二界面1001中显示面部图像1103,向用户展示一个月后色斑问题的老化情况。也就是说,在用户向老化按钮802拖动滑块1101的同时,手机可按照时间顺序显示在不同时间下用户面部的色斑问题的老化情况,使用户可以动态的感受到当前面部中色斑问题随时间的老化情况。
S405、若检测到用户在第一界面中的第二操作,则手机显示第三界面,第三界面中包括上述色斑区域去老化后的面部图像。
步骤S404中阐述了对色斑区域进行老化处理的方法,相应的,步骤S405中将阐述对色斑区域进行去老化处理的方法。也就是说,本申请实施例提供的皮肤检测方法既可以模拟用户皮肤在一段时间内发生老化的变化情况,也可以模拟用户皮肤在一段时间内发生去老化的变化情况。
示例性的,上述第二操作可以为用户点击图8中第一界面801中去老化按钮803的操作。当然,上述第二操作还可以是用户在第一界面801中的滑动或按压等操作,本申请实施例对此不做任何限制。
与步骤S404类似的,仍如图9所示,检测到用户在上述第一界面801执行第二操作后,手机可将RGB格式的面部图像701转换为Lab格式的面部图像901。面部图像901中的ROI区域(即脸颊区域)与面部图像701中的ROI区域对应。进而,手机可根据脸颊区域内各个像素单元中L、a、b三个像素通道的像素值分别计算L像素通道的变化系数K1,a像素通道的变化系数K2以及b像素通道的变化系数K3。其中,变化系数K1、K2和K3的计算方法与步骤S404中计算变化系数K1、K2和K3的方法相同,故此处不再赘述。
与步骤S404不同的是,手机可根据上述变化系数K1、K2和K3,对色斑区域内的各个L像素通道、a像素通道和b像素通道分别进行去老化处理。
示例性的,手机可按照下述公式(4),将色斑区域内各个L像素通道的像素值L更新为L’,L’与变化系数K1为负相关关系。其中,公式(4)为:L’=L-K1*C1*L。
类似的,手机可按照下述公式(5),将色斑区域内各个a像素通道的像素值a更新为a’,a’与变化系数K2为负相关关系。其中,公式(5)为:a’=a-K2*C2*a。
类似的,手机可按照下述公式(6),将色斑区域内各个b像素通道的像素值b更新为b’,b’与变化系数K3为负相关关系。其中,公式(6)为:b’=b-K3*C3*b。
至此,如图12所示,手机根据上述变化系数K1、K2和K3,对上述面部图像901的色斑区域进行去老化处理后得到面部图像1201。在面部图像1201中,手机为色斑较为明显的区域确定出的变化系数相对较大,使得手机按照上述公式(4)-(6)确定出的各像素通道的像素值相对较小,即去老化后色斑区域的颜色变浅,实现色斑淡化的视觉效果。
如图13中的(a)所示,手机可将色斑区域去老化处理后得到的面部图像1201显示在第三界面1202中,使用户在第二界面1001中可直观的看到色斑问题去老化后的面部图像,从而提醒用户及时修复面部出现的色斑问题。本申请实施例中可将手机模拟出的上述色斑区域去老化后的面部图像称为面部模拟图像(例如第二面部模拟图像)。当然,手机还可在第三界面1202中显示对面部图像1201中色斑问题的打分情况。
在一些实施例中,手机还可以在第三界面1202中向用户显示经过不同时间后上述色斑问 题的去老化情况。如图13中的(b)所示,用户可在第三界面1202中拖动滑块1301在去老化进度条1302上滑动。当用户将滑块1301拖动至老化进度条1302的终点(即去老化按钮803)时,手机可显示经上述去老化处理后的面部图像1201。例如,面部图像1201是用户对色斑问题修复两个月后的皮肤状况。
如果检测到用户将滑块1301拖动至靠近去老化按钮803的某一处,例如,如图13所示,用户将滑块1301拖动至位于去老化进度条1302的中间点B时,手机可根据滑块1301所在的位置重新计算上述色斑问题的去老化情况。例如,手机可根据滑块1301所在的位置,将面部图像1201的色斑区域中的各个像素单元的像素值乘以对应的比例系数w(0<w<1)。进而,如图13所示,手机可按照计算出的各个像素值在第二界面1001中显示面部图像1303,例如,面部图像1303是用户对色斑问题修复一个月后的皮肤状况。也就是说,在用户向去老化按钮803拖动滑块1301的同时,手机可按照时间顺序显示在不同时间下用户面部的色斑问题的去老化情况,使用户可以动态的感受到当前面部中色斑问题随时间的去老化情况。
上述实施例中是以手机模拟用户面部图像中色斑问题的老化和去老化场景举例说明的,可以理解的是,手机获取到用户的面部图像(例如上述面部图像701)后,还可以检测用户面部出现的其他问题。如图14所示,以下实施例中将以检测用户面部出现的细纹问题举例进行说明。
S1401、手机确定面部图像中的细纹区域。
手机获取到用户的面部图像后,可使用预设的细纹检测算法提取面部图像中存在细纹的细纹区域。仍如上述图8所示,手机在显示包含面部图像701的第一界面801时,还在第一界面801中设置了色斑按钮804和细纹按钮805。如果检测到用户点击细纹按钮805,则手机可提取面部图像中存在细纹的细纹区域。或者,手机获取到面部图像701后可自动提取面部图像中存在细纹的细纹区域,本申请实施例对此不做任何限制。
其中,上述细纹检测算法可以为螺旋金字塔算法等,本领域技术人员可以根据实际经验或实际应用场景设置上述细纹检测算法,本申请实施例对此不做任何限制。
S1402、手机显示包含上述面部图像的第三界面,并在第三界面中提示用户面部出现细纹问题。
与上述步骤S403类似的,手机确定出面部图像701内的细纹区域后,如图15所示,手机可将用户的面部图像显示在第三界面1501中,并在第三界面1501中提示用户的面部存在细纹问题。例如,手机可以在第三界面1501的面部图像1501中标记确定出的细纹区域。又例如,手机可以对面部图像1501中出现的细纹问题进行打分,并在第三界面1501中显示打分结果。又例如,手机还可以在第三界面1501中显示中向用户推荐相应的护肤建议,如增强补水、使用去皱产品等。
示例性的,如图15所示,上述第三界面1501中还可以包括针对面部图像701中细纹问题的老化按钮1502和去老化按钮1503。如果检测到用户点击老化按钮1502,则手机可通过执行下述步骤S1403,模拟用户在没有护肤的情况下面部细纹区域的老化情况。相应的,如果检测到用户点击去老化按钮1503,则手机可通过执行下述步骤S1404,模拟用户在有效护肤的情况下面部色细纹域的改善情况,从而直观的提醒用户其面部细纹区域在不同情况下的变化,提高用户的用户体验。
S1403、若检测到用户在第三界面中的第一操作,则手机显示第四界面,第四界面中包括上述细纹区域老化后的面部图像。
示例性的,若果检测到用户点击第三界面1501中的老化按钮1502,说明用户希望看到细纹区域老化后的样子。细纹老化反映在图像上一般是细纹颜色的加深变暗,因此,手机可对确定出的细纹区域的像素单元进行加深处理。
例如,手机可将RGB格式的面部图像701转化为灰度格式的面部图像1601。在面部图像1601中每个像素单元都具有一个灰度值G。手机可根据每个像素单元的灰度值G确定上述细纹区域的变化系数D。
示例性的,手机可对面部图像1601中各个像素单元的灰度值进行归一化处理,进而,手机可计算归一化之后面部图像1601中各个像素单元的灰度平均值G p。手机可将变化系数D设置为:D=G p+C4,其中C4为常数。例如,C4=0.5。
手机确定出上述细纹区域的变化系数D后,如图16所示,手机可修改面部图像701中细纹区域的每个R、G、B像素通道的像素值,使得细纹颜色的加深变暗。例如,更新后的R像素通道的取值R’=R-C5*D,C5为常数(例如C5=0.229);更新后的G像素通道的取值G’=G-C6*D,C6为常数(例如C6=0.587);更新后的B像素通道的取值B’=B-C7*D,C7为常数(例如C7=0.114)。可以看出,每个像素通道更新后的取值与变化系数D为负相关的关系。
进而,如图17所示,手机可将细纹区域更新后的面部图像1701显示在第四界面1702中。面部图像1701可称为面部模拟图像(例如第一面部模拟图像)。在面部图像1701中,手机通过上述公式将细纹区域中各个像素通道的像素值都降低了,使得细纹区域加深变暗,从而模拟出细纹老化的视觉效果。
示例性的,手机还可以在第四界面1702中向用户显示经过不同时间后上述细纹问题的老化情况。如图18所示,用户可在第四界面1702中拖动滑块1801在老化进度条1802上滑动。当滑块1801被拖动至不同位置时,手机可显示经过不同时间后细纹老化的面部图像,使用户可以动态的感受到当前面部中细纹问题随时间的老化情况。
例如,当用户将滑块1801拖动至老化进度条1802的终点(即上述老化按钮1502)时,手机可显示上述经老化处理后的面部图像1701,面部图像1701为两个月后用户没有修复细纹问题时的皮肤状况。当用户将滑块1801拖动至老化进度条1802的中间位置时,手机可对面部图像1701中细纹区域内各个R、G、B像素通道的像素值乘以对应的比例系数v(0<v<1),得到与当前滑块位置对应的面部图像1803,如图18所示,面部图像1803为一个月后用户没有修复细纹问题时的皮肤状况。
S1404、若检测到用户在第三界面中的第二操作,则手机显示第五界面,第五界面中包括上述细纹区域去老化后的面部图像。
示例性的,若果检测到用户点击第三界面1501中的去老化按钮1503,说明用户希望看到细纹区域去老化后的样子。细纹去老化反映在图像上一般是细纹颜色的淡化增亮,因此,手机可对确定出的细纹区域的像素单元进行淡化处理。
例如,手机可按照上述步骤S1403中的方法计算细纹区域的变化系数D。进而,如图19所示,手机可修改面部图像701中细纹区域的每个R、G、B像素通道的像素值,使得细纹颜色的淡化增亮。例如,更新后的R像素通道的取值R’=R+C5*D;更新后的G像素通道的取值G’=G+C6*D;更新后的B像素通道的取值B’=B+C7*D。可以看出,每个像素通道更新后的取值与变化系数D为正相关的关系。
进而,如图20中的(a)所示,手机可将细纹区域更新后的面部图像1901显示在第五界 面1902中。面部图像1901可称为面部模拟图像(例如第二面部模拟图像)。在面部图像1901中,手机通过上述公式将细纹区域中各个像素通道的像素值都增加了,使得细纹区域淡化增亮,从而模拟出细纹去老化的视觉效果。
示例性的,手机还可以在第五界面1902中向用户显示经过不同时间后上述细纹问题的老化情况。如图20中的(b)所示,用户可在第五界面1902中拖动滑块2001在去老化进度条2002上滑动。当滑块2001被拖动至不同位置时,手机可显示经过不同时间后细纹去老化的面部图像,使用户可以动态的感受到当前面部中细纹问题随时间的去老化情况。
例如,当用户将滑块2001拖动至去老化进度条2002的终点(即去老化按钮1503)时,手机可显示上述经去老化处理后的面部图像1901,面部图像1901为用户修复细纹问题两个月后的皮肤状况。当用户将滑块2001拖动至去老化进度条2002的中间位置时,手机可对面部图像1901中细纹区域内各个R、G、B像素通道的像素值乘以对应的比例系数v(0<v<1),得到与当前滑块位置对应的面部图像2003,如图20中的(b)所示,面部图像2003为用户修复细纹问题一个月后的皮肤状况。
在另一些实施例中,手机获取到用户的面部图像(例如上述面部图像701)后,不仅可以确定上述面部图像中的色斑区域,还可以确定上述面部图像中的细纹区域。进而,如图21所示,手机在界面2101中显示用户面部图像701的同时,可一并提示用户在面部出现色斑问题和细纹问题。
界面2101中还可以设置老化按钮2102和去老化按钮2103。如果检测到用户点击老化按钮2102,则如图22中的(a)所示,手机可通过上述步骤S404和S1403模拟出上述色斑问题和细纹问题老化后的面部图像2201。如果检测到用户点击去老化按钮2103,则如图22中的(b)所示,手机可通过上述步骤S405和S1404模拟出上述色斑问题和细纹问题去老化后的面部图像2202。
可以看出,在本申请提供的皮肤检测方法中,手机可针对检测出的皮肤问题(例如上述色斑问题、细纹问题等)模拟该皮肤问题在一段时间内老化/去老化的变化情况,并且,手机可将模拟出的老化/去老化后的面部图像展示给用户,使用户可直观、生动的感受到自己皮肤在未来一段时间内可能出现的变化情况,从而提醒用户及时修复出现的皮肤问题,提高用户的使用体验。
如图23所示,本申请实施例公开了一种电子设备,包括:触摸屏2301,所述触摸屏2301包括触敏表面2306和显示屏2307;一个或多个处理器2302;存储器2303;一个或多个应用程序(未示出);以及一个或多个计算机程序2304,上述各器件可以通过一个或多个通信总线2305连接。其中,该一个或多个计算机程序2304被存储在上述存储器2303中并被配置为被该一个或多个处理器2302执行,该一个或多个计算机程序2304包括指令,上述指令可以用于执行上述应实施例中的步骤S401-S405或S1401-S104中的皮肤检测方法。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请实施例各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以 采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:快闪存储器、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请实施例的具体实施方式,但本申请实施例的保护范围并不局限于此,任何在本申请实施例揭露的技术范围内的变化或替换,都应涵盖在本申请实施例的保护范围之内。因此,本申请实施例的保护范围应以所述权利要求的保护范围为准。

Claims (25)

  1. 一种皮肤检测方法,其特征在于,包括:
    电子设备获取用户的面部图像;
    所述电子设备检测所述面部图像中出现的皮肤问题;
    所述电子设备在第一界面中提示用户面部出现皮肤问题,所述第一界面中包括所述面部图像;
    响应于用户在所述第一界面中的第一操作,所述电子设备显示第二界面,所述第二界面中包括所述皮肤问题老化后的第一面部模拟图像;或者,
    响应于用户在所述第一界面中的第二操作,所述电子设备显示第三界面,所述第三界面中包括所述皮肤问题去老化后的第二面部模拟图像。
  2. 根据权利要求1所述的方法,其特征在于,所述皮肤问题包括色斑问题;所述电子设备检测所述面部图像中出现的皮肤问题,包括:
    所述电子设备在所述面部图像中检测出现色斑问题的色斑区域。
  3. 根据权利要求2所述的方法,其特征在于,
    响应于用户在所述第一界面中的第一操作,在所述电子设备显示第二界面之前,还包括:
    所述电子设备对所述面部图像中的所述色斑区域进行老化处理,得到所述第一面部模拟图像;
    响应于用户在所述第一界面中的第二操作,在所述电子设备显示第三界面之前,还包括:
    所述电子设备对所述面部图像中的所述色斑区域进行去老化处理,得到所述第二面部模拟图像。
  4. 根据权利要求3所述的方法,其特征在于,所述电子设备对所述面部图像中的所述色斑区域进行老化处理,得到所述第一面部模拟图像,包括:
    所述电子设备获取所述色斑区域内L像素通道的变化系数K1、a像素通道的变化系数K2以及b像素通道的变化系数K3;
    所述电子设备对所述色斑区域中的L像素通道进行老化处理,得到老化处理后L像素通道的像素值L’,L’=L+K1*C1*L,L为老化处理前L像素通道的像素值,C1为常数;
    所述电子设备对所述色斑区域中的a像素通道进行老化处理,得到老化处理后a像素通道的像素值a’,a’=a+K2*C2*a,a为老化处理前a像素通道的像素值,C2为常数;
    所述电子设备对所述色斑区域中的b像素通道进行老化处理,得到老化处理后b像素通道的像素值b’,b’=b+K3*C3*b,b为老化处理前b像素通道的像素值,C3为常数。
  5. 根据权利要求3所述的方法,其特征在于,所述电子设备对所述面部图像中的所述色斑区域进行去老化处理,得到所述第二面部模拟图像,包括:
    所述电子设备获取所述色斑区域内L像素通道的变化系数K1、a像素通道的变化系数K2以及b像素通道的变化系数K3;
    所述电子设备对所述色斑区域中的L像素通道进行去老化处理,得到去老化处理后L像素通道的像素值L’,L’=L-K1*C1*L,L为去老化处理前L像素通道的像素值,C1为常数;
    所述电子设备对所述色斑区域中的a像素通道进行去老化处理,得到去老化处理后a像素通道的像素值a’,a’=a-K2*C2*a,a为去老化处理前a像素通道的像素值,C2为常数;
    所述电子设备对所述色斑区域中的b像素通道进行去老化处理,得到去老化处理后b像素通道的像素值b’,b’=b-K3*C3*b,b为去老化处理前b像素通道的像素值,C3为常数。
  6. 根据权利要求1-5中任一项所述的方法,其特征在于,所述皮肤问题包括细纹问题;所述电子设备检测所述面部图像中出现的皮肤问题,包括:
    所述电子设备在所述面部图像中检测出现细纹问题的细纹区域。
  7. 根据权利要求6所述的方法,其特征在于,
    响应于用户在所述第一界面中的第一操作,在所述电子设备显示第二界面之前,还包括:
    所述电子设备对所述面部图像中的所述细纹区域进行老化处理,得到所述第一面部模拟图像;
    响应于用户在所述第一界面中的第二操作,在所述电子设备显示第三界面之前,还包括:
    所述电子设备对所述面部图像中的所述细纹区域进行去老化处理,得到所述第二面部模拟图像。
  8. 根据权利要求7所述的方法,其特征在于,所述电子设备对所述面部图像中的所述细纹区域进行老化处理,得到所述第一面部模拟图像,包括:
    所述电子设备获取所述细纹区域的变化系数D;
    所述电子设备对所述细纹区域中的R像素通道进行去老化处理,得到去老化处理后R像素通道的像素值R’,R’=R-C5*D,R为去老化处理前R像素通道的像素值,C5为常数;
    所述电子设备对所述细纹区域中的G像素通道进行去老化处理,得到去老化处理后G像素通道的像素值G’,G’=G-C6*D,G为去老化处理前G像素通道的像素值,C6为常数;
    所述电子设备对所述细纹区域中的B像素通道进行去老化处理,得到去老化处理后B像素通道的像素值B’,B’=B-C7*D,R为去老化处理前B像素通道的像素值,C7为常数。
  9. 根据权利要求7所述的方法,其特征在于,所述电子设备对所述面部图像中的所述细纹区域进行去老化处理,得到所述第二面部模拟图像,包括:
    所述电子设备获取所述面部图像中所述细纹区域的变化系数D;
    所述电子设备对所述细纹区域中的R像素通道进行去去老化处理,得到去去老化处理后R像素通道的像素值R’,R’=R+C5*D,R为去去老化处理前R像素通道的像素值,C5为常数;
    所述电子设备对所述细纹区域中的G像素通道进行去去老化处理,得到去去老化处理后G像素通道的像素值G’,G’=G+C6*D,G为去去老化处理前G像素通道的像素值,C6为常数;
    所述电子设备对所述细纹区域中的B像素通道进行去去老化处理,得到去去老化处理后B像素通道的像素值B’,B’=B+C7*D,R为去去老化处理前B像素通道的像素值,C7为常数。
  10. 根据权利要求1-9中任一项所述的方法,其特征在于,所述第一界面中还包括老化进度条和滑块,所述第一操作为用户拖动所述滑块在所述老化进度条上的滑动操作;所述方法还包括:
    若检测到所述滑块被拖动至所述老化进度条的第一位置,则所述电子设备在所述第二界面中显示与所述第一位置对应的第一面部模拟图像;
    若检测到所述滑块被拖动至所述老化进度条的第二位置,则所述电子设备在所述第二界面中显示与所述第二位置对应的第一面部模拟图像。
  11. 根据权利要求1-9中任一项所述的方法,其特征在于,所述第一界面中还包括去老化进度条和滑块,所述第二操作为用户拖动所述滑块在所述去老化进度条上的滑动操作;所 述方法还包括:
    若检测到所述滑块被拖动至所述去老化进度条的第一位置,则所述电子设备在所述第三界面中显示与所述第一位置对应的第二面部模拟图像;
    若检测到所述滑块被拖动至所述去老化进度条的第二位置,则所述电子设备在所述第三界面中显示与所述第二位置对应的第二面部模拟图像。
  12. 根据权利要求1-11中任一项所述的方法,其特征在于,
    所述第一界面中还包括对所述面部图像中皮肤问题的打分情况或护肤建议;或,
    所述第二界面中还包括对所述第一面部模拟图像中皮肤问题的打分情况或护肤建议;或,
    所述第三界面中还包括对所述第二面部模拟图像中皮肤问题的打分情况或护肤建议。
  13. 一种电子设备,其特征在于,包括:
    触摸屏,其中,所述触摸屏包括触敏表面和显示屏;
    一个或多个处理器;
    一个或多个存储器;
    以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述一个或多个存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述电子设备执行时,使得所述电子设备执行以下步骤:
    获取用户的面部图像;
    检测所述面部图像中出现的皮肤问题;
    在第一界面中提示用户面部出现皮肤问题,所述第一界面中包括所述面部图像;
    响应于用户在所述第一界面中的第一操作,显示第二界面,所述第二界面中包括所述皮肤问题老化后的第一面部模拟图像;或者,
    响应于用户在所述第一界面中的第二操作,显示第三界面,所述第三界面中包括所述皮肤问题去老化后的第二面部模拟图像。
  14. 根据权利要求13所述的电子设备,其特征在于,所述电子设备检测所述面部图像中出现的皮肤问题,具体包括:
    在所述面部图像中检测出现色斑问题的色斑区域。
  15. 根据权利要求14所述的电子设备,其特征在于,当所述指令被所述电子设备执行时,还使得所述电子设备执行以下步骤:
    对所述面部图像中的所述色斑区域进行老化处理,得到所述第一面部模拟图像;
    对所述面部图像中的所述色斑区域进行去老化处理,得到所述第二面部模拟图像。
  16. 根据权利要求15所述的电子设备,其特征在于,所述电子设备对所述面部图像中的所述色斑区域进行老化处理,得到所述第一面部模拟图像,具体包括:
    获取所述色斑区域内L像素通道的变化系数K1、a像素通道的变化系数K2以及b像素通道的变化系数K3;
    对所述色斑区域中的L像素通道进行老化处理,得到老化处理后L像素通道的像素值L’,L’=L+K1*C1*L,L为老化处理前L像素通道的像素值,C1为常数;
    对所述色斑区域中的a像素通道进行老化处理,得到老化处理后a像素通道的像素值a’,a’=a+K2*C2*a,a为老化处理前a像素通道的像素值,C2为常数;
    对所述色斑区域中的b像素通道进行老化处理,得到老化处理后b像素通道的像素值b’,b’=b+K3*C3*b,b为老化处理前b像素通道的像素值,C3为常数。
  17. 根据权利要求15所述的电子设备,其特征在于,所述电子设备对所述面部图像中的所述色斑区域进行去老化处理,得到所述第二面部模拟图像,具体包括:
    获取所述色斑区域内L像素通道的变化系数K1、a像素通道的变化系数K2以及b像素通道的变化系数K3;
    对所述色斑区域中的L像素通道进行去老化处理,得到去老化处理后L像素通道的像素值L’,L’=L-K1*C1*L,L为去老化处理前L像素通道的像素值,C1为常数;
    对所述色斑区域中的a像素通道进行去老化处理,得到去老化处理后a像素通道的像素值a’,a’=a-K2*C2*a,a为去老化处理前a像素通道的像素值,C2为常数;
    对所述色斑区域中的b像素通道进行去老化处理,得到去老化处理后b像素通道的像素值b’,b’=b-K3*C3*b,b为去老化处理前b像素通道的像素值,C3为常数。
  18. 根据权利要求13-17中任一项所述的电子设备,其特征在于,所述电子设备检测所述面部图像中出现的皮肤问题,具体包括:
    在所述面部图像中检测出现细纹问题的细纹区域。
  19. 根据权利要求18所述的电子设备,其特征在于,当所述指令被所述电子设备执行时,还使得所述电子设备执行以下步骤:
    对所述面部图像中的所述细纹区域进行老化处理,得到所述第一面部模拟图像;
    对所述面部图像中的所述细纹区域进行去老化处理,得到所述第二面部模拟图像。
  20. 根据权利要求19所述的电子设备,其特征在于,所述电子设备对所述面部图像中的所述细纹区域进行老化处理,得到所述第一面部模拟图像,具体包括:
    获取所述细纹区域的变化系数D;
    对所述细纹区域中的R像素通道进行去老化处理,得到去老化处理后R像素通道的像素值R’,R’=R-C5*D,R为去老化处理前R像素通道的像素值,C5为常数;
    对所述细纹区域中的G像素通道进行去老化处理,得到去老化处理后G像素通道的像素值G’,G’=G-C6*D,G为去老化处理前G像素通道的像素值,C6为常数;
    对所述细纹区域中的B像素通道进行去老化处理,得到去老化处理后B像素通道的像素值B’,B’=B-C7*D,R为去老化处理前B像素通道的像素值,C7为常数。
  21. 根据权利要求19所述的电子设备,其特征在于,所述电子设备对所述面部图像中的所述细纹区域进行去老化处理,得到所述第二面部模拟图像,具体包括:
    获取所述面部图像中所述细纹区域的变化系数D;
    对所述细纹区域中的R像素通道进行去去老化处理,得到去去老化处理后R像素通道的像素值R’,R’=R+C5*D,R为去去老化处理前R像素通道的像素值,C5为常数;
    对所述细纹区域中的G像素通道进行去去老化处理,得到去去老化处理后G像素通道的像素值G’,G’=G+C6*D,G为去去老化处理前G像素通道的像素值,C6为常数;
    对所述细纹区域中的B像素通道进行去去老化处理,得到去去老化处理后B像素通道的像素值B’,B’=B+C7*D,R为去去老化处理前B像素通道的像素值,C7为常数。
  22. 根据权利要求13-21中任一项所述的电子设备,其特征在于,所述第一界面中还包括老化进度条和滑块,所述第一操作为用户拖动所述滑块在所述老化进度条上的滑动操作;当所述指令被所述电子设备执行时,还使得所述电子设备执行以下步骤:
    若检测到所述滑块被拖动至所述老化进度条的第一位置,则在所述第二界面中显示与所述第一位置对应的第一面部模拟图像;
    若检测到所述滑块被拖动至所述老化进度条的第二位置,则在所述第二界面中显示与所述第二位置对应的第一面部模拟图像。
  23. 根据权利要求13-21中任一项所述的电子设备,其特征在于,所述第一界面中还包括去老化进度条和滑块,所述第二操作为用户拖动所述滑块在所述去老化进度条上的滑动操作;当所述指令被所述电子设备执行时,还使得所述电子设备执行以下步骤:
    若检测到所述滑块被拖动至所述去老化进度条的第一位置,则在所述第三界面中显示与所述第一位置对应的第二面部模拟图像;
    若检测到所述滑块被拖动至所述去老化进度条的第二位置,则在所述第三界面中显示与所述第二位置对应的第二面部模拟图像。
  24. 一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,其特征在于,当所述指令在电子设备上运行时,使得所述电子设备执行如权利要求1-12中任一项所述的皮肤检测方法。
  25. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在电子设备上运行时,使得所述电子设备执行如权利要求1-12中任一项所述的皮肤检测方法。
PCT/CN2019/122317 2018-12-26 2019-12-02 一种皮肤检测方法及电子设备 Ceased WO2020134877A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP19902077.7A EP3885968A4 (en) 2018-12-26 2019-12-02 SKIN DETECTION METHOD AND ELECTRONIC DEVICE
US17/418,368 US11759143B2 (en) 2018-12-26 2019-12-02 Skin detection method and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811603196.8 2018-12-26
CN201811603196.8A CN109793498B (zh) 2018-12-26 2018-12-26 一种皮肤检测方法及电子设备

Publications (1)

Publication Number Publication Date
WO2020134877A1 true WO2020134877A1 (zh) 2020-07-02

Family

ID=66557755

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/122317 Ceased WO2020134877A1 (zh) 2018-12-26 2019-12-02 一种皮肤检测方法及电子设备

Country Status (4)

Country Link
US (1) US11759143B2 (zh)
EP (1) EP3885968A4 (zh)
CN (1) CN109793498B (zh)
WO (1) WO2020134877A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113743388A (zh) * 2021-11-08 2021-12-03 武汉烽火信息集成技术有限公司 一种面部au关键点检测的方法、装置和电子设备
CN117876371A (zh) * 2024-03-11 2024-04-12 南京理工大学 基于改进卷积神经网络的液压泵零件齐套检测方法

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111199171B (zh) * 2018-11-19 2022-09-23 荣耀终端有限公司 一种皱纹检测方法和终端设备
CN109793498B (zh) * 2018-12-26 2020-10-27 华为终端有限公司 一种皮肤检测方法及电子设备
CN111325746A (zh) * 2020-03-16 2020-06-23 维沃移动通信有限公司 一种肤质检测方法及电子设备
US11915305B2 (en) 2020-04-01 2024-02-27 Snap Inc. Identification of physical products for augmented reality experiences in a messaging system
US11521334B2 (en) 2020-04-01 2022-12-06 Snap Inc. Augmented reality experiences of color palettes in a messaging system
US12118601B2 (en) * 2020-04-01 2024-10-15 Snap Inc. Method, system, and non-transitory computer-readable medium for analyzing facial features for augmented reality experiences of physical products in a messaging system
US12165242B2 (en) 2020-04-01 2024-12-10 Snap Inc. Generating augmented reality experiences with physical products using profile information
CN111374490A (zh) * 2020-04-22 2020-07-07 深圳市锐吉电子科技有限公司 一种拍照组件及智能镜子
CN113554557B (zh) * 2020-04-26 2025-01-24 华为技术有限公司 以增强现实方式显示皮肤细节的方法及电子设备
CN111651040B (zh) * 2020-05-27 2021-11-26 华为技术有限公司 用于肌肤检测的电子设备的交互方法及电子设备
CN113749614B (zh) * 2020-06-05 2023-03-10 华为技术有限公司 皮肤检测方法和设备
CN114187649B (zh) * 2020-08-24 2025-06-03 华为技术有限公司 护肤辅助方法、设备及存储介质
CN112107296B (zh) * 2020-09-10 2023-03-14 深圳安道客网络科技有限公司 皮肤信息检测系统及检测方法
CN112221021B (zh) * 2020-11-02 2023-02-07 中南大学湘雅三医院 一种皮肤科智能激光祛斑控制系统
CN115131822B (zh) * 2022-07-06 2024-10-29 上海睿触科技有限公司 一种基于深度学习的皮肤色斑识别方法
US12462395B2 (en) 2022-12-13 2025-11-04 International Business Machines Corporation Simulating progression of skin conditions based on machine learning
CN119671961B (zh) * 2024-11-28 2025-12-16 广州稀咖科技有限公司 一种基于测油面纸的出油等级分析方法及装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1781448A (zh) * 1999-06-14 2006-06-07 宝洁公司 皮肤成像和分析系统及方法
US20080212894A1 (en) * 2007-03-02 2008-09-04 Ramazan Demirli Method and apparatus for simulation of facial skin aging and de-aging
CN101916370A (zh) * 2010-08-31 2010-12-15 上海交通大学 人脸检测中非特征区域图像处理的方法
CN103251406A (zh) * 2013-05-13 2013-08-21 广东欧珀移动通信有限公司 一种检测皮肤含水量的方法、装置及移动终端
US20180276883A1 (en) * 2017-03-21 2018-09-27 Canfield Scientific, Incorporated Methods and apparatuses for age appearance simulation
CN109793498A (zh) * 2018-12-26 2019-05-24 华为终端有限公司 一种皮肤检测方法及电子设备

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2199554C (en) * 1996-03-12 2006-03-14 Loren R. Ouellette Skin analyzer with speech capability
JP2007184683A (ja) * 2006-01-04 2007-07-19 Eastman Kodak Co 画像データ処理装置及び方法
CN103152476B (zh) * 2013-01-31 2015-01-28 广东欧珀移动通信有限公司 检测皮肤状态的手机及其使用方法
US9256963B2 (en) 2013-04-09 2016-02-09 Elc Management Llc Skin diagnostic and image processing systems, apparatus and articles
SG10202100694SA (en) * 2016-04-22 2021-03-30 Fitskin Inc Systems and Method for Skin Analysis Using Electronic Devices
KR102509934B1 (ko) * 2016-08-01 2023-03-15 엘지전자 주식회사 이동 단말기 및 그의 동작 방법
WO2020113326A1 (en) * 2018-12-04 2020-06-11 Jiang Ruowei Automatic image-based skin diagnostics using deep learning

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1781448A (zh) * 1999-06-14 2006-06-07 宝洁公司 皮肤成像和分析系统及方法
US20080212894A1 (en) * 2007-03-02 2008-09-04 Ramazan Demirli Method and apparatus for simulation of facial skin aging and de-aging
CN101652784A (zh) * 2007-03-02 2010-02-17 宝洁公司 模拟面部皮肤老化和去老化的方法及装置
CN101916370A (zh) * 2010-08-31 2010-12-15 上海交通大学 人脸检测中非特征区域图像处理的方法
CN103251406A (zh) * 2013-05-13 2013-08-21 广东欧珀移动通信有限公司 一种检测皮肤含水量的方法、装置及移动终端
US20180276883A1 (en) * 2017-03-21 2018-09-27 Canfield Scientific, Incorporated Methods and apparatuses for age appearance simulation
CN109793498A (zh) * 2018-12-26 2019-05-24 华为终端有限公司 一种皮肤检测方法及电子设备

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113743388A (zh) * 2021-11-08 2021-12-03 武汉烽火信息集成技术有限公司 一种面部au关键点检测的方法、装置和电子设备
CN117876371A (zh) * 2024-03-11 2024-04-12 南京理工大学 基于改进卷积神经网络的液压泵零件齐套检测方法

Also Published As

Publication number Publication date
US20220148161A1 (en) 2022-05-12
EP3885968A1 (en) 2021-09-29
CN109793498B (zh) 2020-10-27
US11759143B2 (en) 2023-09-19
CN109793498A (zh) 2019-05-24
EP3885968A4 (en) 2022-01-12

Similar Documents

Publication Publication Date Title
CN109793498B (zh) 一种皮肤检测方法及电子设备
CN115129410B (zh) 桌面壁纸配置方法、装置、电子设备及可读存储介质
KR102548317B1 (ko) 색소 검출 방법 및 전자 장치
WO2020015144A1 (zh) 一种拍照方法及电子设备
EP3813012B1 (en) Skin spot detection method and electronic device
WO2022017261A1 (zh) 图像合成方法和电子设备
CN113810600A (zh) 终端的图像处理方法、装置和终端设备
WO2020015149A1 (zh) 一种皱纹检测方法及电子设备
EP4280586B1 (en) Point light source image detection method and electronic device
CN113810601A (zh) 终端的图像处理方法、装置和终端设备
CN113542580B (zh) 去除眼镜光斑的方法、装置及电子设备
EP4231147A1 (en) Drawing command processing method and related device therefor
WO2022001258A1 (zh) 多屏显示方法、装置、终端设备及存储介质
WO2024082976A1 (zh) 文本图像的ocr识别方法、电子设备及介质
CN112527220B (zh) 一种电子设备显示方法及电子设备
CN113391735A (zh) 显示形态的调整方法、装置、电子设备及存储介质
CN114095602A (zh) 索引显示方法、电子设备及计算机可读存储介质
CN114332331B (zh) 一种图像处理方法和装置
CN119296146A (zh) 人像肤色的检测方法和装置
WO2023051320A1 (zh) 更换电子设备屏幕壁纸的方法、装置和电子设备
CN114579900A (zh) 跨设备的页面切换方法、电子设备及存储介质
CN118317205B (zh) 图像处理方法和终端设备
CN114691066B (zh) 一种应用的显示方法及电子设备
CN112671953B (zh) 一种调整电子设备的折叠角度的方法及电子设备
HK40068138B (zh) 索引显示方法、电子设备及计算机可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19902077

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019902077

Country of ref document: EP

Effective date: 20210624