CN114979499A - Light adjusting method and device - Google Patents

Light adjusting method and device Download PDF

Info

Publication number
CN114979499A
CN114979499A CN202110196645.7A CN202110196645A CN114979499A CN 114979499 A CN114979499 A CN 114979499A CN 202110196645 A CN202110196645 A CN 202110196645A CN 114979499 A CN114979499 A CN 114979499A
Authority
CN
China
Prior art keywords
light
parameter
pwm signal
brightness
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.)
Granted
Application number
CN202110196645.7A
Other languages
Chinese (zh)
Other versions
CN114979499B (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

Images

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
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Circuit Arrangement For Electric Light Sources In General (AREA)

Abstract

The application provides a light adjusting method and device. According to the method, in the operation process of the electronic equipment, based on the parameters of the light emitted by the light supplement lamp and the parameters of the ambient light, the control parameters of the control signals of the light supplement lamp which are suitable for shooting images under the current condition and the light brightness of which is not changed can not be perceived by a user are determined, and the light supplement lamp is controlled based on the control parameters, so that the shooting work can be completed under the condition that the light brightness of which is not changed can not be perceived by the user, 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 are concerned about science and technology skin measurement, science skin care, and recording and tracking of skin health conditions by using photographing skin measurement application software. The mirror is used as an important necessary device in the links of skin care and makeup, and the concept of an intelligent mirror with the function of skin measurement is developed. In the process that the user uses the intelligent mirror, the intelligent mirror can shoot facial images of the user through the camera, then facial skin of the user is analyzed by combining an image recognition algorithm, and a skin measurement analysis report is output.
At present, when a user uses the intelligent mirror, the brightness of light on the intelligent mirror can be adjusted according to the requirement of the user. However, due to the fact that the difference of imaging effects of the cameras under different lighting brightness is large, the difference of skin measuring results output by the intelligent mirror under different lighting brightness is large, and skin measuring accuracy of the intelligent mirror is low.
Disclosure of Invention
The embodiment of the application provides a light adjusting method and device, which can finish shooting work under the condition that a user cannot perceive that the brightness of light changes, and the shot image is optimal.
In a first aspect, an embodiment of the present application provides a light adjusting method, which is applied to an electronic device including a camera and a fill-in light, where the fill-in light is controlled by a Pulse Width Modulation (PWM) signal; the method comprises the following steps: determining a first brightness level of a light supplement lamp set by a user and a first wavelength of light emitted by the light supplement 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 target parameters of the PWM signals according to the first brightness level, the first wavelength and the first illumination intensity, wherein the target parameters comprise a target duty ratio and a target pulse amplitude, the lamplight brightness of the light supplement lamp provided by the light supplement lamp under the target parameters is matched with the lamplight brightness of the light supplement lamp required by the camera for shooting images under the current condition, the brightness of the light supplement lamp perceived by a user under the target parameters 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 lamplight 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 operation process of the electronic equipment, based on the parameters (namely, the brightness level and the wavelength) of the light emitted by the light supplement lamp and the parameters (namely, the illumination intensity) of the ambient light, the control parameters of the control signals of the light supplement lamp which are suitable for shooting images under the current condition and cannot be used for the user to perceive the change of the light brightness are determined, and the light supplement lamp is controlled based on the control parameters, so that the shooting work can be completed under the condition that the user cannot perceive the change of the light brightness, 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 manner, 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 as a high-level signal, and controlling the camera to shoot the image. Thereby, the camera completes shooting 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, the camera can have sufficient time to complete the shooting.
In a possible implementation manner, after controlling the camera to capture the image, the method further includes: and adjusting the target parameter to the first parameter.
In one possible implementation manner, a deviation value between a target calculation value of the pulse time integral corresponding to the target parameter and a first calculation value of the pulse time integral corresponding to the first parameter is within a preset range.
In a possible implementation manner, determining a target parameter of the PWM signal according to the first brightness level, the first wavelength, and the first illumination intensity specifically includes: 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 a target parameter, 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 parameter.
In a possible implementation manner, determining a 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 the signal parameter determination model to obtain a target parameter.
In one possible implementation, the electronic device has a skin detection function for detecting the skin of the user based on the image captured by the 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; and determining that the first image contains the face and no shielding object exists on the face, and starting a skin detection function on the electronic equipment. Thereby, the skin detection function is turned on.
In one possible implementation, the electronic device is a 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 the memory for performing the method provided in the first aspect.
In a third aspect, embodiments of the present application provide a light adjusting device, which runs computer program instructions to execute the method provided in the first aspect. Illustratively, the apparatus may be a chip, or a processor. In one example, the apparatus may comprise a processor, which may be coupled with a memory, read instructions in the memory and execute the method as provided in the first aspect in accordance with the instructions. The memory may be integrated in the chip or the processor, or may be independent of 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 containing instructions that, when executed 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 diagram of a hardware structure of an electronic device according to an embodiment of the present disclosure;
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 provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of a light adjustment process provided in an embodiment of the present application;
FIG. 6 is a schematic flow chart of a light adjustment provided in 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 clearer, the technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is a schematic view 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 an electronic device as the smart mirror 11 as an example, the user a can use the smart mirror 11 to organize his/her appearance and outfit. In the process that the user a uses the intelligent mirror 11, the user a can adjust the brightness of the light on the intelligent mirror 11 to achieve the light supplement 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 turn up 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 may turn down the brightness of the light on the smart mirror 11. Because intelligent mirror 11 is great under different light luminance its camera imaging effect difference, in order to reduce the imaging effect difference of its camera under different light luminance, in this scheme, use intelligent mirror 11's in-process at user A, can be according to the light luminance on the intelligent mirror 11 that user A adjusted, determine the camera in the intelligent mirror 11 under the current environment and shoot required best illumination intensity, and adjust the luminance of light in the intelligent mirror 11 when shooing under the prerequisite that the user can not experience the light luminance change, thereby reduce the difference of its camera imaging effect of intelligent mirror 11 under the different light luminance that the user adjusted, promote intelligent mirror 11's skin measuring accuracy. In other words, in this scheme, the user uses intelligent mirror in-process, and the luminance of light on the intelligent mirror can be adjusted at will to the user, but when the intelligent mirror was shooing user's facial image, the light in the intelligent mirror then appeared with best luminance to make camera in the intelligent mirror avoid the interference of light luminance, and then make camera in the intelligent mirror image effect difference under different light luminance change less, promoted the survey skin accuracy of intelligent mirror.
It can be understood that in this scheme, electronic equipment can be for intelligent mirror, also can be for the electronic equipment that has skin detection function such as cell-phone, panel computer. In one example, the electronic device has a skin detection function, which may be understood as the electronic device may detect the skin of the user based on an image captured by a camera or other image capture device.
Next, a hardware structure of the electronic device related to this embodiment will be described.
Referring to fig. 2, fig. 2 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present disclosure. As shown in fig. 2, the electronic device 200 may include: processor 201, memory 202, camera 203, fill light 204, and the like.
The processor 201 may support the electronic device 200 to implement the method provided in the present embodiment. The processor 201 may be a general purpose processor, a special purpose processor, or a Neural Network Processing Unit (NPU). For example, the processor 201 may include a Central Processing Unit (CPU) and/or a baseband processor. The baseband processor may be configured to process communication data, and the CPU may be configured to implement corresponding control and processing functions, execute a software program, and process data of the software program. For example, the processor 201 may determine parameters, such as a duty ratio, a Pulse Width Modulation (PWM) signal, corresponding to the fill-in lamp 204 according to a brightness level of the fill-in 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. In addition, the processor 201 may also adjust parameters of the PWM signal corresponding to the fill-in light 204, and may also control the camera 203 to capture an image.
A memory 202, on which a program (also instructions or code) may be stored, may be executed by the processor 201, so that the processor 201 performs the method described in the present embodiment. Optionally, the memory 202 may also store data. Alternatively, the processor 201 may also read data stored in the memory 202, the data may be stored in the same memory address as the program, and the data may be stored in a different memory address from the program. For example, the memory 202 may store a pre-constructed PWM signal parameter mapping table, which includes a mapping relationship between 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 PWM signal parameters, and by inputting the brightness level of the fill-in light 204, the wavelength of the light at the brightness level, and the illumination intensity of the ambient light in the current environment, which are set by the user, into the calculation model, parameters for determining a Pulse Width Modulation (PWM) signal corresponding to the fill-in light 204 may be obtained.
In one example, the processor 201 and the memory 202 may be provided separately or integrated together, for example, on a single board or a System On Chip (SOC).
The camera 203 may capture images. Such as capturing an image of the user's face, etc.
The fill-in light 204 is a light source of the electronic device 200, and can provide light with different brightness levels for the user based on the user's needs. The fill light 204 may be a Light Emitting Diode (LED), for example. In one example, the control signal for the fill light 204 may be a Pulse Width Modulation (PWM) signal. In one example, when the electronic device 200 is a smart mirror, the fill light 204 may be annularly disposed around a mirror surface of the smart mirror.
Optionally, a distance sensor, an ambient light sensor, etc. may also be included in the electronic device 200. Among other things, 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. The ambient light sensor may be configured to sense an illumination intensity of the ambient light.
Optionally, the electronic device 200 may have a mirror therein for the user to groom and pack.
It is to be understood that the illustrated structure of the embodiment of the present application does not specifically limit the electronic device 200. In other embodiments of the present application, the electronic device 200 may include more or fewer components than illustrated, or combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
For a detailed description of the operations performed by the electronic device 200 in the above possible designs, reference may be made to the description of the embodiments of the method provided in the present embodiment below, and thus a detailed description is omitted here.
Next, based on the application scenario shown in fig. 1 and the hardware structure of the electronic device shown in fig. 2, the light adjustment process in this embodiment will be described in detail by taking the electronic device as an example of an intelligent mirror. It should be understood that the smart mirror may be replaced with other electronic devices having a skin detection function.
(1) Pre-constructing PWM signal parameter corresponding table
Generally, when the smart mirror performs skin detection, the illumination intensity of an image when a camera takes a picture is related to the light source of the smart mirror and the ambient light. In one example, the illumination intensity may be understood as light intensity.
In this scheme, can carry out the off-line experiment, carry out the light filling to intelligent mirror under common house environment to acquire user's skin image. Then, an analysis experiment is performed on the acquired skin image. Experiments show that if the light intensity of the ambient light is L evn And the light supplement intensity of the intelligent mirror is L LED The corresponding light intensity of the skin image most suitable for skin measurement and analysis is known to be L p Then the relationship between them can be expressed as: l is p =f(L evn ,L LED ) I.e. there is a mapping relationship between the three. The light supplement intensity of the intelligent mirror can be understood as the intensity of light emitted by the light supplement lamp on the intelligent mirror.
Furthermore, the light supplementing intensity of the intelligent mirror corresponding to the marked light intensity suitable for photographing can be obtained according to the experiment under the respective ambient light. For example, if the labeled light intensity is a and the ambient light is b, the fill-in light intensity c of the intelligent mirror is equal to a-b.
After determining the light supplementing light intensity that the mark light intensity that is fit for shooing corresponds the intelligent mirror, can determine the pulse current under the corresponding light supplementing light intensity based on the corresponding relation between light supplementing light intensity and the pulse current. For example, the correspondence between the fill-in light intensity and the pulse current may be: i is pi =f(L ei ),I pi Is a pulse current, L ei The light intensity of the supplementary lighting is obtained. In one example, since the current corresponds to the voltage, determining the pulse current under the corresponding fill-in light intensity can also be understood as determining the pulse voltage under the corresponding fill-in light intensity, that is, determining the pulse amplitude of the PWM signal corresponding to the fill-in light.
Further, the value of the luminance time integral (i.e., the luminous flux) of the lamp light perceived by the human eye is related to the value of the pulse time integral of the PWM signal corresponding to the fill light. The value of the pulse time integral of the PWM signal corresponding to the fill light may be: DxI max +(1-D)xI min D is the duty ratio of the PWM signal, I max Is the 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 fill light may be understood as the area of the shaded portion in fig. 3 a.
In order to make the user not perceive that the lamplight brightness of the light supplement lamp on the intelligent mirror changes, when the determined pulse amplitude of the PWM signal corresponding to the light supplement lamp is different from the pulse amplitude of the PWM signal corresponding to the light supplement lamp under the lamplight brightness adjusted by the user, the duty ratio of the PWM signal corresponding to the light supplement lamp can be adjusted, so that the pulse time integral values of the PWM signals corresponding to the light supplement lamp before and after adjustment are equal, and the user does not perceive that the lamplight brightness of the light supplement lamp on the intelligent mirror changes. For example, as shown in fig. 3a and 3b, where fig. 3b is a parameter of the PWM signal before adjustment, and fig. 3a is a parameter of the PWM signal after adjustment, when the area of the shaded portion in fig. 3a is equal to the area of the shaded portion in fig. 3b, the user may not perceive that the brightness of the light of the fill-in lamp on the smart mirror changes.
The relationship between the value of the luminance time integral (i.e., luminous flux) of the light perceived by human eyes and the value of the pulse time integral of the PWM signal corresponding to the fill-in light, measured by experiments, may be:
Figure BDA0002947035020000051
wherein L is eye Value of the time integral of the brightness of the light perceived by the human eye, [ D I [ ] max +(1-D)*I min ]The value of the pulse time integral of the PWM signal corresponding to the fill-in lamp is shown, and V (lambda) is the relative visual acuity of the fill-in lamp under different wavelengths.
As can be seen from 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 fill-in lamp, when the wavelength of the light emitted by the fill-in 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 light brightness of the light supplement lamp on the intelligent mirror, the wavelength of the light emitted by the light supplement lamp needs to be used as a reference factor.
In the scheme, the duty ratio of the PWM signal corresponding to each wavelength under each brightness level of the light supplementing 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 fill-in light are obtained, a PWM signal parameter corresponding table can be constructed. For example, as shown in table one, the brightness level of the fill-in lamp is 1 level, and the wavelength of the light emitted by the fill-in lamp is a 1 The illumination intensity of the ambient light is b 1 The duty ratio of the PWM signal is d 1 With a pulse amplitude of I 1 (ii) a The brightness grade of the light supplement lamp is 2 grade, and the wavelength of the light emitted by the light supplement lamp is a 3 The illumination intensity of the ambient light is b 1 The duty ratio of the PWM signal is d 3 With a pulse amplitude of I 3
Watch 1
Figure BDA0002947035020000052
In one example, after obtaining each parameter in the PWM signal parameter correspondence table, the determined each parameter may be trained by using a gaussian process model, a neural network model, a support vector machine, and the like, so as to obtain a corresponding calculation model. In this way, the parameters in the current environment are subsequently input into the calculation model, so that the duty ratio and the pulse amplitude of the corresponding PWM signal can be determined.
(2) Starting a skin detection function
In the scheme, when the intelligent mirror detects that the distance between the intelligent mirror and the user is smaller than the preset distance threshold, the intelligent mirror can start a camera on the intelligent mirror to shoot the user image. Then, the intelligent mirror can analyze the user image shot by the camera, and when the user image contains the face of the user and no blocking object exists on the face of the user, the skin detection function can be started.
(3) Determining the optimal illumination intensity required by the camera in the intelligent mirror to shoot images
After the skin detection function is started by the intelligent mirror, the intelligent mirror can determine 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 based on the light adjustment operation of the user. For example, the smart mirror may have 5 brightness adjustment steps, and when the user sets the brightness adjustment step to 2 steps, the smart mirror may determine the brightness level corresponding to 2 steps based on the preset relationship between the brightness adjustment step and the brightness level.
To the wavelength of the light that the light filling lamp sent, the colour temperature that intelligent mirror can send based on the light filling lamp is confirmed. For example, if the fill light does not have a color temperature adjusting function, the color temperature corresponding to the corresponding brightness level may be determined based on a preset correspondence between the brightness level and the color temperature; and then, determining the wavelength corresponding to the corresponding color temperature based on the preset relationship between the color temperature and the wavelength. If the light supplement lamp has a color temperature adjusting function, determining the color temperature set by the user based on the color temperature adjusting operation of the user; and then, determining the wavelength corresponding to the corresponding color temperature based on the preset relationship between the color temperature and the wavelength. In addition, the intelligent mirror can also sense the color temperature of light emitted by the current light supplement lamp based on a color temperature sensor on the intelligent mirror; and then, determining the wavelength corresponding to the corresponding color temperature based on the preset relationship between the color temperature and the wavelength.
For the illumination intensity of the ambient light, the smart mirror may sense the illumination intensity of the ambient light of the environment where the smart mirror is located based on the ambient light sensor thereon.
Further, after the brightness level of the light supplement lamp on the intelligent mirror set by the user, the wavelength of 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 are determined, the pre-constructed PWM signal parameter correspondence table can be inquired, and the duty ratio and the pulse amplitude of the current needed PWM signal are determined. The duty ratio and the pulse amplitude of the PWM signal required currently are the duty ratio and the pulse amplitude of the PWM signal when the camera on the intelligent mirror shoots the image in the skin detection process to achieve the most suitable skin detection image, and the illumination intensity of the light supplement lamp under the duty ratio and the pulse amplitude of the PWM signal is the optimal illumination intensity required by the camera in the intelligent mirror to shoot the image.
In an example, the determined brightness level of the fill-in light on the intelligent mirror, the wavelength of light emitted by the fill-in light at the brightness level, and the illumination intensity of the ambient light of the environment where the intelligent mirror is located, which are set by the user, may also be input to a pre-constructed calculation model to obtain the duty ratio and the pulse amplitude of the currently required PWM signal.
(4) Light regulation
After the duty ratio and the pulse amplitude of the currently required PWM signal are determined, the duty ratio and the pulse amplitude corresponding to the PWM signal at present may be adjusted, so as to adjust the duty ratio and the pulse amplitude corresponding to the PWM signal at present to the determined duty ratio and the pulse amplitude of the currently required PWM signal. Thus, one light adjustment is completed. It can be understood that the brightness of the fill-in light perceived by the user before the parameters of the PWM signal are adjusted is the same as the brightness of the fill-in light perceived by the user after the parameters of the PWM signal are adjusted.
Then, in order to ensure the image capturing effect, the camera may be controlled to capture an image when the PWM signal is a high level signal. In the scheme, the duration of the high-level signal can be longer than or equal to the exposure time of the camera, so that the camera can successfully complete shooting. Illustratively, as shown in fig. 4, the camera 41 may be controlled to complete photographing for the duration of the high level signal.
In this scheme, after the camera shooting was accomplished, can resume the state before the adjustment with the PWM signal that the light filling lamp corresponds, accomplish another light regulation promptly so far. Illustratively, if the duty ratio of the PWM signal before adjustment is D 1 With a pulse amplitude of I 1 The duty ratio of the adjusted PWM signal is D 2 With a pulse amplitude of I 2 After the camera finishes shooting, the duty ratio of the PWM signal can be changed from D 2 Adjusted to D 1 The pulse amplitude is set by I 2 Is adjusted to I 1
For ease of understanding, the entire flow is briefly described below. Referring to fig. 5, as shown in fig. 5, after triggering the no-sensing skin function on the electronic device (e.g., a smart mirror), the brightness level of the light source (i.e., the fill-in light in this document) controlled by the user, the light wavelength of the light source, and the illumination intensity of the ambient light at this time can be obtained. Then, based on the brightness level of the light source, the light wavelength and the illumination intensity of the ambient light regulated and controlled by the user, the duty ratio D of the light supplement lamp required during the corresponding photographing is inquired 1 And amplitude of pulse I 1 (ii) a And the duty ratio D of the light supplement lamp initially controlled by the user 0 Adjusted to duty cycle D 1 The pulse amplitude I of the light supplement lamp initially controlled by the user 0 Adjusted to pulse amplitude I 1 . Finally, after the photographing is finished, the duty ratio D of the adjusted light supplement lamp is adjusted 1 Adjusted back to duty cycle D 0 Amplitude of pulse I 1 Adjusted back to pulse amplitude I 0 . It should be understood that the details of the process can be referred to the above description, and are not repeated herein.
In one example, in this scheme, the no-skin-sensing function may be a function of detecting the skin of the user and outputting a skin-sensing report when the user cannot perceive the skin. Exemplarily, taking an electronic device as an intelligent mirror as an example, on the premise that a light supplement lamp of the intelligent mirror is turned on, a camera on the intelligent mirror detects that a human face exists and the position of the human face is within a proper range from the intelligent mirror, and the intelligent mirror can call a non-sensing skin algorithm in a background and asynchronously output a skin measurement report.
The above is the introduction of the light adjusting process in the scheme. Next, a light adjusting method provided in the embodiments of the present application will be described based on the light adjusting process described above. It will be appreciated that this method is another expression of the light adjustment process described above, and that the two are combined. The method is based on the light adjustment process described above, and some or all of the contents of the method can be referred to the description of the light adjustment process above.
It is to be appreciated that the method can be performed by any apparatus, device, platform, cluster of devices having computing and processing capabilities. When the method is executed by a single device, the device can be provided with a camera and a fill-in light; when the method is executed by the equipment cluster, part of the equipment cluster can be provided with cameras, part of the equipment cluster can be provided with light supplement lamps, and the same equipment can also be provided with the cameras and the light supplement lamps. The light supplementing lamp can be controlled by Pulse Width Modulation (PWM) signals.
Referring to fig. 6, fig. 6 is a schematic flowchart illustrating a light adjusting method according to an embodiment of the present disclosure. As shown in fig. 6, the light adjusting method includes:
step S101, determining a first brightness level of a 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.
And S103, determining a target parameter of the PWM signal according to the first brightness level, the first wavelength and the first illumination intensity.
In this scheme, the target parameters may include a target duty ratio and a target pulse amplitude. The light brightness of the light supplement lamp 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 the image under the current condition, the brightness of the light supplement lamp perceived by the 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 a first brightness level, the light wavelength sent by the light supplement 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 correspondence 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 correspondence table includes a mapping relationship between the first brightness level, the first wavelength, the first illumination intensity, and the target parameter. For example, 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 the signal parameter determination model to obtain the target parameter. For example, the signal parameter determination model may be a pre-constructed computational model as described above.
In one example, a deviation value between a target calculation value of the pulse time integral corresponding to the target parameter and a first calculation value of the pulse time integral corresponding to the first parameter is within a preset range. For example, the target calculation value may be an area of a shaded portion in fig. 3a, and the first calculation value may be an area of a shaded portion in fig. 3 b.
After the target parameters are determined, step S104 may be performed.
And step S104, adjusting the first parameter of the PWM signal under the current condition to a target parameter.
In this scheme, 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 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 may have sufficient time to complete the shooting.
Further, after the camera is controlled to shoot the image, the target parameter can be adjusted to the first parameter, and the PWM signal corresponding to the fill-in light is restored to the state before adjustment.
Therefore, in the operation process of the electronic equipment, based on the parameters (namely, the brightness level and the wavelength) of the light emitted by the light supplement lamp and the parameters (namely, the illumination intensity) of the ambient light, the control parameters of the control signals of the light supplement lamp which are suitable for shooting images under the current condition and cannot be used for the user to perceive the change of the light brightness are determined, and the light supplement lamp is controlled based on the control parameters, so that the shooting work can be completed under the condition that the user cannot perceive the change of the light brightness, and the shot images are optimal.
In one example, the electronic device may have a skin detection function for detecting the skin of the user based on the image captured by the 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 the present solution, it may be determined that the distance between the user and the electronic device is smaller than a preset distance threshold, for example, the distance is detected based on a distance sensor in the electronic device. Then, the camera is started again to shoot the first image. And finally, analyzing the first image, and starting a skin detection function on the electronic equipment when the first image is determined to contain the face and no shielding object exists on the face.
In one example, the electronic device may be a smart mirror, which may have a mirrored surface.
It should be understood that the light adjustment method provided in the present disclosure may also be applied to a road monitoring photographing system or other fields requiring photographing, and is not limited herein.
Based on the method in the embodiment, the embodiment of the application further provides a light adjusting device. The light adjusting device may be the electronic device shown in fig. 2 above. In one example, the light adjusting device may include: at least one memory for storing programs, and at least one program processor for executing the memory stores. Wherein, when the program stored in the memory is executed, the processor realizes the method provided in the scheme. For example, the memory in the light adjusting device may be the memory 202 in fig. 2, and the processor may be the processor 201 in fig. 2.
The detailed description of the operations performed by the light adjusting device in the above possible designs can be provided with reference to the text scheme, and thus the detailed description is omitted here.
Based on the method in the foregoing embodiments, the present application further provides a light adjusting device, which can run computer program instructions to execute the method described above. Illustratively, the apparatus may be 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 execute the above-described method in accordance with the instructions. The memory may be integrated in the chip or the processor, or may be independent of the chip or the processor. For example, the memory in the light adjusting device may be the memory 202 in fig. 2, and the processor may be the processor 201 in fig. 2.
Based on the method in the embodiment, the embodiment of the application also provides a chip. Referring to fig. 7, fig. 7 is a schematic structural diagram of a chip according to an embodiment of the present disclosure. As shown in fig. 7, chip 700 includes one or more processors 701 and interface circuits 702. Optionally, chip 700 may also include 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 implemented by integrated logic circuits of hardware or instructions in the form of software in the processor 701. The processor 701 may be a general purpose processor, a Neural Network Processing Unit (NPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, or discrete hardware components. The methods, 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, and the processor 701 may perform some or all of the steps in the above embodiments.
The interface circuit 702 may be used to transmit or receive data, instructions, or information, and the processor 701 may perform processing by using the data, instructions, or other information received by the interface circuit 702, and may transmit processing completion information 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 a skin test result.
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. The portion of memory may also include non-volatile random access memory (NVRAM). Which may be coupled to the processor 701. Illustratively, a pre-constructed PWM signal parameter correspondence table may be stored in the memory.
Alternatively, the memory stores executable software modules or data structures, and the processor 701 may perform corresponding operations by calling operation instructions stored in the memory (the operation instructions may be stored in an operating system).
Optionally, the interface circuit 702 may be configured to output an 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 hardware design, software design, or a combination of hardware and software, which is not limited herein.
It will be appreciated that the steps of the above-described method embodiments may be performed by logic circuits in the form of hardware or instructions in the form of software in a processor.
It should be understood that throughout the description of the embodiments of the present application, words such as "exemplary," "for example," or "for example" are used to indicate example, instance, or illustration. Any embodiment or design described herein as "exemplary," "e.g.," or "e.g.," is not to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the words "exemplary," "e.g.," or "exemplary" is intended to present relevant concepts in a concrete fashion.
In the description of the embodiments of the present application, the term "and/or" is only one kind of association relationship describing an associated object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, B exists alone, and A and B exist at the same time. In addition, the term "plurality" means two or more unless otherwise specified. For example, the plurality of systems refers to two or more systems, the plurality of terminals refers to two or more terminals, and the multi-path video stream refers to two or more video streams.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicit indication of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
It is understood that the processor in the embodiments of the present application may be a Central Processing Unit (CPU), other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. The general purpose processor may be a microprocessor, but 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 software instructions executed by a processor. The software instructions may consist of corresponding software modules that may be stored in Random Access Memory (RAM), flash memory, read-only memory (ROM), Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), registers, a 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. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an ASIC.
In the above embodiments, the implementation may be wholly or partially realized 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, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in or transmitted over a computer-readable storage medium. The computer instructions may be transmitted from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the 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)), among others.
It is to be understood that the various numerical references referred to in the embodiments of the present application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of the present application.

