CN114245025A - Light supplementing method, device, equipment, storage medium and computer product - Google Patents

Light supplementing method, device, equipment, storage medium and computer product Download PDF

Info

Publication number
CN114245025A
CN114245025A CN202111375576.2A CN202111375576A CN114245025A CN 114245025 A CN114245025 A CN 114245025A CN 202111375576 A CN202111375576 A CN 202111375576A CN 114245025 A CN114245025 A CN 114245025A
Authority
CN
China
Prior art keywords
value
color temperature
light
temperature value
hue
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
CN202111375576.2A
Other languages
Chinese (zh)
Other versions
CN114245025B (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.)
Shenzhen Vision Technology Co Ltd
Original Assignee
Shenzhen Vision Technology 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 Shenzhen Vision Technology Co Ltd filed Critical Shenzhen Vision Technology Co Ltd
Priority to CN202111375576.2A priority Critical patent/CN114245025B/en
Publication of CN114245025A publication Critical patent/CN114245025A/en
Application granted granted Critical
Publication of CN114245025B publication Critical patent/CN114245025B/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/71Circuitry for evaluating the brightness variation
    • 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/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • H04N23/88Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control
    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B47/00Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
    • H05B47/10Controlling the light source
    • H05B47/105Controlling the light source in response to determined parameters
    • H05B47/11Controlling the light source in response to determined parameters by determining the brightness or colour temperature of ambient light
    • 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 discloses a light supplementing method, a light supplementing device, light supplementing equipment, a storage medium and a computer product, and belongs to the technical field of computers. The method comprises the following steps: acquiring a first color temperature value under the condition that the light supplement lamp is not turned on; turning on a light supplement lamp, and setting the color temperature value of the light supplement lamp as a first color temperature value; adjusting the color temperature value of the light supplement lamp so that the difference value between the color temperature value of the light supplement lamp and the second color temperature value is smaller than or equal to the preset color temperature difference value; determining a target hue value according to the second hue value; and adjusting the brightness of the fill-in light so that the difference value between the hue value of the light in the environment and the target hue value is smaller than or equal to the preset hue difference value. This application is close through the colour temperature value of adjusting the colour temperature value of light to with in the environment of locating light to through the luminance of adjustment light filling lamp so that the hue value of light is close with target hue value in the environment of locating under this colour temperature value, the user's complexion of skin of the person who shoots is more true better in the environment of locating under this condition, thereby obtains better shooting effect.

Description

