CN114979499B - Light adjusting method and device - Google Patents

Light adjusting method and device Download PDF

Info

Publication number
CN114979499B
CN114979499B CN202110196645.7A CN202110196645A CN114979499B CN 114979499 B CN114979499 B CN 114979499B CN 202110196645 A CN202110196645 A CN 202110196645A CN 114979499 B CN114979499 B CN 114979499B
Authority
CN
China
Prior art keywords
light
pwm signal
brightness
parameter
wavelength
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110196645.7A
Other languages
Chinese (zh)
Other versions
CN114979499A (en
Inventor
周一丹
王耀园
胡宏伟
饶刚
卢曰万
郜文美
丁欣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202110196645.7A priority Critical patent/CN114979499B/en
Priority to PCT/CN2021/136367 priority patent/WO2022174653A1/en
Publication of CN114979499A publication Critical patent/CN114979499A/en
Application granted granted Critical
Publication of CN114979499B publication Critical patent/CN114979499B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/74Circuitry for compensating brightness variation in the scene by influencing the scene brightness using illuminating means
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/56Cameras or camera modules comprising electronic image sensors; Control thereof provided with illuminating means
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Abstract

The application provides a light adjusting method and device. According to the method, in the running process of the electronic equipment, the control parameters of the control signals of the light supplementing lamps which are suitable for shooting images under the current condition and cannot be perceived by a user to change the brightness of the light are determined based on the parameters of the light emitted by the light supplementing lamps and the parameters of the environmental light, and the light supplementing lamps are controlled based on the control parameters, so that shooting work can be completed under the condition that the user cannot perceive the change of the brightness of the light, and the shot images are optimal.

Description

Light adjusting method and device
Technical Field
The application relates to the technical field of terminals, in particular to a light adjusting method and device.
Background
With the development of society, more and more people begin to pay attention to scientific skin measurement, scientific skin care and recording and tracking of skin health conditions by using photographing skin measurement application software. The mirror is an essential important device in the skin care and make-up process, and the concept of an intelligent mirror with a skin measurement function is generated. In the process that the user uses the intelligent mirror, the intelligent mirror can shoot the facial image of the user through the camera, then the facial skin of the user is analyzed by combining an image recognition algorithm, and a skin measurement analysis report is output.
At present, in the process of using the intelligent mirror, a user can adjust the light brightness on the intelligent mirror according to the self demand. However, as the difference of the imaging effect of the camera under different light brightness is larger, the difference of the skin measurement result output by the intelligent mirror under different light brightness is larger, and the skin measurement accuracy of the intelligent mirror is lower.
Disclosure of Invention
The embodiment of the application provides a lamplight adjusting method and device, which can complete shooting work under the condition that a user cannot perceive the change of lamplight brightness, and the shot image is optimal.
In a first aspect, an embodiment of the present application provides a light adjustment method, which is applied to an electronic device including a camera and a light supplement lamp, where the light supplement lamp is controlled by a pulse width modulation PWM signal; the method comprises the following steps: determining a first brightness level of the light supplementing lamp set by a user and a first wavelength of light emitted by the light supplementing lamp under the first brightness level; determining a first illumination intensity of ambient light of an environment in which the electronic device is located; determining a target parameter of a PWM signal according to a first brightness level, a first wavelength and a first illumination intensity, wherein the target parameter comprises a target duty ratio and a target pulse amplitude, the light brightness provided by the light supplement lamp under the target parameter is matched with the light brightness of the light supplement lamp required by the camera for shooting an image under the current condition, the brightness of the light supplement lamp perceived by a user under the target parameter is the same as the brightness of the light supplement lamp perceived by the user under the current condition, the current condition is that the brightness of the light supplement lamp is the first brightness level, the light wavelength emitted by the light supplement lamp is the first wavelength, and the light intensity of ambient light is the first illumination intensity; and adjusting a first parameter of the PWM signal under the current condition to a target parameter, wherein the first parameter comprises a first duty ratio and a first pulse amplitude.
Therefore, in the running process of the electronic equipment, based on the parameters (namely the brightness level and the wavelength) of the light emitted by the light supplementing lamp and the parameters (namely the illumination intensity) of the ambient light, the control parameters of the control signals of the light supplementing lamp which are suitable for shooting images under the current condition and cannot be perceived by a user to change the brightness of the light are determined, and the light supplementing lamp is controlled based on the control parameters, so that shooting work can be completed under the condition that the user cannot perceive the change of the brightness of the light, and the shot images are optimal.
For example, when the electronic device has a skin detection function, the method may be implemented after the skin detection function on the electronic device is turned on.
In one possible implementation, after adjusting the first parameter of the PWM signal under the current condition to the target parameter, the method further includes: and determining the PWM signal to be a high-level signal, and controlling the camera to shoot an image. Thereby, the camera is made to complete photographing at the optimal brightness.
In one possible implementation, the duration of the high level signal is greater than or equal to the exposure time of the camera. Thereby, so that the camera can have sufficient time to complete photographing.
In one possible implementation manner, after controlling the camera to capture an image, the method further includes: the target parameter is adjusted to the first parameter.
In one possible implementation, the deviation value between the target calculated value of the pulse time integral corresponding to the target parameter and the first calculated value of the pulse time integral corresponding to the first parameter is within a preset range.
In one possible implementation, determining the target parameter of the PWM signal according to the first brightness level, the first wavelength and the first illumination intensity specifically includes: and according to the first brightness level, the first wavelength and the first illumination intensity, inquiring a pre-constructed PWM signal parameter corresponding table to obtain target parameters, wherein the PWM signal corresponding table comprises a mapping relation among the first brightness level, the first wavelength, the first illumination intensity and the target parameters.
In one possible implementation, determining the target parameter of the PWM signal according to the first brightness level, the first wavelength and the first illumination intensity specifically includes: and inputting the first brightness level, the first wavelength and the first illumination intensity into a signal parameter determination model to obtain target parameters.
In one possible implementation manner, the electronic device has a skin detection function, where the skin detection function is used for detecting skin of a user based on an image captured by a camera, and the method further includes: determining that the distance between the user and the electronic equipment is smaller than a preset distance threshold; starting a camera to shoot a first image; the first image is determined to contain a face, no shielding object is arranged on the face, and a skin detection function on the electronic equipment is started. Thus realizing the opening of the skin detection function.
In one possible implementation, the electronic device is a smart mirror, the smart mirror having a mirror surface.
In a second aspect, an embodiment of the present application provides a light adjusting device, including:
at least one memory for storing a program;
at least one processor for invoking a program stored in a memory to perform the method provided in the first aspect.
In a third aspect, embodiments of the present application provide a light adjustment device running computer program instructions to perform a method as provided in the first aspect. The apparatus may be, for example, a chip, or a processor. In one example, the apparatus may include a processor, which may be coupled to a memory, read instructions in the memory and perform the method as provided in the first aspect in accordance with the instructions. The memory may be integrated into the chip or the processor, or may be separate from the chip or the processor.
In a fourth aspect, embodiments of the present application provide a computer storage medium having instructions stored therein which, when executed on a computer, cause the computer to perform the method provided in the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method provided in the first aspect.
In a sixth aspect, an embodiment of the present application provides a chip including at least one processor and an interface;
at least one processor obtains program instructions or data through an interface;
at least one processor is configured to execute program line instructions to implement the method provided in the first aspect.
Drawings
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
fig. 2 is a schematic hardware structure of an electronic device according to an embodiment of the present application;
FIG. 3a is a schematic diagram of a PWM signal according to an embodiment of the present application;
FIG. 3b is a schematic diagram of a PWM signal according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a PWM signal according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a light adjustment process according to an embodiment of the present application;
FIG. 6 is a schematic flow chart of a light adjustment according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a chip according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present application. As shown in fig. 1, the user a can perform skin detection using an electronic device having a skin detection function. Taking the electronic device as the smart mirror 11 as an example, the user a can use the smart mirror 11 to sort his own home and bundle. In the process of using the smart mirror 11, the user a can adjust the brightness of the light on the smart mirror 11 to achieve the light compensation brightness desired by the user. For example, when the brightness of the ambient light in the environment where the smart mirror 11 is located is low, the user a may adjust the brightness of the light on the smart mirror 11; when the brightness of the ambient light in the environment where the smart mirror 11 is located is high, the user a can turn down the brightness of the lamp light on the smart mirror 11. Because its camera imaging effect difference of smart mirror 11 under different light luminance is great, in order to reduce its camera imaging effect difference under different light luminance, in this scheme, at user A's in-process that uses smart mirror 11, can be according to the light luminance on the smart mirror 11 that user A adjusted, confirm the required best illumination intensity of camera shooting in the smart mirror 11 under the current environment, and adjust the luminance of light in the smart mirror 11 when shooing under the prerequisite that the user experienced the light luminance variation, thereby reduce the difference of its camera imaging effect of smart mirror 11 under the different light luminance that the user adjusted, promote the skin measurement accuracy of smart mirror 11. In other words, in the scheme, the user can randomly adjust the brightness of the light on the intelligent mirror in the process of using the intelligent mirror, but the light in the intelligent mirror is presented with the optimal brightness when the intelligent mirror shoots the facial image of the user, so that the camera in the intelligent mirror is free from the interference of the brightness of the light, and further the imaging effect difference change of the camera in the intelligent mirror under different brightness of the light is small, and the skin measurement accuracy of the intelligent mirror is improved.
It can be appreciated that in the scheme, the electronic device can be an intelligent mirror, and also can be electronic devices with skin detection functions such as a mobile phone, a tablet personal computer and the like. In one example, the electronic device having a skin detection function may be understood that the electronic device may detect skin of a user based on an image captured by a camera or other image capturing device.
Next, a hardware structure of the electronic device according to the present embodiment will be described.
Referring to fig. 2, fig. 2 is a schematic hardware structure of an electronic device according to an embodiment of the application. As shown in fig. 2, the electronic device 200 may include: processor 201, memory 202, camera 203, light supplement lamp 204, etc.
Wherein the processor 201 may support the electronic device 200 to implement the methods provided in the present solution. The processor 201 may be a general purpose processor, a special purpose processor or a neural network processor (Neural Network Processing Unit, NPU). For example, the processor 201 may include a central processing unit (central processing unit, CPU) and/or a baseband processor. The baseband processor may be used to process communication data, and the CPU may be used to implement corresponding control and processing functions, execute software programs, and process data of the software programs. For example, the processor 201 may determine parameters of a pulse width modulation (pulse width modulation, PWM) signal, such as a duty cycle, a pulse amplitude, etc., corresponding to the light supplementing lamp 204 according to a brightness level of the light supplementing lamp 204 set by a user, a wavelength of the light at the brightness level, and an illumination intensity of the ambient light in the current environment. The processor 201 may adjust the parameters of the PWM signal corresponding to the light compensating lamp 204, or may control the camera 203 to capture an image.
The memory 202 may have stored thereon a program (which may also be instructions or code) that is executable by the processor 201 to cause the processor 201 to perform the methods described in this scheme. Optionally, the memory 202 may also have data stored therein. Alternatively, the processor 201 may also read data stored in the memory 202, which may be stored at the same memory address as the program, or which may be stored at a different memory address from the program. For example, the memory 202 may store a pre-constructed PWM signal parameter mapping table, where the PWM signal mapping table includes the first brightness level, the first wavelength, the first illumination intensity, and the target parameter. In addition, the memory 202 may also store a calculation model for calculating parameters of the PWM signal, and the parameters of the pulse width modulation (pulse width modulation, PWM) signal corresponding to the light-compensating lamp 204 may be obtained by inputting the brightness level of the light at the brightness level set by the user and the illumination intensity of the ambient light in the current environment into the calculation model.
In one example, processor 201 and memory 202 may be provided separately or may be integrated together, for example, on a single board or System On Chip (SOC).
The camera 203 can take an image. For example, taking a facial image of the user, etc.
The light supplement lamp 204 is a light source of the electronic device 200, and can provide lights with different brightness levels for users based on the needs of the users. The light supplement lamp 204 may be a light emitting diode (light emitting diode, LED), for example. In one example, the control signal for the light supplement lamp 204 may be a pulse width modulated PWM signal. In one example, when the electronic device 200 is a smart mirror, the light replenishment lamps 204 may be annularly arranged around the mirror surface of the smart mirror.
Optionally, a distance sensor, an ambient light sensor, etc. may also be included in the electronic device 200. Wherein a distance sensor may be used to measure the distance between the electronic device 200 and the user. The electronic device 200 may measure the distance by infrared or laser. An ambient light sensor may be used to sense the illumination intensity of ambient light.
Optionally, the electronic device 200 may have a mirror therein for user grooming and binding.
It should be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 200. In other embodiments of the application, electronic device 200 may include more or fewer components than shown, or certain components may be combined, or certain components may be separated, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
A detailed description of the operations performed by the electronic device 200 in the above-described various possible designs may refer to a description in an embodiment of the method provided in the following text schemes, and will not be repeated here.
Next, based on the application scenario shown in fig. 1 and the hardware structure of the electronic device shown in fig. 2, the electronic device is taken as an example of a smart mirror, and the light adjustment process in this scheme is described in detail. It should be understood that the smart mirror may be replaced by other electronic devices having skin detection functions.
(1) Pre-constructing PWM signal parameter corresponding table
Generally, when the smart mirror detects skin, the illumination intensity of an image when the camera photographs is related to the light source of the smart mirror and the ambient light. In one example, the illumination intensity may be understood as a light intensity.
In this scheme, can carry out the off-line experiment, carry out the light filling to the smart mirror under common house environment to obtain user's skin image. Then, an analysis experiment is performed on the obtained skin image. Experiments show that if the light intensity of the ambient light is L evn The light supplementing intensity of the intelligent mirror is L LED The skin image corresponding light intensity best suited for skin measurement analysis is known to be L p The relationship between them can be expressed as: l (L) p =f(L evn ,L LED ) Namely, the three have a mapping relation. The light intensity of the intelligent mirror can be understood as the intensity of the light emitted by the light compensating lamp on the intelligent mirror.
Further, the light supplementing intensity of the intelligent mirror corresponding to the labeling light intensity suitable for photographing under the respective ambient light can be obtained according to experiments. For example, if the labeling light intensity is a and the ambient light is b, then the light supplementing light intensity of the smart mirror c=a-b.
After the light supplementing intensity of the intelligent mirror corresponding to the marking light intensity suitable for photographing is determined, the pulse current under the corresponding light supplementing intensity can be determined based on the corresponding relation between the light supplementing intensity and the pulse current. For example, the correspondence between the light intensity of the light supplement and the pulse current may be: i pi =f(L ei ),I pi Is pulse current, L ei Is the light intensity of the light supplement. In one example, since the current corresponds to the voltage, determining the pulse current under the corresponding light intensity of the light supplement may also be understood as determining the pulse voltage under the corresponding light intensity of the light supplement, i.e. determining the pulse amplitude of the PWM signal corresponding to the light supplement.
Further, the value of the luminance time integral (i.e., luminous flux) of the lamp perceived by the human eye is correlated with the value of the pulse time integral of the PWM signal corresponding to the light supplement lamp. The pulse time integral value of the PWM signal corresponding to the light filling lamp may be: dxI max +(1-D)xI min D is the duty cycle of PWM signal, I max For maximum pulse current, I min Is the minimum pulse current. For example, as shown in fig. 3a, the value of the pulse time integral of the PWM signal corresponding to the light filling lamp can be understood as the area of the hatched portion in fig. 3 a.
In order to make the user not perceive the change of the light brightness of the light compensating lamp on the intelligent mirror, when the determined pulse amplitude of the PWM signal corresponding to the light compensating lamp is different from the pulse amplitude of the PWM signal corresponding to the light compensating lamp under the light brightness regulated by the user, the duty ratio of the PWM signal corresponding to the light compensating lamp can be regulated, so that the pulse time integral values of the PWM signals corresponding to the light compensating lamp before and after regulation are equal, and the user cannot perceive the change of the light brightness of the light compensating lamp on the intelligent mirror. As shown in fig. 3a and 3b, where fig. 3b is a parameter of the PWM signal before adjustment, fig. 3a is a parameter of the PWM signal after adjustment, and when the area of the shaded portion in fig. 3a is equal to the area of the shaded portion in fig. 3b, the user cannot perceive the change of the light brightness of the light compensating lamp on the smart mirror.
The relation between the value of the luminance time integral (i.e. luminous flux) of the lamplight perceived by human eyes and the value of the pulse time integral of the PWM signal corresponding to the light supplementing lamp can be experimentally measured as follows:
wherein L is eye Time integral value of brightness of light perceived by human eyes, [ D x I ] max +(1-D)*I min ]And V (lambda) is the relative visual acuity of the light supplementing lamp at different wavelengths, which is the value of pulse time integral of the PWM signal corresponding to the light supplementing lamp.
The relationship between the value of the luminance time integral (i.e., luminous flux) of the light perceived by the human eye and the value of the pulse time integral of the PWM signal corresponding to the light supplement lamp shows that, when the wavelength of the light emitted from the light supplement lamp changes, the value of the luminance time integral (i.e., luminous flux) of the light perceived by the human eye also changes. Therefore, in order to ensure that the user cannot perceive the change of the brightness of the light compensating lamp on the smart mirror, the wavelength of the light emitted by the light compensating lamp needs to be used as a reference factor.
In this scheme, the duty cycle of the PWM signal corresponding to each wavelength under each brightness level of the light supplement lamp under each ambient light can be calculated through experiments.
After the pulse amplitude and the duty ratio of the PWM signal corresponding to the light supplementing lamp are obtained, a PWM signal parameter corresponding table can be constructed. Exemplary, as shown in Table one, the brightness level of the light supplement lamp is 1, and the wavelength of the light emitted by the light supplement lamp is a 1 The illumination intensity of the ambient light is b 1 At the time, the duty ratio of the PWM signal is d 1 Pulse amplitude I 1 The method comprises the steps of carrying out a first treatment on the surface of the The brightness level of the light supplementing lamp is 2, and the wavelength of the light emitted by the light supplementing lamp is a 3 The illumination intensity of the ambient light is b 1 At the time, the duty ratio of the PWM signal is d 3 Pulse amplitude I 3
List one
In one example, after obtaining each parameter in the PWM signal parameter mapping table, the determined each parameter may also be trained using a gaussian process model, a neural network model, a support vector machine, and the like, to obtain a corresponding calculation model. In this way, parameters in the current environment are input into the calculation model subsequently, and the duty ratio and the pulse amplitude of the corresponding PWM signal can be determined.
(2) Starting skin detection function
In the scheme, when the intelligent mirror detects that the distance between the intelligent mirror and a user is smaller than a preset distance threshold value, the intelligent mirror can start a camera on the intelligent mirror to shoot an image of the user. Then, the intelligent mirror can analyze the user image shot by the camera, and can start the skin detection function when the user image contains the face of the user and no shielding object is arranged on the face of the user.
(3) Determining an optimal illumination intensity required for a camera in a smart mirror to capture an image
After the intelligent mirror starts the skin detection function, the intelligent mirror can adjust the operation based on the light of the user, and the brightness level of the light supplement lamp on the intelligent mirror set by the user and the wavelength of the light emitted by the light supplement lamp under the brightness level are determined. For example, the smart mirror may have a 5-gear brightness adjustment gear, and when the user sets the brightness adjustment gear to 2-gear, the smart mirror may determine the brightness level corresponding to 2-gear based on the preset relationship between the brightness adjustment gear and the brightness level.
For the wavelength of the light that the light filling lamp sent, the intelligent mirror can be based on the colour temperature of the light that the light filling lamp sent confirms. For example, if the light supplementing lamp does not have the color temperature adjusting function, the color temperature corresponding to the corresponding brightness level can be determined based on the preset corresponding relation between the brightness level and the color temperature; then, based on the relation between the preset color temperature and the wavelength, the wavelength corresponding to the corresponding color temperature is determined. If the light supplementing lamp has a color temperature adjusting function, the color temperature set by a user can be determined based on the color temperature adjusting operation of the user; then, based on the relation between the preset color temperature and the wavelength, the wavelength corresponding to the corresponding color temperature is determined. In addition, the intelligent mirror can sense the color temperature of the light emitted by the current light supplementing lamp based on the color temperature sensor on the intelligent mirror; then, based on the relation between the preset color temperature and the wavelength, the wavelength corresponding to the corresponding color temperature is determined.
For the illumination intensity of the ambient light, the smart mirror may sense the illumination intensity of the ambient light of the environment in which it is located based on the ambient light sensor thereon.
Further, after determining the brightness level of the light supplement lamp on the intelligent mirror set by the user, the wavelength of the light emitted by the light supplement lamp under the brightness level and the illumination intensity of the ambient light of the environment where the intelligent mirror is located, the pre-built PWM signal parameter mapping table can be queried to determine the duty ratio and the pulse amplitude of the PWM signal currently required. The duty ratio and the pulse amplitude of the PWM signal required at present are the duty ratio and the pulse amplitude of the PWM signal when the camera shooting image on the intelligent mirror reaches the most suitable skin detection image in the skin detection process, and the illumination intensity of the light supplementing lamp under the duty ratio and the pulse amplitude of the PWM signal is the optimal illumination intensity required by the camera shooting image in the intelligent mirror.
In one example, the determined brightness level of the light supplement lamp on the smart mirror set by the user, the wavelength of the light emitted by the light supplement lamp under the brightness level, and the illumination intensity of the ambient light of the environment where the smart mirror is located may be input into a pre-constructed calculation model to obtain the duty cycle and the pulse amplitude of the PWM signal that are currently required.
(4) Light adjustment
After the duty cycle and the pulse amplitude of the current required PWM signal are determined, the duty cycle and the pulse amplitude corresponding to the PWM signal can be adjusted, so that the duty cycle and the pulse amplitude corresponding to the PWM signal can be adjusted to the determined duty cycle and the pulse amplitude of the current required PWM signal. Thus, the light adjustment is completed once. It is understood that the brightness of the light-compensating lamp perceived by the user before adjusting the parameters of the PWM signal is the same as the brightness of the light-compensating lamp perceived by the user after adjusting the parameters of the PWM signal.
Then, in order to secure an image capturing effect, the camera may be controlled to capture an image when the PWM signal is a high level signal. In this scheme, the duration of the high level signal may be greater than or equal to the exposure time of the camera, so that the camera can smoothly complete shooting. For example, as shown in fig. 4, the camera 41 may be controlled to complete photographing for a high level signal duration.
In this scheme, after the camera is shot and is accomplished, can resume the PWM signal that the light filling lamp corresponds to the state before the adjustment, accomplish light regulation in addition so far. Exemplary, if the duty cycle of the PWM signal before adjustment is D 1 Pulse amplitude I 1 The duty ratio of the adjusted PWM signal is D 2 Pulse amplitude I 2 The duty ratio of the PWM signal can be set by D after the shooting of the camera is completed 2 Adjust to D 1 Pulse amplitude is defined by I 2 Adjust to I 1
For ease of understanding, the overall process is briefly described below. Referring to fig. 5, as shown in fig. 5, after triggering the sensorless skin function on the electronic device (such as a smart mirror, etc.), the brightness level, the light wavelength, and the illumination intensity of the ambient light of the light source (i.e., the light supplement lamp herein) regulated and controlled by the user at this time can be obtained. Then, based on the brightness level, the light wavelength and the illumination intensity of the ambient light of the light source regulated and controlled by the user, inquiring the duty ratio D of the light supplementing lamp required in corresponding photographing 1 Sum pulse amplitude I 1 The method comprises the steps of carrying out a first treatment on the surface of the And the duty ratio D of the light filling lamp initially controlled by the user 0 Adjusted to duty ratio D 1 Pulse amplitude I of the light filling lamp initially controlled by a user 0 Adjusted to pulse amplitude I 1 . Finally, after photographing is completed, the duty ratio D of the adjusted light supplementing lamp 1 Back to duty cycle D 0 Pulse amplitude I 1 Back to pulse amplitude I 0 . It should be understood that details of this procedure may be found in the above description and will not be described in detail hereAnd (5) repeating the description.
In one example, in this solution, the sensorless skin function may refer to a function of detecting skin of a user and outputting a skin measurement report when the user cannot feel the skin. By taking an electronic device as an intelligent mirror as an example, on the premise that a light supplementing lamp of the intelligent mirror is lighted, a camera on the intelligent mirror detects that a human face exists, the position of the human face is within a proper range from the intelligent mirror, and the intelligent mirror can call a skin sensing-free algorithm in a background to asynchronously output a skin sensing report.
The above is an introduction to the light adjusting process in the present solution. Next, a light adjusting method provided by the embodiment of the present application is described based on the light adjusting process described above. It will be appreciated that this approach is another expression of the light modulation process described above, both in combination. The method is based on the light adjustment procedure described above, and some or all of the method may be found in the description of the light adjustment procedure above.
It is understood that the method may be performed by any apparatus, device, platform, cluster of devices having computing, processing capabilities. Wherein the method, when performed by a separate device, may have a camera and a light supplement lamp thereon; when the method is executed by the device cluster, some devices in the device cluster can be provided with cameras, some devices are provided with light supplementing lamps, and the same device can be provided with the cameras and the light supplementing lamps. The light supplementing lamp can be controlled by a Pulse Width Modulation (PWM) signal.
Referring to fig. 6, fig. 6 is a schematic flow chart of a light adjusting method according to an embodiment of the application. As shown in fig. 6, the light adjusting method includes:
step S101, determining a first brightness level of the light supplement lamp set by a user and a first wavelength of light emitted by the light supplement lamp under the first brightness level.
Step S102, determining a first illumination intensity of ambient light of an environment where the electronic device is located.
Step S103, determining target parameters of the PWM signal according to the first brightness level, the first wavelength and the first illumination intensity.
In this scenario, the target parameters may include a target duty cycle and a target pulse amplitude. The brightness of the light provided by the light supplementing lamp under the target parameter is matched with the light brightness of the light supplementing lamp required by the camera for shooting the image under the current condition, the brightness of the light supplementing lamp perceived by the user under the target parameter is the same as the brightness of the light supplementing lamp perceived by the user under the current condition, the current condition is that the brightness of the light supplementing lamp is a first brightness level, the light wavelength emitted by the light supplementing lamp is a first wavelength, and the light intensity of the ambient light is a first illumination intensity.
As a possible implementation manner, a pre-constructed PWM signal parameter mapping table may be queried according to the first brightness level, the first wavelength and the first illumination intensity to obtain the target parameter, where the PWM signal mapping table includes a mapping relationship between the first brightness level, the first wavelength, the first illumination intensity and the target parameter. Illustratively, the pre-constructed PWM signal parameter correspondence table may be table one described above.
As another possible implementation, the first brightness level, the first wavelength and the first illumination intensity may be input to a signal parameter determination model, resulting in the target parameter. The signal parameter determination model may be, for example, a pre-constructed calculation model as described above.
In one example, the deviation value between the target calculated value of the pulse time integral corresponding to the target parameter and the first calculated value of the pulse time integral corresponding to the first parameter is within a preset range. Illustratively, the target calculated value may be the area of the hatched portion in fig. 3a, and the first calculated value may be the area of the hatched portion in fig. 3 b.
After determining the target parameter, step S104 may be performed.
Step S104, the first parameter of the PWM signal under the current condition is adjusted to the target parameter.
In this scenario, the first parameter may include a first duty cycle and a first pulse amplitude. After the target parameter is determined, the PWM signal can be adjusted, and then the first parameter of the PWM signal under the current condition is adjusted to the target parameter.
Further, as shown in fig. 4, after the PWM signal is adjusted, the camera may be controlled to capture an image when it is determined that the PWM signal is a high level signal. In this solution, the duration of the high level signal may be greater than or equal to the exposure time of the camera, so that the camera may have sufficient time to complete the shooting.
Further, after the camera is controlled to capture an image, the target parameter may be adjusted to the first parameter, and the PWM signal corresponding to the light-compensating lamp may be restored to the state before adjustment.
Therefore, in the running process of the electronic equipment, based on the parameters (namely the brightness level and the wavelength) of the light emitted by the light supplementing lamp and the parameters (namely the illumination intensity) of the ambient light, the control parameters of the control signals of the light supplementing lamp which are suitable for shooting images under the current condition and cannot be perceived by a user to change the brightness of the light are determined, and the light supplementing lamp is controlled based on the control parameters, so that shooting work can be completed under the condition that the user cannot perceive the change of the brightness of the light, and the shot images are optimal.
In one example, the electronic device may have a skin detection function for detecting skin of a user based on an image captured by a camera. At this time, before determining the target parameter, it may also be determined whether to activate a skin detection function on the electronic device. For example, in this solution, it may be determined that the distance between the user and the electronic device is smaller than a preset distance threshold, for example, based on a distance detected by a distance sensor in the electronic device. Then, the camera is restarted to take the first image. Finally, the first image is analyzed, and when the first image is determined to contain a face and no shielding object is arranged on the face, the skin detection function on the electronic equipment can be started.
In one example, the electronic device may be a smart mirror, which may have a mirror surface.
It should be understood that the light adjustment method provided in the present embodiment may also be applied to a road monitoring photographing system, or other fields requiring photographing, which is not limited herein.
Based on the method in the above embodiment, the embodiment of the application further provides a light adjusting device. The light adjusting means may be an electronic device as shown in fig. 2 above. In one example, the light adjusting device may include: at least one program memory for storing a program, and at least one program processor for executing the memory storage. Wherein the processor implements the methods provided in the present solution when the program stored in the memory is executed. The memory in the light adjusting device may be, for example, the memory 202 in fig. 2, and the processor may be the processor 201 in fig. 2.
A detailed description of the operations performed by the light adjusting device in the above various possible designs may be provided in the embodiments with reference to the above text schemes, and will not be repeated here.
Based on the method in the above embodiment, the embodiment of the present application further provides a light adjusting device, which can execute the computer program instructions to perform the above-described method. The apparatus may be, for example, a chip, or a processor. In one example, the apparatus may include a processor that may be coupled to a memory, read instructions in the memory and perform the methods described above in accordance with the instructions. The memory may be integrated into the chip or the processor, or may be separate from the chip or the processor. The memory in the light adjusting device may be, for example, the memory 202 in fig. 2, and the processor may be the processor 201 in fig. 2.
Based on the method in the above embodiment, the embodiment of the present application further provides a chip. Referring to fig. 7, fig. 7 is a schematic structural diagram of a chip according to an embodiment of the application. As shown in fig. 7, chip 700 includes one or more processors 701 and interface circuitry 702. Optionally, chip 700 may also include a bus 703. Wherein:
the processor 701 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in the processor 701 or by instructions in the form of software. The processor 701 described above may be a general purpose processor, a neural network processor (Neural Network Processing Unit, NPU), a digital communicator (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The methods and steps disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. For example, the chip 700 may be applied to the electronic device shown in fig. 2, where the processor 701 may perform some or all of the steps in the various embodiments described above.
The interface circuit 702 may be used for transmitting or receiving data, instructions or information, the processor 701 may process using the data, instructions or other information received by the interface circuit 702, and the process completion information may be transmitted through the interface circuit 702. For example, when the chip 700 is applied to the electronic device shown in fig. 2, the interface circuit 702 may be used to output skin measurement results.
Optionally, chip 700 also includes memory, which may include read only memory and random access memory, and provides operating instructions and data to the processor. A portion of the memory may also include non-volatile random access memory (NVRAM). Wherein the memory may be coupled to the processor 701. For example, the memory may have a pre-built PWM signal parameter correspondence table stored therein.
Alternatively, the memory stores executable software modules or data structures and the processor 701 may perform corresponding operations by invoking operational instructions stored in the memory (which may be stored in an operating system).
Alternatively, the interface circuit 702 may be configured to output the execution result of the processor 701.
It should be noted that, the functions corresponding to the processor 701 and the interface circuit 702 may be implemented by a hardware design, a software design, or a combination of hardware and software, which is not limited herein.
It will be appreciated that the steps of the method embodiments described above may be performed by logic circuitry in the form of hardware in a processor or instructions in the form of software.
It is understood that in the description of embodiments of the application, words such as "exemplary," "such as" or "for example" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary," "such as" or "for example" is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary," "such as" or "for example," etc., is intended to present related concepts in a concrete fashion.
In the description of the embodiments of the present application, the term "and/or" is merely an association relationship describing an association object, and indicates that three relationships may exist, for example, a and/or B may indicate: a alone, B alone, and both A and B. In addition, unless otherwise indicated, the term "plurality" means two or more. For example, a plurality of systems means two or more systems, a plurality of terminals means two or more terminals, and a plurality of video streams means two or more video streams.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating an indicated technical feature. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
It is to be appreciated that the processor in embodiments of the application may be a central processing unit (central processing unit, CPU), other general purpose processor, digital signal processor (digital signal processor, DSP), application specific integrated circuit (application specific integrated circuit, ASIC), field programmable gate array (field programmable gate array, FPGA) or other programmable logic device, transistor logic device, hardware components, or any combination thereof. The general purpose processor may be a microprocessor, but in the alternative, it may be any conventional processor.
The method steps in the embodiments of the present application may be implemented by hardware, or may be implemented by executing software instructions by a processor. The software instructions may be comprised of corresponding software modules that may be stored in random access memory (random access memory, RAM), flash memory, read-only memory (ROM), programmable ROM (PROM), erasable programmable PROM (EPROM), electrically erasable programmable EPROM (EEPROM), registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted across a computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a Solid State Disk (SSD)), or the like.
It will be appreciated that the various numerical numbers referred to in the embodiments of the present application are merely for ease of description and are not intended to limit the scope of the embodiments of the present application.

