Systems and methods for creating topical formulations with improved image capture

By displaying an image of the user's body part on an optical display, determining the sensor location and lighting environment, and processing the image data to calculate reflectivity and color characteristics, it solves the facial image capture data calibration and accuracy problems in the existing technology and improves the accuracy of cosmetic formulations. Customizability.

CN114174783BActive Publication Date: 2024-10-18SHISEIDO CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202080040189.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-03
Publication Date
2024-10-18
Estimated Expiration
2040-04-03

AI Technical Summary

Technical Problem

When the existing technology captures facial image data, there are accuracy problems in the calibration and optical data collection processes. Especially in the case of interference from ambient light sources, it is difficult to ensure the accuracy of color accuracy.

Method used

Optimize customized cosmetics by displaying an image of the user's body part on an optical display, determining sensor location and acceptability of the lighting environment, recording image data using an image sensor, and processing this data to determine lighting models to calculate reflectance and color characteristics formula.

Benefits of technology

Improved calibration and optical data accuracy of the image capture process enables accurate capture of facial color characteristics in different lighting environments, improving customization of cosmetic formulas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114174783B_ABST
    Figure CN114174783B_ABST
Patent Text Reader

Abstract

A method is described, including displaying an image of a body part of a user on an optical display of a device used by the user. The device may include an image sensor, and the image of the body part of the user is sensed by the sensor. The method includes determining whether the position of the body part image relative to the sensor is acceptable to allow recording of the body part image; determining whether the lighting environment associated with the sensor is acceptable to allow recording of the body part image; recording the image using the sensor to provide a recorded image having image data; processing the recorded image to determine illumination model data associated with the illumination environment; and determining reflectivity and color characteristics associated with the body part based on the recorded image and the illumination model data. In one embodiment, the optical display has a light source, and when the lighting environment is unacceptable for recording, the method instructs the user to modify the lighting environment so that its illumination of the body part is less than about 2% of the illumination provided by the light source, illuminate the body part with constant white light using the light source, and determine whether the illuminated body part is positioned relative to the sensor to allow recording of the image of the body part by displaying an outline of the body part on the optical display to locate the body part within the field of view of the sensor. In this case, the processing of the image may include direct calculation to determine the illumination model.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims the benefit under 35 U.S.C. §119(e) of U.S. Provisional Patent Application Nos. 62 / 831,667, 62 / 859,676, and 62 / 951,970, filed on April 9, 2019, each of which is entitled “SYSTEMS AND METHODS FOR CREATING LOCAL AGENTS WITH IMPROVED IMAGE CAPTURE,” the entire disclosures of which are incorporated herein by reference. Background Art Technical Field

[0003] The field of the invention relates generally to image analysis and topical formulation, and more particularly to systems and methods for determining customized or selected cosmetic formulations based on color facial images using improved image capture techniques.

[0004] Related technical description

[0005] There is a need in the art for providing a method for customizing or topical preparations (e.g., cosmetics) based on the use of, for example, advanced image analysis techniques to determine the specific needs of an individual. Therefore, a system and method for solving these problems have been developed, and a user is allowed to capture accurate, repeatable color samples using a mobile device. The formulation of aesthetic and protective topical preparations optimized for a specific user and the method for providing the resulting product to the user are developed by the applicant and disclosed in U.S. Patent Nos. 8,933,994, 9,122,918 and 9,122,919 and / or U.S. Patent Application Publication Nos. 2018 / 0189853A1 and 2018 / 0260871A1 ("background patents"), each of which is incorporated by reference in the relevant part of this article. The implementation of these methods and other systems is now being used in industry and is available on the market. Companies like Matchco provide a full range of solutions to produce such preparations. The systems and methods disclosed in these patents have many advantages, not only in that they enable the actual production of these cosmetic preparations, but also in that such systems and methods can describe the characteristics of a given user and use these characteristics to derive or recommend user-specific cosmetic formulas, and provide improved cosmetic formulas based on initial formulas through user interaction and feedback. Therefore, new formulas can be specially formulated, selected and / or modified for individual users based on such systems.

[0006] Systems such as those described in the background patents disclose techniques for using a device with an image sensor, which may be a handheld device such as a mobile phone, to interactively guide a user to capture images and process the user interactions and resulting images, for measuring facial regions to determine and ultimately manufacture customized topical formulations such as cosmetics. However, the user performance requirements (including user interaction time) associated with such techniques may be relatively high. For example, some previous methods require sequentially collecting data from multiple facial regions to calibrate the device sensor to obtain the most accurate image data. These operational requirements may result in less adoption by end users. Therefore, there is a need for optimized methods for interactively capturing image data.

[0007] There are several existing methods for capturing user optical data for multiple facial regions simultaneously (i.e., in a single image capture). The simplest method for capturing user optical image data is for the user to take a self-portrait or "selfie" image of themselves. This image data can be enhanced by machine vision services that are typically available to the operating system of a handheld device with a camera and an interactive display. In addition, such image data can be enhanced by a collection of three-dimensional (3D) surface data. For machine vision services available on a handheld device operating system, it is increasingly common to achieve enhancement through optical systems that record 3D surface data. In addition, existing devices typically provide services for tracking specific areas of a user's face (called facial landmarks). These landmarks can be associated with, mapped onto, or used to generate a 3D surface by methods known to practitioners in the art.

[0008] However, while the use of selfies is known, there remains a need in the art to improve the calibration, optics and camera data collection processes and resulting color accuracy to account for the effects of ambient lighting that may interfere with an accurate and calibrated image. Summary of the invention

[0009] The present invention includes multiple embodiments that are directed to improving the calibration, optical and camera data collection processes and the resulting color accuracy, including, where applicable, accounting for the effects of ambient light sources that may interfere with accurate and calibrated images. Exemplary embodiments of the present invention are summarized herein.

[0010] In one embodiment of the present invention, a method is included, the method comprising: displaying an image of a body part of a user on an optical display of a device used by the user, wherein the device includes an image sensor and the image of the body part of the user is sensed by the sensor; determining whether the position of the body part image relative to the sensor is acceptable to allow recording of the image of the body part; determining whether the lighting environment associated with the sensor is acceptable to allow recording of the image of the body part; recording the image using the sensor to provide a recorded image with image data; processing the recorded image to determine lighting model data associated with the lighting environment; and determining reflectance and color characteristics associated with the body part of the user based on the recorded image and the lighting model data.

[0011] In one embodiment of the method, determining whether the position of the body part relative to the sensor is acceptable for recording an image of the body part may include displaying a color light on the optical display.

[0012] In another embodiment of the method, determining whether the position of the body part relative to the sensor is acceptable for recording an image of the body part may include displaying an illumination profile of the body part on the optical display.

[0013] Additionally, the method may include determining whether the position of the body part relative to the sensor is acceptable for recording an image of the body part may include actuating a tactile or audible indicator on the device.

[0014] In another embodiment of the method, determining whether the lighting environment is acceptable for recording an image of the body part may include displaying a color light on the optical display.

[0015]

[0013] Also included herein in a method, determining whether the lighting environment is acceptable for recording an image of the body part may include displaying a lighting profile of the body part.

[0016] In another embodiment of the method, determining whether the lighting environment is acceptable for recording an image of the body part may include actuating a tactile or audible indicator on the device.

[0017] Determining the illumination model in the method may include: measuring exposure data associated with the device; determining data describing the relationship between a light source on the device and an aperture of the image sensor; determining data describing the relationship between the lighting environment and the image sensor; and determining data describing the relationship between the image sensor, the light source, and a surface of the body part.

[0018] The method may also include determining a customized cosmetic formula based in part on the reflectance and color characteristics.

[0019] In one method herein, various processing of recorded images may be used for different lighting environments. Exemplary embodiments include that the optical display may include a light source; wherein the illumination of the body part by the lighting environment may be less than about 2% of the illumination provided by the light source; and wherein processing the recorded image to determine the illumination model data may include direct calculation. The optical display may include a light source; wherein the illumination of the body part by the lighting environment may be between about 2% and 10% of the illumination provided by the light source; and wherein processing the recorded image to determine the illumination model data may include performing image filtering. The optical display may include a light source; wherein the illumination of the body part by the lighting environment may be between about 10% and 25% of the illumination provided by the light source; and wherein processing the recorded image to determine the illumination model data may include performing statistical estimation of bilateral symmetry. In addition, the optical display may include a light source; wherein the illumination of the body part by the lighting environment may be between about 25% and 40% of the illumination provided by the light source; and wherein processing the recorded image to determine the illumination model data may include employing machine learning techniques.

[0020] In another embodiment, the optical display may include a light source; and wherein, when it is determined that the lighting environment associated with the sensor is unacceptable for recording the body part, the method may then further include: instructing the user to modify the lighting environment so that its illumination of the body part is less than about 2% of the illumination provided by the light source; illuminating the body part with constant white light using the light source; and determining whether the illuminated body part is positioned relative to the sensor to allow recording of an image of the body part by displaying an outline of the user's body part on the optical display to locate the body part within the field of view of the sensor; wherein processing the recorded image to determine the lighting model data includes direct calculation.

[0021] The present invention also includes an embodiment of a system comprising: one or more processors and a non-transitory memory; machine-readable instructions stored in the memory, which, when executed by the one or more processors, cause the system to perform operations including the following operations: displaying an image of a body part of a user on an optical display of a device used by the user, wherein the device includes an image sensor and the image of the body part of the user is sensed by the sensor; determining whether the position of the body part image relative to the sensor is acceptable to allow recording of the body part image; determining whether the lighting environment associated with the sensor is acceptable to allow recording of the body part image; recording the image using the sensor to provide a recorded image having image data; processing the recorded image to determine lighting model data associated with the lighting environment; and determining reflectance and color characteristics associated with the body part of the user based on the recorded image and the lighting model data.

[0022] The present invention also includes a method comprising: (a) illuminating a body part of a user with light of known intensity and color using an illumination source associated with an optical display of a device; (b) displaying a representation of the body part on the optical display, the body part being sensed by an image sensor of the optical device, wherein the representation of the body part includes a contour associated with the body part, and wherein the representation allows the user to position the body part within the optical display; (c) recording an image of the body part sensed by the image sensor; (d) recording data describing characteristics of the optical display and characteristics of the image sensor, the characteristics of the optical display including the known intensity and color of the illumination light, and the characteristics of the image sensor including exposure settings of the image sensor; and (e) determining a surface color of the body part based on data associated with the recorded image of the body part, data describing characteristics of the optical display, and data describing characteristics of the image sensor.

[0023] In one embodiment of the method, the method may further include determining a distance from the image sensor to the surface of the body part, wherein the distance is further used to determine the surface color of the body part. In another embodiment, determining the surface color of the body part includes comparing data associated with a recorded image of the body part with data describing characteristics of the optical display and data describing characteristics of the image sensor. The method may further include calibrating the exposure sensitivity of the illumination source and the image sensor using data from a recorded image of a light source reflected in a mirror. In such an embodiment, the surface color of the body part may be determined by processing the distance from the image sensor to the surface of the body part, data associated with the recorded image of the body part, data describing characteristics of the optical display, and data describing characteristics of the image sensor using a weighted function network.

[0024] Also included herein is a system comprising one or more processors and a non-transitory memory; machine-readable instructions stored in the memory, which, when executed by the one or more processors, cause the system to perform operations including: (a) illuminating a body part of a user with light of known intensity and color using an illumination source associated with an optical display of the device; (b) displaying a representation of the body part on the optical display, the body part being sensed by an image sensor of the optical device, wherein the representation of the body part includes a contour associated with the body part, and wherein the representation allows the user to position the body part within the optical display; (c) recording an image of the body part sensed by the image sensor; (d) recording data describing characteristics of the optical display and characteristics of the image sensor, the characteristics of the optical display including the known intensity and color of the illumination light, and the characteristics of the image sensor including exposure settings of the image sensor; and (e) determining a surface color of the body part based on data associated with the recorded image of the body part, data describing characteristics of the optical display, and data describing characteristics of the image sensor.

[0025] The present invention also includes a method comprising: displaying an image of a body part of a user on an optical display of a device used by the user, wherein the device includes an image sensor and the image of the body part of the user is sensed by the sensor; recording a first version and a second version of the image of the body part using the sensor to provide related recorded high dynamic range images, wherein the display lighting on the optical display of the device is set to white to record the first version of the image, wherein the display lighting on the optical display of the device is set to black to record the second version of the image; removing at least some of the lighting in the second version of the image from the first version of the image to create a third version of the image; processing data associated with the third version of the image to create a three-dimensional model of the body part, the three-dimensional model being associated with a series of vertices, each of the vertices being associated with a color; correcting the color associated with each of the vertices to take into account the distance from the sensor to the body part and the angle from the sensor to the body part to determine a corrected color vertex; and processing the corrected color vertices using a machine learning model to estimate color characteristics of the body part.

[0026] In some embodiments, the method may further include operating the image sensor in a self-portrait mode using an application. The method may further include controlling settings of a device having the image sensor using the application. In one embodiment of the method, it may further include taking a first version of the image in a darkroom lighting environment, and further illuminating the optical display with white light.

