Skin undertone determining method and an electronic device

A skin undertone determining method and an electronic device are provided. The method includes: obtaining a first image; obtaining a first parameter value and a second parameter value in a first color space according to the first image; obtaining a third parameter value in a second color space according to the first image; and determining a skin undertone of skin in the first image according to the first parameter value, the second parameter value, and the third parameter value. Accordingly, it is able to know that the skin in the first image has warm undertones or cool undertones.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims the priority benefit of China application serial no. 201710610202.1, filed on Jul. 25, 2017. The entirety of the above-mentioned patent application is hereby incorporated by reference herein and made a part of this specification.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The invention relates to a skin undertone determining method. More particularly, the invention relates to a skin undertone determining method combining two color spaces for making determination and an electronic device.

2. Description of Related Art

When wearing makeup, most of the people choose foundation colors of foundation makeup according to skin undertones of their own. Nevertheless, it is difficult for most of the people to effectively and clearly find out the skin undertones of themselves and thus fail to choose the matching foundation colors of the foundation makeup according to their skin undertones. Therefore, how to effectively and clearly find out the skin undertones is an issue that needs to be overcome.

SUMMARY OF THE INVENTION

The invention provides a skin undertone determining method and an electronic device which are able to effectively and clearly obtain a skin undertone of a user.

The invention provides a skin undertone determining method including: obtaining a first image; obtaining a first parameter value and a second parameter value in a first color space according to the first image; obtaining a third parameter value in a second color space according to the first image; and determining a skin undertone of skin in the first image according to the first parameter value, the second parameter value, and the third parameter value.

In an embodiment of the invention, wherein the step of obtaining the first image includes: obtaining a second image, wherein the second image includes a face and neck of a human body; defining a plurality of reference points in a border of the face and neck in the second image; selecting a first reference point in the reference points, wherein a coordinate of the first reference point in a first direction is less than coordinates of other reference points in the reference points in the first direction; determining a position of a baseline in the second image according to the coordinate of the first reference point in the first direction and a predetermined offset, wherein a coordinate of the baseline in the first direction is less than the coordinate of the first reference point in the first direction; determining a feature area in the second image according to the reference points and the baseline; and obtaining the first image according to the feature area.

In an embodiment of the invention, wherein the step of determining the skin undertone of skin in the first image according to the first parameter value, the second parameter value, and the third parameter value includes: determining the skin undertone of skin in the first image has warm undertones when the first parameter value is greater than a first threshold, the second parameter value is greater than a second threshold, the second parameter value is less than a third threshold, and the third parameter value is less than a fourth threshold; and determining the skin undertone of skin in the first image has cool undertones when the first parameter value is less than the first threshold, the second parameter value is greater than a fifth threshold, the second parameter value is less than a sixth threshold, and the third parameter value is greater than a fourth threshold.

In an embodiment of the invention, wherein the step of obtaining the first parameter value and the second parameter value in the first color space includes: calculating an average value of color in the first image; and obtaining the first parameter value and the second parameter value of the average value of color in the first color space.

In an embodiment of the invention, wherein the step of obtaining the third parameter value in the second color space includes: obtaining the third parameter value of the average value of color in the second color space.

In an embodiment of the invention, wherein the first color space is a HSV color space, the first parameter value is a hue value in the HSV color space, and the second parameter value is a luminance value in the HSV color space.

In an embodiment of the invention, the second color space is a RGB color space, and the third parameter value is a blue value in the RGB color space.

In an embodiment of the invention, the method further includes: determining a corresponding foundation color according to the skin undertone determined and outputting a foundation color recommendation message according to the foundation color.

In an embodiment of the invention, the first image obtained includes only the neck of the human body or only a portion of the neck of the human body.

The invention further provides an electronic device, and the electronic device includes a storage unit and a processing unit. The storage unit is configured to store a plurality of modules. The processing unit is coupled to the storage unit and configured to access and execute the modules stored in the storage unit. The modules include an image obtaining module and a determination module. The image obtaining module obtains a first image. The determination module obtains a first parameter value and a second parameter value in a first color space according to the first image. The determination module further obtains a third parameter value in a second color space according to the first image. The determination module further determines a skin undertone of skin in the first image according to the first parameter value, the second parameter value, and the third parameter value.

In an embodiment of the invention, wherein in the operation of obtaining the first image, the image obtaining module obtains a second image, wherein the second image includes a face and neck of a human body; a plurality of reference points are defined in a border of the face and neck in the second image; a first reference point is selected in the reference points, wherein a coordinate of the first reference point in a first direction is less than coordinates of other reference points in the reference points in the first direction; a position of a baseline is determined in the second image according to the coordinate of the first reference point in the first direction and a predetermined offset, wherein a coordinate of the baseline in the first direction is less than the coordinate of the first reference point in the first direction; a feature area is determined in the second image according to the reference points and the baseline; and the first image is obtained according to the feature area.

