Skin sensitivity display method, device, electronic device and readable storage medium
By acquiring and processing skin images on electronic devices and displaying the skin sensitivity distribution in real time, the problem of the inability to understand skin sensitivity in real time in existing technologies is solved, the detection cost is reduced and the accuracy is improved.
Patent Information
- Application Number
- CN202010944311.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-09
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2040-09-09
AI Technical Summary
Existing skin detection technology cannot understand the skin sensitivity of different areas in real time, and the test report shows poor results. Users need to go to medical institutions for testing, which is costly.
By acquiring the original image containing the photographed object, extracting the skin area image, and using a preset sensitivity conversion algorithm to determine the skin sensitivity of each pixel point, and then adjusting the pixel value to display a sensitivity distribution diagram, the device cost is reduced and the measurement accuracy is improved.
The real-time display of skin sensitivity distribution on electronic devices is realized, which reduces equipment costs and improves measurement accuracy and real-time performance.
Smart Images

Figure CN114241347B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data acquisition technology, and in particular relates to a method, device, electronic device and readable storage medium for displaying skin sensitivity. Background Art
[0002] As the largest organ in the human body, the skin's condition is particularly important. This condition can be determined through a number of indicators, such as skin sensitivity. Skin sensitivity primarily refers to the intensity of the skin's response to external stimuli. The higher the skin's sensitivity, the more intense the reaction. Therefore, how to effectively and quickly inform users of their skin sensitivity has become a pressing issue.
[0003] Existing skin testing technologies often require users to visit a designated medical institution for testing using specialized equipment to obtain a corresponding skin test report. However, this report only provides users with an overall understanding of skin sensitivity, without providing real-time insights into the specific sensitivity of different areas. This results in poor display quality. Summary of the Invention
[0004] The embodiments of the present application provide a method, device, electronic device, and readable storage medium for displaying skin sensitivity, which can improve measurement accuracy while reducing measurement costs.
[0005] In a first aspect, embodiments of the present application provide a method for displaying skin sensitivity, which is applied to an electronic device, comprising:
[0006] Acquire an original image containing a photographed object, and extract a skin area image of the photographed object from the original image;
[0007] Determining the skin sensitivity corresponding to each pixel point in the skin area image;
[0008] The pixel value of each pixel point in the skin area image in the original image is adjusted according to the skin sensitivity, and the original image after the pixel value adjustment is used as a sensitivity distribution diagram, and the sensitivity distribution diagram is displayed.
[0009] The implementation of the embodiments of the present application has the following beneficial effects: by acquiring a ranging image containing a target object, the target object is a user performing non-contact interactive behavior, and extracting a display ranging reference parameter for skin sensitivity through the ranging image, the distance value between the electronic device and the target object can be determined based on the ranging reference parameter. The electronic device only needs to include a camera module to achieve this. When measuring the distance value between the electronic device and the target object, this embodiment does not rely on a depth image or require ranging through the shooting angle difference of a binocular camera. Therefore, the electronic device does not need to be configured with a light pulse-based transceiver and a binocular camera module, thereby greatly reducing the cost of the electronic device. At the same time, since the distance measurement is performed by determining one or more ranging reference parameters instead of directly obtaining the distance value during the distance measurement process, the accuracy of the ranging can be improved.
[0010] In a possible implementation of the first aspect, determining the skin sensitivity corresponding to each pixel point in the skin area image includes:
[0011] Obtain a first pixel value corresponding to the red channel and a second pixel value corresponding to the green channel of the pixel point in the original image;
[0012] The first pixel value and the second pixel value are introduced into a preset sensitivity conversion algorithm to obtain the skin sensitivity corresponding to the pixel point.
[0013] In a possible implementation of the first aspect, the sensitivity conversion algorithm is specifically:
[0014]
[0015] Among them, f is the skin sensitivity; r is the first pixel value; g is the second pixel value; alpha and beta are preset adjustment coefficients; exp(x) is an exponential function.
[0016] In a possible implementation of the first aspect, obtaining the original image containing the photographed object includes:
[0017] Obtain real-time collected video data;
[0018] extracting each video image frame in the video data as the original image;
[0019] The displaying of the sensitivity distribution schematic diagram includes:
[0020] Based on the frame number of each of the original images, the sensitivity distribution diagrams associated with each of the original images are displayed in sequence.
[0021] In a possible implementation manner of the first aspect, extracting each video image frame in the video data as the original image includes:
[0022] Based on the frame numbers, sequentially analyzing the original images to determine whether the original images contain a skin area;
[0023] If the original image includes a skin area, performing an operation of extracting an image of the skin area of the photographed subject from the original image;
[0024] If the original image does not contain a skin area, the original image corresponding to the next frame number is analyzed, and the operation of determining whether the original image contains a skin area is performed.
[0025] In a possible implementation of the first aspect, adjusting the pixel value of each pixel in the skin area in the original image according to the skin sensitivity includes:
[0026] Determining, based on a preset pixel mapping relationship, an adjusted pixel value associated with the skin sensitivity corresponding to each pixel point;
[0027] The original pixel value of the pixel point in the original image is replaced by the adjusted pixel value.
[0028] In a possible implementation of the first aspect, obtaining the original image containing the photographed object includes:
[0029] If the camera is in the sensitivity detection mode, a fill light module equipped with a polarizer is turned on to obtain the original image of the object illuminated by the fill light module.
[0030] In a second aspect, an embodiment of the present application provides a device for displaying skin sensitivity, comprising:
[0031] an original image acquisition unit, configured to acquire an original image containing a photographed object, and extract a skin area image of the photographed object from the original image;
[0032] a skin sensitivity determination unit, configured to determine the skin sensitivity corresponding to each pixel point in the skin area image;
[0033] A sensitivity distribution diagram display unit is used to adjust the pixel value of each pixel point in the skin area image in the original image according to the skin sensitivity, use the original image after adjusting the pixel value as the sensitivity distribution diagram, and display the sensitivity distribution diagram.
[0034] In a third aspect, an embodiment of the present application provides an electronic device, a memory, a processor, and a computer program stored in the memory and runnable on the processor, characterized in that when the processor executes the computer program, the method for displaying skin sensitivity described in any one of the first aspects above is implemented.
[0035] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and is characterized in that when the computer program is executed by a processor, it implements the method for displaying skin sensitivity described in any one of the above-mentioned first aspects.
[0036] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the method for displaying skin sensitivity described in any one of the first aspects above.
[0037] In a sixth aspect, an embodiment of the present application provides a chip system, comprising a processor coupled to a memory, wherein the processor executes a computer program stored in the memory to implement a method for displaying skin sensitivity as described in any one of the first aspects.
[0038] It can be understood that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 is a structural diagram of an electronic device provided in an embodiment of the present application;
[0040] Figure 2 is a schematic structural diagram of another electronic device provided in an embodiment of the present application;
[0041] Figure 3 is a software structure block diagram of the electronic device according to an embodiment of the present application;
[0042] Figure 4 This is a schematic diagram of an output screen of a smart beauty mirror provided in one embodiment of the present application;
[0043] Figure 5 This is a flowchart of a method for displaying skin sensitivity provided by an embodiment of the present application;
[0044] Figure 6 This is a schematic diagram of a scenario in which an electronic device acquires an original image according to an embodiment of the present application;
[0045] Figure 7 This is a diagram of an interface for selecting an original image provided in an embodiment of the present application;
[0046] Figure 8This is a specific implementation flowchart of S5012 provided in one embodiment of the present application;
[0047] Figure 9 1 is a schematic diagram of extracting a skin area image provided by an embodiment of the present application;
[0048] Figure 10 This is a specific implementation flowchart of S502 provided in one embodiment of the present application;
[0049] Figure 11 This is a sensitivity distribution diagram provided by an embodiment of the present application;
[0050] Figure 12 is a sensitivity distribution diagram provided by another embodiment of the present application;
[0051] Figure 13 This is a flowchart of a specific implementation of adjusting the pixel value of each pixel point in the skin area of the original image according to the skin sensitivity in S503 provided by an embodiment of the present application;
[0052] Figure 14 This is a structural block diagram of a device for displaying skin sensitivity provided by an embodiment of the present application;
[0053] Figure 15 This is a schematic diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0054] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0055] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0056] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0057] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0058] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0059] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0060] The skin sensitivity display method provided in the embodiments of the present application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), and smart beauty mirrors. The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.
[0061] For example, the electronic device can be a station (STAION, ST) in a WLAN, a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA) device, a handheld device with wireless communication capabilities, a computing device or other processing device connected to a wireless modem, a computer, a laptop computer, a handheld communication device, a handheld computing device, and / or other devices for communicating on a wireless system and a next-generation communication system, such as a mobile terminal in a 5G network or a mobile terminal in a future evolved Public Land Mobile Network (PLMN) network, etc.
[0062] Figure 1 A structural diagram of the electronic device 100 is shown.
[0063] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope 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 ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0064] It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0065] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0066] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0067] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0068] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.
[0069] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C bus lines. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, and the like via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K via the I2C interface, enabling communication between the processor 110 and the touch sensor 180K via the I2C bus interface, thereby implementing the touch function of the electronic device 100.
[0070] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface, enabling the function of answering calls through a Bluetooth headset.
[0071] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0072] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface, enabling the function of playing music through Bluetooth headphones.
[0073] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the electronic device 100. The processor 110 and the display 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0074] The GPIO interface can be configured via software. The GPIO interface can be configured as either a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, display 194, wireless communication module 160, audio module 170, sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0075] The USB interface 130 is an interface that complies with USB standards and may be a MiniUSB interface, a MicroUSB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100 and to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as augmented reality devices.
[0076] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.
[0077] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also provide power to the electronic device via the power management module 141.
[0078] 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 provides power to the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0079] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0080] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0081] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0082] 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 medium-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. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0083] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0084] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include 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, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0085] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0086] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1. The display screen 194 may include a touch panel and other input devices.
[0087] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
[0088] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise, brightness, and skin tone. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.
[0089] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0090] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0091] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. This allows electronic device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.
[0092] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU enables intelligent cognitive applications in electronic device 100, such as image recognition, facial recognition, speech recognition, and text comprehension.
[0093] 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 electronic device 100. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.
[0094] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, 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 storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.
[0095] The electronic device 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0096] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.
[0097] The speaker 170A, also called a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or listen to hands-free calls through the speaker 170A.
[0098] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or a voice message, the user can place the receiver 170B close to the ear to hear the voice.
[0099] Microphone 170C, also known as "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the source of sound, realize directional recording function, etc.
[0100] The headphone jack 170D is used to connect a wired headphone and can be the USB interface 130 or a 3.5mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0101] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be located on display screen 194. There are many types of pressure sensors 180A, such as resistive, inductive, and capacitive. A capacitive pressure sensor can include at least two parallel plates made of conductive material. When force acts on pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the intensity of the pressure based on this change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the touch intensity based on pressure sensor 180A. Electronic device 100 can also calculate the touch location based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch location but with different touch intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, a command to view short messages is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to a short message application icon, a command to create a new short message is executed.
[0102] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.
[0103] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude using the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
[0104] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover based on the magnetic sensor 180D. Based on the detected opening and closing status of the case or flip cover, features such as automatic unlocking of the flip cover can be configured.
[0105] Accelerometer 180E can detect the magnitude of acceleration of electronic device 100 in all directions (generally three axes). It can also detect the magnitude and direction of gravity when electronic device 100 is stationary. It can also be used to identify the electronic device's posture, enabling applications such as switching between landscape and portrait modes and pedometers.
[0106] The distance sensor 180F is used to measure distance. The electronic device 100 can measure distance using infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure distance to achieve fast focusing.
[0107] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses 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 electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user is holding the electronic device 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 and pocket mode to automatically unlock and lock the screen.
[0108] Ambient light sensor 180L is used to sense ambient light brightness. Electronic device 100 can adaptively adjust the brightness of display screen 194 based on the perceived ambient light. Ambient light sensor 180L can also be used to automatically adjust white balance when taking photos. Ambient light sensor 180L can also work with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent accidental touches.
[0109] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
[0110] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 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 electronic device 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from shutting down abnormally due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to prevent abnormal shutdown due to low temperature.
[0111] The touch sensor 180K is also called a "touch-sensitive device." The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen." The touch sensor 180K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, at a location different from that of the display screen 194.
[0112] The bone conduction sensor 180M can obtain vibration signals. In some embodiments, the bone conduction sensor 180M can obtain vibration signals from the vibrating bones of the human body. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure pulse signals. In some embodiments, the bone conduction sensor 180M can also be set in headphones to form bone conduction headphones. The audio module 170 can parse out voice signals based on the vibration signals of the vibrating bones of the human body obtained by the bone conduction sensor 180M to implement voice functions. The application processor can parse heart rate information based on the blood pressure pulse signals obtained by the bone conduction sensor 180M to implement heart rate detection functions.
[0113] The buttons 190 include a power button, a volume button, and the like. The buttons 190 may be mechanical buttons or touch buttons. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.
[0114] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0115] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc.
[0116] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by inserting it into or removing it from the SIM card interface 195. The electronic device 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, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0117] Figure 2 The following is a schematic diagram of the structure of another electronic device provided by an embodiment of the present application. In this embodiment, the electronic device is specifically a smart mirror, which can, for example, process the captured image in real time using a preset algorithm and then display it on the mirror surface. The smart mirror includes at least a camera module 201, a display module 202, and a data processing device 203. The camera module 201 can be used to capture an image containing a captured object and display the captured image through the display module 202. If the captured image needs to be processed, the image can be adjusted by the data processing device 203 and then output through the display module 202.
[0118] Preferably, the smart mirror may also include a fill light 204. Upon detecting low ambient light intensity in the current scene, the electronic device may activate the fill light 204 to provide fill light, thereby increasing the overall brightness of the captured image. Optionally, the fill light 204 may be equipped with a polarizer. By controlling the angle of the polarizer, the fill light may emit light of a predetermined color. For example, the fill light 204 may emit red and green light, thereby capturing an original image of the subject under the red and green light illumination.
[0119] The software system of the electronic device can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device 100.
[0120] Figure 3 It is a software structure block diagram of the electronic device in the embodiment of the present application.
[0121] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
[0122] The application layer can include a series of application packages.
[0123] like Figure 3 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
[0124] The application framework layer provides an application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0125] like Figure 3 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0126] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.
[0127] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0128] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.
[0129] The phone manager is used to provide communication functions for electronic devices, such as call status management (including answering, hanging up, etc.).
[0130] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0131] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.
[0132] Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
[0133] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.
[0134] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.
[0135] The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0136] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
[0137] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0138] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0139] A 2D graphics engine is a drawing engine for 2D drawings.
[0140] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.
[0141] The following describes the workflow of the software and hardware of the electronic device 100 in conjunction with capturing a photo scene.
[0142] When the touch sensor 180K receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including touch coordinates, touch operation timestamp, and other information). The raw input event is stored in the kernel layer. The application framework layer obtains the raw input event from the kernel layer and identifies the control corresponding to the input event. For example, if the touch operation is a touch single-click operation and the control corresponding to the single-click operation is the control of the camera application icon, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer to capture a still image or video through the camera 193.
[0143] Example 1:
[0144] When users need to detect their skin, they can do so in the following three ways:
[0145] Method 1: Performing a skin test using a skin testing device. The aforementioned skin testing device can be a medical skin testing device. Due to factors such as cost and device size, these devices are often purchased by medical institutions. When a user requires a skin test using a skin testing device, they typically need to visit a medical institution for the test. The resulting skin test report primarily provides numerical values for various skin test indicators, such as melanin content, acne density, roughness, tissue oxygen content, and skin type classification (e.g., oily or dry skin). The user can use the skin test report to understand their overall skin condition. However, this method is difficult to perform. Due to the high cost of skin testing devices, users often find it difficult to purchase such devices at home. Users must visit a medical institution for testing, significantly increasing the difficulty and cost of skin testing. Furthermore, the aforementioned skin testing device cannot determine the local skin condition, resulting in poor report display quality. Furthermore, the aforementioned testing device has a long data processing time and low real-time performance, requiring users to wait a long time before receiving the test report, resulting in inefficient report acquisition.
[0146] Method 2: Skin detection through smart makeup mirror. Existing smart makeup mirrors generally only have skin beautification and whitening functions, that is, beautification of faces and portraits, but do not have skin detection functions. In the process of face beautification, freckles, dark circles, etc. on the face can be identified through intelligent recognition algorithms, and the above blemish areas can be beautified, blurred, whitened, etc. Figure 4 Schematic diagram showing the output screen of the smart makeup mirror provided by an embodiment of the present application. Figure 4As shown, a smart beauty mirror can identify facial blemishes and mark them, allowing users to understand their current skin condition. However, existing smart beauty mirrors cannot determine skin sensitivity and have limited skin detection options, which cannot meet the skin detection needs of existing users.
[0147] Method 3: Skin testing via smartphone apps. Similar to skin testing via smart makeup mirrors, smartphones with these apps installed can only perform skin beautification and whitening processing on images of the user's face, as well as identify facial blemishes. They also cannot determine skin sensitivity, offer limited skin testing options, and are unable to meet the skin testing needs of existing users.
[0148] It can be seen that the above three methods cannot simultaneously take into account the two aspects of efficiently obtaining skin sensitivity detection results and understanding the local sensitivity distribution of the skin. Therefore, in order to solve the defects of the above skin detection technology, this application provides a method for displaying skin sensitivity, which is detailed as follows: Figure 5 As shown, the execution subject of the skin sensitivity display method is an electronic device, which can be a smart phone, a tablet computer, a computer, a smart game console and any device equipped with a camera module. Optionally, the electronic device can be a smart mirror, which obtains the user image including the user using the smart mirror through the camera module loaded on the smart mirror, and processes the user image through the processor, and then outputs the processed user image on the "mirror surface" (i.e., the display module) of the smart mirror to simulate the scene of the user looking in the mirror, and can adjust the picture presented by the "mirror surface" according to the user's needs. Figure 5 The following is a flowchart illustrating a method for displaying skin sensitivity according to an embodiment of the present application, which is described in detail as follows:
[0149] In S501, an original image containing a photographed object is acquired, and a skin area image of the photographed object is extracted from the original image.
[0150] In this embodiment, the electronic device may be equipped with a built-in camera module, which can capture an original image containing the subject. The subject can move the part to be detected into the shooting area of the electronic device so that the captured original image contains the skin area of the part to be detected. For example, Figure 6 A schematic diagram of a scene in which an electronic device according to an embodiment of the present application obtains an original image is shown. Figure 6 As shown, the electronic device is specifically a smart mirror, which can be placed on a desktop. When the user is in a sitting position, the smart mirror can capture the user's face. In this scenario, the subject of the photo is the user, and the skin area to be detected is the skin area of the face.
[0151] In one possible implementation, the electronic device can receive the original image fed back by an external camera module. The electronic device can establish a communication connection with the external camera module through a wired interface or a wireless communication module, and receive the original image containing the photographed object captured by the camera module. The camera module can be a shooting module specifically used for skin detection, such as a camera equipped with a variety of different light-emitting devices, which can emit purple light, red light, ultraviolet light, infrared light, etc. through different light-emitting devices. The camera module can obtain the original image of the photographed object under different light irradiation, and feed the captured original image back to the electronic device through a communication link with the electronic device. Some skin detection methods, such as skin sensitivity detection or acne density detection, may require the photographed object to capture the original image under specific light irradiation. Based on this, the above-mentioned camera module can be configured with multiple different light-emitting devices according to the requirements of the detection project, so that when performing the corresponding skin detection project, the associated light-emitting device is turned on to expose the photographed object under the corresponding light to obtain the original image.
[0152] In a possible implementation, the electronic device may select a captured image from a gallery as the original image. Figure 7 The figure shows the interface diagram of selecting the original image provided by an embodiment of the present application. Figure 7 As shown in (a) of FIG, the electronic device can enter the gallery display interface when detecting that the user clicks the gallery control 701, such as Figure 7 (b) in the figure. Images that have been taken or obtained from other devices can be displayed in the gallery display interface of the electronic device. When the electronic device detects that a preset selection operation is initiated on any existing image, the existing image is used as the target image, and the skin sensitivity display process is performed on the target image. The target image is used as the original image and the operations S501 to S503 are performed. For example, the preset selection operation can be a long press operation. If it is detected that the user performs a long press operation on any existing image, a pop-up window will appear. Figure 7 The control 702 in (c) is specifically an edit menu that can be executed for an existing image. The edit menu includes an item "skin sensitivity detection", that is, a control 703. If the electronic device detects that the user clicks on the control 703, it executes the skin sensitivity display process; for example, if the electronic device detects that the user clicks on any existing image, it can display a preview page of the existing image, such as Figure 7 (d) in the preview page includes multiple editing controls, including a control 704 for skin sensitivity detection. When the electronic device detects that the user clicks on the control 704, it can execute the display process of the skin sensitive area and output a sensitivity distribution diagram corresponding to the existing image previewed by the user.
[0153] In one possible implementation, the electronic device can be configured with multiple display modes, including but not limited to: a normal display mode and a sensitivity detection mode. In normal display mode, the electronic device can directly display and output the original image, without performing any additional processing on the original image. In sensitivity detection mode, if the user wishes to check their skin sensitivity, operations S501 to S503 are executed to display a sensitivity distribution image corresponding to the original image.
[0154] In one possible implementation, the electronic device can obtain real-time video data containing the photographed object. The real-time video data is specifically data obtained by the camera module at a preset frame rate, and each frame corresponds to an image. The electronic device can extract each video image frame from the video data, and perform a skin sensitivity display process for each video image frame, that is, execute operations S501 to S503, and output a sensitivity distribution diagram corresponding to each video image frame, respectively, to achieve real-time dynamic observation of the skin sensitivity of the photographed object, thereby improving the display effect and real-time performance of the skin sensitivity.
[0155] Furthermore, when the electronic device acquires real-time video data, S501 may specifically include S5011 to S5012, which are described in detail as follows:
[0156] In S5011, video data collected in real time is obtained.
[0157] In this embodiment, the electronic device is equipped with a camera module that can acquire video data. The camera module can acquire video data of the subject in real time through the camera module and transmit the real-time acquired video data to the processor of the electronic device for processing, such as display processing of skin sensitivity. It should be noted that because the camera module acquires video data of the subject in real time, after acquiring each frame of video image, the camera module transmits the newly acquired video data to the processor of the electronic device for processing. That is, during the above-mentioned real-time acquisition of video data, the acquired video data is also processed in real time in subsequent steps, and the processed video data is displayed on the display module, thereby achieving the purpose of real-time dynamic viewing of skin sensitivity.
[0158] In one possible implementation, the camera module generates a video data stream, encapsulates the real-time collected video data into data packets of the corresponding format, and transmits the collected data packets of each video data in real time through the video data stream to process the video data in real time.
[0159] In S5012, each video image frame in the video data is extracted as the original image.
[0160] In this embodiment, after acquiring the video data, the electronic device can parse the video data, extract each video image frame contained in the video data, and use the acquired video image frame as the above-mentioned original image to generate a sensitivity distribution diagram corresponding to each video image frame.
[0161] In an embodiment of the present application, the electronic device can obtain video data of the target object in real time, and perform skin sensitivity display processing on each video image frame in the video data respectively, to obtain a sensitivity distribution diagram corresponding to each video image frame, so that the user can view the skin sensitivity status in real time, thereby improving the display effect of skin sensitivity and the real-time viewing, and enhancing the user experience.
[0162] Furthermore, as another embodiment of the present application, Figure 8 This is a specific implementation flow chart of S5012 provided in an embodiment of the present application. Figure 8 As shown, compared with the previous embodiment, S5012 in the embodiment of the present application specifically includes S801 to S803, which are specifically described as follows:
[0163] Furthermore, extracting each video image frame in the video data as the original image includes:
[0164] In S801, based on the frame number, the original image is analyzed in sequence to determine whether the original image contains a skin area.
[0165] In this embodiment, when the electronic device acquires video data of the subject in real time, it associates a frame number with each video image frame based on the chronological order of capture, and processes each video image frame sequentially based on the frame number. In this embodiment, since the original image used to display the sensitivity distribution diagram must contain an image of the skin region, if the original image does not contain a skin region, no processing is required on the original image. Conversely, if the original image contains a skin region, a regional image corresponding to the skin region is extracted from the original image, and operations S502 and S503 are performed.
[0166] In one possible implementation, the electronic device may be configured with a skin recognition algorithm. The electronic device may input an original image into the skin recognition algorithm and output a recognition result corresponding to the original image, the recognition result including a first result including a skin area and a second result not including a skin area. Based on the recognition result, the electronic device may determine whether to perform operation S802 or S803.
[0167] In one possible implementation, the skin recognition algorithm is specifically a convolutional neural network. The electronic device can import each original image into the convolutional neural network in sequence based on the frame number. The convolutional neural network can perform multiple convolution operations on the original image through multiple built-in cascaded convolution kernels to obtain N layers of convolution vectors, where N is specifically the number of convolution layers contained in the convolutional neural network. Each convolution layer corresponds to one convolution kernel. The convolution vector output by the Nth layer is imported into the corresponding fully connected layer to identify whether the original image contains a skin area and obtain a recognition result. The electronic device extracts features from the original image through multiple convolution layers to determine whether the original image contains feature information associated with the skin, thereby identifying whether the skin area is contained.
[0168] In one possible implementation, the skin color is within a specific range, and the skin area is large and flat. Based on these two points, the electronic device can determine whether the pixel value of each pixel in the original image is within the preset range. If so, the electronic device counts the number of pixels within the range and whether the multiple pixels within the range are adjacent. If so, the electronic device determines that the original image contains a skin area.
[0169] In one possible implementation, the electronic device can obtain the ambient light intensity when the original image is taken, perform light intensity compensation on each pixel value in the original image based on the ambient light intensity, and perform the above-mentioned area range recognition operation based on the adjusted original image to avoid color deviation of the pixel values in the original image due to excessive brightness or darkness of the ambient light, causing the pixel values of the skin area to deviate from the above-mentioned interval range, thereby improving the accuracy of skin area recognition.
[0170] In S802, if the original image includes a skin area, an operation of extracting an image of the skin area of the subject from the original image is performed.
[0171] In this embodiment, when the electronic device detects that the original image corresponding to the current frame number includes a skin area, it can extract a skin area image associated with the skin area from the original image.
[0172] In S803, if the original image does not contain a skin area, the original image corresponding to the next frame number is analyzed, and the operation of determining whether the original image contains a skin area is performed.
[0173] In this embodiment, when the electronic device detects that the original image corresponding to the current frame number does not contain a skin area, it does not need to generate a sensitivity distribution diagram corresponding to the original image, and obtains the original image of the next frame number to perform the skin area recognition operation.
[0174] In a possible implementation, if it is detected that the original image corresponding to the current frame number does not contain a skin area, the original image is directly displayed.
[0175] In an embodiment of the present application, before determining the skin sensitivity of the original image, it is first determined whether the original image contains a skin area. The conversion operation of the sensitivity distribution diagram is not performed on the original image that does not contain a skin area; only the original image that contains a skin area is processed, thereby reducing unnecessary processing operations and improving conversion efficiency.
[0176] In this embodiment, the electronic device can identify the area of the subject's skin covered by the original image, i.e., the aforementioned skin area image, and extract the skin area image from the original image. Because the primary identification target when determining skin sensitivity is the subject's skin area, sensitivity identification is not required for other skin areas not belonging to the subject.
[0177] In one possible implementation, the electronic device may determine the skin region image by extracting multiple contour curves contained in the original image using a contour recognition algorithm and determining image feature values for each image region based on the image region enclosed by each contour curve. Such image feature values include, but are not limited to, at least one of the following: average pixel value, number of pixels, mean square error of pixel values, etc. If the image feature value satisfies a preset skin feature condition, the image region enclosed by the contour curve is identified as a skin region, thereby extracting the skin region image from the original image.
[0178] In one possible implementation, the electronic device can also determine the skin area image by sliding the image frame of the initial size on the original image, identifying whether the area currently covered by the image frame includes the skin area during the sliding framing process, and if so, marking the area. After the sliding framing is completed, an area containing multiple marks is obtained. At this time, the above-mentioned image frame is reduced based on a preset adjustment step size, and the above-mentioned framing and identification operation is performed on the multiple marked areas until the size of the image frame is smaller than the preset lower limit threshold. At this time, the last marked area is the skin area image.
[0179] For example, Figure 9 FIG1 shows a schematic diagram of extracting a skin region image provided by an embodiment of the present application. Figure 9As shown in (a) in FIG, the original image specifically includes an image of a hand area. The contour information corresponding to the skin area image included in the original image is determined by a preset skin area recognition algorithm, that is, Figure 9 As shown in (b) in the figure; and based on the contour information, the skin area image is extracted from the original image, that is, Figure 9 (c) in the.
[0180] In S502, the skin sensitivity corresponding to each pixel point in the skin area image is determined.
[0181] In this embodiment, the electronic device may be configured with a skin sensitivity conversion algorithm, and each pixel point in the skin area image in the original image is imported into the above conversion algorithm to calculate the skin sensitivity corresponding to each pixel point.
[0182] In this embodiment, the original image of the photographed object is obtained by any camera module, and the reason for determining the sensitivity of the skin area is specifically: the area of sensitive skin will show redness in the external skin manifestation clinically. Skin sensitivity is generally caused by internal and external factors such as drugs, local applied agents or environmental components. In skin testing, medical research and clinical drug research, it is becoming increasingly important to understand the physiological response of the skin to these irritants. The skin tissue activity test is to understand the ability of the microvascular network of the skin tissue to respond to vasodilation that increases blood flow and vascular obstruction that reduces blood flow, so as to understand the skin's allergic hardening, inflammatory process and irritation to irritants. Among them, skin sensitivity can be specifically divided into the following three types:
[0183] 1. Sensitive skin: Sensitive skin refers to a normal skin condition characterized by high sensitivity, weak resistance to external stimuli, and pronounced reactions to stimuli. For example, environmental influences, improper use of cosmetics, and damage to the stratum corneum caused by excessive cleansing can lead to incomplete skin barrier function and low skin hydration, resulting in thinner and more fragile skin and dilated subcutaneous capillaries.
[0184] 2. Skin irritation: Also known as irritant contact dermatitis, this refers to a phenomenon in which the skin rapidly develops redness, swelling, heat, pain, and itching after being exposed to a critical concentration of a chemical irritant or above. For example, excessive exposure to an irritant in a short period of time can cause epidermal damage and barrier disruption, triggering cellular stress and immune responses, and activating inflammation.
[0185] 3. Skin allergy: Also known as allergic contact dermatitis, this condition occurs when the skin is exposed to an allergen and experiences redness, swelling, heat, pain, and itching within a short period of time. Initial contact with the antigen triggers an allergic immune response, which takes time for T cells to react. Subsequent contact with the antigen after sensitization can quickly lead to allergic contact dermatitis. Skin allergies are caused by an abnormal immune response triggered by chemicals, and low-molecular-weight chemicals (haptens) are the primary triggers of skin allergies. These reactions also cause subcutaneous capillaries to dilate.
[0186] Any of the above-mentioned skin sensitivity phenomena will be accompanied by dilation of subcutaneous capillaries, that is, redness of the skin surface. Therefore, by judging the redness of the user's skin surface, the skin sensitivity of the subject can be determined.
[0187] In one possible implementation, calculating skin sensitivity requires determining the values of the red, green, and blue channels for each pixel, i.e., the skin region image is specifically an RGB image. Based on this, the terminal device can identify the image format of the skin region image and determine whether the image format is RGB. If so, the terminal device executes step S502. Otherwise, the terminal device can convert the skin region image to RGB format using an image format conversion algorithm, and execute step S502 based on the converted skin region image.
[0188] In one possible implementation, the electronic device may determine the skin sensitivity corresponding to each pixel point by storing a mapping relationship between skin sensitivity and pixel value, and importing the pixel value of the pixel point into the mapping relationship, thereby calculating the skin sensitivity corresponding to the pixel point.
[0189] In one possible implementation, based on the three different classifications of skin sensitivity, the skin sensitivity can be used to characterize the sensitivity type, specifically skin allergy, skin irritation, or sensitive skin. The electronic device assigns corresponding sensitivity values to different skin sensitivity types. If a sensitivity type associated with a pixel is detected, the sensitivity value associated with that sensitivity type is used as the skin sensitivity of that pixel.
[0190] As another embodiment of the present application, Figure 10 FIG4 shows a specific implementation flow chart of S502 provided in an embodiment of the present application. Figure 10 As shown, Figure 5 Compared with the embodiment shown in FIG, S502 in this embodiment specifically includes S5021 to S5022, which are described in detail as follows:
[0191] Furthermore, determining the skin sensitivity corresponding to each pixel point in the skin area image includes:
[0192] In S5021, a first pixel value corresponding to the red channel and a second pixel value corresponding to the green channel of the pixel point in the original image are obtained.
[0193] In this embodiment, the red blood cells in the capillaries of skin tissue strongly absorb green light and very little red light. In contrast, the subcutaneous dermis absorbs less light of various wavelengths, thus enabling the detection of hemoglobin using visible light. Sensitive skin often appears red, and this redness is caused by the large number of red blood cells in the capillaries. Based on this, the electronic device can capture an image of the subject's skin area under illumination containing green and red light (such as white light or red-green polarized light) and determine the skin sensitivity based on the pixel values of each skin area in the green and red channels.
[0194] In this embodiment, the original image is specifically an RGB image, i.e., each pixel in the original image corresponds to a pixel value in each channel, namely, a first pixel value for the red channel, a second pixel value for the green channel, and a third pixel value for the blue channel. Because it is necessary to determine the degree of green and red light absorption of each pixel corresponding to the skin in the skin region image, the first pixel value for the red channel and the second pixel value for the green channel are obtained.
[0195] In S5022, the first pixel value and the second pixel value are introduced into a preset sensitivity conversion algorithm to obtain the skin sensitivity corresponding to the pixel point.
[0196] In this embodiment, the electronic device may input the obtained first pixel value and second pixel value into a sensitivity conversion algorithm to determine the skin sensitivity of the skin area corresponding to the pixel. Specifically, if the skin area corresponding to the pixel absorbs less red light, the first pixel value corresponding to the pixel will be larger, i.e., there is a positive correlation between the skin sensitivity and the first pixel value. If the skin area corresponding to the pixel absorbs more green light, the second pixel value corresponding to the pixel will be smaller, i.e., there is a negative correlation between the skin sensitivity and the second pixel value.
[0197] In a possible implementation, the sensitivity conversion algorithm may be a hash conversion function. By importing the first pixel value and the second pixel value into the hash conversion function, the skin sensitivity corresponding to the pixel point may be obtained.
[0198] In one possible implementation, the sensitivity conversion algorithm may be obtained by training a neural network based on multiple training images. The electronic device may use the red and green layers within the multiple training images as inputs to the neural network, and the sensitivity training distribution maps corresponding to the training images as outputs of the neural network to train the neural network. The trained neural network then serves as the sensitivity conversion algorithm, and the first and second pixel values corresponding to each pixel are imported into the merchant's sensitivity conversion algorithm to calculate the skin sensitivity corresponding to each pixel.
[0199] Furthermore, the sensitivity conversion algorithm is specifically as follows:
[0200]
[0201] Among them, f is the skin sensitivity; r is the first pixel value; g is the second pixel value; alpha and beta are preset adjustment coefficients; exp(x) is an exponential function.
[0202] In this embodiment, the electronic device can determine the absorption deviation of red light and green light between the first pixel value of the red channel and the second pixel value of the green channel based on the difference between the two, so as to determine the concentration of red blood cells in the skin area corresponding to the pixel point, and determine the skin sensitivity of the skin area based on the concentration of red blood cells, thereby improving the accuracy of skin sensitivity.
[0203] In an embodiment of the present application, the first pixel value of the red channel and the second pixel value of the green channel are determined based on the characteristics of red blood cells absorbing light of different colors, thereby obtaining the skin sensitivity corresponding to the pixel point. This reduces the difficulty of obtaining skin sensitivity while ensuring the accuracy of skin sensitivity.
[0204] In S503, the pixel value of each pixel point in the skin area image in the original image is adjusted according to the skin sensitivity, the original image after the pixel value adjustment is used as a sensitivity distribution diagram, and the sensitivity distribution diagram is displayed.
[0205] In this embodiment, to allow the user to intuitively determine the skin sensitivity of each part of the skin area, the electronic device can improve the display effect by changing the pixel values of each pixel in the skin area in the original image to display the distribution of skin sensitivity, rather than displaying the sensitivity value. Based on this, the electronic device can adjust the pixel values of each pixel in the skin area according to the skin sensitivity and use the original image with the adjusted pixel values as a sensitivity distribution diagram for representing the skin sensitivity distribution of the skin area.
[0206] In one possible implementation, the electronic device may identify images of other regions except the skin region image as background region images, and adjust the pixel values of each pixel in the background region image to a preset value, for example, setting all pixels in the background region image to black, thereby preventing the background of the image from affecting the display effect of the sensitivity distribution of the skin region. For example, Figure 11 FIG. 1 shows a schematic diagram of sensitivity distribution provided by an embodiment of the present application. Figure 11 As shown, each pixel point in the background area in the sensitivity distribution diagram is set with a uniform pixel value to highlight the sensitivity distribution of the skin area, and a corresponding comparison table between sensitivity and pixel value is configured so that the user can determine the skin sensitivity corresponding to different pixel values.
[0207] In a possible implementation, the electronic device may crop the skin area image from the original image, adjust the pixel value of each pixel in the skin area image, and display the skin area image after adjusting the pixel value as the sensitivity distribution diagram. Figure 12 FIG. 1 shows a sensitivity distribution diagram provided by another embodiment of the present application. Figure 12 As shown, the sensitivity distribution diagram only includes the skin area and does not include the background area, and is configured with a corresponding comparison table between sensitivity and pixel value, so that the user can determine the skin sensitivity corresponding to different pixel values.
[0208] Furthermore, as another implementation of this application, Figure 13 FIG4 shows a specific implementation flow chart of adjusting the pixel value of each pixel in the skin area of the original image according to the skin sensitivity in S503 provided by an embodiment of the present application. Figure 13 As shown, Figure 5 Compared with the embodiment shown in FIG, S503 in this embodiment specifically includes S5031 to S5032, which are described in detail as follows:
[0209] Furthermore, adjusting the pixel value of each pixel point in the skin area in the original image according to the skin sensitivity includes:
[0210] In S5031, based on a preset pixel mapping relationship, the adjusted pixel value associated with the skin sensitivity corresponding to each pixel point is determined.
[0211] In this embodiment, the electronic device may establish a pixel mapping relationship that specifically defines the pixel values corresponding to each skin sensitivity in the sensitivity distribution diagram. The electronic device may query the pixel value associated with each pixel point in the pixel mapping relationship and use the resulting pixel value as the adjusted pixel value.
[0212] In a possible implementation, the pixel mapping relationship may be specifically a conversion algorithm, and the skin sensitivity of the pixel point is introduced into the conversion algorithm to determine the adjusted pixel value corresponding to the skin sensitivity.
[0213] In one possible implementation, the adjusted pixel values may specifically include pixel values corresponding to multiple different channels. If the original image is an RGB image, the adjusted pixel values specifically include pixel values for the red, green, and blue channels. If the original image is a CMYK image, the adjusted pixel values specifically include pixel values for the cyan, magenta, yellow, and black channels.
[0214] In S5032, the original pixel value of the pixel point in the original image is replaced with the adjusted pixel value.
[0215] In this embodiment, the electronic device may use the adjusted pixel values determined by the pixel points in each skin area image to replace the pixel values in the original image, thereby achieving the purpose of adjusting the pixel values in the original image.
[0216] In an embodiment of the present application, by setting a pixel mapping relationship and querying the adjusted pixel value corresponding to each pixel point, the pixel value of each pixel point in the original image is set based on the adjusted pixel value, thereby automatically generating a sensitivity distribution diagram and improving generation efficiency.
[0217] Furthermore, as another embodiment of the present application, if the original image obtained above is extracted in sequence based on the frame number of the video data for implementation shooting, then in S503, generating and displaying the sensitivity distribution diagram can specifically be: based on the frame number of each of the original images, displaying the sensitivity distribution diagram associated with each of the original images in sequence.
[0218] In this embodiment, the electronic device sequentially determines the skin sensitivity of each pixel in the skin area of each original image based on the frame number, and adjusts the pixel value of each pixel in the original image based on the skin sensitivity to generate a sensitivity distribution diagram for the original image. Based on this, the electronic device can also sequentially display the sensitivity distribution diagram corresponding to each original image based on the frame number corresponding to each original image, thereby dynamically displaying skin sensitivity and improving the display effect.
[0219] As can be seen from the above, the method for displaying skin sensitivity provided by the embodiment of the present application can obtain an original image containing a photographed object, determine a skin area image from the original image, obtain the skin sensitivity associated with each pixel based on the pixel value of each pixel in the skin area image, and adjust the pixel value of the corresponding pixel in the original image based on the determined skin sensitivity, thereby generating a sensitivity distribution diagram. In this way, the user can understand the overall skin sensitivity in the sensitivity distribution diagram while also determining the sensitivity corresponding to each local skin area. Compared with existing skin detection technologies, the generated sensitivity distribution diagram is generated based on the original image by adjusting the pixel values of the pixels. Therefore, the outline of the skin area is consistent with the original image. By viewing the sensitivity distribution diagram, the sensitivity corresponding to each local area can be determined, thereby improving the display effect. On the other hand, since the generation process of the sensitivity distribution diagram can be completed by an electronic device including a camera module, and the user does not need to go to a specific medical institution to complete it, the convenience of obtaining skin sensitivity is greatly improved, the difficulty of obtaining it is reduced, and the efficiency of skin detection is improved.
[0220] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0221] Example 2:
[0222] Corresponding to the method for displaying skin sensitivity described in the above embodiment, Figure 14 A structural block diagram of a skin sensitivity display device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0223] Reference Figure 14 , the skin sensitivity display device includes:
[0224] The original image acquisition unit 1401 is configured to acquire an original image containing a photographed object and extract a skin area image of the photographed object from the original image;
[0225] a skin sensitivity determination unit 1402, configured to determine the skin sensitivity corresponding to each pixel point in the skin area image;
[0226] The sensitivity distribution diagram display unit 1403 is configured to adjust the pixel value of each pixel point in the skin area in the original image according to the skin sensitivity, and generate and display a sensitivity distribution diagram.
[0227] Optionally, the skin sensitivity determination unit 1402 includes:
[0228] A pixel value acquisition unit, configured to acquire a first pixel value corresponding to a red channel and a second pixel value corresponding to a green channel of the pixel point in the original image;
[0229] The skin sensitivity conversion unit is used to import the first pixel value and the second pixel value into a preset sensitivity conversion algorithm to obtain the skin sensitivity corresponding to the pixel point.
[0230] Optionally, the sensitivity conversion algorithm is specifically:
[0231]
[0232] Among them, f is the skin sensitivity; r is the first pixel value; g is the second pixel value; alpha and beta are preset adjustment coefficients; exp(x) is an exponential function.
[0233] Optionally, the original image acquisition unit 1401 includes:
[0234] A video data acquisition unit, used to acquire video data collected in real time;
[0235] a video image frame extraction unit, configured to extract each video image frame in the video data as the original image;
[0236] The sensitivity distribution diagram display unit 1403 is specifically used for:
[0237] Based on the frame number of each of the original images, the sensitivity distribution diagrams associated with each of the original images are displayed in sequence.
[0238] Optionally, the video image frame extraction unit includes:
[0239] a skin region identification unit, configured to perform image analysis on the original image in sequence based on the frame number, and determine whether the original image contains a skin region;
[0240] a first operating unit, configured to extract an image of the skin area of the subject from the original image if the original image includes a skin area;
[0241] The second operating unit is configured to analyze the original image corresponding to the next frame number and perform the operation of determining whether the original image contains a skin area if the original image does not contain a skin area.
[0242] Optionally, the sensitivity distribution diagram display unit 1403 includes:
[0243] an adjusted pixel value query unit, configured to determine, based on a preset pixel mapping relationship, an adjusted pixel value associated with the skin sensitivity corresponding to each pixel point;
[0244] The adjusted pixel value replacing unit is used to replace the original pixel value of the pixel point in the original image with the adjusted pixel value.
[0245] Optionally, the original image acquisition unit 1401 includes:
[0246] The polarized light shooting unit is configured to, if in a sensitivity detection mode, activate a fill light module equipped with a polarizer to obtain the original image of the object under the illumination of the fill light module.
[0247] Therefore, the skin sensitivity display device provided in the embodiment of the present application can also obtain an original image containing the photographed object, determine the skin area image from the original image, obtain the skin sensitivity associated with each pixel based on the pixel value of each pixel in the skin area image, and adjust the pixel value of the corresponding pixel in the original image based on the determined skin sensitivity, thereby generating a sensitivity distribution diagram. In this way, the user can understand the overall skin sensitivity in the sensitivity distribution diagram while also determining the sensitivity corresponding to each local skin area. Compared with existing skin detection technologies, the generated sensitivity distribution diagram is generated based on the original image by adjusting the pixel values of the pixels. Therefore, the outline of the skin area is consistent with the original image. By viewing the sensitivity distribution diagram, the sensitivity corresponding to each local area can be determined, thereby improving the display effect. On the other hand, since the generation process of the sensitivity distribution diagram can be completed by an electronic device including a camera module, and the user does not need to go to a specific medical institution to complete it, the convenience of obtaining skin sensitivity is greatly improved, the difficulty of obtaining is reduced, and the efficiency of skin detection is improved.
[0248] Figure 15 This is a schematic diagram of the structure of an electronic device provided in one embodiment of the present application. Figure 15 As shown, the electronic device 15 of this embodiment includes: at least one processor 1500 ( Figure 15 Only one is shown in the figure) a processor, a memory 151, and a computer program 152 stored in the memory 151 and executable on the at least one processor 1500, wherein the processor 1500 implements the steps of any of the above-mentioned embodiments of the method for displaying skin sensitivity when executing the computer program 152.
[0249] The electronic device 15 can be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The electronic device can include, but is not limited to, a processor 1500 and a memory 151. Those skilled in the art will understand that Figure 15 This is merely an example of the electronic device 15 and does not constitute a limitation on the electronic device 15 . The electronic device 15 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0250] The processor 1500 may be a central processing unit (CPU), or may be another general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor.
[0251] In some embodiments, the memory 151 may be an internal storage unit of the electronic device 15, such as a hard disk or memory of the electronic device 15. In other embodiments, the memory 151 may also be an external storage device of the electronic device 15, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 15. Furthermore, the memory 151 may also include both an internal storage unit of the electronic device 15 and an external storage device. The memory 151 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 151 may also be used to temporarily store data that has been output or is to be output.
[0252] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.
[0253] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0254] An embodiment of the present application also provides an electronic device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor implements the steps of any of the above-mentioned method embodiments when executing the computer program.
[0255] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned various method embodiments can be implemented.
[0256] An embodiment of the present application provides a computer program product. When the computer program product is run on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned various method embodiments when executing the computer program product.
[0257] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the process in the above-mentioned embodiment method by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / electronic device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0258] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0259] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0260] In the embodiments provided in this application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely illustrative. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0261] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0262] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A method for displaying skin sensitivity, characterized in that: include: Acquire an original image containing a photographed object, and extract a skin area image of the photographed object from the original image; Determining the skin sensitivity corresponding to each pixel point in the skin area image; adjusting the pixel value of each pixel point in the skin area image in the original image according to the skin sensitivity, using the original image after adjusting the pixel value as a sensitivity distribution diagram, and displaying the sensitivity distribution diagram; Determining the skin sensitivity corresponding to each pixel point in the skin area image includes: Obtain a first pixel value corresponding to the red channel and a second pixel value corresponding to the green channel of the pixel point in the original image; Importing the first pixel value and the second pixel value into a preset sensitivity conversion algorithm to obtain the skin sensitivity corresponding to the pixel point; The sensitivity conversion algorithm is specifically as follows: Among them, f is the skin sensitivity; r is the first pixel value; g is the second pixel value; alpha and beta are preset adjustment coefficients; exp(x) is an exponential function.
2. The display method according to claim 1, wherein: The obtaining of the original image containing the photographed object includes: Obtain real-time collected video data; extracting each video image frame in the video data as the original image; The displaying of the sensitivity distribution schematic diagram includes: Based on the frame number of each of the original images, the sensitivity distribution diagrams associated with each of the original images are displayed in sequence.
3. The display method according to claim 2, wherein: The extracting each video image frame in the video data as the original image includes: Based on the frame numbers, sequentially analyzing the original images to determine whether the original images contain a skin area; If the original image includes a skin area, performing an operation of extracting an image of the skin area of the photographed subject from the original image; If the original image does not contain a skin area, the original image corresponding to the next frame number is analyzed, and the operation of determining whether the original image contains a skin area is performed.
4. The display method according to any one of claims 1 to 3, characterized in that: The adjusting the pixel value of each pixel point in the skin area in the original image according to the skin sensitivity includes: Determining, based on a preset pixel mapping relationship, an adjusted pixel value associated with the skin sensitivity corresponding to each pixel point; The original pixel value of the pixel point in the original image is replaced by the adjusted pixel value.
5. The display method according to any one of claims 1 to 3, characterized in that: The obtaining of the original image containing the photographed object includes: If the camera is in the sensitivity detection mode, a fill light module equipped with a polarizer is turned on to obtain the original image of the object illuminated by the fill light module.
6. A skin sensitivity display device, characterized in that: include: an original image acquisition unit, configured to acquire an original image containing a photographed object, and extract a skin area image of the photographed object from the original image; a skin sensitivity determination unit, configured to determine the skin sensitivity corresponding to each pixel point in the skin area image; a sensitivity distribution diagram display unit, configured to adjust the pixel value of each pixel point in the skin area image in the original image according to the skin sensitivity, use the original image after adjusting the pixel value as the sensitivity distribution diagram, and display the sensitivity distribution diagram; The skin sensitivity determination unit includes: A pixel value acquisition unit, configured to acquire a first pixel value corresponding to a red channel and a second pixel value corresponding to a green channel of the pixel point in the original image; a skin sensitivity conversion unit, configured to import the first pixel value and the second pixel value into a preset sensitivity conversion algorithm to obtain the skin sensitivity corresponding to the pixel point; The sensitivity conversion algorithm is specifically as follows: Among them, f is the skin sensitivity; r is the first pixel value; g is the second pixel value; alpha and beta are preset adjustment coefficients; exp(x) is an exponential function.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Cheek sensitive skin recognition method and device
CN108921128A
Self-adaptive skin inflammation area detection method based on multi-feature fusion
CN110363088A
Method and apparatus for displaying skin sensitivity, electronic device, and readable storage medium
WO2022052786A1