Light supplementing method, device, equipment, storage medium and computer product
Technical Field
The present application relates to the field of computer technologies, and in particular, to a light supplement method, apparatus, device, storage medium, and computer product.
Background
Short videos and live broadcasts are becoming more and more common nowadays, and the environment with poor light can affect the shooting effect. For example, a makeup blogger live broadcasts in a dark environment, the face of the user who shoots the makeup blogger becomes dark and not good enough, and light supplement is needed under the condition.
In the correlation technique, when the light of the current environment of user is not enough, the user can manually adjust the light filling lamp to fill light to the current environment to adjust the light of the current environment to the satisfied degree.
However, the manual adjustment of the fill-in light by the user is cumbersome, and the user can only adjust the fill-in light by subjectively observing the light of the current environment, so that an ideal shooting effect may not be achieved.
Disclosure of Invention
The application provides a light supplementing method, a light supplementing device, a storage medium and a computer product, which can enable light to meet the needs of users and obtain ideal shooting effects. The technical scheme is as follows:
in a first aspect, a light supplement method is provided, where the method includes:
acquiring a first color temperature value under the condition that a light supplement lamp is not turned on, wherein the first color temperature value is the color temperature value of light rays in the environment where the light supplement lamp is not turned on;
turning on the light supplement lamp, and setting the color temperature value of the light supplement lamp as the first color temperature value;
adjusting the color temperature value of the light supplement lamp so that the difference value between the color temperature value of the light supplement lamp and a second color temperature value is smaller than or equal to a preset color temperature difference value, wherein the second color temperature value is the color temperature value of light in the environment where the light supplement lamp is turned on;
after the difference value between the color temperature value of the light supplement lamp and the second color temperature value is smaller than or equal to the preset color temperature difference value, determining a target color tone value according to the second color temperature value, wherein the target color tone value is a color tone value capable of improving the skin color of a user under the second color temperature value;
and adjusting the brightness of the light supplement lamp to enable the difference value between the hue value of the light in the environment and the target hue value to be smaller than or equal to a preset hue difference value.
In the present application, a first color temperature value is obtained without turning on the light supplement lamp, where the first color temperature value is a color temperature value of light in an environment where the light supplement lamp is not turned on, that is, a color temperature value of natural light. After the light supplement lamp is turned on, the color temperature value of the light supplement lamp is set to be the first color temperature value, so that the light in the environment where the light supplement lamp is turned on cannot become more complex, the color of the light emitted by the light supplement lamp is close to the color of natural light, and the color of an object can be reflected truly. And then, the difference value between the color temperature value of the light supplementing lamp and the second color temperature value is smaller than or equal to the preset color temperature difference value by adjusting the color temperature value of the light supplementing lamp, so that the consistency of the light of the whole environment is ensured even if the color temperature value of the light supplementing lamp is closer to the color temperature value of the light in the current environment. And then, acquiring a target hue value according to the second hue value, wherein the target hue value is a hue value capable of improving the skin color of the user under the second hue value, and then adjusting the brightness of the fill-in lamp to enable the difference value between the hue value of the light in the environment and the target hue value to be less than or equal to a preset hue difference value, even if the hue value of the light in the environment is close to the target hue value. Under the condition, the skin color of the user shot under the light in the environment is real and better seen, so that a better shooting effect can be obtained.
Optionally, the obtaining the first color temperature value without turning on the fill light includes:
under the condition that a light supplement lamp is not turned on, capturing light rays in the environment through a color temperature detection element in an image sensor to generate pixel data, and determining a first color temperature value according to the pixel data; alternatively, the first and second electrodes may be,
under the condition that a light supplement lamp is not turned on, capturing light rays in the environment through a spectrum sensor, generating pixel data, generating spectrum information, and determining the first color temperature value according to the spectrum information; alternatively, the first and second electrodes may be,
and under the condition that a light supplement lamp is not turned on, shooting the environment to generate an original image, and determining the first color temperature value according to the original image.
Optionally, the adjusting the color temperature value of the fill-in light to make the difference between the color temperature value of the fill-in light and the second color temperature value smaller than or equal to a preset color temperature difference includes:
after the color temperature value of the light supplement lamp is set as the first color temperature value, the second color temperature value is obtained;
comparing the color temperature value of the light supplement lamp with the newly acquired second color temperature value;
if the difference value between the color temperature value of the light supplement lamp and the newly acquired second color temperature value is larger than the preset color temperature difference value, adjusting the color temperature value of the light supplement lamp;
and after the color temperature value of the light supplement lamp is adjusted, acquiring the second color temperature value again, and returning to the step of comparing the color temperature value of the light supplement lamp with the newly acquired second color temperature value until the difference between the color temperature value of the light supplement lamp and the newly acquired second color temperature value is less than or equal to the preset color temperature difference.
Optionally, the determining a target hue value according to the second hue value includes:
and determining the target hue value according to a first corresponding relation and the second hue value, wherein the first corresponding relation is a corresponding relation between the hue value and the hue value, and the hue value corresponding to each hue value in the first corresponding relation is a hue value capable of improving the skin color of the public under the one hue value.
Optionally, the determining a target hue value according to the second hue value includes:
acquiring a skin color type of a user;
acquiring a corresponding relation associated with the user skin color type from a plurality of corresponding relations as a second corresponding relation, wherein the plurality of corresponding relations are all corresponding relations between color temperature values and color tone values, the plurality of corresponding relations are corresponding relations one-to-one associated with a plurality of skin color types, and the color tone value corresponding to each color temperature value in each corresponding relation in the plurality of corresponding relations is a color tone value capable of improving the skin color of the skin color type associated with the corresponding relation at the color temperature value;
and determining the target tone value according to the second corresponding relation and the second color temperature value.
Optionally, the adjusting the brightness of the fill-in light to make a difference between a hue value of light in the environment and the target hue value smaller than a preset hue difference value includes:
obtaining the hue value of light in the environment;
comparing the newly acquired hue value of the light in the environment with the target hue value;
if the difference value between the newly acquired hue value of the light in the environment and the target hue value is larger than the preset hue difference value, adjusting the brightness of the light supplement lamp;
and after the brightness of the light supplement lamp is adjusted, re-acquiring the hue value of the light in the environment, and returning to the step of comparing the newly acquired hue value of the light in the environment with the target hue value until the difference value between the newly acquired hue value of the light in the environment and the target hue value is less than or equal to the preset hue difference value.
In a second aspect, a light supplement device is provided, the device including:
the device comprises an acquisition module, a processing module and a control module, wherein the acquisition module is used for acquiring a first color temperature value under the condition that a light supplement lamp is not turned on, and the first color temperature value is the color temperature value of light rays in the environment where the light supplement lamp is not turned on;
the setting module is used for turning on the light supplement lamp and setting the color temperature value of the light supplement lamp as the first color temperature value;
the first adjusting module is used for adjusting the color temperature value of the light supplement lamp so that the difference value between the color temperature value of the light supplement lamp and a second color temperature value is smaller than or equal to a preset color temperature difference value, and the second color temperature value is the color temperature value of light in the environment where the light supplement lamp is turned on;
the determination module is configured to determine a target hue value according to the second color temperature value after a difference between the color temperature value of the fill light and the second color temperature value is less than or equal to the preset color temperature difference, where the target hue value is a hue value capable of improving a user skin color at the second color temperature value;
and the second adjusting module is used for adjusting the brightness of the light supplementing lamp so that the difference value between the hue value of the light in the environment and the target hue value is smaller than or equal to a preset hue difference value.
Optionally, the obtaining module is configured to:
under the condition that a light supplement lamp is not turned on, capturing light rays in the environment through a color temperature detection element in an image sensor to generate pixel data, and determining a first color temperature value according to the pixel data;
optionally, the obtaining module is configured to:
under the condition that a light supplement lamp is not turned on, capturing light rays in the environment through a spectrum sensor, generating pixel data, generating spectrum information, and determining the first color temperature value according to the spectrum information;
optionally, the obtaining module is configured to:
and under the condition that a light supplement lamp is not turned on, shooting the environment to generate an original image, and determining the first color temperature value according to the original image.
Optionally, the first adjusting module is configured to:
after the color temperature value of the light supplement lamp is set as the first color temperature value, the second color temperature value is obtained;
comparing the color temperature value of the light supplement lamp with the newly acquired second color temperature value;
if the difference value between the color temperature value of the light supplement lamp and the newly acquired second color temperature value is larger than the preset color temperature difference value, adjusting the color temperature value of the light supplement lamp;
and after the color temperature value of the light supplement lamp is adjusted, acquiring the second color temperature value again, and returning to the step of comparing the color temperature value of the light supplement lamp with the newly acquired second color temperature value until the difference between the color temperature value of the light supplement lamp and the newly acquired second color temperature value is less than or equal to the preset color temperature difference.
Optionally, the determining module is configured to:
and determining the target hue value according to a first corresponding relation and the second hue value, wherein the first corresponding relation is a corresponding relation between the hue value and the hue value, and the hue value corresponding to each hue value in the first corresponding relation is a hue value capable of improving the skin color of the public under the one hue value.
Optionally, the determining module is configured to:
acquiring a skin color type of a user;
acquiring a corresponding relation associated with the user skin color type from a plurality of corresponding relations as a second corresponding relation, wherein the plurality of corresponding relations are all corresponding relations between color temperature values and color tone values, the plurality of corresponding relations are corresponding relations one-to-one associated with a plurality of skin color types, and the color tone value corresponding to each color temperature value in each corresponding relation in the plurality of corresponding relations is a color tone value capable of improving the skin color of the skin color type associated with the corresponding relation at the color temperature value;
and determining the target tone value according to the second corresponding relation and the second color temperature value.
Optionally, the second adjusting module is configured to:
obtaining the hue value of light in the environment;
comparing the newly acquired hue value of the light in the environment with the target hue value;
if the difference value between the newly acquired hue value of the light in the environment and the target hue value is larger than the preset hue difference value, adjusting the brightness of the light supplement lamp;
and after the brightness of the light supplement lamp is adjusted, re-acquiring the hue value of the light in the environment, and returning to the step of comparing the newly acquired hue value of the light in the environment with the target hue value until the difference value between the newly acquired hue value of the light in the environment and the target hue value is less than or equal to the preset hue difference value.
In a third aspect, a computer device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when executed by the processor, the computer program implements the fill lighting method described above.
In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the light supplement method described above.
In a fifth aspect, a computer program product comprising instructions is provided, which when run on a computer, causes the computer to perform the steps of the fill lighting method described above.
It is to be understood that, for the beneficial effects of the second aspect, the third aspect, the fourth aspect and the fifth aspect, reference may be made to the description of the first aspect, and details are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a light supplement method according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a light supplement device according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
It should be understood that reference to "a plurality" in this application means two or more. In the description of the present application, "/" means "or" unless otherwise stated, for example, a/B may mean a or B; "and/or" herein is only an association relationship describing an associated object, and means that there may be three relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, for the convenience of clearly describing the technical solutions of the present application, the terms "first", "second", and the like are used to distinguish the same items or similar items having substantially the same functions and actions. Those skilled in the art will appreciate that the terms "first," "second," etc. do not denote any order or quantity, nor do the terms "first," "second," etc. denote any order or importance.
Before explaining the embodiments of the present application in detail, an application scenario of the embodiments of the present application will be described.
The light supplementing method provided by the embodiment of the application is applied to a scene needing light supplementing when light is insufficient, the color temperature of the light supplementing lamp is adjusted to be close to the color temperature of light in the environment when the light supplementing lamp is opened, and then the brightness of the light supplementing lamp is adjusted to enable the color tone of the light in the environment to be close to the target color tone value, so that the color tone of a user can be improved by shooting under the light in the environment, and a better shooting effect is obtained.
The light supplement method provided in the embodiments of the present application is explained in detail below.
Fig. 1 is a flowchart of a light supplement method according to an embodiment of the present disclosure. Referring to fig. 1, the method includes the following steps.
Step 101: the terminal obtains a first color temperature value under the condition that the light supplement lamp is not turned on.
The first color temperature value is a color temperature value of light in an environment where the light supplement lamp is not turned on, that is, the first color temperature value is a color temperature value of natural light in the environment where the light supplement lamp is not turned on. Color temperature is a physical quantity used to describe the color of a light source, and is defined as the temperature of a black body, which is called the color temperature of the light source when the light source and the black body radiate at the closest color at a certain temperature, the black body can absorb all the external electromagnetic radiation without any reflection and transmission, and the black body can respectively emit red, orange, yellow, white and blue visible lights in the process of the temperature of the black body from low to high.
Before the terminal acquires the first color temperature value, the terminal is connected with the light supplement lamp, so that the terminal can control the light supplement lamp and adjust the parameters of the light supplement lamp. The connection mode of the terminal and the light supplement lamp can be wired connection or wireless connection, and the embodiment of the application does not limit the connection mode.
Optionally, the terminal may obtain a white balance result of light in the environment without turning on the fill light lamp, where the white balance result includes the first color temperature value.
Specifically, the operation of step 101 can be realized in the following three possible ways.
In a first possible manner, under the condition that the fill light is not turned on, the terminal captures light in the environment through a color temperature detection element in the image sensor, generates pixel data, and determines a first color temperature value according to the pixel data.
The image sensor is a photosensitive element, is built in a camera of a terminal, can convert an optical signal into an electrical signal, and can be a CMOS (Complementary Metal-Oxide-Semiconductor) or CCD (Charge coupled Device) image sensor.
The color temperature detection element is a device for detecting an ambient color temperature. After light rays in the environment pass through the lens and enter the color temperature detection element in the image sensor, the light rays entering the color temperature detection element are converted into electric signals, and corresponding pixel data are generated through digital-to-analog conversion and other processing.
The pixel data is data for reflecting the color temperature of light in the environment.
Under the condition, the terminal directly captures the light in the environment through the color temperature detection element of the image sensor, and determines the first color temperature value according to the generated pixel data, so that the whole process does not need other devices, and the color temperature determination efficiency is improved.
The operation of the terminal for determining the first color temperature value according to the pixel data is similar to the operation of determining the color temperature value according to a certain pixel data in the related art, and this is not described in detail in this embodiment of the present application.
In a second possible mode, under the condition that the light supplement lamp is not turned on, the terminal captures light rays in the environment through the spectrum sensor to generate spectrum information, and the first color temperature value is determined according to the spectrum information.
The working principle of the spectrum sensor is that polychromatic light emitted by a light source is separated according to different wavelengths, spectral line intensity is measured by matching with various photoelectric detection elements, spectral power distribution (namely spectral information) is obtained, and photoelectric performance parameters such as color temperature and the like are calculated according to the spectral power distribution. The spectrum sensor can be arranged in the light supplement lamp, and also can be arranged at a position where a user needs light supplement in an environment, the spectrum sensor can communicate with a terminal through wired connection or wireless connection, and the embodiment of the application does not limit the position.
The spectral information is used to reflect the color temperature of the light in the environment.
Under the condition, the spectral sensor captures light in the environment to generate spectral information, more accurate environment light information can be obtained, and therefore the terminal can calculate a more accurate first color temperature value.
The operation of determining the first color temperature value according to the spectral information is similar to the operation of determining the color temperature value according to certain spectral information in the related art, and this is not described in detail in this embodiment of the present application.
In a third possible mode, the terminal shoots the environment without turning on the fill light, generates an original image, and determines a first color temperature value according to the original image.
The original image is an image in RAW format, RAW meaning "original, unprocessed". As the name implies, a file in RAW format is composed of RAW image data received by the camera photosensitive element, while also containing camera settings and image processing parameters at the time of file creation.
In this case, the original image captured by the terminal includes more and more accurate information capable of reflecting light in the environment, so that the terminal can calculate a more accurate first color temperature value according to the original image.
The operation of the terminal for determining the first color temperature value according to the original image is similar to the operation of determining the color temperature value according to a certain original image in the related art, which is not described in detail in this embodiment of the present application.
Step 102: the terminal turns on the light supplement lamp and sets the color temperature value of the light supplement lamp as a first color temperature value.
When the light supplement lamp is opened at a terminal, the color temperature value of the light supplement lamp is set to be a first color temperature value, so that the color temperature value of the light supplement lamp is consistent with the color temperature value of light in the environment where the light supplement lamp is not opened, namely, the color of the light emitted by the light supplement lamp is consistent with the color of the light in the environment where the light supplement lamp is not opened, and therefore, when the light supplement lamp is opened, the light emitted by the light supplement lamp is not greatly different from the light in the environment where the light supplement lamp is not opened, and more complex light cannot be caused after the light supplement lamp is opened. And the first color temperature value is the color temperature value of natural light in the environment where the light supplement lamp is not turned on, so that the color temperature value of the light supplement lamp is set as the first color temperature value, the color of light emitted by the light supplement lamp can be close to the color of the natural light, and the color of an object can be reflected more truly.
Further, after the light supplement lamp is turned on by the terminal, the color temperature value of light in the environment where the light supplement lamp is located is affected by light emitted by the light supplement lamp, and then the following step 103 is executed to further adjust the color temperature value of the light supplement lamp.
Step 103: the terminal adjusts the color temperature value of the light supplement lamp so that the difference value between the color temperature value of the light supplement lamp and the second color temperature value is smaller than or equal to the preset color temperature difference value.
The second color temperature value is the color temperature value of the light in the environment where the light supplement lamp is turned on.
The preset color temperature difference value may be set in advance, and the preset color temperature difference value may be set to be smaller. If the difference between the color temperature value of the light supplement lamp and the second color temperature value is smaller than or equal to the preset color temperature difference, it is indicated that the difference between the color temperature value of the light supplement lamp and the second color temperature value is smaller, that is, the color temperature value of the light supplement lamp is closer to the second color temperature value, that is, the color temperature value of the light supplement lamp is closer to the color temperature value of the light in the current environment. If the difference between the color temperature value of the light supplement lamp and the second color temperature value is greater than the preset color temperature difference, it is indicated that the difference between the color temperature value of the light supplement lamp and the second color temperature value is large, that is, the color temperature value of the light supplement lamp is not close to the second color temperature value, that is, the color temperature value of the light supplement lamp is not close to the color temperature value of the light in the current environment.
Optionally, the terminal may obtain a white balance result of light in the environment after the fill light is turned on, where the white balance result includes the second color temperature value.
Specifically, the operation of step 103 may be: the terminal sets the color temperature value of the light supplement lamp as a first color temperature value and then obtains a second color temperature value; the terminal compares the color temperature value of the light supplementing lamp with a newly acquired second color temperature value; if the difference value between the color temperature value of the light supplement lamp and the newly acquired second color temperature value is larger than the preset color temperature difference value, the terminal adjusts the color temperature value of the light supplement lamp; and after the color temperature value of the light supplement lamp is adjusted, acquiring a second color temperature value again, and returning to the step of comparing the color temperature value of the light supplement lamp with the newly acquired second color temperature value until the difference value between the color temperature value of the light supplement lamp and the newly acquired second color temperature value is less than or equal to the preset color temperature difference value.
In this case, the terminal compares the color temperature value of the fill-in lamp with the newly obtained second color temperature value to determine whether the color temperature value of the fill-in lamp is close enough to the color temperature value of the light in the current environment. And if the difference value between the color temperature value of the light supplement lamp and the newly acquired second color temperature value is larger than the preset color temperature difference value, which indicates that the color temperature value of the light supplement lamp is not close to the color temperature value of the light in the current environment, the terminal adjusts the color temperature value of the light supplement lamp. And after the color temperature value of the light supplement lamp is adjusted, acquiring a second color temperature value again for comparison so as to judge whether the adjusted color temperature value of the light supplement lamp is close enough to the color temperature value of the light in the current environment, and continuously adjusting the color temperature value of the light supplement lamp when the adjusted color temperature value of the light supplement lamp is not close enough. So, through the colour temperature value of constantly adjusting this light filling lamp, until the difference between the colour temperature value of this light filling lamp and the second colour temperature value of newly acquireing is less than or equal to and predetermines the colour temperature difference, the colour temperature value of this light filling lamp is comparatively close with the colour temperature value of the light in the environment of present here to make the light of whole environment more unanimous, step 104 below the terminal execution this moment.
If the difference between the color temperature value of the light supplement lamp and the newly obtained second color temperature value is greater than the preset color temperature difference, the operation of adjusting the color temperature value of the light supplement lamp by the terminal may be: and if the difference value between the color temperature value of the light supplement lamp and the newly acquired second color temperature value is larger than the preset color temperature difference value, and the color temperature value of the light supplement lamp is smaller than the newly acquired second color temperature value, increasing the color temperature value of the light supplement lamp. And if the difference value between the color temperature value of the light supplement lamp and the newly acquired second color temperature value is larger than the preset color temperature difference value, and the color temperature value of the light supplement lamp is larger than the newly acquired second color temperature value, reducing the color temperature value of the light supplement lamp.
For example, the preset color temperature difference value is 30K (kelvin). The color temperature value of the light supplement lamp is 2100K, the obtained second color temperature value is 2160K, the difference value between the color temperature value of the light supplement lamp and the newly obtained second color temperature value is 60K and is larger than the preset color temperature difference value, and the color temperature value of the light supplement lamp is 2100K and is smaller than the newly obtained second color temperature value 2160K, so that the terminal enlarges the color temperature value of the light supplement lamp at the moment and then obtains the second color temperature value again. The adjusted color temperature value of the light supplement lamp is 2130K, the second color temperature value is 2170K, the adjusted color temperature value of the light supplement lamp is compared with the second color temperature value which is obtained again, the difference value between the color temperature value of the light supplement lamp and the second color temperature value which is obtained newly is 40K and is larger than the preset color temperature difference value, and the color temperature value 2130K of the light supplement lamp is smaller than the second color temperature value 2170K which is obtained newly, the terminal continuously adjusts the color temperature value of the light supplement lamp, and then the second color temperature value is obtained again. The adjusted color temperature value of the light supplement lamp is 2160K, the newly acquired second color temperature value is 2180K, the adjusted color temperature value of the light supplement lamp is compared with the newly acquired second color temperature value, the difference between the color temperature value of the light supplement lamp and the newly acquired second color temperature value is 20K and is smaller than the preset color temperature difference, and the fact that the color temperature value of the light supplement lamp is closer to the newly acquired second color temperature value is proved, so that the color temperature value of the light supplement lamp does not need to be adjusted.
Step 104: and after the difference value between the color temperature value of the light supplementing lamp and the second color temperature value is smaller than or equal to the preset color temperature difference value, the terminal determines a target hue value according to the second color temperature value.
The target hue value is a hue value that can improve the user's skin tone at the second hue value. The hue value is the distance from the point on the isochromatic temperature line intersecting the blackbody color temperature trajectory line to the blackbody color temperature trajectory line.
Specifically, the operation of step 104 can be implemented in two possible ways:
in a first possible manner, the terminal determines the target hue value based on the first correspondence and the second hue value.
The first corresponding relation is the corresponding relation between the color temperature value and the hue value, and the hue value corresponding to each color temperature value in the first corresponding relation is the hue value capable of improving the skin color of the public at the color temperature value, namely for the skin color of most users, the skin color of the users can be shot well at the color temperature value by using the hue value corresponding to the color temperature value in the first corresponding relation.
The hue values corresponding to different color temperature values in the first corresponding relationship may be preset, for example, the hue values may be hue values capable of improving the skin color of the public under different color temperature values simulated in a laboratory in advance. Specifically, it is possible to simulate the user skin color at a plurality of tone values at the same color temperature value, and by comparing and observing the shooting effect of the majority of the user skin colors at the plurality of tone values, select a tone value which makes the majority of the user skin colors look better at the color temperature value from the plurality of tone values, and the tone value is the tone value corresponding to the color temperature value which can improve the popular skin color. By analogy, the tone values capable of improving the skin color of the public under different color temperature values are obtained through experimental simulation, and the tone values capable of improving the skin color of the public corresponding to each color temperature value in the different color temperature values obtained through simulation are used as the first corresponding relation. In practical application, the terminal can determine a tone value capable of improving the skin color of the public, namely a target tone value, according to the first corresponding relation and the color temperature value of the light in the environment by acquiring the color temperature value (namely, the second color temperature value) of the light in the environment.
For example, if the second color temperature value is 3000K, the hue value corresponding to the second color temperature value may be obtained as 20 from the first correspondence relationship (i.e., the correspondence relationship between the color temperature value and the hue value) shown in the following table 1, and it may be determined that the hue value capable of improving the skin color of the general public is 20, that is, the target hue value is 20, when the color temperature value of the light in the environment is 3000K.
TABLE 1
Color temperature value Tone value
2300K 10
2600K 30
3000K 20
4000K 30
…… ……
In the embodiments of the present application, the correspondence between the color temperature value and the color tone value is described only by taking table 1 as an example, and table 1 does not limit the embodiments of the present application.
Specifically, if a color temperature value identical to the second color temperature value exists in the first corresponding relationship, the terminal acquires a tone value corresponding to the second color temperature value from the first corresponding relationship as a target tone value; if the first corresponding relation does not have the color temperature value which is the same as the second color temperature value, the terminal selects the first two color temperature values from the plurality of color temperature values in the first corresponding relation according to the sequence that the difference values between the plurality of color temperature values in the first corresponding relation and the second color temperature value are from small to large, and determines the target color tone value according to the difference value between the first two color temperature values and the second color temperature value and the two corresponding color tone values of the first two color temperature values in the first corresponding relation.
In this case, if the first correspondence relationship has a color temperature value that is the same as the second color temperature value, and it is described that the hue value corresponding to the second color temperature value can be directly found in the first correspondence relationship, the terminal directly obtains the hue value corresponding to the second color temperature value from the first correspondence relationship as the target color temperature value.
If the first corresponding relationship does not have the same color temperature value as the second color temperature value, which means that the hue value corresponding to the second color temperature value cannot be directly found from the first corresponding relationship, the terminal needs to calculate the hue value corresponding to the second color temperature value, that is, the target hue value. The terminal selects the first two color temperature values from the plurality of color temperature values in the first corresponding relation according to the sequence that the difference values between the plurality of color temperature values and the second color temperature value in the first corresponding relation are from small to large, and can select two color temperature values which are closer to the second color temperature, namely the second color temperature value is between the two color temperature values.
The operation of determining the target hue value by the terminal according to the difference between the first two color temperature values and the second color temperature value and the two hue values corresponding to the first two color temperature values in the first corresponding relationship may be: the terminal determines the difference value of the first two color temperature values and the difference value between the two hue values corresponding to the first two color temperature values in the first corresponding relation; the terminal divides the difference between the corresponding color temperature value with smaller hue value in the previous two color temperature values and the second color temperature value by the difference of the previous two color temperature values to obtain a color temperature difference value ratio; the terminal multiplies the difference value between the two tone values corresponding to the previous two color temperature values in the first corresponding relation by the color temperature difference value proportion to obtain a tone difference value; and the terminal adds the hue value corresponding to the color temperature value with the smaller corresponding hue value in the previous two color temperature values with the hue difference value to obtain the target hue value.
For example, the second color temperature value is 3500K, the first corresponding relationship is as shown in table 1 above, the color temperature value identical to the second color temperature value does not exist in the first corresponding relationship, the difference between the plurality of color temperature values in the first corresponding relationship and the second color temperature value is 3500-: 3000K, 4000K, 2600K and 2300K, wherein the former two color temperature values are 3000K and 4000K. The terminal determines that the difference value between the first two color temperature values is 1000K and determines that the difference value between the two hue values corresponding to the first two color temperature values in the first correspondence relationship is 10. And dividing the difference value of the corresponding color temperature value 3000K with smaller hue value in the first two color temperature values and the second color temperature value by the difference value of the first two color temperature values by 1000K to obtain the color temperature difference value proportion of 500/1000-0.5. The terminal multiplies the difference between the two hue values corresponding to the first two color temperature values in the first correspondence by the color temperature difference value ratio: the hue difference was 5 when 10 × 0.5 was changed to 5. The terminal adds the hue value corresponding to the color temperature value 3000K with the smaller corresponding hue value in the first two color temperature values with the hue difference value: 20+5 is 25, resulting in a target hue value of 25.
In a second possible mode, the terminal acquires the skin color type of the user; acquiring a corresponding relation associated with the skin color type of the user from the corresponding relations as a second corresponding relation; and determining the target hue value according to the second corresponding relation and the second hue temperature value.
The skin color type refers to a kind of skin color of the user, such as yellow skin, black skin, white skin, and the like, which is not limited in the embodiment of the present application.
The corresponding relations are all corresponding relations between color temperature values and hue values, the corresponding relations are corresponding relations one by one associated with a plurality of skin color types, and the hue value corresponding to each color temperature value in each corresponding relation in the corresponding relations is a hue value of skin color of the skin color type associated with the corresponding relation under the color temperature value. For example, for the corresponding relationship associated with yellow skin, the hue value corresponding to each color temperature value in the corresponding relationship is the hue value capable of improving the skin color of yellow skin at the color temperature value.
The hue values corresponding to different color temperature values in the plurality of corresponding relationships may be preset, for example, the hue values corresponding to a plurality of skin color types may be improved under different color temperature values by simulating skin colors of a plurality of skin color types in a laboratory in advance. Specifically, for a skin color type in the plurality of skin color types, shooting the skin color of the skin color type at a plurality of tone values is simulated at the same color temperature value, and a tone value which can make the skin color of the skin color type look good at the color temperature value is selected from the plurality of tone values by comparing the shooting effect of the skin color type at the plurality of tone values, and the tone value is the tone value which corresponds to the color temperature and can improve the skin color of the skin color type. And by analogy, the tone value of the skin color capable of improving the skin color type under different color temperature values is obtained through experimental simulation, and the tone value of the skin color capable of improving the skin color type corresponding to each color temperature value in the different color temperature values obtained through simulation is used as the corresponding relation associated with the skin color type.
In this case, the multiple correspondence relationships are associated with the multiple skin color types one by one, so that the possibility is provided for different users to select the skin color type corresponding to the skin color of the user, the user selects the skin color type of the user in the terminal before shooting, and then the terminal determines the correspondence relationship associated with the skin color type of the user as the second correspondence relationship, so that the second correspondence relationship is more suitable for the skin color of the user, and thus, the target tone value determined according to the second correspondence relationship is the tone value of the skin color of the user under the color temperature value of light in the environment where the target tone value is located, and the determination of the target tone value is more suitable and accurate.
The manner in which the terminal determines the target hue value according to the second correspondence and the second hue value is similar to the manner in which the terminal determines the target hue value according to the first correspondence and the second hue value, and details are not repeated here.
Step 105: the terminal adjusts the brightness of the light supplement lamp so that the difference value between the hue value of the light in the environment and the target hue value is smaller than or equal to the preset hue difference value.
The preset hue difference value may be set in advance, and the preset hue difference value may be set to be smaller. If the difference between the hue value of the light in the environment and the target hue value is smaller than or equal to the preset hue difference, it is indicated that the difference between the hue value of the light in the environment and the target hue value is smaller, that is, the hue value of the light in the environment is closer to the target hue value. If the difference between the hue value of the light in the environment and the target hue value is greater than the preset hue difference, it is indicated that the difference between the hue value of the light in the environment and the target hue value is greater, that is, the hue value of the light in the environment is not close to the target hue value.
Therefore, the terminal changes the hue value of the light in the environment by adjusting the brightness of the light supplement lamp, so that the hue value of the light in the environment is closer to the target hue value, under the condition, the skin color of a user can be improved by shooting under the hue value of the light in the environment, and the brightness of the light supplement lamp does not need to be adjusted at the moment.
Specifically, the operation of step 105 may be: obtaining the hue value of light in the environment; comparing the newly acquired hue value of the light in the environment with a target hue value; if the difference value between the newly acquired hue value of the light in the environment and the target hue value is larger than the preset hue difference value, the brightness of the light supplementing lamp is adjusted; and after the brightness of the light supplement lamp is adjusted, re-acquiring the hue value of the light in the environment, and returning to the step of comparing the newly acquired hue value of the light in the environment with the target hue value until the difference value between the newly acquired hue value of the light in the environment and the target hue value is less than or equal to the preset hue difference value.
In this case, the terminal compares the newly acquired hue value of the light in the present environment with the target hue value to determine whether the newly acquired hue value of the light in the present environment is sufficiently close to the target hue value. And if the difference value between the newly acquired hue value of the light in the environment and the target hue value is larger than the preset hue difference value, which indicates that the newly acquired hue value of the light in the environment is not close to the target hue value, the terminal adjusts the brightness of the light supplement lamp. After the brightness of the light supplement lamp is adjusted, the hue value of the light in the environment is obtained again to be compared, whether the hue value of the light in the current environment is close to the target hue value is judged, and the brightness of the light supplement lamp is continuously adjusted when the current environment is not close to the target hue value. Therefore, the brightness of the light supplement lamp is continuously adjusted until the difference value between the newly acquired hue value of the light in the environment where the light is located and the target hue value is smaller than or equal to the preset color temperature difference value, at the moment, the hue value of the light in the current environment where the light is located is closer to the target hue value, namely, the hue value of the light in the environment where the light is located is the hue value capable of improving the skin color of the user under the color temperature value of the light in the environment where the light is located, and therefore the user can shoot the skin color of the user well.
Alternatively, the terminal may obtain a white balance result of the light in the environment, where the white balance result includes a hue value of the light in the environment.
If the difference between the newly acquired hue value of the light in the environment and the target hue value is greater than the preset hue difference, the operation of adjusting the brightness of the light supplement lamp may be: and if the difference value between the newly acquired hue value of the light in the environment and the target hue value is larger than the preset hue difference value and the newly acquired hue value of the light in the environment is smaller than the target hue value, the terminal brightens the brightness of the light supplement lamp. And if the difference value between the newly acquired hue value of the light in the environment and the target hue value is larger than the preset hue difference value, and the newly acquired hue value of the light in the environment is larger than the target hue value, dimming the brightness of the light supplement lamp by the terminal.
For example: the preset hue difference value is 5. The second color temperature value is 3000K, the hue value of the light in the obtained environment is 10, the target hue value is 20, the difference value between the hue value of the light in the obtained environment and the target hue value is 10, which is greater than the preset color temperature difference value, and the hue value of the light in the obtained environment is 10 smaller than the target hue value 20, so that the terminal brightens the brightness of the light supplement lamp at the moment, and then obtains the hue value of the light in the obtained environment again. And (3) reacquiring the hue value of the light in the environment to be 26, comparing the reacquired hue value of the light in the environment with the target hue value to obtain that the difference value between the reacquired hue value 26 of the light in the environment and the target hue value 20 is 6 and is larger than the preset color temperature difference value, and the reacquired hue value 26 of the light in the environment is larger than the target hue value 20, dimming the brightness of the fill light by the terminal, and reacquiring the hue value of the light in the environment. And the light tone value in the environment is acquired again and is 22, the acquired light tone value in the environment is compared with the target light tone value, the difference value between the acquired light tone value in the environment and the target light tone value is 2, and is smaller than the preset color temperature difference value, which indicates that the acquired light tone value in the environment is closer to the target light tone value, the brightness of the light supplement lamp does not need to be adjusted, and when the color temperature value of the light in the environment is 3000K, the current light tone value of the light in the environment can improve the skin color of the user.
It is to be noted that the light supplement method provided in the embodiment of the present application may be applied to shooting software, and may also be applied to light supplement software. If the light supplement method provided by the embodiment of the application is applied to the shooting software, when the shooting software is turned on, the shooting software can automatically complete the light supplement correction operation on the environment where the shooting software is located, and a user can directly use the shooting software to shoot, so that a real and good image can be shot. If the light supplement method provided by the embodiment of the application is applied to light supplement software, when light supplement is needed by a user, the light supplement correction operation on the environment can be completed by opening the light supplement software, then shooting can be performed by opening shooting software, and a real and good image can be shot.
In this embodiment, the terminal obtains a first color temperature value when the light supplement lamp is not turned on, where the first color temperature value is a color temperature value of light in an environment where the light supplement lamp is not turned on, that is, a color temperature value of natural light. After the light supplement lamp is turned on, the color temperature value of the light supplement lamp is set to be the first color temperature value, so that the light in the environment where the light supplement lamp is turned on cannot become more complex, the color of the light emitted by the light supplement lamp is close to the color of natural light, and the color of an object can be reflected truly. And then, the difference value between the color temperature value of the light supplementing lamp and the second color temperature value is smaller than or equal to the preset color temperature difference value by adjusting the color temperature value of the light supplementing lamp, so that the consistency of the light of the whole environment is ensured even if the color temperature value of the light supplementing lamp is closer to the color temperature value of the light in the current environment. And then, acquiring a target hue value according to the second hue value, wherein the target hue value is a hue value capable of improving the skin color of the user under the second hue value, and then adjusting the brightness of the fill-in lamp to enable the difference value between the hue value of the light in the environment and the target hue value to be less than or equal to a preset hue difference value, even if the hue value of the light in the environment is close to the target hue value. Under the condition, the skin color of the user shot under the light in the environment is real and better seen, so that a better shooting effect can be obtained.
Fig. 2 is a schematic structural diagram of a light supplement device according to an embodiment of the present disclosure. The apparatus may be implemented as part or all of a computer device, which may be the computer device shown in fig. 3 below, by software, hardware, or a combination of both. Referring to fig. 2, the apparatus includes: the device comprises an acquisition module 201, a setting module 202, a first adjustment module 203, a determination module 204 and a second adjustment module 205.
The obtaining module 201 is configured to obtain a first color temperature value when the light supplement lamp is not turned on, where the first color temperature value is a color temperature value of light in an environment where the light supplement lamp is not turned on;
the setting module 202 is configured to turn on the light supplement lamp and set a color temperature value of the light supplement lamp to a first color temperature value;
a first adjusting module 203, configured to adjust a color temperature value of the light supplement lamp, so that a difference between the color temperature value of the light supplement lamp and a second color temperature value is smaller than or equal to a preset color temperature difference, where the second color temperature value is a color temperature value of light in an environment where the light supplement lamp is turned on;
a determining module 204, configured to determine a target hue value according to the second color temperature value after a difference between the color temperature value of the fill light and the second color temperature value is less than or equal to a preset color temperature difference, where the target hue value is a hue value capable of improving a user skin color at the second color temperature value;
the second adjusting module 205 is configured to adjust the brightness of the fill light so that a difference between a hue value of light in an environment and a target hue value is smaller than or equal to a preset hue difference value.
Optionally, the obtaining module 201 is configured to:
under the condition that the light supplement lamp is not turned on, light rays in the environment are captured through a color temperature detection element in the image sensor, pixel data are generated, and a first color temperature value is determined according to the pixel data.
Optionally, the obtaining module 201 is configured to:
under the condition that the light supplement lamp is not turned on, light rays in the environment are captured through the spectrum sensor, pixel data are generated, spectrum information is generated, and the first color temperature value is determined according to the spectrum information.
Optionally, the obtaining module 201 is configured to:
and under the condition that the light supplement lamp is not turned on, shooting the environment to generate an original image, and determining a first color temperature value according to the original image.
Optionally, the first adjusting module 203 is configured to:
setting the color temperature value of the light supplement lamp as a first color temperature value, and then acquiring a second color temperature value;
comparing the color temperature value of the light supplement lamp with the newly acquired second color temperature value;
if the difference value between the color temperature value of the light supplement lamp and the newly acquired second color temperature value is larger than the preset color temperature difference value, adjusting the color temperature value of the light supplement lamp;
and after the color temperature value of the light supplement lamp is adjusted, acquiring a second color temperature value again, and returning to the step of comparing the color temperature value of the light supplement lamp with the newly acquired second color temperature value until the difference between the color temperature value of the light supplement lamp and the newly acquired second color temperature value is less than or equal to a preset color temperature difference.
Optionally, the determining module 204 is configured to:
and determining a target hue value according to the first corresponding relation and the second hue value, wherein the first corresponding relation is the corresponding relation between the color temperature value and the hue value, and the hue value corresponding to each color temperature value in the first corresponding relation is the hue value capable of improving the popular skin color under the color temperature value.
Optionally, the determining module 204 is configured to:
acquiring a skin color type of a user;
acquiring a corresponding relation associated with the user skin color type from a plurality of corresponding relations as a second corresponding relation, wherein the corresponding relations are all corresponding relations between color temperature values and color tone values, the corresponding relations are corresponding relations one-to-one associated with a plurality of skin color types, and the color tone value corresponding to each color temperature value in each corresponding relation in the corresponding relations is a color tone value capable of improving the skin color of the skin color type associated with the corresponding relation at the color temperature value;
and determining the target hue value according to the second corresponding relation and the second hue temperature value.
Optionally, the second adjusting module 205 is configured to:
obtaining the hue value of light in the environment;
comparing the newly acquired hue value of the light in the environment with a target hue value;
if the difference value between the newly acquired hue value of the light in the environment and the target hue value is larger than the preset hue difference value, the brightness of the light supplementing lamp is adjusted;
and after the brightness of the light supplement lamp is adjusted, re-acquiring the hue value of the light in the environment, and returning to the step of comparing the newly acquired hue value of the light in the environment with the target hue value until the difference value between the newly acquired hue value of the light in the environment and the target hue value is less than or equal to the preset hue difference value.
In this embodiment, the terminal obtains a first color temperature value when the light supplement lamp is not turned on, where the first color temperature value is a color temperature value of light in an environment where the light supplement lamp is not turned on, that is, a color temperature value of natural light. After the light supplement lamp is turned on, the color temperature value of the light supplement lamp is set to be the first color temperature value, so that the light in the environment where the light supplement lamp is turned on cannot become more complex, the color of the light emitted by the light supplement lamp is close to the color of natural light, and the color of an object can be reflected truly. And then, the difference value between the color temperature value of the light supplementing lamp and the second color temperature value is smaller than or equal to the preset color temperature difference value by adjusting the color temperature value of the light supplementing lamp, so that the consistency of the light of the whole environment is ensured even if the color temperature value of the light supplementing lamp is closer to the color temperature value of the light in the current environment. And then, acquiring a target hue value according to the second hue value, wherein the target hue value is a hue value capable of improving the skin color of the user under the second hue value, and then adjusting the brightness of the fill-in lamp to enable the difference value between the hue value of the light in the environment and the target hue value to be less than or equal to a preset hue difference value, even if the hue value of the light in the environment is close to the target hue value. Under the condition, the skin color of the user shot under the light in the environment is real and better seen, so that a better shooting effect can be obtained.
It should be noted that: in the light supplement device provided in the above embodiment, only the division of the functional modules is illustrated in the light supplement, and in practical applications, the function distribution may be completed by different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
Each functional unit and module in the above embodiments may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used to limit the protection scope of the embodiments of the present application.
The light supplement device and the light supplement method provided by the embodiments belong to the same concept, and the specific working processes and technical effects of the units and modules in the embodiments can be referred to the method embodiments, which are not described herein again.
Fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present application. As shown in fig. 3, the computer device 3 includes: a processor 30, a memory 31, and a computer program 32 stored in the memory 31 and operable on the processor 30, wherein the processor 30 executes the computer program 32 to implement the steps of the fill lighting method in the above-mentioned embodiments.
The computer device 3 may be a general purpose computer device or a special purpose computer device. In a specific implementation, the computer device 3 may be a desktop computer, a laptop computer, a palmtop computer, a mobile phone, a tablet computer, a wireless terminal device, and the like, and the embodiment of the present application does not limit the type of the computer device 3. Those skilled in the art will appreciate that fig. 3 is only an example of the computer device 3, and does not constitute a limitation of the computer device 3, and may include more or less components than those shown, or combine some components, or different components, such as input and output devices, network access devices, etc.
The Processor 30 may be a Central Processing Unit (CPU), and the Processor 30 may also be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or any conventional processor.
The storage 31 may in some embodiments be an internal storage unit of the computer device 3, such as a hard disk or a memory of the computer device 3. The memory 31 may also be an external storage device of the computer device 3 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the computer device 3. Further, the memory 31 may also include both an internal storage unit of the computer device 3 and an external storage device. The memory 31 is used for storing an operating system, an application program, a Boot Loader (Boot Loader), data, and other programs. The memory 31 may also be used to temporarily store data that has been output or is to be output.
An embodiment of the present application further provides a computer device, where the computer device includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, the processor implementing the steps of any of the various method embodiments described above when executing the computer program.
The embodiments of the present application also provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
The embodiments of the present application provide a computer program product, which when run on a computer causes the computer to perform the steps of the above-described method embodiments.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the above method embodiments may be implemented by a computer program, which may be stored in a computer readable storage medium and used by a processor to implement the steps of the above method embodiments. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or apparatus capable of carrying computer program code to a photographing apparatus/terminal device, a recording medium, computer Memory, ROM (Read-Only Memory), RAM (Random Access Memory), CD-ROM (Compact Disc Read-Only Memory), magnetic tape, floppy disk, optical data storage device, etc. The computer-readable storage medium referred to herein may be a non-volatile storage medium, in other words, a non-transitory storage medium.
It should be understood that all or part of the steps for implementing the above embodiments may be implemented 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. The computer instructions may be stored in the computer-readable storage medium described above.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/computer device and method may be implemented in other ways. For example, the above-described apparatus/computer device embodiments are merely illustrative, and for example, a module or a unit may be divided into only one logical function, and may be implemented in other ways, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A method for supplementing light, the method comprising:
acquiring a first color temperature value under the condition that a light supplement lamp is not turned on, wherein the first color temperature value is the color temperature value of light rays in the environment where the light supplement lamp is not turned on;
turning on the light supplement lamp, and setting the color temperature value of the light supplement lamp as the first color temperature value;
adjusting the color temperature value of the light supplement lamp so that the difference value between the color temperature value of the light supplement lamp and a second color temperature value is smaller than or equal to a preset color temperature difference value, wherein the second color temperature value is the color temperature value of light in the environment where the light supplement lamp is turned on;
after the difference value between the color temperature value of the light supplement lamp and the second color temperature value is smaller than or equal to the preset color temperature difference value, determining a target color tone value according to the second color temperature value, wherein the target color tone value is a color tone value capable of improving the skin color of a user under the second color temperature value;
and adjusting the brightness of the light supplement lamp to enable the difference value between the hue value of the light in the environment and the target hue value to be smaller than or equal to a preset hue difference value.
2. The method of claim 1, wherein obtaining the first color temperature value without turning on a fill light comprises:
under the condition that a light supplement lamp is not turned on, capturing light rays in the environment through a color temperature detection element in an image sensor to generate pixel data, and determining a first color temperature value according to the pixel data; alternatively, the first and second electrodes may be,
under the condition that a light supplement lamp is not turned on, capturing light rays in the environment through a spectrum sensor to generate spectrum information, and determining the first color temperature value according to the spectrum information; alternatively, the first and second electrodes may be,
and under the condition that a light supplement lamp is not turned on, shooting the environment to generate an original image, and determining the first color temperature value according to the original image.
3. The method of claim 1, wherein the adjusting the color temperature value of the fill-in lamp such that the difference between the color temperature value of the fill-in lamp and the second color temperature value is less than or equal to a preset color temperature difference comprises:
after the color temperature value of the light supplement lamp is set as the first color temperature value, the second color temperature value is obtained;
comparing the color temperature value of the light supplement lamp with the newly acquired second color temperature value;
if the difference value between the color temperature value of the light supplement lamp and the newly acquired second color temperature value is larger than the preset color temperature difference value, adjusting the color temperature value of the light supplement lamp;
and after the color temperature value of the light supplement lamp is adjusted, acquiring the second color temperature value again, and returning to the step of comparing the color temperature value of the light supplement lamp with the newly acquired second color temperature value until the difference between the color temperature value of the light supplement lamp and the newly acquired second color temperature value is less than or equal to the preset color temperature difference.
4. The method of claim 1, wherein determining a target hue value based on the second hue temperature value comprises:
and determining the target hue value according to a first corresponding relation and the second hue value, wherein the first corresponding relation is a corresponding relation between the hue value and the hue value, and the hue value corresponding to each hue value in the first corresponding relation is a hue value capable of improving the skin color of the public under the one hue value.
5. The method of claim 1, wherein determining a target hue value based on the second hue temperature value comprises:
acquiring a skin color type of a user;
acquiring a corresponding relation associated with the user skin color type from a plurality of corresponding relations as a second corresponding relation, wherein the plurality of corresponding relations are all corresponding relations between color temperature values and color tone values, the plurality of corresponding relations are corresponding relations one-to-one associated with a plurality of skin color types, and the color tone value corresponding to each color temperature value in each corresponding relation in the plurality of corresponding relations is a color tone value capable of improving the skin color of the skin color type associated with the corresponding relation at the color temperature value;
and determining the target tone value according to the second corresponding relation and the second color temperature value.
6. The method of claim 1, wherein the adjusting the brightness of the fill light to make the difference between the hue value of the light in the environment and the target hue value smaller than a preset hue difference value comprises:
obtaining the hue value of light in the environment;
comparing the newly acquired hue value of the light in the environment with the target hue value;
if the difference value between the newly acquired hue value of the light in the environment and the target hue value is larger than the preset hue difference value, adjusting the brightness of the light supplement lamp;
and after the brightness of the light supplement lamp is adjusted, re-acquiring the hue value of the light in the environment, and returning to the step of comparing the newly acquired hue value of the light in the environment with the target hue value until the difference value between the newly acquired hue value of the light in the environment and the target hue value is less than or equal to the preset hue difference value.
7. A light supplement apparatus, the apparatus comprising:
the device comprises an acquisition module, a processing module and a control module, wherein the acquisition module is used for acquiring a first color temperature value under the condition that a light supplement lamp is not turned on, and the first color temperature value is the color temperature value of light rays in the environment where the light supplement lamp is not turned on;
the setting module is used for turning on the light supplement lamp and setting the color temperature value of the light supplement lamp as the first color temperature value;
the first adjusting module is used for adjusting the color temperature value of the light supplement lamp so that the difference value between the color temperature value of the light supplement lamp and a second color temperature value is smaller than or equal to a preset color temperature difference value, and the second color temperature value is the color temperature value of light in the environment where the light supplement lamp is turned on;
the determination module is configured to determine a target hue value according to the second color temperature value after a difference between the color temperature value of the fill light and the second color temperature value is less than or equal to the preset color temperature difference, where the target hue value is a hue value capable of improving a user skin color at the second color temperature value;
and the second adjusting module is used for adjusting the brightness of the light supplementing lamp so that the difference value between the hue value of the light in the environment and the target hue value is smaller than or equal to a preset hue difference value.
8. A computer device, characterized in that the computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, which computer program, when executed by the processor, implements the method according to any of claims 1 to 6.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the method of any one of claims 1 to 6.
10. A computer program product, characterized in that it contains computer instructions which, when run on a computer, cause the computer to perform the method according to any one of claims 1 to 6.
CN202111375576.2A 2021-11-19 2021-11-19 Light supplementing method, device, equipment, storage medium and computer product Active CN114245025B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111375576.2A CN114245025B (en) 2021-11-19 2021-11-19 Light supplementing method, device, equipment, storage medium and computer product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111375576.2A CN114245025B (en) 2021-11-19 2021-11-19 Light supplementing method, device, equipment, storage medium and computer product