In an embodiment of the invention, wherein in the operation of determining the skin undertone of skin in the first image according to the first parameter value, the second parameter value, and the third parameter value, the determination module determines the skin undertone of skin in the first image has warm undertones when the first parameter value is greater than a first threshold, the second parameter value is greater than a second threshold, the second parameter value is less than a third threshold, and the third parameter value is less than a fourth threshold; and the determination module determines the skin undertone of skin in the first image has cool undertones when the first parameter value is less than the first threshold, the second parameter value is greater than a fifth threshold, the second parameter value is less than a sixth threshold, and the third parameter value is greater than a fourth threshold.

In an embodiment of the invention, wherein in the operation of obtaining the first parameter value and the second parameter value in the first color space, the determination module calculates an average value of color in the first image and obtains the first parameter value and the second parameter value of the average value of color in the first color space.

In an embodiment of the invention, wherein in the operation of obtaining the third parameter value in the second color space, the determination module obtains the third parameter value of the average value of color in the second color space.

In an embodiment of the invention, wherein the first color space is a HSV color space, the first parameter value is a hue value in the HSV color space, and the second parameter value is a luminance value in the HSV color space.

In an embodiment of the invention, wherein the second color space is a RGB color space, and the third parameter value is a blue value in the RGB color space.

In an embodiment of the invention, the modules further include an output module. The output module determines a corresponding foundation color according to the skin undertone determined, and the output module outputs a foundation color recommendation message according to the foundation color.

In an embodiment of the invention, the first image obtained includes only the neck of the human body or only a portion of the neck of the human body.

To sum up, the skin undertone determining method and the electronic device provided by the embodiments of the invention may effectively and clearly obtain the skin undertone of the user and correspondingly recommend the foundation color to the user, such that the user is able to decide the color of the foundation makeup with ease.

DESCRIPTION OF THE EMBODIMENTS

FIG. 1is a schematic block diagram illustrating an electronic device according to an embodiment of the invention. Referring toFIG. 1, an electronic device1000at least includes a processing unit100and a storage unit120. Moreover, the processing unit100is coupled to the storage unit120, but the invention is not limited thereto. In an embodiment of the invention, the electronic device1000may be a server, a smart mobile device, a desktop computer, a notebook computer, a workstation, a personal digital assistant (PDA), etc., but the invention is not limited thereto.

The processing unit100may be a central processing unit (CPU) or other programmable microprocessor for general use or special use, a digital signal processor (DSP), a programmable controller, an application specific integrated circuit (ASIC), other similar device, or a combination of the foregoing.

The storage unit120may be a fixed or a movable random access memory (RAM) in any form, a read-only memory (ROM), a flash memory, other similar device, or a combination of the foregoing.

In the present embodiment, a plurality of program code snippets are stored in the storage unit120of the electronic device1000, and the program code snippets are executed by the processing unit100after being installed. For instance, a plurality of modules including an image obtaining module140, a determination module160, and an output module180are stored in the storage unit120. Various operations applied to the electronic device1000are respectively executed through the modules, wherein each of the modules is formed by one program code snippet or the program code snippets. Note that the storage unit120in the foregoing embodiment is not limited to a single memory device, and the foregoing modules may also be separately stored in two or more than two memory devices of identical or different types. In the rest of the embodiments of the invention, the foregoing modules are further, for example, respectively implemented through specific circuit structures.

In an embodiment of the invention, the electronic device1000further includes devices such as an output and input interface (not shown) and a communication interface (not shown), but the invention is not limited thereto. Specifically, the output and input interface includes devices configured for outputting or inputting messages and data, such as a display, a speaker, a keyboard, a mouse, a touch panel, etc. On the other hand, the communication interface supports various wired communication standards and wireless communication standards, such that the electronic device1000is able to be connected to other devices.

A skin undertone determining method provided by the embodiments of the invention may be implemented in the electronic device1000illustrated inFIG. 1. Several embodiments are introduced in the following in association with the accompanied electronic device1000illustrated inFIG. 1to further illustrate the foregoing analysis method. It is worth noting that the skin undertone determining method is not limited to be implemented merely on the electronic device1000, or rather the foregoing analysis method may be implemented on other electronic devices or systems equipped with corresponding capabilities.

FIG. 2is a schematic flowchart of determining a skin undertone according to an embodiment of the invention. Referring toFIG. 2, in step S201, the image obtaining module140may obtain an image of a neck area of a person being captured. Note that the neck area of the human body is not exposed to the sun often compared to the face, such that the skin color of the neck area is closer to the person's real skin color. Based on the above, an image of the neck area is used in the invention to perform analysis.