[0027] In some embodiments, the method may further include storing a third version of the image in a facial data format. In the method, each vertex may include one or more of the following: each vertex may include one or more of the following: a label associated with the position of the vertex on the body part, an RGB color obtained from the third version of the image, a depth of the vertex obtained from the depth data of the image sensor, a spatial position of the vertex relative to the image sensor viewpoint, and a projected normal position of the vertex relative to the image sensor viewpoint. In one embodiment of the method, the method may further include a pre-processing step of correcting color based on the type of the device using the image data from the device.

[0028] In the method, the machine learning model may include a color correction learning model, and the method further includes correcting the type of the device while training the skin color model, and including images from different types of devices, including devices having the image sensor, as training data in the skin color model. The training data for the machine learning model is smoothed and filtered before training the machine learning model.

[0029] In a further method, the machine learning model can be constructed and trained using training data from human subjects, wherein the training data includes one or more of: survey data, self-report data from human subjects, reference photographs of human subjects and color maps, skin color data of human subjects measured by a spectrophotometer in at least one facial region as ground truth measurements, and facial image data from a user. The at least one facial region is selected from the group consisting of wrist, forehead, right cheek, left cheek, right jawline, left jawline, and shoulder.

[0030] The training data in the method, the training data of skin color data from at least one facial region used for ground truth measurement can be combined into a single CIELAB color using a component median method, and thereafter the single CIELAB color for each facial region can be used as input to a machine learning model, and the output of the machine learning model is a unified color for facial cosmetics.

[0031] Alternatively, the present method uses a composite approach to combine training data from skin color data for at least one facial region used for ground truth measurements, wherein the skin color data from at least one facial region is linearly weighted over the at least one facial region to determine which of the at least one region best matches the single CIELAB value of skin color in the ground truth dataset. In the machine learning model, in this embodiment, the CIELAB vectors for each of the at least one facial region are inputs to the model, and the single ground truth color CIELAB vector is the output. The linear weighting can be calculated as a result of a multivariate linear regression with regularization. The machine learning model can include a ground truth dataset having ground truth data captured in summer months and ground truth data captured in winter months.

[0032] Brief description of the drawings

[0033] The above summary and the following detailed description of the preferred embodiments of the present invention will be better understood when read in conjunction with the accompanying drawings. For the purpose of illustrating the present invention, presently preferred embodiments are shown in the accompanying drawings. However, it should be understood that the present invention is not limited to the precise arrangements and tools shown. In the accompanying drawings, similar reference numerals generally represent the same parts in different views. In addition, the drawings are not necessarily drawn to scale, instead, emphasis is generally placed on illustrating the principles of the present invention.

[0034] In the attached picture:

[0035] Figure 1 A rendering of detected facial landmarks is shown;

[0036] Figure 2 An exemplary optical display with combined line display and illumination is depicted;

[0037] Figure 3 depicts an exemplary optical display having feedback indicating to a user poor user positioning during a selfie scan;

[0038] Figure 4 A depth map of the facial region is shown;

[0039] Figure 5 shows a rendering of the geometry of the face region derived from facial landmark detection;

[0040] Figure 6 depicts subdivided geometry from a geometry framework with depth sampling;

[0041] Figure 7 Planar samples depicting facial regions that can be used with the lighting model;

[0042] Fig. 8A and 8C is a flow chart of the steps of an exemplary method employing the optimized image capture technique of the present invention; and

[0043] Figure 8B is a high-level exemplary system architecture that may be used in conjunction with embodiments of the present invention. DETAILED DESCRIPTION

[0044] The following describes embodiments of the present invention, and the disclosures of background patents are incorporated by reference in relevant parts, which disclosures relate to basic systems and methods to define existing systems and methods used in the present invention.

[0045] The invention and embodiments thereof described in this application provide an optical display (e.g., an illuminated liquid crystal display) for providing feedback to a user while serving as a means for illuminating the user with a known amount of light to measure skin color in facial areas. Thus, in addition to facial landmark tracking and facial surface reconstruction, embodiments provide a form of controlled illumination to construct a model of a unique lighting environment for parallel optical data capture (i.e., where multiple forms of optical data can be captured simultaneously). As used herein, the term "illumination model" or reference to modeling of an illumination environment refers to a mathematical model of the physical propagation of light provided by an illumination source, its interaction with physical surfaces, and subsequent sensing by an optical system. Such a model can be simplified into practical applications as data and code and used to provide information about image data.

[0046] In addition, the captured data and constructed illumination models can be used to train machine learning systems. Furthermore, the real-time captured data and constructed illumination models can be processed by the trained machine learning system to provide detailed skin color data (i.e., CIEL*a*b*, CIELAB colors), skin color feature data (e.g., wrinkles, freckles, acne, birthmarks), and provide manufacturing instructions for interactive creation, modification, and manufacture of customized topical preparations.

[0047] Embodiments of the invention disclosed herein also allow for the parallel collection of optical reflectance data from multiple facial regions of a user using optimization techniques, as described in more detail herein.

[0048] By way of background, accurate color recording (ie, measurement and storage of data) using a sensor / camera of an optical device recording an image requires that the physical properties of the sensor, lighting, and physical environment be controlled, known, or modeled.

[0049] As used herein, optical data refers to data captured by a sensor and processed by a lens optical system to focus a real image onto an array of light sensing devices such as a charge coupled device (CCD). The output of the optical system is an image composed of color channels or grayscale channels. Optical data may include other data captured by an optical system (including a camera) and using other sensing methods. For example, depth data may be sensed using an optical system that uses multiple cameras and timed or structured light outputs, such as used in time-of-flight sensors and depth systems using structured light.