Publications (2)

Publication Number Publication Date
CN114245025A true CN114245025A (en) 2022-03-25
CN114245025B CN114245025B (en) 2023-07-04

Family

ID=80750196

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111375576.2A Active CN114245025B (en) 2021-11-19 2021-11-19 Light supplementing method, device, equipment, storage medium and computer product

Country Status (1)

Country Link
CN (1) CN114245025B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114745510A (en) * 2022-06-13 2022-07-12 东莞锐视光电科技有限公司 Automatic LED light source calibration method and system for target image acquisition
CN117042266A (en) * 2023-10-10 2023-11-10 深圳市千岩科技有限公司 Control method, control device, electronic equipment and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106101569A (en) * 2016-08-22 2016-11-09 维沃移动通信有限公司 A kind of method of light filling of taking pictures and mobile terminal
CN109005360A (en) * 2018-06-11 2018-12-14 北京小米移动软件有限公司 Light compensation method, device and the computer readable storage medium of shooting environmental
US20200375005A1 (en) * 2019-05-21 2020-11-26 Beijing Xiaomi Mobile Software Co., Ltd. Light supplement module, light supplement control method and terminal for light supplement module
CN112312030A (en) * 2019-08-01 2021-02-02 深圳怡化电脑股份有限公司 Photographing light supplement method and device, computer equipment and storage medium
CN112333399A (en) * 2020-11-30 2021-02-05 深圳创维-Rgb电子有限公司 Shooting light supplementing method, intelligent terminal and readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106101569A (en) * 2016-08-22 2016-11-09 维沃移动通信有限公司 A kind of method of light filling of taking pictures and mobile terminal
CN109005360A (en) * 2018-06-11 2018-12-14 北京小米移动软件有限公司 Light compensation method, device and the computer readable storage medium of shooting environmental
US20200375005A1 (en) * 2019-05-21 2020-11-26 Beijing Xiaomi Mobile Software Co., Ltd. Light supplement module, light supplement control method and terminal for light supplement module
CN112312030A (en) * 2019-08-01 2021-02-02 深圳怡化电脑股份有限公司 Photographing light supplement method and device, computer equipment and storage medium
CN112333399A (en) * 2020-11-30 2021-02-05 深圳创维-Rgb电子有限公司 Shooting light supplementing method, intelligent terminal and readable storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114745510A (en) * 2022-06-13 2022-07-12 东莞锐视光电科技有限公司 Automatic LED light source calibration method and system for target image acquisition
CN117042266A (en) * 2023-10-10 2023-11-10 深圳市千岩科技有限公司 Control method, control device, electronic equipment and computer readable storage medium
CN117042266B (en) * 2023-10-10 2024-02-23 深圳市千岩科技有限公司 Control method, control device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN114245025B (en) 2023-07-04

