A facial fill-in lighting method based on multi-sensor integration
By integrating multiple sensors and bright light units in the mirror system, dynamically adjusting bright light, the problem of filling light in the environment of insufficient light is solved, and the effect of intelligent filling light and resource saving is achieved.
Patent Information
- Application Number
- CN202410441231.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-12
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-04-12
AI Technical Summary
Existing mirrors cannot provide intelligent fill light in environments with insufficient light, resulting in users being unable to accurately observe facial details, affecting the beauty and makeup effects. At the same time, traditional fill light methods have problems with wasting resources.
The facial fill light method based on multi-sensor fusion is adopted. By integrating multiple bright light units, distance sensors and light sensing sensors in the mirror system, the bright light intensity and distribution are dynamically adjusted, and intelligent fill light operation is carried out according to the user's position and ambient light conditions.
It realizes the provision of intelligent fill light operation while saving light resources, ensuring that users obtain clear and bright facial observation conditions, avoid resource waste, and improve user experience.
Smart Images

Figure CN118591063B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a facial light-filling method based on multi-sensor integration, and belongs to the technical field of intelligent mirror cabinets. Background Art
[0002] In modern society, people pay more and more attention to their appearance. Facial beauty and makeup have become an important part of many people's daily lives. In daily life, people often need to use mirrors to observe and modify their appearance. However, conventional mirrors are just a simple reflection tool and cannot provide additional fill light function. As a result, in low-light environments, people often cannot accurately observe their facial details, affecting the beauty and makeup effects.
[0003] Traditional fill-light methods can usually only provide fill-light with a fixed brightness and cannot be intelligently adjusted according to the real-time needs of users. Secondly, traditional fill-light methods often require manual intervention and adjustment, that is, manually turning on the lamps in the environment where the mirror is located. Although the fill-light effect can be achieved, resources are wasted because users easily forget to turn off the lamps. In addition, due to the fixed brightness of the lamps, too high brightness will also cause resource waste problems, and too low brightness will cause users to use the mirror due to insufficient fill-light, resulting in poor use effects. Therefore, there is a lack of a technical means that can achieve intelligent fill-light operation while saving light resources. Summary of the invention
[0004] The present invention provides a facial fill-light method, device and computer-readable storage medium based on multi-sensor integration, the main purpose of which is to realize intelligent fill-light operation under the premise of saving light resources.
[0005] To achieve the above object, the present invention provides a facial fill light method based on multi-sensor integration, comprising:
[0006] Start the mirror system, wherein the mirror system includes a bright light device and a mirror. The bright light device is located behind the mirror and consists of a plurality of bright light units, and the bright light units are evenly distributed behind the mirror. The mirror is divided into a human-mirror interaction area, a sensor area, and a monitoring area. The human-mirror interaction area is located in the center of the mirror. The monitoring area is located directly above the mirror and includes a portrait monitoring unit and a distance sensor. The sensor area is located on the left and right of the mirror and consists of a distance sensor and a light sensor.
[0007] Obtain the monitoring images captured by the portrait monitoring unit and transmit the monitoring images back to the mirror system;
[0008] Use the pre-built face recognition model to identify whether the surveillance image includes a human portrait. If the surveillance image includes a human portrait, determine whether the human portrait is facing the mirror.
[0009] If the portrait is not facing the mirror, the sensor in the sensor area is not activated, and the process returns to the step of obtaining the monitoring image captured by the portrait monitoring unit;
[0010] If the person is facing the mirror, start the distance sensors in the sensor area and the monitoring area to obtain the distance between the user and the mirror, obtain the person-mirror distance value, and calculate the space proportion of the user in the area directly in front of the mirror based on the person-mirror distance value;
[0011] Determine the light units to be turned on in the light device according to the space proportion value; and
[0012] Start the light sensor in the sensor area to obtain the light value of the area directly in front, and calculate the light intensity of the light unit to be illuminated based on the light value;
[0013] The waiting light unit is activated based on the bright light intensity to complete the fill light operation of the mirror system for the user.
[0014] Optionally, the method further comprises: setting the number of the bright light units, comprising:
[0015] Get the area of the human-mirror interaction zone in the mirror surface;
[0016] The number of bright light units is calculated according to the following formula:
[0017]
[0018] in, represents the number of bright light units in the mirror system, represents the area of the human-mirror interaction zone, Indicates the human-mirror interaction area, Each light unit The lighting coverage area at rated power, Indicates rounding operation. Represents the weight factor for calculating the number of bright light units based on the human-mirror interaction area.
[0019] Optionally, the distance sensors in the start sensor area and the monitoring area acquire the position of the user from the mirror surface to obtain the person-mirror distance value, including:
[0020] A three-dimensional coordinate system is constructed with the mirror surface and the area directly in front of the mirror surface, wherein the portrait monitoring unit is the starting point of the three-dimensional coordinate system, the plane where the mirror surface is located represents the plane formed by the X-axis and the Y-axis, and the area directly in front of the mirror surface is located in the plane where the Z-axis is located;
[0021] In the three-dimensional coordinate system, calculating the position information of the user in the front area in the monitoring screen;
[0022] Calculate the beam angle of each distance sensor when emitting a light beam using the position information;
[0023] Activate all distance sensors in the monitoring area and the sensor area, and emit light beams to capture users based on the light beam angle corresponding to each distance sensor;
[0024] Receive the reflected light from the distance sensor, and calculate the user's distance from the mirror based on the reflected light to obtain the human-mirror distance value.
[0025] Optionally, the structure of the person-mirror distance value is:
[0026]
[0027]
[0028] in, Indicates the distance between the person and the mirror. Indicates The distance sensor measures the status information calculated by the user, where Indicates the X-axis value of the user in the three-dimensional coordinate system. Indicates the Y-axis value of the user in the three-dimensional coordinate system. Indicates the Z-axis value of the user in the 3D coordinate system.
[0029] Optionally, the calculating based on the person-mirror distance value to obtain a space proportion value of the user in the area directly in front of the mirror surface includes:
[0030] The projection area projected by the user to the human-mirror interaction area is calculated according to the human-mirror distance value;
[0031] Calculate the occupied volume of the area directly in front of the mirror by the user based on the projection area;
[0032] Calculate the ratio of the occupied volume to the area directly in front to get the user's space share.
[0033] Optionally, the calculating, according to the person-mirror distance value, a projection area projected by the user onto the person-mirror interaction area includes:
[0034] Obtain all X-axis values and Y-axis values in the human-lens distance value, fit a humanoid posture function according to all X-axis values and Y-axis values, and simultaneously determine the minimum X-axis value and the maximum X-axis value from all X-axis values;
[0035] The projected area is calculated using the following formula:
[0036]
[0037] in, Indicates the projection area of the user projected onto the human-mirror interaction area. represents the humanoid posture function, is the minimum X-axis value, is the maximum X-axis value.
[0038] Optionally, the mirror system is located between the first wall and the second wall, and the first wall and the second wall are in a parallel and opposite state. Below the mirror system is a washbasin, and the mirror system is used as an observation surface. The parallel and opposite space formed by the first wall, the second wall and the third wall is the area directly in front of the mirror.
[0039] Optionally, calculating the occupied volume of the area directly in front of the mirror by the user according to the projection area includes:
[0040] The average Z-axis value is calculated based on all Z-axis values in the human-lens distance value;
[0041] The volume occupied by the user in front of the mirror is calculated according to the following formula:
[0042]
[0043] in, Indicates the volume occupied by the user in front of the mirror. represents the length of the first wall or the second wall, Indicates the average Z-axis value.
[0044] Optionally, determining the light units to be turned on in the light device according to the space proportion value includes:
[0045] Calculate the projection area projected by the user to the human-mirror interaction area;
[0046] Calculate the bright light area in the bright light device that needs to turn on the bright light based on the projection area;
[0047] Calculate the number of bright light units that need to be turned on according to the space ratio;
[0048] Determine the relationship between the number of bright light units included in the bright light area and the calculated number of bright light units;
[0049] If the number of bright light units included in the bright light area is greater than the calculated number of bright light units, all bright light units in the bright light area are confirmed as waiting bright light units;
[0050] If the number of bright light units included in the bright light area is less than or equal to the calculated number of bright light units, bright light units continue to be selected from the adjacent areas of the bright light area until the number of bright light units included in the bright light area and the selected ones are equal to the calculated number of bright light units, and all the bright light units in the bright light area and the bright light units in the adjacent areas are confirmed as bright light units to be selected.
[0051] Optionally, calculating the number of bright light units that need to be turned on according to the space proportion value includes:
[0052] The number of bright light units that need to be turned on is calculated according to the following formula:
[0053]
[0054] in, It means that the number of bright light units that need to be turned on is calculated based on the space ratio. is the number of bright light units in the mirror system, Indicates the space ratio. To calculate the weighting factor for the number of bright light units that need to be turned on, Indicates rounding operation. Represents a natural constant.
[0055] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:
[0056] at least one processor; and,
[0057] a memory communicatively connected to the at least one processor; wherein,
[0058] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to implement the above-mentioned facial fill light method based on multi-sensor fusion.
[0059] In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the above-mentioned facial fill light method based on multi-sensor integration.
[0060] Compared with the problems described in the background technology, the mirror system used in the present invention has multiple built-in bright light units, and dynamically adjusts the bright light intensity and distribution according to the user's position and the ambient light conditions, and then by starting only part of the bright light units according to actual needs, and adjusting the brightness of each bright light unit, it is possible to achieve effective conservation of light resources. In addition, the present invention uses a variety of sensors including distance sensors and light sensors to sense information such as user position and ambient light, and performs intelligent fill light operations based on real-time data, accurately senses the distance between the user and the mirror and the ambient light conditions, can optimize the fill light strategy, avoid unnecessary light source consumption, and can also increase the brightness of the bright light unit to ensure that the user can obtain clear and bright facial observation conditions, thereby saving light resources and improving user experience. Importantly, the present invention does not completely rely on the face recognition model, and the face recognition models used in the present invention are all lightweight models, which are only used to identify whether the user is facing the mirror system, thereby overcoming the problem of waste of computing resources caused by running a complex deep learning network to the greatest extent, and at the same time, combined with the distance sensor to judge the distance between the user and the mirror system, a simple calculation method is used to realize the intelligent display of the bright light unit. Therefore, the facial fill light method based on multi-sensor integration proposed in the present invention realizes intelligent fill light operation under the premise of saving light resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 A schematic diagram of a flow chart of a facial light fill method based on multi-sensor integration provided by an embodiment of the present invention;
[0062] Figure 2 A schematic diagram of the structure of a mirror system in a facial light fill method based on multi-sensor integration provided by an embodiment of the present invention;
[0063] Figure 3 A schematic diagram of a portrait and a mirror system in a top-down perspective in a facial fill light method based on multi-sensor integration provided by an embodiment of the present invention;
[0064] Figure 4 A schematic diagram of a side view of a portrait and a mirror system in a facial fill light method based on multi-sensor integration provided by an embodiment of the present invention;
[0065] Figure 5 A schematic diagram of a user and a mirror system when the user is in a bowing posture in a facial fill light method based on multi-sensor integration provided by an embodiment of the present invention;
[0066] Figure 6 A schematic diagram of the structure of a distance sensor working in a facial fill light method based on multi-sensor integration provided by an embodiment of the present invention;
[0067] Figure 7A schematic diagram of the structure of an electronic device for implementing the facial fill-in lighting method based on multi-sensor integration provided by an embodiment of the present invention.
[0068] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION
[0069] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0070] The embodiment of the present application provides a facial fill-in light method based on multi-sensor integration. The execution subject of the facial fill-in light method based on multi-sensor integration includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the facial fill-in light method based on multi-sensor integration can be executed by software or hardware installed on a terminal device or a server device. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.
[0071] Embodiment 1:
[0072] Reference Figure 1 FIG. 2 is a flow chart of a facial fill light method based on multi-sensor integration provided by an embodiment of the present invention. In this embodiment, the facial fill light method based on multi-sensor integration includes:
[0073] S1. Start the mirror system, wherein the mirror system includes a light device and a mirror. The light device is located behind the mirror and consists of a plurality of light units. The light units are evenly distributed behind the mirror. The mirror is divided into a human-mirror interaction area, a sensor area, and a monitoring area. The human-mirror interaction area is located at the center of the mirror. The monitoring area is located directly above the mirror and includes a portrait monitoring unit and a distance sensor. The sensor area is located on the left and right of the mirror and consists of a distance sensor and a light sensor.
[0074] It should be explained that the mirror system described in the embodiment of the present invention is an integrated system that adds intelligent operation to an ordinary mirror to achieve facial fill light. The mirror system includes a light device and a mirror. The light device consists of multiple groups of light units regularly arranged behind the mirror. By controlling whether different light units light up, the purpose of facial fill light is achieved.
[0075] For easier understanding, please refer to Figure 2Regarding the structural diagram of the mirror system, the mirror surface of the mirror system is divided into a human-mirror interaction area, a sensor area and a monitoring area. Among them, the human-mirror interaction area is used to let the user look in the mirror (referred to as mirror interaction), and the monitoring area and the sensor area provide different degrees of facial fill light for users who are performing mirror interaction through intelligent analysis.
[0076] It is understandable that in order to facilitate users to achieve mirror interaction, the human-mirror interaction area is located in the center of the entire mirror. At the same time, in order to provide a better monitoring field of view for the portrait monitoring unit, the monitoring area is placed directly above the mirror, and the sensor area is located on the left and right of the mirror, which does not hinder mirror interaction and can also facilitate the operation of various types of sensors.
[0077] In addition, it should be noted that the number of bright light units and the mirror area should have a suitable corresponding relationship. Too many bright light units will cause a waste of resources, while too few bright light units will cause a poor fill light effect. Therefore, in order to ensure that the number of bright light units of the bright light device has a suitable corresponding relationship with the mirror area, an embodiment of the present invention provides a calculation formula for the corresponding relationship. In detail, the number of bright light units has a corresponding relationship with the mirror area, and the calculation of the corresponding relationship includes:
[0078] Obtain the area of the human-mirror interaction region in the mirror surface to obtain the human-mirror interaction area;
[0079] The number of bright light units is calculated according to the following formula:
[0080]
[0081] in, represents the number of bright light units in the mirror system, represents the area of the human-mirror interaction zone, Indicates the human-mirror interaction area, Each light unit The lighting coverage area at rated power, Indicates rounding operation. Represents the weight factor for calculating the number of bright light units based on the human-mirror interaction area, and is an integer greater than 0.
[0082] For example, assuming that the area of the human-mirror interaction zone in the mirror is 1 square meter, and each bright light unit The lighting coverage area under rated power is 0.05 square meters, and the weight factor is 1, then the calculated number of bright light units is 20, therefore, these 20 bright light units can be evenly installed behind the mirror.
[0083] S2. Obtain the monitoring picture captured by the portrait monitoring unit, wherein the monitoring area of the portrait monitoring unit is limited to the area directly in front of the mirror, and transmit the monitoring picture back to the mirror system, wherein the mirror system has a built-in face recognition model.
[0084] It is understandable that in order to improve privacy security, the monitoring area of the portrait monitoring unit is limited to the front of the mirror, and it should be emphasized that whether the portrait monitoring unit works can be based on user needs. Exemplarily, Xiao Zhang's home is equipped with the mirror system described in the embodiment of the present invention, and Xiao Zhang generally does not turn on the portrait monitoring unit, that is, the mirror system is used as an ordinary mirror. However, the environment in Xiao Zhang's city is poor recently, and it is shrouded in gray smog all day long. Therefore, Xiao Zhang's home is obstructed from lighting and affected by smog, which also causes skin allergies on Xiao Zhang's face. It is necessary to use the mirror system to apply medicine to the allergic face or observe the recovery of the face many times. Therefore, under the premise of poor lighting and the need to look in the mirror many times, Xiao Zhang turns on the portrait monitoring unit to achieve the purpose of intelligent facial fill light.
[0085] In addition, it should be noted that since the mirror system is generally located in areas with high humidity such as restrooms, fog often occurs on the mirror surface. Therefore, in order to ensure the timeliness of facial fill light, the mirror surface of the mirror system described in the embodiment of the present invention has an intelligent dehumidification function.
[0086] Furthermore, the mirror system has a built-in face recognition model, whose main purpose is to identify whether the monitoring image includes a portrait. In order to ensure timeliness while saving computing resources, the face recognition model described in the embodiment of the present invention is a lightweight model.
[0087] S3. Using a face recognition model to identify whether the monitoring image includes a human portrait.
[0088] It is understandable that judging whether a surveillance image includes a human portrait based on a face recognition model under deep learning is a public technical means, and the embodiments of the present invention will not be repeated here.
[0089] S4. If the monitoring image includes a human portrait, determine whether the human portrait is facing the mirror.
[0090] It should be explained that when the user performs mirror interaction, the user's facial area must face the mirror to ensure that the user's eyes can observe the mirror's image. Therefore, the prerequisite for turning on intelligent facial fill light is to determine whether the portrait is facing the mirror. When the portrait is not facing the mirror, the user may be washing hands, clothes, etc., so there is no need to turn on intelligent fill light.
[0091] As is known to the public, the key to determining whether a person is facing the mirror is to determine whether the eyes are facing the mirror. There are many ways to determine whether the eyes are facing the mirror, including but not limited to using facial key point detection algorithms, such as the facial key point detector in Dlib or OpenCV to identify the eyes, and determine the direction of the eyes based on the position of the pupils. If the pupil is in the center of the eye socket, it may mean that the eyes are facing the mirror.
[0092] S5. If the portrait is not facing the mirror, the sensor in the sensor area is not activated and the process returns to S2.
[0093] It is understandable that if the face recognition model and the face key point detector identify that the portrait is not facing the mirror, it means that the user does not need to use a mirror at this time, and there is no need to start the bright light device for fill light.
[0094] S6. If the portrait is facing the mirror, start the distance sensors in the sensor area and the monitoring area to obtain the position of the user from the mirror, obtain the person-mirror distance value, and calculate the space occupation value of the user in the area directly in front based on the person-mirror distance value.
[0095] See also Figure 3 , which is a schematic diagram of a top view of a portrait and a mirror system according to an embodiment of the present invention when a portrait is facing the mirror. Figure 4 Based on Figure 3 Side view under the effect. Figure 3 , Figure 4 As shown, in the embodiment of the present invention, the mirror system is located in the middle of the first wall and the second wall, and the first wall and the second wall are in a parallel and opposite state. Below the mirror system is a washbasin, and the mirror system is used as an observation surface. The parallel and opposite space formed by the first wall, the second wall and the third wall is the front area.
[0096] It should be emphasized that the main purpose of the embodiment of the present invention is to calculate the number and positions of the bright light units that need to be turned on by the bright light device according to the distance between the human image and the mirror system and the volume occupied by the human image in the entire space.
[0097] For example, if Xiao Zhang needs to use the mirror system at this time, the embodiment of the present invention needs to calculate the distance between Xiao Zhang and the mirror system (i.e., the person-mirror distance value described in the embodiment of the present invention), and the distance between Xiao Zhang and the entire bathroom ( Figure 3: The area enclosed by the first wall, the second wall, the third wall and the mirror system is also the monitoring area of the above-mentioned portrait monitoring unit in the embodiment of the present invention, that is, the volume proportion of the area directly in front (that is, the space proportion value in the embodiment of the present invention), so as to calculate the number and position of the bright light units that need to be turned on when performing facial fill light for Xiao Zhang according to the person-mirror distance value and the space proportion value. The main purpose of this operation is to effectively realize facial fill light while saving electric energy resources.
[0098] Specifically, the distance sensors in the start sensor area and the monitoring area obtain the position of the user from the mirror surface to obtain the person-mirror distance value, including:
[0099] A three-dimensional coordinate system is constructed with the mirror surface and the front area, wherein the portrait monitoring unit is the starting point of the three-dimensional coordinate system, the plane where the mirror surface is located represents the plane formed by the X-axis and the Y-axis, and the front area formed by the first wall and the second wall is located in the plane where the Z-axis is located;
[0100] Confirming the location information of the user in the front area from the monitoring screen;
[0101] Calculate the beam angle of each distance sensor when emitting a light beam using the position information;
[0102] Activate all distance sensors in the monitoring area and the sensor area, and emit light beams to capture users based on the light beam angle corresponding to each distance sensor;
[0103] Receive the reflected light from the distance sensor, and calculate the user's distance from the mirror based on the reflected light to obtain the human-mirror distance value.
[0104] It should be explained that there are existing methods that can confirm the distance between the user and the portrait monitoring unit based on the monitoring screen, such as traditional digital image processing technology or deep learning models, but over-reliance on software methods will cause inaccurate distance assessment. Therefore, the embodiment of the present invention still relies on the distance sensor to emit light waves, and relies on the reflected light to measure the position of the user and the mirror.
[0105] For example, assuming that digital image processing technology or a deep learning model is used to calculate the position information of Xiao Zhang in the front area of the monitoring screen as (0.3, 0.1, 1.2), then the position information indicates that Xiao Zhang's position on the plane where the mirror is located is (0.3, 0.1), that is, he may be 0.3 meters to the left of the portrait monitoring unit, 0.1 meter above it, and 1.2 meters away from the mirror.
[0106] However, it should be emphasized that the position information calculated by digital image processing technology or deep learning models is rough information, because the user has a variety of postures in front of the mirror, see Figure 5The bowing posture shown is the most common posture for looking in the mirror, which makes it easier to check one's facial condition. Therefore, excessive reliance on digital image processing technology or deep learning models to calculate position information may result in large errors, which will affect the number and area of subsequent bright light units that are turned on.
[0107] Therefore, see Figure 6 As shown, the embodiment of the present invention uses multiple groups of distance sensors to obtain the human-mirror distance value, and can calculate the human-mirror distance values of different parts of the user based on the reflected light, that is, the human-mirror distance value is a combined multi-data structure, which can overall reflect the user's posture information in front of the mirror system.
[0108] In detail, the structure of the human-mirror distance value is:
[0109]
[0110]
[0111] in, Indicates the distance between the person and the mirror. Indicates The distance sensor measures the status information calculated by the user's body parts, among which, Indicates the X-axis value of the user's position in the three-dimensional coordinate system. Indicates the Y-axis value of the user's position in the three-dimensional coordinate system. Indicates the Z-axis value of the user's part in the three-dimensional coordinate system.
[0112] For example, assuming that the state information of the user's face of the 10th distance sensor is (0.2, 0.1, 1.1), and the state information of the user's chest is (0.2, 0.13, 1.2), since 1.1 meters is obviously smaller than 1.2 meters, it is obvious that the user is in a bowing posture for looking in the mirror. In summary, through the cooperation of the distance sensor and the portrait monitoring unit, the embodiment of the present invention can obtain the position information of different parts of the user and the mirror system, and the above-mentioned person-mirror distance value can be obtained by combining the position information of different parts.
[0113] Furthermore, users of different body shapes actually need different bright light units. For example, even if a 60-pound child and a 200-pound adult are at the same distance from the mirror system, the 200-pound adult will occupy more mirror area, so the bright light units that are finally turned on will also be different. Therefore, the embodiment of the present invention needs to further calculate the space proportion of the user in the front area according to the person-mirror distance value.
[0114] In detail, the calculation based on the person-mirror distance value to obtain the space proportion value of the user in the front area includes:
[0115] The projection area of the human body projected onto the human-mirror interaction zone is calculated according to the human-mirror distance value;
[0116] Calculate the volume of the area directly in front of the user based on the projected area;
[0117] Calculate the ratio of the occupied volume to the area directly in front to get the user's space share.
[0118] It should be explained that the space proportion value is of great significance in the embodiments of the present invention, because the larger the space proportion value, the more bright light units need to be turned on. In detail, the projection area of the human body projected onto the human-mirror interaction area is calculated according to the human-mirror distance value, including:
[0119] Obtain all X-axis values and Y-axis values in the human-lens distance value, fit a humanoid posture function according to all X-axis values and Y-axis values, and simultaneously determine the minimum X-axis value and the maximum X-axis value from all X-axis values;
[0120] The projected area is calculated using the following formula:
[0121]
[0122] in, represents the projection area of the human body onto the human-mirror interaction zone, and Less than or equal to , represents the humanoid posture function, is the minimum X-axis value, is the maximum X-axis value.
[0123] For example, suppose Xiao Zhang stands in front of the mirror system, and the distance sensor captures a series of state information of the distance between various parts of Xiao Zhang and the mirror system. According to the above description, the state information is determined by the X-axis value, the Y-axis value and the Z-axis value, wherein the X-axis value and the Y-axis value represent the coordinate values of various parts projected onto the human-mirror interaction area. Therefore, the embodiment of the present invention extracts all the X-axis values and the Y-axis values, and performs fitting with X as the independent variable and Y as the dependent variable, and then a function in which Y changes with the change of X can be obtained, which is called the humanoid posture function. Further, with the humanoid posture function By performing the integration operation as an integral function, the projection area of the user in the human-mirror interaction area can be obtained.
[0124] Furthermore, the step of calculating the occupied volume of the area directly in front of the user according to the projected area includes:
[0125] The average Z-axis value is calculated based on all Z-axis values in the human-lens distance value;
[0126] The volume occupied by the user in the area directly in front of him is calculated according to the following formula:
[0127]
[0128] in, Indicates the volume occupied by the user in the area directly in front of him. Indicates the length of the first wall or the second wall, Indicates the average Z-axis value.
[0129] It should be explained that, assuming that the distance sensor is used to capture the Z-axis value of the distance between each part of Xiao Zhang and the mirror system, according to the above description, the Z-axis value represents the distance between each part of Xiao Zhang and the mirror system along the first wall, that is, the length of the first wall minus the average Z-axis value, the result is the distance between Xiao Zhang and the third wall. Then, by multiplying the projection area with the distance between Xiao Zhang and the third wall, we can get how much volume Xiao Zhang occupies in the entire front area relative to the mirror system. .
[0130] Furthermore, the ratio of the occupied volume to the front area is calculated to obtain the space ratio. For example, assuming that the volume of the front area constructed by the first wall, the mirror system, the second wall, and the third wall is 10 cubic meters, and the occupied volume calculated due to Xiao Zhang's body shape and position is 4 cubic meters, then 4 divided by 10 is 0.4, which is a space ratio.
[0131] S7. Determine the light units to be turned on in the light device according to the space proportion value.
[0132] It is understandable that the larger the space ratio is, the higher the user's demand for lighting is. Therefore, how to select the appropriate number and area of lighting units from the lighting device to meet the needs of users with different space ratios is a key technical problem to be solved in this step. In detail, determining the lighting units to be turned on in the lighting device according to the space ratio includes:
[0133] While calculating the projection area, determining the projection area of the human body projected onto the human-mirror interaction area;
[0134] Calculate the bright light area in the bright light device that needs to turn on the bright light based on the projection area;
[0135] Calculate the number of bright light units that need to be turned on according to the space ratio;
[0136] Determine the relationship between the number of bright light units included in the bright light area and the calculated number of bright light units;
[0137] If the number of bright light units included in the bright light area is greater than the calculated number of bright light units, all bright light units in the bright light area are confirmed as waiting bright light units;
[0138] If the number of bright light units included in the bright light area is less than or equal to the calculated number of bright light units, bright light units continue to be selected from the adjacent areas of the bright light area until the number of bright light units included in the bright light area and the selected ones are equal to the calculated number of bright light units, and all the bright light units in the bright light area and the bright light units in the adjacent areas are confirmed as bright light units to be selected.
[0139] It should be explained that when calculating the projection area, the embodiment of the present invention needs to retrieve all X-axis values and Y-axis values, and the area surrounded by the minimum X-axis value and the maximum X-axis value among all X-axis values, and the minimum Y-axis value and the maximum Y-axis value among all Y-axis values is the projection area. It is understandable that the projection area is the area that the user needs to focus on observing, because the projection area displays various parts of the user, so all the bright light units included in the projection area need to be illuminated, especially in the above embodiment, Xiao Zhang's family has been affected by dim weather for a long time, resulting in insufficient lighting in the area directly in front, and it is extremely necessary to light up all the bright light units in the projection area.
[0140] In addition, sometimes, because the user's space proportion value is too large, more bright light units need to be lit, so it is also necessary to determine the impact of the space proportion value on the determination of the total number of bright light units. In detail, the number of bright light units that need to be turned on according to the space proportion value includes:
[0141] The number of bright light units that need to be turned on is calculated according to the following formula:
[0142]
[0143] in, It means that the number of bright light units that need to be turned on is calculated based on the space ratio. is the number of bright light units in the mirror system, Indicates the space ratio. To calculate the weighting factor for the number of bright light units that need to be turned on, Indicates rounding operation. Represents a natural constant.
[0144] It can be understood that according to the above calculation, the number of bright light units that need to be turned on under different space share values can be obtained. Assuming that Xiao Zhang's space share value is 0.4, the number of bright light units that need to be turned on is 12 through calculation, while the number of bright light units included in the bright light area is only 9, so bright light units continue to be selected from the adjacent areas of the bright light area.
[0145] Specifically, the embodiment of the present invention first selects the bright light unit in the adjacent area to the user's head. That is, assuming that three bright light units need to be supplemented, the adjacent bright light unit is first selected from the projection area where Xiao Zhang's head is located, thereby maximizing the satisfaction of facial fill light needs.
[0146] S8. Start the light sensor in the sensor area to obtain the light value of the area directly in front, and calculate the light intensity of the light unit to be illuminated based on the light value.
[0147] It should be explained that each bright light unit in the embodiment of the present invention can display light intensities of different brightnesses. For example, it can display three levels of light intensities. If the light value of the area directly in front obtained by the light sensor is relatively weak, the light intensity of the light unit to be brightened can be modulated to the highest level. If the light value of the area directly in front obtained by the light sensor is relatively sufficient, the light intensity of the light unit to be brightened can be modulated to the lowest level.
[0148] S9, starting the waiting light unit based on the bright light intensity, and completing the fill light operation of the mirror system for the user.
[0149] It can be seen that according to the calculation of the above steps S1-S8, a suitable position and a suitable number of light units (hereinafter referred to as the light units to be lit) can be finally selected from the light device, and then all the light units to be lit are displayed based on the calculated light intensity, and finally the mirror system completes the fill light operation for the user. In particular, the fill light strategy constructed by the embodiment of the present invention can improve the light utilization rate when the user uses the mirror, while also avoiding resource waste, and preventing the problem of light resource waste caused by users forgetting to turn off the lighting in the traditional field.
[0150] Compared with the problems described in the background technology, the mirror system used in the present invention has multiple built-in bright light units, and dynamically adjusts the bright light intensity and distribution according to the user's position and the ambient light conditions, and then by starting only part of the bright light units according to actual needs, and adjusting the brightness of each bright light unit, it is possible to achieve effective conservation of light resources. In addition, the present invention uses a variety of sensors including distance sensors and light sensors to sense information such as user position and ambient light, and performs intelligent fill light operations based on real-time data, accurately senses the distance between the user and the mirror and the ambient light conditions, can optimize the fill light strategy, avoid unnecessary light source consumption, and can also increase the brightness of the bright light unit to ensure that the user can obtain clear and bright facial observation conditions, thereby saving light resources and improving user experience. Importantly, the present invention does not completely rely on the face recognition model, and the face recognition models used in the present invention are all lightweight models, which are only used to identify whether the user is facing the mirror system, thereby overcoming the problem of waste of computing resources caused by running a complex deep learning network to the greatest extent, and at the same time, combined with the distance sensor to judge the distance between the user and the mirror system, a simple calculation method is used to realize the intelligent display of the bright light unit. Therefore, the facial fill light method based on multi-sensor integration proposed in the present invention realizes intelligent fill light operation under the premise of saving light resources.
[0151] Embodiment 2:
[0152] like Figure 7 , is a schematic diagram of the structure of an electronic device for implementing a facial fill light method based on multi-sensor integration provided by an embodiment of the present invention.
[0153] The electronic device 1 may include a processor 10, a memory 11, a bus 12 and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a facial light-filling program based on multi-sensor fusion.
[0154] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (SmartMediaCard, SMC), a secure digital (SecureDigital, SD) card, a flash card (FlashCard), etc. equipped on the electronic device 1. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 may not only be used to store application software and various types of data installed in the electronic device 1, such as the code of a facial fill light program based on multi-sensor integration, but also be used to temporarily store data that has been output or is to be output.
[0155] In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes various functions and processes data of the electronic device 1 by running or executing programs or modules stored in the memory 11 (such as a facial fill light program based on multi-sensor integration, etc.), and calling data stored in the memory 11.
[0156] The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.
[0157] Figure 7 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 7The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0158] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0159] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.
[0160] Optionally, the electronic device 1 may further include a user interface, which may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.
[0161] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0162] The facial light filling program based on multi-sensor integration stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:
[0163] Start the mirror system, wherein the mirror system includes a bright light device and a mirror. The bright light device is located behind the mirror and consists of a plurality of bright light units, and the bright light units are evenly distributed behind the mirror. The mirror is divided into a human-mirror interaction area, a sensor area, and a monitoring area. The human-mirror interaction area is located in the center of the mirror. The monitoring area is located directly above the mirror and includes a portrait monitoring unit and a distance sensor. The sensor area is located on the left and right of the mirror and consists of a distance sensor and a light sensor.
[0164] Obtain the monitoring images captured by the portrait monitoring unit and transmit the monitoring images back to the mirror system;
[0165] Use the pre-built face recognition model to identify whether the surveillance image includes a human portrait. If the surveillance image includes a human portrait, determine whether the human portrait is facing the mirror.
[0166] If the portrait is not facing the mirror, the sensor in the sensor area is not activated, and the process returns to the step of obtaining the monitoring image captured by the portrait monitoring unit;
[0167] If the person is facing the mirror, start the distance sensors in the sensor area and the monitoring area to obtain the distance between the user and the mirror, obtain the person-mirror distance value, and calculate the space proportion of the user in the area directly in front of the mirror based on the person-mirror distance value;
[0168] Determine the light units to be turned on in the light device according to the space proportion value; and
[0169] Start the light sensor in the sensor area to obtain the light value of the area directly in front, and calculate the light intensity of the light unit to be illuminated based on the light value;
[0170] The waiting light unit is activated based on the bright light intensity to complete the fill light operation of the mirror system for the user.
[0171] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figures 1 to 7 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0172] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0173] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:
[0174] Start the mirror system, wherein the mirror system includes a bright light device and a mirror. The bright light device is located behind the mirror and consists of a plurality of bright light units, and the bright light units are evenly distributed behind the mirror. The mirror is divided into a human-mirror interaction area, a sensor area, and a monitoring area. The human-mirror interaction area is located in the center of the mirror. The monitoring area is located directly above the mirror and includes a portrait monitoring unit and a distance sensor. The sensor area is located on the left and right of the mirror and consists of a distance sensor and a light sensor.
[0175] Obtain the monitoring images captured by the portrait monitoring unit and transmit the monitoring images back to the mirror system;
[0176] Use the pre-built face recognition model to identify whether the surveillance image includes a human portrait. If the surveillance image includes a human portrait, determine whether the human portrait is facing the mirror.
[0177] If the portrait is not facing the mirror, the sensor in the sensor area is not activated, and the process returns to the step of obtaining the monitoring image captured by the portrait monitoring unit;
[0178] If the person is facing the mirror, start the distance sensors in the sensor area and the monitoring area to obtain the distance between the user and the mirror, obtain the person-mirror distance value, and calculate the space proportion of the user in the area directly in front of the mirror based on the person-mirror distance value;
[0179] Determine the light units to be turned on in the light device according to the space proportion value; and
[0180] Start the light sensor in the sensor area to obtain the light value of the area directly in front, and calculate the light intensity of the light unit to be illuminated based on the light value;
[0181] The waiting light unit is activated based on the bright light intensity to complete the fill light operation of the mirror system for the user.
[0182] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0183] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0184] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0185] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A facial fill light method based on multi-sensor integration, characterized in that: The method comprises: Start the mirror system, wherein the mirror system includes a bright light device and a mirror. The bright light device is located behind the mirror and consists of a plurality of bright light units, and the bright light units are evenly distributed behind the mirror. The mirror is divided into a human-mirror interaction area, a sensor area, and a monitoring area. The human-mirror interaction area is located in the center of the mirror. The monitoring area is located directly above the mirror and includes a portrait monitoring unit and a distance sensor. The sensor area is located on the left and right of the mirror and consists of a distance sensor and a light sensor. Obtain the monitoring images captured by the portrait monitoring unit and transmit the monitoring images back to the mirror system; Use the pre-built face recognition model to identify whether the surveillance image includes a human portrait. If the surveillance image includes a human portrait, determine whether the human portrait is facing the mirror. If the portrait is not facing the mirror, the sensor in the sensor area is not activated, and the process returns to the step of obtaining the monitoring image captured by the portrait monitoring unit; If the human portrait is facing the mirror, the distance sensors in the sensor area and the monitoring area are activated to obtain the position of the user from the mirror, and the person-mirror distance value is obtained. Based on the person-mirror distance value, the following method is used to calculate the space proportion value of the user in the area directly in front of the mirror: the projection area of the user projected onto the person-mirror interaction area is calculated according to the person-mirror distance value; the occupied volume of the user in the area directly in front of the mirror is calculated according to the projection area; the ratio of the occupied volume to the area directly in front is calculated to obtain the space proportion value of the user; Determine the light units to be turned on in the light device according to the space proportion value; and Start the light sensor in the sensor area to obtain the light value of the area directly in front, and calculate the light intensity of the light unit to be illuminated based on the light value; The waiting light unit is activated based on the bright light intensity to complete the fill light operation of the mirror system for the user.
2. The facial lighting method based on multi-sensor integration as claimed in claim 1, characterized in that: The method further includes: setting the number of the bright light units, including: Get the area of the human-mirror interaction zone in the mirror surface; The number of bright light units is calculated according to the following formula: Where N is the number of bright light units in the mirror system, S u represents the area of the human-mirror interaction zone, u represents the human-mirror interaction zone, S l represents the lighting coverage area of each bright light unit l at rated power, [] represents the rounding operation, and α represents the weight factor for calculating the number of bright light units based on the human-mirror interaction area.
3. The facial lighting method based on multi-sensor integration as claimed in claim 1, characterized in that: The distance sensors in the start sensor area and the monitoring area obtain the position of the user from the mirror surface to obtain the person-mirror distance value, including: A three-dimensional coordinate system is constructed with the mirror surface and the area directly in front of the mirror surface, wherein the portrait monitoring unit is the starting point of the three-dimensional coordinate system, the plane where the mirror surface is located represents the plane formed by the X-axis and the Y-axis, and the area directly in front of the mirror surface is located in the plane where the Z-axis is located; In the three-dimensional coordinate system, calculating the position information of the user in the front area in the monitoring screen; Calculate the beam angle of each distance sensor when emitting a light beam using the position information; Activate all distance sensors in the monitoring area and the sensor area, and emit light beams to capture users based on the light beam angle corresponding to each distance sensor; Receive the reflected light from the distance sensor, and calculate the user's distance from the mirror based on the reflected light to obtain the human-mirror distance value.
4. The facial lighting method based on multi-sensor integration as claimed in claim 3, characterized in that: The structure of the human-mirror distance value is: D=[d1,d2,...,d i ,...,d n ] d i =(x i ,y i ,z i ) Where D represents the distance between the person and the lens, d i represents the state information calculated by the i-th distance sensor measuring the user, where x i Indicates the user's X-axis value in the three-dimensional coordinate system, y i Indicates the Y-axis value of the user in the three-dimensional coordinate system, z i Indicates the Z-axis value of the user in the 3D coordinate system.
5. The facial lighting method based on multi-sensor integration as claimed in claim 4, characterized in that: The step of calculating the projection area of the user projected onto the human-mirror interaction area according to the human-mirror distance value includes: Obtain all X-axis values and Y-axis values in the human-lens distance value, fit a humanoid posture function according to all X-axis values and Y-axis values, and simultaneously determine the minimum X-axis value and the maximum X-axis value from all X-axis values; The projected area is calculated using the following formula: Among them, S t represents the projection area of the user projected onto the human-mirror interaction area, Y(x) represents the humanoid posture function, x min is the minimum X-axis value, x max is the maximum X-axis value.
6. The facial lighting method based on multi-sensor integration as claimed in claim 2, characterized in that: The mirror system is located between the first wall and the second wall, and the first wall and the second wall are in a parallel and opposite state. Below the mirror system is a washbasin, and the mirror system is used as an observation surface. The parallel and opposite space formed by the first wall, the second wall and the third wall is the area directly in front of the mirror.
7. The facial lighting method based on multi-sensor integration as claimed in claim 6, characterized in that: The step of calculating the occupied volume of the area directly in front of the mirror by the user according to the projection area includes: The average Z-axis value is calculated based on all Z-axis values in the human-lens distance value; The volume occupied by the user in front of the mirror is calculated according to the following formula: Among them, V t represents the occupied volume of the area directly in front of the mirror by the user, H represents the length of the first wall or the second wall, Indicates the average Z-axis value.
8. The facial lighting method based on multi-sensor integration as claimed in claim 7, characterized in that: The step of determining the light units to be turned on in the light device according to the space proportion value includes: Calculate the projection area projected by the user to the human-mirror interaction area; Calculate the bright light area in the bright light device that needs to turn on the bright light based on the projection area; Calculate the number of bright light units that need to be turned on according to the space ratio; Determine the relationship between the number of bright light units included in the bright light area and the calculated number of bright light units; If the number of bright light units included in the bright light area is greater than the calculated number of bright light units, all bright light units in the bright light area are confirmed as waiting bright light units; If the number of bright light units included in the bright light area is less than or equal to the calculated number of bright light units, bright light units continue to be selected from the adjacent areas of the bright light area until the number of bright light units included in the bright light area and the selected ones are equal to the calculated number of bright light units, and all the bright light units in the bright light area and the bright light units in the adjacent areas are confirmed as bright light units to be selected.
9. The facial lighting method based on multi-sensor integration as claimed in claim 8, characterized in that: The step of calculating the number of bright light units that need to be turned on according to the space ratio value includes: The number of bright light units that need to be turned on is calculated according to the following formula: Among them, N t It indicates that the number of bright light units that need to be turned on is calculated according to the space ratio value. N is the number of bright light units in the mirror system, and P t Represents the space proportion value, β is the weight factor for calculating the number of bright light units that need to be turned on, [] represents the rounding operation, and e represents a natural constant.
Citation Information
Patent Citations
Dynamic light supplementing device and method for face recognition
CN110620879A
Automatic light adjusting device and method for cosmetic mirror
CN110769568A