[0050] The physical characteristics of the sensor are determined by reading embedded data in the optical stream or in the associated hardware through the operating system (e.g., optical data may include color images, depth data represented in an image array, and camera settings represented, for example, in the Exchangeable Image File Format (EXIF) or Tagged Image File Format (TIFF)). The embedded data may include data in a data stream (e.g., a serial data stream available in an application programming interface (API) in the device's operating system (OS)) consisting primarily of raw or compressed image data that contains additional information about the data stream. The embedded data may include, but is not limited to: the exposure time used in image capture, the aperture of the lens system used in image capture, the sensitivity (ISO) of the image recording device used for image capture, the location of the image capture in GPS coordinates, and the brand and model of the imaging device.

[0051] As used herein, lighting refers to sources of visible light, which can include localized area light sources (eg, lamps), diffuse area light sources (eg, light panels), and distant light sources (eg, light from the sun and moon).

[0052] As used herein, physical environment refers to an indoor space (e.g., a room in a house or the interior of a car or vehicle) or an outdoor space that also includes the color and reflectivity of surfaces in the vicinity of the activity associated with image capture.

[0053] As described more fully herein, the relationship between the sensor, light, and the surface reflectivity of the target can be sensed and modeled using data provided by 3D sensing capabilities in the device / camera. Alternatively, the relationship can be sensed and modeled using techniques that identify facial feature points and fit those feature points to the user image (e.g., geometric data fitting techniques using mathematical methods). Such techniques can be provided by computer vision algorithms in the device operating system or other available sources, including open source projects (such as STASM, OpenCV) or industry APIs (such as Apple's ARKit or Google's visionAPI). Lighting and user interaction can be controlled using the device's optical display, as described more fully herein.

[0054] The embedded data, i.e., the exposure data of the optical sensor (i.e., ISO, shutter time, and aperture), can be obtained in a variety of ways. In one exemplary embodiment, the exposure data embedded in the camera data stream is monitored to determine the exposure value of the sensor. In another embodiment, the system sets the shutter timing and ISO sensitivity of the camera to specific settings. In either case, the amount of light in the scene can be measured using the exposure data.

[0055] The relationship between the light source (e.g., a "flash" or illumination from an optical display in a self-portrait / selfie) and the camera (i.e., geometric relationship / position (6 degrees of freedom), position (xyz), orientation (yaw, pitch, roll or pivot) relative to each other) can be determined by measuring the relative position and orientation of the light source and the aperture of the camera system. This data can be measured and stored in the data source for later use.

[0056] The relationship between the ambient light source and the camera (i.e., the geometric relationship, same as described above) also needs to be determined and may change with radiance mapping depending on the local illumination (lighting environment) and its physical environment relative to the camera aperture. For low light / darkroom environments, determining the relationship between the location, direction, and subsequent contribution of the ambient light source to the camera can be as simple as detecting when the exposure information embedded in the image data indicates that the intensity of such additional light is small. For cases where the ambient light source is low, direct calculation of the color of the measured surface can be simplified. Low light environments are, for example, where the total contribution of ambient or other ambient light sources is less than about 2% of the human perceptible brightness or color variance measured by the CIELAB color measurement of the surface measurement rate, where CIELAB is designed to use a standard observer model that closely approximates human perception of brightness and color.

[0057] Once the relative positions of the camera, skin surface and light are known, and the amount of light is known (i.e., since there are no light sources other than the display) and the exposure of the camera is known, a direct calculation can be performed by solving the radiation equation. The color of the skin can be solved as a physical system.

[0058] While the darkroom environment simplifies the overall solution process of the lighting model (i.e., since there is no external light, the problem of solving for unknown variables is eliminated), other complications arise, as described below.

[0059] Many handheld devices contain camera systems and are capable of using an optical display to interact with the device. Over time, the quality of optical displays on handheld devices has continued to improve in terms of resolution, brightness, and color. The improvements in brightness and color fidelity of these devices allow them to be used as both lighting and display systems. This use is well known and is often used by embedded software on the device as a "flash" or fill light in the camera code interface. It is also common to display the real-time output of the camera on such an optical display as feedback to the selfie user. However, during this real-time feedback, in a darkroom environment, it is not possible to use the display as a light source. This is because showing a video image of someone on a display screen in a darkroom will reduce the light displayed on the screen. The light displayed on the screen is dim and cannot illuminate the selfie subject. The lack of lighting in a darkroom makes it difficult (if not impossible) to correctly position the user's face for a selfie photo.

[0060] Certain aspects of the present invention help to solve this problem. In one embodiment, an optical display is used both for feedback and as a light source in a darkroom environment, which involves indicating the position of an image sensor on the optical display so that the body part that is the subject of the selfie scan can be automatically detected, for example, using the facial feature point detection technology described herein, and the optical display illuminates the body part with a greater luminous flux than other light sources. More specifically, the handheld device can be programmed to display an outline, line drawing, or other sparse rendering of itself to the user on a white background at a constant / near constant brightness (this illumination comes from the light source display of the mobile phone) (as described in more detail below). This rendering can be accomplished in a variety of ways. In one embodiment, an image processing algorithm for finding edges (such as Canny edge detection) can be used to find the edges of the face. These edges can be displayed as light lines on a white background. This allows the device to provide positioning feedback to the user while providing near constant / continuous illumination.

[0061] A method for creating a line drawing / sparsely rendered representation of a user's face is now described. A facial feature detection algorithm (e.g., provided by a machine vision service or facial feature detection API of a handheld device operating system, as described above) may be used to locate key points of the user's face (e.g., Figure 1 ). The software knows the various points on the face. New points can be added by using a proportional relationship to the existing points. Then, a line drawing is created by connecting these points. These points can be used to draw a light yellow line drawing on a white background (such as Figure 2 ), allowing the system to provide positioning feedback to the user while providing near-constant lighting. This rendering can show the user's position in the frame so that the user can properly position the self-portrait. In this way, in a darkroom environment, the optical display can be used as a light source and feedback for positioning and alignment.

[0062] Additionally, in certain embodiments, primarily applicable indoors with at least some light, rendering may differ when the user positions the camera at a near-optimal position and distance. Optimal user positioning may be determined by a number of factors. One factor is the distance of the user from the camera. For example, at very close distances, all desired features of the user may not be visible, the user's features may be out of focus, and / or algorithms for locating facial landmarks may fail. If the user is too far from the camera, the number of pixels representing the user's features may be reduced, affecting data collection. If the user is not in the center of the image area, key user features may be cropped. If the user's head is turned to one side, certain features may be hidden in that orientation of the user.

[0063] In one embodiment, when the phone is in position, the rendering may be a line drawing depicting the outline of the face, and when the phone is not in position, the rendering may become an oval around the face. More specifically, the facial feature detection software can detect the location of facial feature points to determine whether the user's facial features are visible within the frame and acceptable for recording the image. If the facial features are not all visible in the image frame, an oval is rendered.

[0064] In another exemplary embodiment, when the mobile phone is in a suitable position (such as Figure 2 ), the rendering can show pale linear edges of the face, and when not in place the rendering can become a low contrast bright video rendering of the user (as shown Figure 3 In some embodiments, the low ambient light requirement is relaxed and Newton's method is used to account for the entire lighting environment using additional calculations, as described in the following sections. However, even in such embodiments, it is still useful to provide user feedback through the optical display using the methods described above, because direct illumination of the optical display is still required even in situations with high ambient / ambient light.

[0065] For bright room environments, with greater ambient lighting to consider, finding the relationship between the camera and ambient lighting may be more complex. One exemplary solution involves taking multiple images using multiple light sources to adjust the calculated surface color. In this embodiment, the user records the image using the "selfie" method described above, where the color of the optical display is a known calibrated white. In one embodiment, the screen color and brightness of a given model of mobile phone are measured and used as constants. In other embodiments, if the screen color and brightness of a given model of mobile phone vary too much and cannot be considered constant, the white screen can be calibrated by having the user take a picture of themselves in a mirror. That image can be used to calibrate the white screen of the mobile phone-that is, the white light in the image can be measured and thus become known. The technology for an embodiment of this step is described in an example in the background patent and is further described herein. For example, in an exemplary embodiment, the user is guided by a series of user interface screens to display the display of the handheld device to a common mirror surface. The exposure setting of the camera / mobile phone is set to a known value. The user is required to press a user interface element to record an image of the front camera screen image of the handheld device. The display's illumination and the camera's exposure sensitivity are calibrated by software on the handheld device using the recorded images, known exposure settings, the type of handheld device, and the size and recorded brightness of bright displays in the image. The white point used for color conversion is then adjusted by using the found display illumination brightness and color relative to the camera's exposure characteristics to improve calculations of skin tones.

[0066] Now returning to the description of a method for calculating ambient light illumination in a bright room environment, after taking a selfie, the color of the optical display light source is changed (e.g., to yellow) and the image is recorded. The color image (e.g., yellow illuminated) is used to detect those areas in the image where a different frequency illumination color (i.e., a color other than yellow) is present. This information is used to remove the ambient light from the first (i.e., white calibrated) image.

[0067] Describing this embodiment in more detail now, the software on the handheld device displays a series of separate background colors on the optical display and records an image for each separate light source. One of the light sources may be the most intense yellow (R=1, G=1, B=0) as defined in the sRGB standard. Another light source may be white (R=1, G=1, B=1) as defined in the sRGB standard. The software may then perform the following steps to detect and remove ambient light: 1. Find non-yellow (blue) areas of the image of the user with a yellow light source. 2. Process these areas to remove exposure saturation artifacts, which is done by attenuating high exposure areas. 3. Process these areas to remove noise, which can be done by applying a median image filter. 4. These found areas are used to attenuate the exposure of the image of the user with a white light source. 5. The resulting corrected image can be used to refine subsequent calculations of surface color. In this case, exposure saturation artifacts are very bright reflections that appear as pure white in the recorded image. These can be detected, found and removed by a histogram of brightness. In this context, noise removal can be performed by applying a component median filter with a radius of 1.0 to the captured image using known techniques.

[0068] In a bright room environment, the handheld device may be programmed to provide an indication that image data may be collected and another indication that image data may not be collected. For example, in one embodiment, an indication (e.g., a red dot, such as a red dot) may be provided when the embedded exposure data read from the camera data stream indicates that the ambient light is too bright or otherwise inadequate for the optical display to serve as the primary light source for the user. Figure 3 ), but may indicate differently (e.g., a green dot, such as Figure 2 In other embodiments, the indication is not visual but is audible or tactile.

[0069] Now describing this embodiment in more detail, when the total contribution of ambient light sources and other non-optical display light sources is greater than the contribution of the optical display, they may be considered "too bright", making it difficult for the software algorithm or method to accurately solve for the surface reflectance of the desired area of ​​the user's skin color. Depending on the technology available to solve for such light, more or less light may be tolerable or acceptable, i.e., directly solving the illumination model is very sensitive to ambient light, while the machine learning system may be trained to ignore more ambient light. For example, in embodiments where reflectance is solved directly (e.g., through inverse rendering techniques, without the aid of image filtering, such as additional statistical or machine learning techniques elsewhere in this document), the amount of illumination required can be very small in addition to the amount of illumination provided by the optical display. For example, because this additional illumination will directly affect the tolerance of the skin color measurement found, it may be required that the additional or ambient illumination falling on the skin color surface to be measured is less than about 2% of the illumination provided by the optical display (i.e., the amount of ambient light allowed from light sources other than the display, expressed as a percentage of the light output by the display when illuminating the skin).

[0070] In another embodiment, where ambient or other additional illumination may be attenuated by the image filtering described above, it may be required that the additional or ambient illumination falling on the skin color surface to be measured be less than about 10% of the illumination provided by the optical display.

[0071] In yet another embodiment, a statistical technique is added for estimating the allowed variance of reflected light for a facial region, and a statistical estimate of the bilateral symmetry of facial reflectance under known illumination, which may require that the additional or ambient illumination falling on the skin-colored surface to be measured is less than about 25% of the illumination provided by the optical display. For example, since the light from the optical display is roughly centered, and facial features have already been detected, it is useful to compare the illumination of the facial region using bilateral symmetry (assuming that humans are roughly symmetrical laterally). If the reflected color of the right side of the face is found to be significantly different from the left side, then that difference can be used to detect external light on the lighter side of the face.

[0072] In another embodiment, a machine learning system trained using various possible skin tones, lighting, and environmental inputs adjusts the output of the previous embodiment, requiring that the additional or ambient lighting falling on the skin tone surface to be measured is less than about 40% of the lighting provided by the optical display. In these embodiments, the required limits on the additional or ambient lighting are tested and known, and the amount of additional lighting can be detected by monitoring the output of data embedded in the image data stream.

[0073] The physical relationship between the sensor, light source, and target surface also needs to be determined (physical relationship, as previously described). In one embodiment, the optical display (the light source in the selfie mode of operation) is in a fixed position relative to the optical sensor / camera. The system can determine the type of device it is operating on and use that relationship (the physical distance and orientation of the display relative to the camera, which does not change for a given model of phone) to determine the physical relationship of the sensor / camera to the light source. In order to determine the relationship of the sensor and light source to the target surface, the different depths of the target surface must be determined. In one embodiment, a handheld device (e.g., a smartphone) has a sensor that measures depth as an array.

[0074] Figure 4 Display the output of this array depth as a grayscale image. Figure 4 In the embodiment of the present invention, the brighter areas are closer to the camera aperture and the darker areas are farther away. It will be appreciated that each grayscale tone represents a fixed, calibrated distance from the camera aperture and can therefore be used to construct a 3D surface associated with the optical image. In this way, the relationship of the target surface to the camera is determined. In another embodiment, machine vision technology is used to find facial landmarks on the image (e.g., using the API mentioned above). Figure 1 The two-dimensional (2D) points output from facial landmark tracking using a service in the operating system of a handheld device are shown. The points are connected by a line in their array order. Figure 5 Shows Figure 1 The points in the image are enhanced using a fitting algorithm to build a graph of nodes and arcs to form a set of connected 3D polyhedra. The data structure used to hold this graph is called a winged-edge model. The fitting algorithm used in this example uses the found facial feature points to determine the new positions of the pre-made image, which are found by the system using substitution, scaling, interpolation, and extrapolation. There are known algorithms that can be used to perform this fitting. For example, Singular Value Decomposition can be used to build homogeneous projection matrices for a subset of feature points, and these matrices can be used to map portions of the winged-edge model to feature point locations. Figure 4 The depth map shown can be used to apply the sensed depth position to the transformed wing edge model. Figure 6 A wing edge model is shown which has been smoothed using selective subdivision. Such subdivision techniques are known. The distance of these surfaces to the camera can then be determined, i.e., because the depth of the facial region is measured with reference to the camera aperture.

[0075] Additional details of the above process are now described. More specifically, the following description (including the pseudo code referenced below) provides exemplary steps for creating a polygonal structure of a face from facial feature points.

[0076] Facial landmarks are read from the output of the facial landmark detection software mentioned earlier. Figure 1 The numbered input vertices are shown. The number associated with each vertex is called an index. The face region polygons are defined by the indices. For example, Figure 1 Indices 1-65 are used in . Zero-based counting is used, so the index range in the code in this example is 0-64 (inclusive). Additional vertices are used to construct the polygon. These additional vertices are synthesized using weighted interpolation and extrapolation:

[0077] Synthesize Linear Point (synthLinearPoint) interpolates a new vertex using a weight and two input vertices.

[0078] Synthesize TriPoint uses the perpendicular normals of two points, the centroid of the two points, and a weight to extrapolate a new vertex.

[0079] synthQuadPoint uses the perpendicular normals of two points, the position of a third point, and a weight to extrapolate a new vertex.

[0080] Use the pseudo code synthUVs() to synthesize each new vertex 65-92.

[0081] Create the wing edge model by traversing gFaceRegionsRegions in order. Figure 5 An exemplary wing edge model is shown. Methods for creating this model are known and described, for example, in "Wing Edge Polyhedron Representation" by Bruce G. Baumgart of Stanford University's Artificial Intelligence Project (1972), which is incorporated herein by reference.

[0082] Next, the wing edge model is subdivided. An exemplary subdivision technique is known and described, for example, in "Subdivision Surfaces in Character Animation" by Tony DeRose, Michael Kass, and Tien Truong (SIGGRAPH '98), which is incorporated herein by reference.

[0083] The camera's 4×4 projection matrix is ​​calculated using known values ​​based on the type and model of device being used. For each vertex in the subdivided surface: the corresponding point in the depth map is sampled; scale correction is applied to the depth representation; the vertex's Z depth value is set; and the vertex is unprojected using the inverse of the 4×4 projection matrix. For each polygon in the subdivided surface, a color is sampled from the visible light image. An example output of this process is shown below. Figure 7 shown.

[0084] The following is a representation of code that can be used to perform the preceding process.

[0085] The definition of the face region polygon is provided below, where the first number is the vertex polygon count, followed by the facial landmark vertex index. Vertex numbers above 65 are synthesized by weighted interpolation.

[0086]

[0087]

[0088]

[0089]

[0090]

[0091]

[0092] Next we calculate the fourth vertex based on three vertices and a weight:

[0093]

[0094] Next, we calculate the third vertex based on two vertices and a weight:

[0095]

[0096]

[0097] Here we interpolate a vertex from two vertices and a weight:

[0098]

[0099] The following are all the additional vertices from the original feature point vertex:

[0100]

[0101]

[0102]

[0103] Aggregate data collected in the above manner is referred to herein as filtered data. Using the filtered data, it is possible to solve the illumination model.

[0104] A method for solving the illumination model is now described. The exposure of the sensor / camera can be characterized by reading embedded data in the image stream, or by setting the exposure settings of one or more front-facing cameras on the handheld device as described above. As described above, the physical relationship of the sensor, light source, and surface to be measured can be determined. As described above, the light source can be controlled by coupling an optical display to act as controlled illumination. Using this information, the illumination model of the scene seen on the camera can be approximated. The general problem of solving the illumination model to find the reflectivity, color, and surface features of geometry from a known scene with additional illumination and geometry data is called inverse rendering. The more one knows about a particular scene, the more accurate the derived illumination model and the measured surface features of the found geometry will be. Inverse rendering is a known technique and is described in more detail in Patow and Pueyo, "A Review of the Inverse Rendering Problem" (Computer Graphics Forum, P 663-687, V 22, N 4, https: / / doi.org / 10.1111 / j.1467-8659.2003.00716.x (2003)), which is incorporated herein by reference.

[0105] In one embodiment, the dominant illumination source is known, and the orientation and key planes of the face can be found by sampling colors from the color image captured by the selfie scan. The result of this sampling is Figure 7 As shown. The inverse rendering technique can be used to solve Figure 7 In one embodiment, an optimized inverse rendering technique for addressing these characteristics is described in Boivin and Gagalowicz, "Inverse Rendering of a Single Image", Motion Graphics Project, University of Toronto, Canada, Mirages Project, INRIA-Rocquencourt, France, www.dgp.toronto.edu / ~boivin / pubs / cgiv2002.pdf (2002), which is incorporated herein by reference.

[0106] A given technique is chosen to solve for reflectance and color features based on how well it matches the specific set of knowns and unknowns present in the problem being solved. There are two main categories of inverse rendering; a "direct solution" that can be used when ambient light is low or there are few unknowns, and an "indirect solution" that can be used when there are more unknowns (such as a lot of ambient light).

[0107] The inverse rendering technique infers an initial value for the surface reflectance using the existing imagery, found geometry, and the dominant lighting. The algorithm then minimizes the error between the synthetic rendering and the captured image by iterating the most likely changes to the surface reflectance parameters to reduce the error. As used herein, synthetic rendering refers to the use of computer graphics techniques to draw something that does not exist. In this case, there is a 3D model, the properties of the light and camera are known, and we can synthesize what we think we should see and compare it to what is actually there. Then, variables such as the color of the skin surface, the sheen of the skin, etc. can be changed until the rendering and the actual facial surface match. The lighting model can be solved iteratively (e.g., using Newton's method). If there are more unknowns (such as additional light), then these unknowns also need to be approximated, which makes the problem more difficult and complex to solve. If the optical display of the handheld device is the primary light source, or the additional light sources can be corrected / accounted for by the methods described herein, then the technique produces sufficiently accurate results to determine the color and surface features of discrete areas of the face. For environments with more ambient or direct light, additional processing may be required to reduce the error.

[0108] Although in one exemplary embodiment an inverse rendering technique is used to determine surface reflectivity, other techniques known in the art may also be used.

[0109] For example, in another embodiment, a relative light transmission model can be used to solve for the color and reflectivity characteristics of skin-colored surfaces. The transmission model consists of an undirected graph of connections between scanning surfaces, light zones of optical displays, and cameras or imaging devices. Each node of the graph is a surface region, light region, or camera viewpoint. Arcs in the graph connect each node and contain portions of the radiant transmission between each node. For simplicity, the connecting arcs are limited to surface nodes connected to adjacent surface nodes, optical displays, and cameras. The relative changes in color and brightness of each surface are determined by their differences from the local averages of adjacent surface nodes. Each surface node in the transmission graph is labeled with the location of the surface. Local areas of the transmission graph are graded according to the amount of error they contain compared to the radiant calculation of the physical light transmission of a known graph. Areas with low errors are compared to similarly labeled predetermined relative transmission graphs from example skin colors. A support vector machine is used to solve for the contribution of the known skin color.

[0110] In another alternative embodiment, a plenoptic illumination model can be used to solve for the surface reflectance of the surface of the captured image. The plenoptic illumination model assumes that most areas of the face are illuminated by the same illumination model, so the model can be generalized and complexity reduced. In this method, the scanned colors of each surface of the face recorded are mapped onto a sphere. The mapping is performed by using the direction of the surface imperfections or planes to find matching directions on the sphere. In one embodiment, the colors of each sphere region are aggregated using an average. In another embodiment, they are collected and sorted to calculate the component median. The position of the sphere is determined by the weighted average of each contributing surface based on convexity. The diameter of the sphere is determined by the weighted amplitude of each contributing surface. By comparing the known position of the optical display, the known position of the camera, and the angle and position of each region of the sphere, the region of the sphere with the highest specular reflection light is determined, and the region found is the region where the incident light angle matches the incident light viewing angle relative to the surface of the region. The region of the sphere with the highest diffuse reflection light is found, and the surface of the region is the region that most completely faces the light of the optical display. Initial values ​​for diffuse reflectance, specular reflectance, and ambient reflectance can be solved using an illumination model (e.g., the well-known and described Phong illumination model, BuiTuongPhong, “ Computer generated image bright ”, Communications of ACM 18 (1975), no. 6, 311–317, incorporated herein by reference). Model reflectance values ​​are calculated for each region of the sphere. Each region of the sphere is graded according to its distance from the modeled color. Regions of the sphere that exceed an error threshold may be marked for use in modeling ambient lighting. Regions of the sphere that are within the tolerance range may be used to improve the color and surface features / reflectance of the user's skin color prediction.

[0111] Additional details of the global lighting model are now described. In such an embodiment, data related to the lighting and surface of an object captured using a device / camera can be found by iteratively approximating the lighting and surface data using a rendering technique that employs a series of functions implemented as code running on a digital computer. The code and its flow are referred to herein as the global lighting model (GlobalLightingModel). The input (InputData) of the global lighting model includes the following:

[0112] - A digital image of the user captured using a camera / device in the form of a two-dimensional array of pixels (referred to herein as an ImageMap), encoded as red, green and blue values ​​in a color space called sRGB.

[0113] - A captured depth image (referred to herein as DepthMap) in the form of a two-dimensional array of depth values ​​associated with the captured digital image. These values ​​are a linear representation of the distance from the camera to the corresponding pixel in the ImageMap.

[0114] - Wing edge polygonal model described in this paper.

[0115] -Exposure settings related to the capture of the user's digital image (ie, ISO, shutter speed and aperture).

[0116] - The position of the camera aperture relative to the center of the illuminated portion of the display (referred to herein as PositionData).

[0117] -The size of the illuminated portion of the display (referred to herein as Illumination Data).

[0118] - The calibrated light signature of the display lighting portion of the device model used to capture the image.

[0119] - The CCD response curve of the camera / device used to capture the digital image, which may be adjusted to provide SI units depending on the model of the device (herein referred to as the ImageLightCurve). This curve is represented as an array of discrete values ​​0...0x0001000 to provide a direct lookup to a 16-bit pixel value.

[0120] -ImageToCamera conversion, that is, the depth map x, y, depth pixels are converted to a 4x4 transformation matrix of x, y, z vectors, and the camera aperture point is 0, 0, 0.

[0121] -LightToCamera conversion, which converts the display light source pixel UV into a 4x4 transformation matrix of x, y, z vectors, with the camera aperture point being 0, 0, 0.

[0122] - LightSI, the constant SI lighting value for this device model.

[0123] Intermediate data is constructed for iteratively approximating lighting and surface data in an ImageMap associated with a captured digital image.

[0124] The intermediate data representing the three-dimensional surface features of the input data is called a surface image (SurfaceMap). The surface image is constructed using a series of steps, including the following steps in one embodiment. The digital image and the depth image are resampled and combined to form a two-dimensional array of structures containing red, green, blue, depth and mask (Mask), which is referred to as a surface image. A median filter (MedianFilter) is applied to the depth image to remove noise. The surface image determines the size of the surface image, and its width and height are usually twice that of the depth image. The surface image is allocated. The depth image is scaled using bicubic interpolation to fit the surface image. The depth component of the surface image is set to the depth image value. The digital image is converted from sRGB to linear RGB, and the linear RGB is converted to SI units by using the lookup of the image light curve. A Gaussian filter is applied to the surface image using the inverse of the scaling factor * 1.5 as the θ of the Gaussian function. The digital image is scaled using point sampling to fit the surface image. The red, green and blue components of the surface image are set to the digital image value. All mask components of the surface image are set to zero. The polygons representing the surface to be approximated in the model are marked. Since the model is built from facial feature detections, these polygons are the same for all instances of the input data. The marker polygons from the model are rendered into the mask component of the surface image so that the mask area is set to 1.

[0125] The intermediate data that represents the three-dimensional surface features of the surface image as a full illumination model is referred to herein as a sphere image (SphereMap). In one embodiment, a series of steps including the following are used to construct the sphere image. The surface image is resampled and combined to form a two-dimensional array of sphere image value (SphereMapValue) structures containing red, green, blue, depth and cumulative values. This is referred to herein as a sphere image (SphereMap). The size of the sphere image is determined. This is typically a square of the second power of the width and height. It is chosen to be small enough to provide sufficient angular resolution for the model, and not so large that there are few samples of the input surface image. In an exemplary embodiment, the size is 256×256. A sphere image is allocated.

[0126] For each pixel in the spherical image:

[0127] if (surfaceimage[thispixel]].mask=1)

[0128] Use neighboring pixels to build a triangle with 3D vertices

[0129] Vertex 0 is this pixel

[0130] Vertex 1 is the pixel in the right column

[0131] Vertex 2 is the pixel in the right column and bottom row

[0132] Convert triangle vertices to camera space

[0133] Vertex0 = ImageToCamera * Vertex0…

[0134] Find the normal of a triangle

[0135] Normals are scaled to 128.0

[0136] Normal offset 128, 128

[0137] Set U, V index, U = nx, V = ny

[0138] For U and V pixels in a spherical image:

[0139] Spherical image [V] [U]. Red + = Surface image [this pixel]]. Red

[0140] Spherical image [V] [U]. Green + = Surface image [this pixel]]. Green

[0141] Spherical image [V] [U]. Blue + = Surface image [this pixel]]. Blue