Specifically,FIG. 3AandFIG. 3Bare schematic diagrams of obtaining an image of a neck area of a user according to an embodiment of the invention. Referring toFIG. 3AandFIG. 3B, the image obtaining module140may obtain an image300(a.k.a. a second image) including both the face and neck parts of the person being captured (or the human body) from the storage unit120. In an exemplary embodiment, the image300is, for example, generated by the electronic device1000after capturing the image with an image obtaining unit (not shown). However, the invention is not intended to limit the method for obtaining the image300. In particular, in another embodiment of the invention, the first image may include only the neck of the human body or a portion of the neck of the human body.

After obtaining the image300, the image obtaining module140defines a border of the face and neck formed by reference points1to19in the image300.

Next, the image obtaining module140selects the reference point19(a.k.a. a first reference point) from the reference points1to19. Herein, a coordinate (a.k.a. a Y-coordinate) of the reference point19in a Y-coordinate direction (a.k.a. a first direction) is less than Y-coordinates of other reference points in the reference points1to19. In other words, the Y-coordinate of the reference point19is less than the Y-coordinates of the reference points1to18.

Afterwards, the image obtaining module140determines a position of a baseline32in the image300according to the Y-coordinate of the reference point19and a predetermined offset A, wherein a Y-coordinate of the baseline32is less than the Y-coordinate of the reference point19. In other words, the base line32is located at a position extended downwardly from the Y-coordinate of the reference point19by a predetermined offset A, and the baseline32is a horizontal line. In the present exemplary embodiment, the predetermined offset A is a fixed value between100and150pixels, for example. Nevertheless, the invention is not intended to limit the value of the predetermined offset A.

Next, referring toFIG. 3B, the image obtaining module140determines a feature area34in the image300according to the reference points1to19and the baseline32, and the image obtaining module140obtains (or acquires) an image (a.k.a. the first image) in the feature area34. Note that the feature area34is the neck area of the person being captured in the image300.

It is worth noting that in an exemplary embodiment, if an input image is obtained through directly capturing the neck area of the person being captured, the image obtaining module140may directly perform analysis by using the input image obtained without executing the foregoing method of identifying the neck area.

Referring toFIG. 2again, in step S203, the determination module160calculates an average value of color in the first image. Specifically, the determination module160averages colors of each of the pixels in the first image. Next, in step S205, the determination module160determines a skin undertone of the person being captured according to the average value of color in the first image.

Specifically, after calculating the average value of color in the first image, in step S205, the determination module160obtains a hue value (a.k.a. a first parameter value) and a luminance value (a.k.a. a second parameter value) in the HSV color space (a.k.a. a first color space) of the average value of color and also obtains a blue (B, Blue) value (a.k.a. a third parameter value) in the RGB color space (a.k.a. a second color space) of the average value of color. Next, the determination module160determines the skin undertone of skin in the first image according to the first parameter value, the second parameter value, and the third parameter value.

Note that the invention is not intended to limit the values of the first threshold, the second threshold, the third threshold, the fourth threshold, the fifth threshold, and the sixth threshold.

Next, referring toFIG. 2again, in step S207, the determination module160determines a corresponding foundation color according to the skin undertone determined and outputs a foundation color recommendation message through the output module180according to the foundation color. For instance, when the skin undertone has the warm undertones, the determination module160may determine the corresponding foundation color is red or brown, and the output module180may, for example, correspondingly output (or display) a recommendation message of a foundation product with the foundation color of red or brown to a user through a screen. Alternatively, when the skin undertone has the cool undertones, the determination module160may determine the corresponding foundation color is white or green, and the output module180may, for example, correspondingly output (or display) a recommendation message of a foundation product with the foundation color of white or green to the user through the screen. Afterwards, in step S209, the user (or the person being captured) may be able to choose the foundation product with the appropriate foundation color according to the recommendation message and apply the foundation makeup on the cheek, neck, etc.

FIG. 4is a flowchart illustrating a method of determining a skin undertone according to an embodiment of the invention. Referring toFIG. 4, in step S401, the image obtaining module140obtains the first image. In step S403, the determination module160obtains the first parameter value and the second parameter value in the first color space according to the first image. In step S405, the determination module160obtains the third parameter value in the second color space according to the first image. Finally, in step S407, the determination module160determines the skin undertone of skin in the first image according to the first parameter value, the second parameter value, and the third parameter value. Note that in an exemplary embodiment, the foregoing process may be executed by executing step S405before executing step S403.

In view of the foregoing, the skin undertone determining method and the electronic device provided by the embodiments of the invention may effectively and clearly obtain the skin undertone of the user and correspondingly recommend the foundation color to the user, such that the user is able to decide the color of the foundation makeup with ease.