Similar Documents

Publication Publication Date Title
US10120267B2 (en) System and method for re-configuring a lighting arrangement
CN114245025B (en) Light supplementing method, device, equipment, storage medium and computer product
US6788813B2 (en) System and method for effectively performing a white balance operation
CN109688396B (en) Image white balance processing method and device and terminal equipment
CN113452980B (en) Image processing method, terminal and storage medium
WO2022042501A1 (en) White balance compensation method and apparatus, and electronic device
US20030020826A1 (en) Automatic white balancing via illuminant scoring autoexposure by neural network mapping
CN105827988A (en) Light control method and device in mobile terminal shooting
Zapryanov et al. Automatic White Balance Algorithms forDigital StillCameras–a Comparative Study
US20180025476A1 (en) Apparatus and method for processing image, and storage medium
CN106412449A (en) Method for shooting light supplement and equipment
CN113676715B (en) Image processing method and device
CN113329217B (en) Automatic white balance parameter processing method and device, and computer readable storage medium
US8654210B2 (en) Adaptive color imaging
CN109076199A (en) White balance adjustment device and its working method and working procedure
CN108886608A (en) White balance adjustment device and its working method and working procedure
CN109903248A (en) A kind of method and image processing method generating automatic white balance model
CN112399160B (en) Color management method and device, terminal and storage medium
Tyukhova The assessment of high dynamic range luminance measurements with LED lighting
CN114051101A (en) Automatic adjustment method and device for supplementary lighting of human face
Florin et al. A method to enhance colors in a digital image
Li Consideration of human visual mechanism for image white balance
Hasche et al. iPhone12 imagery in scene-referred computer graphics pipelines
Srivastava et al. White synthesis with user input for color balancing on mobile camera systems
Vera et al. Color image formation for multiscale gigapixel imaging

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