Claims (12)

1. A light regulating method applied to an electronic device including a camera and a light supplementing lamp controlled by a pulse width modulation PWM signal, the method comprising:
determining a first brightness level of the light supplementing lamp set by a user and a first wavelength of light emitted by the light supplementing lamp under the first brightness level;
determining a first illumination intensity of ambient light of an environment in which the electronic device is located;
determining a target parameter of the PWM signal according to the first brightness level, wherein the target parameter comprises a target duty ratio and a target pulse amplitude, the light brightness provided by the light supplementing lamp under the target parameter is matched with the light brightness of the light supplementing lamp required by the camera for shooting an image under the current condition, the brightness of the light supplementing lamp perceived by the user under the target parameter is the same as the brightness of the light supplementing lamp perceived by the user under the current condition, the current condition is that the brightness of the light supplementing lamp is the first brightness level, the light wavelength emitted by the light supplementing lamp is the first wavelength, and the light intensity of the ambient light is the first light intensity;
and adjusting a first parameter of the PWM signal under the current condition to the target parameter, wherein the first parameter comprises a first duty ratio and a first pulse amplitude.
2. The method of claim 1, wherein after said adjusting the first parameter of the PWM signal under the current condition to the target parameter, further comprising:
and determining the PWM signal to be a high-level signal, and controlling the camera to shoot an image.
3. The method of claim 2, wherein a duration of the high level signal is greater than or equal to an exposure time of the camera.
4. A method according to claim 2 or 3, wherein after said controlling the camera to take an image, further comprising:
and adjusting the target parameter to the first parameter.
5. A method according to any one of claims 1-3, characterized in that the deviation value between the target calculated value of the pulse time integral corresponding to the target parameter and the first calculated value of the pulse time integral corresponding to the first parameter is within a preset range.
6. A method according to any one of claims 1-3, wherein said determining the target parameter of the PWM signal based on the first brightness level, the first wavelength and the first illumination intensity, comprises:
and inquiring a pre-constructed PWM signal parameter corresponding table according to the first brightness level, the first wavelength and the first illumination intensity to obtain the target parameter, wherein the PWM signal corresponding table comprises the mapping relation between the first brightness level, the first wavelength, the first illumination intensity and the target parameter.
7. A method according to any one of claims 1-3, wherein said determining the target parameter of the PWM signal based on the first brightness level, the first wavelength and the first illumination intensity, comprises:
and inputting the first brightness level, the first wavelength and the first illumination intensity into a signal parameter determination model to obtain the target parameter.
8. A method according to any one of claims 1-3, wherein the electronic device has a skin detection function for detecting skin of a user based on an image taken by the camera, the method further comprising:
determining that the distance between the user and the electronic equipment is smaller than a preset distance threshold;
starting the camera to shoot a first image;
and determining that the first image contains a human face, and that no shielding object exists on the human face, and starting a skin detection function on the electronic equipment.
9. A method according to any of claims 1-3, wherein the electronic device is a smart mirror, the smart mirror having a mirror surface.
10. A light adjustment device, comprising:
at least one memory for storing a program;
at least one processor for executing the memory-stored program, which processor is adapted to perform the method according to any of claims 1-9 when the memory-stored program is executed.
11. A computer storage medium having instructions stored therein which, when executed on a computer, cause the computer to perform the method of any of claims 1-9.
12. A chip comprising at least one processor and an interface;
the interface is used for providing program instructions for the at least one processor;
the at least one processor is configured to execute the program instructions to implement the method of any of claims 1-9.
CN202110196645.7A 2021-02-22 2021-02-22 Light adjusting method and device Active CN114979499B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110196645.7A CN114979499B (en) 2021-02-22 2021-02-22 Light adjusting method and device
PCT/CN2021/136367 WO2022174653A1 (en) 2021-02-22 2021-12-08 Light adjusting method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110196645.7A CN114979499B (en) 2021-02-22 2021-02-22 Light adjusting method and device