[0142] Spherical Image [V] [U]. Depth + = Surface Image [this pixel]]. Depth

[0143] Spherical image [V] [U]. Cumulative + = 1

[0144] For each pixel in the spherical image:

[0145] if (sphericalimage[thispixel].cumulative>0)

[0146] Spherical image [V] [U]. Red / = Spherical image [V] [U]. Cumulative

[0147] Spherical image [V] [U]. Green / = Spherical image [V] [U]. Cumulative

[0148] Spherical image [V] [U]. Blue / = Spherical image [V] [U]. Cumulative

[0149] Spherical image [V] [U]. Depth / = Spherical image [V] [U]. Accumulated

[0150] Spherical image [V] [U]. Accumulated / = Spherical image [V] [U]. Accumulated

[0151] The intermediate data representing the position of the screen area in the camera space is called a Light Map. In one embodiment, the following steps are used to construct the Light Map. The Light Map is a two-dimensional array of 3D vertices. The height and width of the Light Map have the same aspect ratio as the display light source of the device model used to capture the digital image. The height and width of the Light Map are as follows:

[0152] Illumination image width = ((display width (mm)) + 2.5) / 5;

[0153] Illumination image height = ((display height (mm)) + 2.5) / 5;

[0154] An illumination image is assigned. The illumination image pixels are set as follows:

[0155] Illumination image [V][U].xyz = (V, U)*LightToCamera.

[0156] The output data from the full illumination model includes:

[0157] SynthSphereMap - a 2D array of structures containing red, green and blue values ​​in SI units,

[0158] CIELAB surface color - set to the average of the pixels in the spherical image that are 16 pixels away from the spherical image UV {128,128}

[0159] Specular Gamma = 1.8

[0160] SpecularScale = 0.23

[0161] ErrorTerm = Infinity

[0162] MaxIteration = 1000

[0163] Minimum error (MinError) = 0.02

[0164] In one exemplary embodiment, the functionality used by the rendering techniques described herein includes the following:

[0165]

[0166]

[0167] The iterative loop used to generate output data is referred to herein as solving the lighting model. It is constrained by the ErrorTerm and MaxIteration states as follows:

[0168]

[0169]

[0170] In this example, the specular amount is not affected, but can be addressed by adding an extra iteration loop. For example, step 1 can be replaced by saving the scincar gamma; steps 2.a…2.d can be executed; and step 2.e is replaced by specular amount = AdjustSpecular(scincaramount, AccumRGBError).

[0171] In another embodiment, ambient light is filtered out from the spherical image by determining the average error between the spherical image and a synthetic spherical image (SynthSphereMap), and rejecting pixels having an error greater than 2 times the average error.

[0172] In another embodiment, the area of ​​the graph can be compared in the lateral hemisphere (ie, u=128-30,

[0173] u=128+30) to filter out ambient light from the spherical image, and bright pixels found during this comparison may be rejected.

[0174] The solution output of the inverse rendering or other techniques is the surface color and reflectance of multiple facial regions. The color and reflectance can be constructed as CIELAB colors and a certain amount of specular reflectance. The CIELAB color and specular reflectance can be constructed as search keys, and the search keys can be used to find and solve for mixtures or ratios of discrete topical preparations that can be combined to generate customized cosmetics, as disclosed in the background patents.

[0175] Solving the physical lighting model directly has limitations. For example, the technique of Bovin and Gagalowicz works well when the number of variables to be solved is relatively small. The number of unknowns introduced into the lighting model by additional light sources of unknown color presents insurmountable challenges in terms of solution time and solution resolution. However, a hybrid system can be assembled to improve the performance of the Bovin and Gagalowicz technique by training a machine learning (ML) system to determine which solution paths are most likely and using these paths to guide the inverse rendering technique. In one embodiment, the solution path of the inverse rendering algorithm can be enhanced by training a hidden Markov model to select specific state transitions.

[0176] Referring now more specifically to the use of the ML system, the filtered data can be used to train an ML model for the output of color and surface reflectance for multiple facial regions. In one exemplary embodiment, the ML system is divided into components that solve for an intermediate representation of the user's skin color. One component can be trained to solve for CIELAB color of known regions of the face. Another component can be trained to solve for surface reflectance caused by sebum content in the upper layers of the epidermis. The outputs of these components can be used to generate search keys to derive mixtures and produce custom topical formulations.

[0177] Describing the present embodiment in more detail, the training data may include filtered data captured using multiple handheld device types, where a range of users have multiple skin color characteristics. Each cell of the filtered data used to train the system may be labeled to associate it with a specific handheld device, a specific user, and a quantitative measure of each user's skin color. These measures may include, but are not limited to: (1) color spectra of multiple facial regions; (2) CIELAB colors of multiple facial regions; and (3) reflectance characteristics of multiple facial regions.

[0178] In one embodiment, a data collection process is used to collect and organize data to train an ML system. This process includes a series of steps: 1. Reference subject projection entry. 2. Reference subject cohort identification. 3. Reference subject training data collection session. 4. Training data analysis. 5. Training data structuring. 6. ML training. 7. ML validation.

[0179] Reference Subjects Projection is entered into a project designed to engage and engage a variety of subjects with a variety of skin tones, types, and features. These types include, but are not limited to, various skin tones (dark to light), various skin shades (warm to cool), various sebum levels, various responses to sunlight, and / or various skin artifacts and localized coloration. Subjects are interviewed and spectrophotometer scans are taken of various skin tones areas, including, but not limited to, wrist, forehead, cheek, upper jaw, jowls, lower neck, and upper chest areas. Hair and eye color are noted, as well as measurements or estimates of pore size and skin color sebum content. Photomicrographs of photos of skin areas are taken. This initial data is structured and placed in a data storage area.

[0180] Reference subject cohort identification aims to identify key individuals from the reference subject projections that are representative of a reference subject cohort or group. Cohort identification can be performed by K-value clustering based on an n-dimensional vector consisting of CIELAB color and sebum content. Other components of the vector can include pore size and frequency of skin artifacts such as freckles or spots. The cohort list can be further filtered by removing outliers based on statistical means.