Claims (14)

1. A light adjusting method is applied to electronic equipment comprising a camera and a fill-in lamp, wherein the fill-in lamp is controlled by a Pulse Width Modulation (PWM) signal, and 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 the PWM signal according to the first brightness level, the first wavelength, and the first illumination intensity, where the target parameter includes a target duty cycle and a target pulse amplitude, where a light brightness provided by the light supplement lamp under the target parameter matches a light brightness of the light supplement lamp required by the camera to capture an image under a current condition, and the light brightness perceived by the user under the target parameter is the same as the light brightness perceived by the user under the current condition, where the current condition is that the light 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 the ambient light is the first illumination intensity;
adjusting a first parameter of the PWM signal under the current condition to the target parameter, the first parameter including a first duty cycle and a first pulse amplitude.
2. The method of claim 1, wherein after adjusting the first parameter of the PWM signal under the current condition to the target parameter, further comprising:
and determining that the PWM signal is a high level signal, and controlling the camera to shoot images.
3. The method of claim 2, wherein the duration of the high level signal is greater than or equal to an exposure time of the camera.
4. The method according to claim 2 or 3, wherein after controlling the camera to capture the image, the method further comprises:
adjusting the target parameter to the first parameter.
5. The method of any of claims 1-4, wherein the deviation between the target calculated pulse time integral value for the target parameter and the first calculated pulse time integral value for the first parameter is within a predetermined range.
6. The method according to any of claims 1-5, wherein said determining a target parameter of said PWM signal based on said first brightness level, said first wavelength and said 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 a mapping relation among the first brightness level, the first wavelength, the first illumination intensity and the target parameter.
7. The method according to any of claims 1-5, wherein said determining a target parameter of said PWM signal based on said first brightness level, said first wavelength and said 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. The method according to any one of claims 1 to 7, wherein the electronic device has a skin detection function for detecting a skin of a user based on the image taken by the camera, and the method further comprises:
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 face and no obstruction exists on the face, and starting a skin detection function on the electronic equipment.
9. The method of any of claims 1-8, wherein the electronic device is a smart mirror, the smart mirror having a mirror surface.
10. A light conditioning device, comprising:
at least one memory for storing a program;
at least one processor for executing the memory-stored program, the processor being configured to perform the method of any of claims 1-9 when the memory-stored program is executed.
11. A light conditioning device, wherein the device executes computer program instructions to perform the method of any of claims 1-9.
12. A computer storage medium having stored therein instructions that, when executed on a computer, cause the computer to perform the method of any of claims 1-9.
13. A computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1-9.
14. A chip comprising at least one processor and an interface;
the interface is used for providing program instructions or data for the at least one processor;
the at least one processor is configured to execute the program line 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 true CN114979499A (en) 2022-08-30
CN114979499B 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 (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116567882B (en) * 2023-05-17 2024-06-11 广东千沣农业发展有限公司 Coding method and system for simultaneously realizing light intensity adjustment and optical communication of lamp
CN116709614B (en) * 2023-08-02 2023-10-20 深圳爱图仕创新科技股份有限公司 Light control method, light control device, computer equipment and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100073520A1 (en) * 2008-09-19 2010-03-25 Altek Corporation Image brightness compensation method and digital camera device with image brightness compensation function
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100073520A1 (en) * 2008-09-19 2010-03-25 Altek Corporation Image brightness compensation method and digital camera device with image brightness compensation function
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
CN114979499B (en) 2023-08-22

Similar Documents

Publication Publication Date Title
WO2020010848A1 (en) Control method, microprocessor, computer readable storage medium, and computer apparatus
US10685215B2 (en) Method and apparatus for recognizing face
CN110168562B (en) Depth-based control method, depth-based control device and electronic device
US20200082160A1 (en) Face recognition module with artificial intelligence models
US11170250B2 (en) Nail contour detecting device, nail contour detecting method and storage medium
CN114979499B (en) Light adjusting method and device
US10820796B2 (en) Pupil radius compensation
US11687635B2 (en) Automatic exposure and gain control for face authentication
CN104915631B (en) Image processing equipment, biometric authentication device and image processing method
CN110070083A (en) Image processing method, device, electronic equipment and computer readable storage medium
US10708992B2 (en) Methods and apparatus for image analysis for lighting control
US11163994B2 (en) Method and device for determining iris recognition image, terminal apparatus, and storage medium
US20230092420A1 (en) Method and apparatus for gaze detection
KR20200084383A (en) Method for utilizing genetic information and electronic device thereof
US20200089315A1 (en) Systems and methods for capturing training data for a gaze estimation model
US8090253B2 (en) Photographing control method and apparatus using strobe
KR20200137918A (en) An electronic device obtaining a skin image and control method thereof
CN111079555A (en) User preference degree determining method and device, electronic equipment and readable storage medium
CN106803284B (en) Method and device for constructing three-dimensional image of face
US20150178589A1 (en) Apparatus for processing digital image and method of controlling the same
Bai et al. An integrated design of a smartphone interface with multiple image processing methods to reduce shining light from a digital projector
JP7209132B2 (en) Illumination compensation in imaging
CN116709614B (en) Light control method, light control device, computer equipment and computer readable storage medium
CN114862947A (en) Distance determination method and distance determination device

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