Publications (2)

Publication Number Publication Date
CN114979499A CN114979499A (en) 2022-08-30
CN114979499B true CN114979499B (en) 2023-08-22

Family

ID=82932219

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110196645.7A Active CN114979499B (en) 2021-02-22 2021-02-22 Light adjusting method and device

Country Status (2)

Country Link
CN (1) CN114979499B (en)
WO (1) WO2022174653A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116709614B (en) * 2023-08-02 2023-10-20 深圳爱图仕创新科技股份有限公司 Light control method, light control device, computer equipment and computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101750848A (en) * 2008-12-11 2010-06-23 鸿富锦精密工业(深圳)有限公司 Pick-up device and light filling method
CN110351490A (en) * 2018-04-04 2019-10-18 杭州海康威视数字技术股份有限公司 Exposure method, device and picture pick-up device
WO2020224619A1 (en) * 2019-05-08 2020-11-12 杭州海康威视数字技术股份有限公司 Camera

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI472222B (en) * 2008-09-19 2015-02-01 Altek Corp Image brightness compensation method and digital image pickup device with image brightness compensation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101750848A (en) * 2008-12-11 2010-06-23 鸿富锦精密工业(深圳)有限公司 Pick-up device and light filling method
CN110351490A (en) * 2018-04-04 2019-10-18 杭州海康威视数字技术股份有限公司 Exposure method, device and picture pick-up device
WO2020224619A1 (en) * 2019-05-08 2020-11-12 杭州海康威视数字技术股份有限公司 Camera