[0181] The reference subject training data collection session is intended to collect data in a form useful for developing a training set for the ML network. Excess data is collected for validation purposes. For training, it collects reference training data in the form of scan data types acquired by a handheld device and associated software means. Several such scans can be performed on a variety of different devices. It collects skin color surface data associated with the handheld device scan data. The skin color surface data will include the CIELAB color of each skin color area output by the ML system, as well as sebum levels, location and type of small skin artifacts (such as freckles, spots and acne), eye color, hair color, location and type of larger skin color artifacts (such as wrinkles, dark or round spots, skin color or tone changes). For example, this data can be collected through discrete scans, microphotographs, high-resolution photos, or high-resolution 3D scans.

[0182] The training data structuring aims to organize and structure the data collected from the reference subject training session into a form that can be used for training the selected ML system. In one embodiment, this is accomplished by initially processing the scan data from the handheld device and the associated software device. As described above, each scan is converted into a wing model. The wing model contains the 3D position of the surface relative to the camera and the optical display light source. The model also contains a set of key 2D coordinates, which are called UV coordinates, which are consistent for each trained wing model (similar in structure, forming a standard). The model also contains a CIELAB color, which is accumulated by one or more images collected by the software on the handheld device. The solved illumination model is associated with the wing model and is used to solve the initial approximation of the surface reflectance of each polyhedron in the wing model. After the input, the required training output is added to each polyhedron of the wing model. The output includes, but is not limited to, CIELAB data of the area scanned by a spectrophotometer, the sebum content of the area, the location and type of smaller skin artifacts, and the location and type of larger skin artifacts in the area. It also includes a series of images. These images are associated with the UV coordinates of the wing model. Each image contains various labeled image regions describing large and small skin artifacts, including but not limited to freckles, dark spots, acne, skin discoloration, wrinkles, and dark circles.

[0183] The ML training is designed to help develop a set of ML graphs and key coefficients, weights or constants in these graphs to transform the input data scanned by the handheld device (i.e., after it is converted into a wing edge model containing all the above input data) into output data consisting of a wing edge model containing information about each polyhedron region. In one embodiment, the ML system is implemented as TensorFlow ( https: / / www.tensorflow.org / ) in . The ML network weights, constants, and coefficients are set during training via a graph network implemented in TensorFlow to output an ordered set of polyhedra from a normalized wing-edge model (each polyhedron has relative 3D data), filtered CIELAB colors from recorded images, estimated reflected CIELAB colors from the solved illumination model, and an error metric for the solved surface reflectance.

[0184] ML validation aims to verify or prove that the training of each ML network generated in the ML training provides outputs within a specific tolerance. In this process, additional data collected during the reference subject training data collection session is used as input to the ML system. The output is verified against the collected output data and the tolerance of the system is found. If the system is within the tolerance, the ML system can be packaged and deployed. If the system is out of tolerance, the ML training is resumed and modifications are made to the structure of the ML graph and the graph is retrained.

[0185] In some embodiments, after the initial training, the ML system may no longer receive training, or the network may receive intermittent training using various techniques known to those skilled in the art. After training, in some embodiments, the ML system may be validated using a separate set of known training data. The ML system may then be used in a service residing on a server (as described below with reference to Figure 8B The invention relates to a method for processing user data into an output of CIELAB data related to a specific facial region by a user-friendly mobile device (described above) or a service resident on the handheld device to process user data into an output of CIELAB data related to a specific facial region.

[0186] In the described embodiment, each component of the ML system can be trained in this manner. In such an embodiment, the CIELAB output and the sebum level output of two separate ML networks can be connected as inputs to an ML system trained to output a specific product formula.

[0187] In another exemplary embodiment, the ML component can be based on CIELAB color, sebum content and cosmetic characteristics and solve for the ratio of ingredients used to customize topical preparations or formula preparations. This component will replace one or more methods in the background patents that use search keys and hybrid solutions.

[0188] The ML system can consist of a further processing stage that provides input, output and training data to a distributed network of nodes connected to the input, output and training data. Each node has a weight or a set of weights and has an associated nonlinear function that can trigger its output signal. The hierarchy of nodes can have many layers. The training input can be constructed to allow the weights to be adjusted based on the input and output states. The nodes can be constructed in a neural network manner, or in a manner called a Markov model. The input can be directly connected to the data input, or the input connection can pass through additional logic before entering the network as an input, so that the width of the network can be much larger than the discrete number of inputs, or some inputs can be limited in the width of the representation. The width and depth of the network can be automatically configured based on the output quality of the training results.

[0189] Once the ML system is trained, the system can be used to process user data collected interactively on a handheld device into manufacturing instructions for a topical formulation that can be customized or otherwise selected for the end user. Thus, for example, a user can take a photo using a mobile phone; the mobile phone can include software that performs certain processing as described herein (e.g., 3D model fitting and data preprocessing), and the mobile phone can then send a 3D model with points (both skin and other parts of the face, such as eyes and lips) and associated colors to a server. The ML system running on the server then determines the lighting model and skin color (e.g., skin color, hair color, lip color) for each facial region in a single graph.

[0190] Fig. 8A and 8B Method 800 and high-level system architecture 870 are shown, respectively, illustrating the steps and components associated with user activities and data flow in an exemplary embodiment. In step 801 , a user runs a software application on his handheld device 850 .

[0191] In step 802, the application displays a line drawing of the user depicting the user's position in real time on the optical display 851 of the handheld device 850 (e.g., Figure 2 Here, the optical display 851 acts both as a continuous light source (e.g., in a dark environment) and helps the user to correctly position their face in the optical display 851.

[0192] In step 803, the application determines whether the lighting of the environment and the positioning of the user's face are acceptable for capturing a good quality image. In particular, the device can be programmed to detect acceptable levels of ambient or additional light and let the user know to move to a darker location. The exposure data stored in the image data stream can be compared to the expected exposure for the optical display lighting and the calculated approximation of the amount of additional lighting. The user interface / device can respond to the user whether a given environment is suitable for scanning, and the application can instruct the user to move to a location with less light (e.g., such as Figure 3 ) or changing the color of an indicator on the optical display 851, or some other indicator (visual, audible, or tactile) or room lighting that is acceptable for scanning.

[0193] As a further example, an application could instruct the user to move the handheld device to center their image on the screen and indicate this has been done by changing the display rendering (e.g. Figure 2 and Figure 3 As shown, Figure 2 showing the facial outline and facial features of a user with illuminated lines displayed, Figure 3 A circle is displayed to indicate that the face is not positioned optimally for the photo).

[0194] In step 804, an image is captured when a button is pressed on the handheld device 850. The image may include multiple images (e.g., multiple images are captured with one button press) and related data, such as depth data, facial landmark data, and color image data. As described above, in step 805, the data may be filtered and used to derive an illumination model (in Figure 8C ), and sent to computer server 852 at step 806. In step 807, computer server 852 may use an illumination model and processing techniques (e.g., inverse rendering) to solve for reflectivity and color characteristics of one or more planes of the face.

[0195] Reference now Figure 8CAn exemplary method of obtaining filtered data is described (step 805). It should be noted that the order of steps shown in the exemplary method is not limiting; according to embodiments of the present invention, the steps may occur in an order different from that shown and described. In step 810, exposure data of an optical sensor in a handheld device 850 is determined (e.g., data from an embedded camera image data stream or set). In step 811, the relationship between the light source in the handheld device 850 and the aperture of the sensor / camera is measured. For various different types of handheld devices 850, these data may be determined and stored in the server 852, or may be provided to the server 852 for use in processing. In step 812, the relationship between the ambient light source and the sensor / camera is determined. Techniques for obtaining appropriate lighting and positioning / alignment of the user as described in steps 802 and 803 above may be used to determine data reflecting the relationship. In step 813, the relationship between the sensor / camera and the light source (determined in step 811) and the target surface is determined, where a 3D model of the target surface can be constructed according to the techniques described previously. Using the data from steps 810 , 811 , 812 , and 813 , an illumination model of the scene observed by the camera may be determined (eg, approximated or derived) in step 814 .

[0196] In some embodiments, as previously described, the ML system may be used to enhance the processing techniques employed by the server 852 (step 807). Intermediate results of the ML system may provide skin color data that may be sent to the handheld device 850 for viewing by the user.

[0197] In reference Fig. 8A , 8B Following the steps described in 8C, the method can be performed in the manner described in one or more of the background patents for ordering and manufacturing topical preparations (e.g., customized or selected cosmetic products) for users.

[0198] An exemplary embodiment relating to alternative aspects of the present invention is now described. As in the previous embodiments, the goal is to determine the skin tone ID of the end user using images captured by the end user's handheld device (e.g., a mobile phone). The challenge is how to interpret the lighting environment in which the end user is located. Similar to the other embodiments described, in this embodiment, the display screen of the device (handheld device or mobile phone) can be used as a calibrated light source in a darkroom environment (e.g., a low-lighting environment), and a selfie scan is performed using the front camera as a capture device. A depth sensor incorporated into the device software is used to determine the depth of the body part to be measured to capture an image, for example, the depth of the face or facial area (facial depth sensor) can be used to provide a measurement of the distance from the device screen to the image target surface (e.g., face). Using a known calibrated light source (display screen) and selfie scan data including facial surface distance data, facial skin color color (i.e., skin tone ID) can be calculated.

[0199] A working example is now described. An end user is located in a dark room environment with little or no ambient lighting, preferably a dark environment available to the end user, such as a room without windows, or with curtains and / or drapes drawn, and light sources such as lamps or computer device displays turned off. The end user opens an application previously downloaded to a handheld device (e.g., a mobile phone), and the application operates in a selfie mode (i.e., a "selfie scan" mode) to open the camera on the phone. In a preferred embodiment, the application detects whether the room is dark enough to continue the process, and determines a skin tone ID for the user that is close enough to the actual skin tone ID within a predetermined tolerance. If the room is not dark enough, a signal is sent to the end user (using the methods previously described herein, or other methods known in the art), and the end user is instructed to move to or create a darker environment. If the room is dark enough, the display of the handheld device is illuminated with white light, either automatically, or optionally by first providing the user with an indication of a sufficiently dark lighting environment (also described previously herein).

[0200] In an exemplary embodiment, the white light is a rectangular shape that fills all or nearly all of the handheld device display. In some embodiments, the white light is automatically displayed when the application detects a dark enough room. A selfie image of the end user is then captured with the camera on the handheld device. This image is referred to herein as an illuminance image. The only light source of the handheld device used to capture the illuminance image is the white light display. An illuminance image captured in a darkroom environment (if dark enough) may be sufficient to estimate the skin tone ID of the end user.

[0201] However, in reality there will be some ambient light (e.g., from a computer monitor, the bottom of a door or the gaps on both sides of a curtain, etc.). In order to obtain the most accurate estimate of the skin tone ID as possible, this ambient light should be taken into account. Therefore, in a preferred embodiment, a second image of the end user is captured using a camera on a handheld device. This second image (referred to as the ambient image) is captured without illumination from the handheld device and therefore includes only light from ambient light sources. As described more fully below, the light present in the ambient image can be removed from the illuminance image, thereby accounting for the ambient light and leaving only known lighting conditions in the image of the end user. Based on these known lighting conditions, as well as other data points described more fully herein, a more accurate estimate of the skin tone ID of the end user can be made.

[0202] In a preferred embodiment, the illumination image and the environment image should be captured in close time to avoid the end user moving during the image capture.

[0203] Further details of the exemplary embodiments are now described. As in the other embodiments described above, the device / phone itself has software that can be used for certain functions - for example, obtaining a 3D image of the end user, which includes the distance from the target (e.g., the end user's facial surface at various points) to the device's camera aperture. In addition, other software can be downloaded to the device / phone in the form of an application. Such downloaded applications can control device display and camera settings, image capture and / or data processing of image data, including but not limited to one or more of the following:

[0204] - Controls settings for the device camera application programming interface (API), which controls low-level settings for the camera, such as exposure settings, frame size, color and depth (3D data) settings, and which camera to use on the device (if two or more cameras are present);

[0205] - Settings that control the Computer Vision API settings, which provide a set of functions for acquiring image data from a camera and returning high-level data (e.g. acquiring data representing a facial image and returning a list of 2D image points corresponding to specific facial features);

[0206] - Initialize the selfie scan display view;

[0207] - Provide ambient light notifications (e.g. notifications when the environment is too bright for selfie scans);

[0208] - Prompting the user to adjust the capture scene for optimal data collection (e.g. instructing the user to adjust the distance between the captured object and the user);

[0209] -Control the image capture process (e.g., timing, display lighting, and exposure settings);

[0210] - perform functions related to image data processing; and

[0211] -Store error information and provide alarms.

[0212] In this exemplary embodiment, in a darkroom environment, when the user opens the application, a line drawing of the user's face can be created and displayed, as described above, so that the user can correctly align her face. However, in this embodiment, a yellow light source as described above is not used, but the image is shown without lighting. As described above, a series of images of the terminal user's face are captured. In a preferred embodiment, the captured images are high dynamic range (HDR) images. HDR technology is well known in the art, and it uses standard methods to combine multiple images taken with different exposure settings into a single image with high dynamic range, showing details more clearly than non-HDR images. HDR images are captured using a set of exposures of predetermined, calibrated values. The exposure settings used to create the HDR images described herein are unique because they are determined by calibrating the device model to represent the range of illumination provided by the device's display (illuminance image) and by the ambient light (environmental image) encountered when in use.

[0213] Typically, HDR images are collected by requesting a series of bracketed images using a programming interface provided by the operating system of the device / phone. Using this interface, multiple images can be quickly taken one after another at different specified exposure rates. For example, a group of images with the same shutter speed and aperture but with different ISO settings can be quickly taken one after another. ISO settings can be selected to cover a wide range of illumination. For example, a first ISO setting can be selected to provide the best exposure using a light source from a device display. A second ISO setting can be selected to provide an optimal exposure twice that of the illumination, i.e., where the ambient light is equal to the light source from the device display. A third ISO setting can be selected to provide an optimal illumination exposure four times that of the first setting. This final exposure can be used to measure the ambient light of 3 times the illumination of the device display. The response curve of the CCD of the device to a single exposure (e.g., the first setting) saturates the illumination exceeding the display light of the device and cannot be accurately measured. The response of the CCD to the image by the exposure test as described above allows a larger illumination amplitude to be measured.

[0214] To further understand this example, the present invention relates to an “illuminance image” and an “environment image”.

[0215] The environment image is an image captured using exposure settings locked to a predetermined calibration value and with the display lighting on the device set to black. As described above, a series of three images may be taken to provide HDR. These may be recorded using the same series of exposure settings as used in the illumination image.

[0216] The illuminance image is an image captured using the exposure settings of auto exposure and with the display lighting on the device set to white, referred to herein as the master scan. This provides a reference image that can accommodate a wide range of lighting conditions. As described above, a series of images can be taken to provide HDR, and these images can be recorded using the same series of exposure settings used in the ambient image. Depth data (i.e., the distance from the device sensor to the target surface) is recorded for the illuminance image scan.

[0217] The exposure settings for the ambient image and the illuminance image can be determined by calibrating a given device model. For example, a given device model will have a known amount of light emitted when the screen is set to display a white area, and when the device is set to full brightness. This amount of light can be measured, and the exposure of the camera can be determined to best illuminate the user's skin tone at a common distance. The device OS allows the system / software application to determine the device model being used, and the calibration settings for that device model can be obtained from a data store predetermined in the manner described above. An image captured with the display illumination on the device set to black, using exposure settings locked to predetermined calibration values ​​as just described, provides a reference image (ambient image) that shows only ambient light. Depth data (i.e., the distance from the device sensor to the target surface) is recorded for the ambient image scan.

[0218] A series of HDR images of the environment and illumination allow the software application to detect light over a larger range. In one embodiment, the following steps may be used to process the environment image and the illumination image.

[0219] The three ambient images are combined into a single HDR image. This can be achieved by correcting each image for the CCD response curve. Then, for each corresponding pixel of each image, the R, G, and B values ​​are scaled by the exposure factor (e.g., 1x for the first, 2x for the second, and 3x for the third). These values ​​are added together and the result is stored with increasing numerical resolution. For example, if each input R, G, and B channel is represented by an unsigned 8-bit value, it can be stored as a 16-bit value.

[0220] Combine the three illumination images into a single HDR image as described in Combining Environment Images.

[0221] The HDR ambient image may be subtracted from the HDR illuminance image, thereby producing a "corrected illuminance image". The resulting corrected illuminance image accounts for ambient light by removing it. In this embodiment, the ambient light that has been removed may be brighter than the light that illuminates the subject's skin tone from a display on the device. This is accomplished by re-encoding each image using HDR imaging.

[0222] The data associated with the corrected illumination image is stored in a facial data format (e.g., structured and represented in a wing edge model as described above). The wing edge model contains a series of vertices, each vertex consisting of a 2D point mapped to a facial feature point in the captured image and a 3D point constructed as described in detail above.

[0223] Each vertex is associated with a color. In one embodiment, the colors of the vertices in the wing edge model can be found by the following steps.

[0224] As previously mentioned, the wing edge model can be subdivided into finer structures. The model can be subdivided in this way so that the average polygon in the model can represent an approximate area of ​​the subject's skin color, for example, a quarter square centimeter. Other subdivision ratios can be used within the scope of the present invention.

[0225] For each polygon in the model, the color of the pixel in the corrected illumination image is sampled. In one embodiment, the sampling is performed by inverse rendering. For example, for each pixel that can be rendered to describe the polygon, the R, G, B data of the pixel is accumulated as an average. This data is collected and stored at a higher resolution than the original pixel data. For example, if the R, G, B data is represented as a 16-bit unsigned integer, the data can be accumulated as a 64-bit double precision floating point number and stored with each polygon in the model.

[0226] The R, G, and B color values ​​for each vertex in the wing edge model can be determined by using the connections in the wing edge data structure to accumulate the colors of each polygon connected to that vertex. The R, G, and B values ​​can then be stored with each vertex in the model.

[0227] In some embodiments, the color resolution represented by the vertices in the model may be all that is needed. For example, for the measurement of skin color, 0.5 cm blemish sampling may be sufficient. In other applications, such as determining the location of specific skin artifacts such as freckles, birthmarks, or wrinkles, a higher resolution may be required, and selected portions of the corrected brightness image may be stored with the wing edge model.

[0228] As previously mentioned, because the wing edge model is assembled using facial landmarks, each vertex and polygon in the segmented model retains a unique position relative to those facial landmarks. Furthermore, since the same level of segmentation can be performed for each subject for whom images were recorded, this will produce the same structural links (i.e., polygons to vertices and edges) as long as facial landmarks are found. It can be known that a given polygon will always fall on, for example, the tip of the nose or in the middle of the left cheek. This allows each vertex associated with a color sample to be labeled by location. For example, all of the vertices that make up a particular area of ​​the forehead can be labeled so that they can be located. In this way, it is possible to traverse the wing edge model and obtain color measurements for known skin color locations.

[0229] Thus, each vertex in the wing edge model can contain: a label indicating the facial part it represents; the RGB color accumulated from the rectified luminance image; the Z depth obtained from the depth map of the device's 3D camera; the X, Y, Z position of the vertex relative to the handheld device's camera viewpoint; and the A, B, C normals of the vertex relative to the handheld device's camera viewpoint.

[0230] In addition to the data represented in the wing edge model, the systems and methods described herein can use pre-computed data, such as calibration data. This is data that does not change from scan to scan and represents the physical characteristics of the scanning device; other constants, such as the range of human skin reflectivity; and system operating constants. In some embodiments, these may include: shutter timing for a particular model of handheld device, which can be used to specify an exposure series for HDR imaging as described above; an acceptable signal-to-noise ratio, such as the ratio of light emitted from the device's illumination display for illumination to light detected in the HDR ambient image; an absolute amount of light expressed in units of measure that is used as a threshold to trigger a state transition to ambient image capture; and a CCD color response curve for a particular model of handheld device.

[0231] Encode the data including the wing edge model for transmission. For example, the GL Transmission Format (GLTF) can be used to allow applications to efficiently transmit and load 3D images and models by minimizing the size of the assets and the runtime processing required to unpack and use these assets.

[0232] The facial model data GLTF file can then be transferred from the device / phone to a remote server or computer service using an encrypted transfer protocol (e.g. HTTPS) and stored in a repository. For example, AWS S3, Amazon Web Services Simple Storage Services repository is used for this purpose. There are many advantages to using such a storage service. It allows the transmission (e.g., facial model data) to and from the service to be encrypted. The service provides storage for facial model data sent from handheld devices and supports various operating systems used by handheld devices. The service allows access to facial model data for further processing, as well as other transactions leading to customized cosmetics and customer support. The service also allows access to private intranets in a secure manner.

[0233] Once transmitted to a computer service (e.g., a remote cloud server), the facial model data is processed. Data processing can be implemented using a service (e.g., AWS Lambda service), which allows applications to respond quickly to new information.

[0234] The processing flow of the facial model data is now described. In some embodiments, a pre-processing step may be used, which may involve color correction to account for the device itself (i.e., the screen and the front-facing camera). The model of the device is identified from the image data, and corrections are made for the light and exposure (i.e., white point and color cast) associated with a specific device type (e.g., a phone model).

[0235] In other embodiments, color correction that takes device models into account is incorporated while training the skin tone color model (e.g., the training data includes images taken with different devices / models, and the machine learning engine accounts for the differences during training), and in this case, no separate pre-processing step is required.

[0236] Next, per-vertex color correction is performed to account for depth data, such as the distance of the device display light to the image target surface (e.g., a face). Distance falloff is calculated using the lighting equation based on the 3D model of the image. The lighting contribution based on angle falloff is also removed. More specifically, as the surface becomes more oblique to the light, the lighting on the surface becomes dimmer. To do this, we use the 3D model and a lighting equation to calculate cosine falloff.

[0237] The following describes in more detail the pre-processing / filtering of vertex data before it may be used as input to a machine learning system in some embodiments:

[0238] 1. Color can be corrected according to the response curve of the specific model of handheld device used to record the images of human subjects. This will correct the CCD response.

[0239] 2. Cosine or angular falloff based on the direction of the vertex surface normal relative to the device display and the device camera. Vertices that are at oblique angles to the camera can be filtered out or removed.

[0240] 3. The amplitude of the light generated decreases according to the distance between the vertex and the device's display and the device's camera.

[0241] 4. Correct vertex colors based on lighting to remove ambient lighting.

[0242] According to alternative embodiments of the method, the implementation in each of the aforementioned processing steps may be different. For example, the amplitude drop can be modeled as a drop in distance from a point source, or as a drop in distance from a surface of the geometric shape of the display area representing the device. However, the basic order of filtering is unchanged because it is derived from the inverse of information transmission as light. In particular, the light leaves the display, is reflected by the skin color area represented by the vertex, and is received by the camera. Filtering is then performed by correction of the camera, correction of the orientation of the surface (including filtering of the oblique angle), and correction of the distance returned to the light. It can be understood that for simplicity or speed of operation, each filter function can be combined and decomposed because any series of mathematical equations can be simplified for solving. In all embodiments, this filtering of data for the image capture process is performed before the data is used as input to the machine learning engine.

[0243] In one embodiment, distance squared decay is used according to the following equation:

[0244] FallCorrectedLum=Lum*(Magnitude(vertex.XYZ)2)

[0245] The inverse rendering equation of cosine falloff can be applied. In one embodiment, a point light with infinite falloff is used according to the following equation:

[0246] CosCorrectedLum=FallCorrectedLum*(1.0 / Dot(vertex.ABC,light.Normal))

[0247] Next, the data is processed using a machine learning engine, referred to herein as a skin color model. The machine learning model must first be built and trained using data associated with human subjects. The data used to train the model can be obtained from a variety of sources, including: survey data, self-reported by human subjects; reference photographs of human subjects, along with color charts; spectrophotometer measurements of skin color in several areas of the subject's face (e.g., forehead, cheeks (left and right), chin (left and right), and facial contours) of human subjects, used as ground truth measurements; and facial image data obtained using the selfie scanning technology described herein.

[0248] A cohort of human subjects is selected in a manner that best meets the needs of a particular application. In one embodiment, the design of skin color data collection for training a machine learning system uses the following steps. A large cohort of human subjects is identified. This cohort can be discovered using proxy lists, advertisements, or other methods. The skin color characteristics of this large cohort are measured. This can be done using a reflectance spectrophotometer. Readings can be taken for specific facial regions, such as the wrist, forehead, left and right cheeks, left and right jawline, and shoulders. The following data can be stored and can include, for example, for each subject: the name of the human subject; spectrophotometer data, which can be converted and stored as CIELAB data; data for wrists, forehead, left and right cheeks, left and right jawline, and shoulders can be stored; and the regional data can be combined into a single CIELAB color using a component median operation and stored as the subject's skin color. The large cohort data can be processed into a test cohort. Doing so can improve color sampling, simplicity of testing, and operational efficiency. In one embodiment, the large cohort is processed using k-value clustering. Clustering can be performed so that the center of each cluster is 3.0ΔE2000 from the center of the other clusters.

[0249] The quality and quantity of the training dataset greatly affects the performance of the final model.

[0250] Use this data to build a model and train it, for example, a tensorflow model as described in the previous paragraph.

[0251] The training of the model is now described in more detail. In one embodiment, an LCD display panel with known illumination is used to calibrate the ambient light to generate some training data for the machine learning model. This data can be collected in the following manner. Each human subject records a series of selfie scans using a predetermined set of instructions. The scans are recorded with different amounts of known ambient light - three scans in the exemplary embodiment. The amount of ambient light can be known by using the following technique. In these sessions, an LCD display panel with known illumination is placed two meters away from the human subject. Computer software causes the LCD display panel to display a series of PNG images that attenuate the light emitted by the LCD display. Each PNG image covers the entire display when displayed. A PNG image is a flat, monochrome image. That is, every pixel in the image has the same value. A PNG image is an 8-bit RGB encoded image. When R, G, B = {0, 0, 0}, the 8-bit image appears black. When R, G, B = {80, 80, 80}, the 8-bit image appears dark gray. When R, G, B = {116, 116, 116}, the 8-bit image appears medium gray. The illumination emitted by the LCD display for each PNG image was recorded at a distance of two meters. The subject was scanned three times, each scan illuminated with a different PNG image, resulting in a known ambient light.

[0252] Typically, the training process uses a dataset (both selfie scan data (GLTF) and ground truth measurements) to refine the weights of the skin color model. For each facial region (i.e., forehead, left cheek, left jaw, facial contour, right jaw, and right cheek, each represented by a set of vertices), the weights for blemishes within the facial region are trained using the spectrophotometer CIELAB ground truth data using the corrected vertex colors of that set (as described above) as input. Curve fit weights are trained for each skin region.

[0253] Continuing to describe the process of building and training a machine learning model, the input of the model is determined. In this embodiment, specific label vertices of the wing edge model are used as input. The RGB value of each vertex is transformed into the CIE l*a*b color space. The input channel is constructed by all vertices with a specific label. The output of the model is determined according to application requirements and training data. For example, the output channel can be specified as a single CIE l*a*b color that will represent the skin color of the facial area. The training input channel is specified as a single CIE l*a*b color collected using a spectrophotometer scan of the facial area. The model design can take the form of a neural network model. Reducing relatively large vector inputs to smaller vector outputs is very suitable for a specific form of neural network. The platform exists to reliably run this type of model and extend them to serve large production systems. The depth and connectivity of the model are determined according to the complexity of the input. The model is trained using a variety of scanned inputs. Random training data is retained for testing. The model was evaluated using test data. Changes in filters, depth, and connectivity are tested and optimized. The second stage of machine learning can be applied to the output of the first stage, as described below. The end application may require a single color that can be used to formulate a cosmetic that provides a uniform color for the user's skin tone. In one embodiment, this color can be calculated by taking the component median of the regional color output from the first stage of machine learning.

[0254] In other embodiments, it may be desirable to train the second stage of machine learning to provide a single cosmetic color suggestion. The training data for this may be the component median of the training input for the first stage, or it may be a uniform color specified by a cosmetic artist. In one embodiment, the second stage machine learning network is constructed and trained in the following manner. The input to the model is determined. In this embodiment, the CIE l*a*b color output for each facial region provided by the first stage of machine learning is used. The input consists of the CIE l*a*b color and the facial region label or input position. A large vector input is composed of these. The output of the model is determined based on the application requirements and the training data. A single CIE l*a*b color of a uniform color for a specified facial cosmetic is output. The training data is a set of filtered cosmetic artists' recommendations. Smoothing can be applied to a series of similar training inputs. Component median filtering can be applied to a series of similar training inputs. Based on additional artist inputs, the cosmetic artist training input can be combined with a spectrophotometer scan. A neural network model can be used because simulating artistic selections is a known use of neural networks. The platform exists to reliably run models of this type and scale them to serve large production systems. The depth and connectivity of the model can be based on a network model previously designed for aesthetic selection. The model is trained using a variety of scanned inputs. For example, selecting a distributed cluster of human subjects from a large cohort representing a geographic region provides a wide range of skin tone types. Collecting input data from multiple sessions of aesthetic color selection by a cosmetic artist at different times, and preferably with similar but distinct groupings of human subjects, will provide a larger dataset and will result in a more accurate capture of the cosmetic artist's intent than a smaller collection. Selecting a handheld device model and then collecting data using many of these devices, rather than just a single device, provides better sampling of the lighting and exposure characteristics of the model.

[0255] In one embodiment, determining a single cosmetic color from a set of facial position color matches can be embodied in the following steps. As described above, a series of tests are performed on a sample set of human subjects with various skin color types. Each subject is scanned. The component median of the CIELAB color of each facial area is calculated as a CIELAB input. The formula of the cosmetic is found using the CIELAB input and the methods disclosed in other patents owned by the applicant (e.g., background patents). The formula is produced by a cosmetic artist and applied to the subject. The cosmetic artist approves the match or suggests a color correction. If approved, the measured color and the approved color are recorded and stored. If not approved, the color correction is applied to the CIELAB color and the test is repeated. A curve is fitted to the difference between the measured color and the approved color based on the CIELAB L* component. If a function is found to meet the cosmetic artist's intention, the function can be used to adjust the component median of the CIELAB color of each facial area. In some cases, the function can provide a bias to a slightly lighter L* value, a reduction in A* value, and a slight increase in B* value in certain parts of the curve in the L* mapping. If there is no obvious fit for aesthetic choices using curve fitting, a machine learning system can be built based on the CIELAB colors of each facial region as input, and the colors approved by makeup artists as training data.

[0256] An alternative embodiment of the component median method for approximating the CIELAB color of an individual's skin color is a composite method. When using the above-mentioned method based on the component median, typically, a single CIELAB color is output for each of multiple facial regions (e.g., the preferred regions of the forehead, left cheek, left jaw, jaw, right jaw, and right cheek). Then, a single l*, a*, and b* channel value is output using the median of each of the CIE l*, a*, and b* channels to represent the total face using the median calculation of each channel. This median calculation is then used to represent the user's skin tone as an estimate compared to the ground truth. In one method, these data are obtained from a spectrophotometer.

[0257] Alternatively, in the composite approach, a linear weighting across multiple regions (such as the six preferred regions mentioned above) is sought to better match the ground truth. The composite approach allows for a deeper determination of which of the six regions provides a better representation of a single CIELAB value to best match the ground truth skin tone representation. This is achieved by constraining the weights, i.e., constraining the weights to sum to 1, thereby producing a method by which one can directly observe which region contributes the most and least to the final output. Using the multi-region and composite approach, the linear weights are calculated by regularized multiple linear regression on a human model dataset, taking the CIELAB vector for each facial region as input and the ground truth color CIELAB single vector (e.g., spectrophotometer) as output.

[0258] To calculate the weights for each skin region (e.g., using the six preferred regions mentioned above), multiple linear regression can be used. In addition, to ensure that the weights sum to 1, θ can be regularized using a normal equation. This is given by:

[0259] θ=(X T X+λ·L) -1 X T y.

[0260] For example, where m is the number of samples from input to output (areas and output spectrophotometer x6 L*a*b* values) and n is the number of skin areas (6 in this example), then

[0261]

[0262] where X is the mx(n1) matrix of CIELAB sample colors for n skin regions, and

[0263]

[0264] Y = m x 1 matrix of output CIELAB colors for each of the corresponding samples.

[0265] θ is a weighting value (i.e., a linear weight representing the influence of each of the six regions, where 0 represents no influence and 1 represents full influence, and its value ranges from [0, 1].

[0266] λ is the regularization parameter, and

[0267]

[0268] Using the example regions mentioned above, and in practice, the shoulder region represents a much higher weighting level than other regions, resulting in higher accuracy in aligning with the ground truth color. This result is also consistent with the intuition and observation of makeup artists, as this region is usually used by makeup artists as the main basis for evaluating the color of skin tones.

[0269] Additionally, composite methods can be used to adjust weights based on other external factors that determine skin tone, such as seasonal changes. If one dataset was captured in the winter and another in the summer, there may be subtle but critical differences in the weights in order to correctly identify a user's skin tone. An additional source of data that can be fed back into the model could be sunlight exposure based on an individual's geographic location, outdoor lifestyle, etc.

[0270] The training data of the dataset may need to be smoothed by applying a Gaussian filter to the difference between the component median or composite method results of the CIELAB color and the color recognized by the makeup artist for each facial region. For example, using the component median, the smoothed Δ is added to the component median and used as the training input. This process can be expressed as follows:

[0271] 1. Smooth and filter the training data:

[0272] a. Let column A be the colors approved by cosmetic artists

[0273] b. Let column M be the median of the CIELAB color components of each facial region

[0274] c. Set column T as the result of training data

[0275] i. Column T = Gaussian (column A - column M) + column M

[0276] 2. Use the filtered data to train the ML system

[0277] 3. The results of the ML system were verified

[0278] a. A cosmetic artist can be performed to verify the recommended tests proposed by the ML system.

[0279] Once built and trained, the skin color model can be deployed as an AWS EC2 instance, or hosted using other widely available services. The computer instance can operate synchronously or asynchronously. The computer instance provides an API interface to execute the skin color model. The machine learning system can be implemented using a widely available machine learning platform, and the machine learning model can be represented as a data description that the machine learning platform uses to build and run machine learning models. The code running on the computer instance:

[0280] 1. Receive a request through the API to process the user scan into a color recommendation.

[0281] 2. Load the facial model data (e.g., GLTF file) for a specific subject.

[0282] 3. Load and manage machine learning models as needed.

[0283] 4. Apply device color correction to the wing edge vertices.

[0284] 5. Apply inverse rendering correction to the wing edge vertices.

[0285] 6. Convert wing edge vertices into machine learning input.

[0286] 7. Run the machine learning model.

[0287] 8. Return the requested machine learning output data.

[0288] In summary, the service is used to evaluate facial model data (e.g., GLTF files) to predict (by inference) skin color in CIE L*a*b space. The captured image data (i.e., facial model data in a GLTF file) consists of light from the device display and measured skin color. Using the known light source (device display) and the captured image, the model solves for skin color as described in more detail above.

[0289] Although certain exemplary embodiments described herein relate to formulations that are applied to the skin (e.g., skin-based topical formulations), embodiments of the present invention are equally applicable to topical formulations for other areas of the face, such as the eyes or lips, and / or for determining color to allow matching or selection of formulations for application to other areas (e.g., hair).

[0290] Some or all of the functions described may be implemented in software and / or hardware on a user device. A user device may include, but is not limited to, a smartphone, a smartwatch, smart glasses, a tablet computer, a portable computer, a television, a gaming device, a music player, a mobile phone, a virtual reality goggles, a laptop computer, a PDA, a smart or dumb terminal, a network computer, a personal digital assistant, a home assistant (e.g., Alexa TM or Home TM ), which preferably has a camera, wireless device, information appliance, workstation, minicomputer, mainframe computer or other computer device, which operates as a general-purpose computer or a special-purpose hardware device that can perform the functions described herein. The software can be implemented, for example, in the form of a computer on a general-purpose computer device, which includes a processing unit, a system memory, and a system bus that couples various system components including the system memory to the processing unit.

[0291] Additionally or alternatively, some or all of the functions may be performed remotely in the cloud or via software as a service. For example, the matching functions may be performed on one or more remote servers or other devices as described above that are in communication with the user device. The remote functions may be performed on a server-class computer with sufficient memory, data storage, and processing power and running a server-class operating system (e.g., and series operating systems).

[0292] The system may include a plurality of software processing modules stored in memory and executed on a processor. As an illustration, the program modules may be in the form of one or more suitable programming languages ​​that are converted into machine language or object code to allow the processor to execute instructions. The software may be in the form of a stand-alone application, implemented in an appropriate programming language or framework.

[0293] The method steps of the techniques described herein may be performed by one or more programmable processors executing one or more computer programs to perform functions by operating on input data and generating output. The method steps may also be performed by, and the apparatus may be implemented as, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit). A module may refer to a portion of a computer program and / or processor / special purpose circuitry that implements the function.

[0294] Processors suitable for executing computer programs include, for example, general and special purpose microprocessors. Typically, the processor will receive instructions and data from a read-only memory or a random access memory or both. The basic elements of a computer are a processor for executing instructions and one or more memories for storing instructions and data. Information carriers suitable for embodying computer program instructions and data include all forms of non-volatile memory, such as semiconductor memory devices, such as EPROM, EEPROM and flash memory devices; magnetic disks, such as internal hard disks or removable disks; magneto-optical disks; and CD-ROM and DVD-ROM disks. One or more memories can store media assets (e.g., audio, video, graphics, interface elements and / or other media files), configuration files and / or instructions, which, when executed by the processor, form the modules, engines and other components described herein and perform the functions associated with the components. The processor and memory can be supplemented by or incorporated in a dedicated logic circuit.

[0295] In various implementations, a user device includes a web browser, a native application, or both, which facilitates the performance of the functions described herein. A web browser allows a device to request a web page or other downloadable program, applet, or document (e.g., a web page request from a server. An example of a web page is a data file that includes computer executable or interpretable information, graphics, sound, text, and / or video that can be displayed, executed, played, processed, streamed, and / or stored, and may contain links or pointers to other web pages. In one implementation, a user of the device manually requests a web page from a server. Alternatively, the device automatically makes the request with a web browser. Commercial web browser software includes and

[0296] In some implementations, the user device includes client software. The client software provides the device with functionality for implementing and executing the features described herein. The client software can be implemented in various forms, for example, it can be in the form of a local application, a web page, a widget, and / or Java, JavaScript, NET, Silverlight, Flash, and / or other applets or plug-ins that are downloaded to the device and run with a web browser. The client software and the web browser can be part of a single client-server interface; for example, the client software can be implemented as a plug-in for a web browser or other framework or operating system. Other suitable client software architectures, including but not limited to widget frameworks and applet technologies can also be used with the client software.

[0297] A communication network can connect devices to one or more servers and / or to each other. Communications can be made over media such as standard telephone lines, LAN or WAN links (e.g., T1, T3, 56KB, X.25), broadband connections (ISDN, Frame Relay, ATM), wireless links (802.11 (Wi-Fi), Bluetooth, GSM, CDMA, etc.). Other communication media are also possible. The network can carry TCP / IP protocol communications and HTTP / HTTPS requests issued by web browsers, and connections between clients and servers can communicate over such a TCP / IP network. Other communication protocols are also possible.

[0298] The system may also be implemented in a distributed computing environment, where tasks are performed by remote processing devices linked through a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including memory storage devices. Other types of system hardware and software than those described herein may also be used, depending on the capacity of the equipment and the amount of data processing power required. The system may also be implemented on one or more virtual machines executing a virtualized operating system such as described above, and operated on one or more computers having hardware such as those described herein.

[0299] In some cases, a relational database or other structured database can provide such functionality, for example, as a database management system that stores data for processing. Examples of databases include the MySQL database server or the ORACLE database server provided by ORACLE Corporation of Redwood Shores, California, the PostgreSQL database server provided by Global Development Group of Berkeley, California, or the DB2 database server provided by IBM.

[0300] It should also be noted that the implementation of the system and method can be as one or more computer-readable programs embodied on or in one or more articles of manufacture. The program instructions can be encoded on an artificially generated propagation signal, for example, a machine-generated electrical, optical or electromagnetic signal, which is generated to encode information for transmission to an appropriate receiver device for execution by a data processing device. A computer storage medium can be or be included in a computer-readable storage device, a computer-readable storage substrate, a random or serial access memory array or device, or a combination of one or more of them. In addition, although a computer storage medium is not a propagation signal, a computer storage medium can be a source or destination of computer program instructions encoded in an artificially generated propagation signal. A computer storage medium can also be or be included in one or more separate physical components or media (for example, multiple CDs, disks, or other storage devices).

[0301] Those skilled in the art will appreciate that changes may be made to the above embodiments without departing from the broad inventive concept of the present invention. Therefore, it is to be understood that the present invention is not limited to the specific embodiments disclosed, but is intended to cover modifications within the spirit and scope of the present invention as defined by the appended claims.

Claims

1. A method for creating a topical formulation with improved image capture, comprising: displaying an image of a body part of a user on an optical display of a device used by the user, wherein the optical display comprises a light source, and wherein the device comprises an image sensor, and the image of the body part of the user is sensed by the sensor; determining whether the position of the image of the body part relative to the sensor is acceptable to allow recording of the image of the body part; determining whether a lighting environment associated with the sensor is acceptable to allow recording of an image of the body part; recording the image using the sensor to provide a recorded image having image data; processing the recorded image to determine lighting model data associated with the lighting environment based on a percentage between the illumination of the body part by the lighting environment and the illumination of the body part provided by the light source; and Reflectivity and color characteristics associated with a body part of the user are determined based on the recorded image and the illumination model data.

2. The method according to claim 1, characterized in that: Determining whether the position of the body part relative to the sensor is acceptable for recording an image of the body part includes displaying a color light on the optical display.

3. The method according to claim 1, characterized in that Determining whether the position of the body part relative to the sensor is acceptable for recording an image of the body part includes displaying an illumination profile of the body part on the optical display.

4. The method according to claim 1, characterized in that: Determining whether the position of the body part relative to the sensor is acceptable for recording an image of the body part includes actuating a tactile or audible indicator on the device.

5. The method according to claim 1, characterized in that Determining whether the lighting environment is acceptable for recording an image of the body part includes displaying colored light on the optical display.

6. The method according to claim 1, characterized in that Determining whether the lighting environment is acceptable for recording an image of the body part includes displaying a lighting profile of the body part.

7. The method according to claim 1, characterized in that Determining whether the lighting environment is acceptable for recording an image of the body part includes actuating a tactile or audible indicator on the device.

8. The method according to claim 1, characterized in that Determining the lighting model includes: measuring exposure data associated with the device; determining data describing a relationship between a light source on the device and an aperture of the image sensor; determining data describing a relationship between the lighting environment and the image sensor; and Data describing a relationship between the image sensor, the light source, and a surface of the body part is determined.

9. The method according to claim 1, further comprising: A custom cosmetic formulation is determined based in part on the reflectance and color characteristics.

10. The method according to claim 1, characterized in that The optical display comprises: a light source; wherein the illumination environment illuminates the body part less than about 2% of the illumination provided by the light source; and wherein processing the recorded image to determine the illumination model data comprises direct calculation.

11. The method according to claim 1, characterized in that: The optical display comprises: a light source; wherein the illumination of the body part by the lighting environment is between about 2% and 10% of the illumination provided by the light source; and wherein processing the recorded image to determine the illumination model data comprises performing image filtering.

12. The method according to claim 1, characterized in that The optical display comprises: a light source; wherein the illumination of the body part by the lighting environment is between about 10% and 25% of the illumination provided by the light source; and wherein processing the recorded image to determine the illumination model data comprises performing a statistical estimation of bilateral symmetry.

13. The method according to claim 1, characterized in that The optical display comprises: a light source; wherein the illumination of the body part by the lighting environment is between about 25% and 40% of the illumination provided by the light source; and wherein processing the recorded image to determine the illumination model data comprises employing machine learning techniques.

14. The method according to claim 1, characterized in that The optical display comprises: a light source; and Wherein, when it is determined that the lighting environment associated with the sensor is unacceptable for recording the body part, the method further comprises: instructing the user to modify the lighting environment so that the lighting environment illuminates the body part by less than about 2% of the illumination provided by the light source; illuminating the body part with constant white light using the light source; and determining whether the illuminated body part is positioned relative to the sensor to allow recording of an image of the body part by displaying an outline of the body part of the user on the optical display to locate the body part within the field of view of the sensor; Wherein processing the recorded images to determine the illumination model data comprises direct calculation.

15. A system for creating a topical formulation with improved image capture, comprising: one or more processors and non-transitory memory; The machine-readable instructions stored in the memory, when executed by the one or more processors, cause the system to perform the following operations, including: displaying an image of a body part of a user on an optical display of a device used by the user, wherein the optical display comprises a light source, and wherein the device comprises an image sensor, and the image of the body part of the user is sensed by the sensor; determining whether the position of the body part image relative to the sensor is acceptable to allow recording of the image of the body part; determining whether a lighting environment associated with the sensor is acceptable to allow recording of an image of the body part; recording the image using the sensor to provide a recorded image having image data; processing the recorded image to determine lighting model data associated with the lighting environment based on a percentage between the lighting environment's illumination of the body part and the lighting provided by the light source to the body part; and Reflectivity and color characteristics associated with the user's body part are determined based on the recorded image and the illumination model data.

16. A method for creating a topical formulation with improved image capture, comprising: (a) illuminating a body part of a user with light of known intensity and color using an illumination source associated with an optical display of the device, wherein the optical display includes a light source; (b) displaying a representation of the body part on the optical display, the body part being sensed by an image sensor of the optical device, wherein the representation of the body part includes an outline associated with the body part, and wherein the representation allows the user to position the body part within the optical display; (c) recording an image of the body part sensed by the image sensor; (d) recording data describing characteristics of the optical display including known intensity and color of illumination light from the light source and characteristics of the image sensor including exposure settings of the image sensor; and (e) determining a surface color of the body part based on data associated with a recorded image of the body part, data describing characteristics of the optical display, and data describing characteristics of the image sensor.

17. The method according to claim 16, further comprising: A distance from the image sensor to a surface of the body part is determined, wherein the distance is further used to determine a surface color of the body part.

18. The method according to claim 16, characterized in that Determining the surface color of the body part comprises comparing data associated with the recorded image of the body part with data describing characteristics of the optical display and data describing characteristics of the image sensor.

19. The method according to claim 16, further comprising: Data from a recorded image of an illumination source reflected in a mirror is used to calibrate the illumination source and the exposure sensitivity of the image sensor.

20. The method of claim 17, wherein the surface color of the body part is determined by processing the distance from the image sensor to the surface of the body part, data associated with a recorded image of the body part, data describing characteristics of an optical display, and data describing characteristics of an image sensor using a network of weighting functions.

21. A system for creating a topical formulation with improved image capture, comprising: one or more processors and non-transitory memory; The machine-readable instructions stored in the memory, when executed by the one or more processors, cause the system to perform the following operations, including: (a) illuminating a body part of a user with light of known intensity and color using an illumination source associated with an optical display of the device, wherein the optical display includes a light source; (b) displaying a representation of the body part on the optical display, the body part being sensed by an image sensor of an optical device, wherein the representation of the body part includes an outline associated with the body part, and wherein the representation allows the user to position the body part within the optical display; (c) recording an image of the body part sensed by the image sensor; (d) recording data describing characteristics of the optical display including known intensity and color of the illumination light from the light source and characteristics of the image sensor including exposure settings of the image sensor; and (e) determining a surface color of the body part based on data associated with a recorded image of the body part, data describing characteristics of the optical display, and data describing characteristics of the image sensor.

22. A method for creating a topical formulation with improved image capture, comprising: displaying an image of a body part of a user on an optical display of a device used by the user, wherein the optical display comprises a light source, and wherein the device comprises an image sensor, and the image of the body part of the user is sensed by the sensor; recording a first version and a second version of the image of the body part using the sensor to provide a high dynamic range image of the associated recording, wherein display lighting on an optical display of the device is set to white to record a first version of the image; and wherein display lighting on an optical display of the device is set to black to record a second version of the image; removing at least some of the lighting in the second version of the image from the first version of the image to create a third version of the image; processing data associated with a third version of the image to create a three-dimensional model of the body part, the three-dimensional model being associated with a series of vertices, each of the vertices being associated with a color; correcting a color associated with each of the vertices to account for a distance from the sensor to the body part and an angle from the sensor to the body part to determine a corrected color vertex; and The corrected color vertices are processed using a machine learning model to estimate color characteristics of the body part.

23. The method of claim 22, further comprising operating the image sensor in a self-portrait mode using an application.

24. The method of claim 23, further comprising controlling settings of a device having the image sensor using the application.

25. The method of claim 22, further comprising capturing the first version of the image in a darkroom lighting environment.

26. The method of claim 25, further comprising illuminating the optical display with white light.

27. The method of claim 22, further comprising storing a third version of the image in a facial data format.

28. The method according to claim 27, characterized in that Each vertex includes one or more of: a label associated with the position of the vertex on the body part, an RGB color obtained from the third version of the image, a depth of the vertex obtained from depth data of the image sensor, a spatial position of the vertex relative to the image sensor viewpoint, and a projected normal position of the vertex relative to the image sensor viewpoint.

29. The method of claim 22, further comprising a pre-processing step for using image data from the device to correct color based on the type of device.

30. The method according to claim 22, characterized in that The machine learning model includes a color correction learning model, and the method also includes: correcting the type of the device while training the skin color model, and including images from different types of devices, including devices with the image sensor, as training data in the skin color model.

31. The method according to claim 22, characterized in that The training data for the machine learning model is smoothed and filtered before training the machine learning model.

32. The method according to claim 22, characterized in that The machine learning model is built and trained using training data from human subjects, wherein the training data includes one or more of: survey data, self-report data from human subjects, reference photographs of human subjects and color maps, skin color data of human subjects measured by a spectrophotometer in at least one facial region as ground truth measurements, and facial image data from users.

33. The method according to claim 32, characterized in that The at least one facial region is selected from the group consisting of a wrist, a forehead, a right cheek, a left cheek, a right jawline, a left jawline, and a shoulder.

34. The method according to claim 32, characterized in that Training data of skin color data from at least one facial region used for ground truth measurements are combined into a single CIELAB color using a component median method, and the single CIELAB color for each facial region is used as input to a machine learning model, and the output of the machine learning model is a unified color for facial makeup.

35. The method according to claim 32, characterized in that Training data from skin color data for at least one facial region used as a ground truth measurement is combined using a composite approach, wherein the skin color data from at least one facial region is linearly weighted across the at least one facial region to determine which of the at least one region best matches a single CIELAB value for skin color in the ground truth dataset.

36. The method according to claim 35, characterized in that In the machine learning model, the CIELAB vector for each of the at least one facial region is the input to the model, and the ground truth color CIELAB single vector is the output.

37. The method according to claim 36, characterized in that The linear weights are calculated as a result of a multivariate linear regression with regularization.

38. The method according to claim 36, characterized in that The machine learning model may include a ground truth dataset having ground truth data captured in summer months and ground truth data captured in winter months.

Citation Information

Patent Citations

  • Systems, Methods and Apparatus for Producing Customized Topical Agents

    US20180189853A1

  • System and Method for Adjusting Custom Topical Agents

    US20180260871A1

  • Systems and methods for specifying and formulating customized topical agents

    US8933994B2

  • Systems and methods for specifying and formulating customized topical agents

    US9122918B2

  • Systems and methods for specifying and formulating customized topical agents

    US9122919B2