Also Published As

Publication number Publication date
WO2022174653A1 (en) 2022-08-25
CN114979499A (en) 2022-08-30

Similar Documents

Publication Publication Date Title
US10685215B2 (en) Method and apparatus for recognizing face
CN108337433B (en) Photographing method, mobile terminal and computer readable storage medium
WO2020010848A1 (en) Control method, microprocessor, computer readable storage medium, and computer apparatus
CN107277388A (en) Mobile terminal and its light compensation method
CN109376592B (en) Living body detection method, living body detection device, and computer-readable storage medium
WO2018161289A1 (en) Depth-based control method, depth-based control device and electronic device
KR20180138300A (en) Electronic device for providing property information of external light source for interest object
CN100361160C (en) Imager and personal identification system
TWI735858B (en) Method and apparatus of adpative infrared proejction control
US11687635B2 (en) Automatic exposure and gain control for face authentication
US20230092420A1 (en) Method and apparatus for gaze detection
CN114979499B (en) Light adjusting method and device
CN109327626A (en) Image-pickup method, device, electronic equipment and computer readable storage medium
US11252336B2 (en) Electronic device obtaining skin image and method of controlling the same
TWI572966B (en) System and method for photographing
CN106791451A (en) A kind of photographic method of intelligent terminal
KR20200137918A (en) An electronic device obtaining a skin image and control method thereof
US8090253B2 (en) Photographing control method and apparatus using strobe
CN105957020A (en) Image generator and image generation method
CN110677557A (en) Image processing method, image processing device, storage medium and electronic equipment
CN112258560B (en) Method and device for acquiring hyperspectral image of object
KR20200084383A (en) Method for utilizing genetic information and electronic device thereof
CN113422908B (en) Data processing method and device
EP3863275B1 (en) System and method for smart image-capturing
JP2021010652A (en) Information processing device, evaluation method, and information processing program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant