CN107071272B - Method and device for controlling brightness of camera fill-in light and terminal - Google Patents

Method and device for controlling brightness of camera fill-in light and terminal Download PDF

Info

Publication number
CN107071272B
CN107071272B CN201710089033.1A CN201710089033A CN107071272B CN 107071272 B CN107071272 B CN 107071272B CN 201710089033 A CN201710089033 A CN 201710089033A CN 107071272 B CN107071272 B CN 107071272B
Authority
CN
China
Prior art keywords
value
power supply
light
brightness
supply parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710089033.1A
Other languages
Chinese (zh)
Other versions
CN107071272A (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.)
Qiku Internet Technology Shenzhen Co Ltd
Original Assignee
Qiku Internet Technology Shenzhen 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 Qiku Internet Technology Shenzhen Co Ltd filed Critical Qiku Internet Technology Shenzhen Co Ltd
Priority to CN201710089033.1A priority Critical patent/CN107071272B/en
Publication of CN107071272A publication Critical patent/CN107071272A/en
Application granted granted Critical
Publication of CN107071272B publication Critical patent/CN107071272B/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/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Studio Devices (AREA)
  • Circuit Arrangement For Electric Light Sources In General (AREA)
  • Image Input (AREA)

Abstract

The invention provides a method, a device and a terminal for controlling the brightness of a camera fill-in light, and relates to the technical field of camera fill-in light control, wherein the method comprises the following steps: when the camera function of the terminal captures the preview image, determining a light supplement influence value of the current photo according to the preview image, wherein the light supplement influence value at least comprises two of the following parameters: the environment brightness value, the face proportion value and the shot object distance value; determining an optimal power supply parameter value corresponding to the brightness of the light supplement lamp according to the light supplement influence value; and controlling the brightness of the light supplement lamp when the terminal takes a picture according to the optimal power supply parameter value. The method and the device can control the brightness of the light supplement lamp of the terminal according to the current light supplement influence value, and further improve the light supplement effect of the camera.

Description

Method and device for controlling brightness of camera fill-in light and terminal
Technical Field
The invention relates to the technical field of camera light supplement control, in particular to a method, a device and a terminal for controlling the brightness of a camera light supplement lamp.
Background
When a terminal with a camera shooting function such as an existing mobile phone and a camera takes a picture, a light supplement lamp is usually arranged for supplementing light so as to slow down the influence of the environment on the shot picture in order to acquire a high-quality picture under an environment with poor brightness; however, the brightness control of the light supplement lamp in the existing camera function is relatively fixed, for example, no matter what kind of environment, a kind of brightness is adopted for light supplement, and the size of the brightness is usually manually set in advance, resulting in a poor light supplement effect.
Aiming at the problem of poor light supplement effect in the camera function, an effective solution is not provided at present.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a method, an apparatus, and a terminal for controlling luminance of a light supplement lamp of a camera, which can control the luminance of the light supplement lamp of the terminal during photographing according to a current light supplement influence value, so as to improve a light supplement effect of the camera.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:
in a first aspect, an embodiment of the present invention provides a method for controlling luminance of a fill-in light of a camera, including: when the camera function of the terminal captures the preview image, determining a light supplement influence value of the current photo according to the preview image, wherein the light supplement influence value at least comprises two of the following parameters: the environment brightness value, the face proportion value and the shot object distance value; determining an optimal power supply parameter value corresponding to the brightness of the light supplement lamp according to the light supplement influence value; and controlling the brightness of a supplementary lighting lamp of the terminal according to the optimal power supply parameter value.
With reference to the first aspect, an embodiment of the present invention provides a first possible implementation manner of the first aspect, where the determining, according to the preview image, a fill lighting influence value of the current photo includes: when the fill-in light influence value comprises an environment brightness value, determining the average brightness of the preview image as the current photographing environment brightness value; when the light supplement influence value comprises a face proportion value, counting the maximum face proportion value in the preview image, and determining the maximum face proportion value as the face proportion value of the current photo; and when the fill-in light influence value comprises a shot object distance value, determining the shot object distance value of the current picture according to the phase difference of the preview image.
With reference to the first possible implementation manner of the first aspect, an embodiment of the present invention provides a second possible implementation manner of the first aspect, where counting a maximum face proportion value in the preview image, and determining the maximum face proportion value as a face proportion value of a current photograph includes: identifying a face region from the preview image by a face identification technology; counting the total number of pixels of the preview image and the number of pixels corresponding to each face area; determining the ratio of the number of pixels corresponding to each face area to the total number of pixels as the face proportion of each face area; and determining the maximum value in the face ratio as the face ratio of the current photo.
With reference to the first possible implementation manner of the first aspect, an embodiment of the present invention provides a third possible implementation manner of the first aspect, where the determining a subject distance value of a current photograph according to a phase difference of a preview image includes: determining the phase difference of the preview image through a phase detection technology; calculating the distance corresponding to the phase difference of the preview image according to the linear corresponding relation between the phase difference and the distance; the calculated distance is determined as the subject distance value of the current photograph.
With reference to the first aspect, an embodiment of the present invention provides a fourth possible implementation manner of the first aspect, where the determining an optimal power supply parameter value corresponding to the luminance of the fill-in light according to the fill-in light influence value includes: searching a corresponding mapping table according to the light supplement influence value to obtain a corresponding power supply parameter value; wherein, the power supply parameter value is a current value or a voltage value; the environment brightness value, the face proportion value and the shot object distance value respectively correspond to a brightness mapping table, a face proportion mapping table and a distance mapping table; and determining the optimal power supply parameter value corresponding to the brightness of the supplementary lighting lamp according to the power supply parameter value and the weight corresponding to each parameter of the supplementary lighting influence value.
With reference to the fourth possible implementation manner of the first aspect, an embodiment of the present invention provides a fifth possible implementation manner of the first aspect, wherein the brightness in the brightness mapping table is inversely proportional to a power supply parameter value of the fill-in lamp; the face ratio mapping table comprises a front light photo table and a back light photo table, wherein the face ratio in the front light photo table is inversely proportional to a power supply parameter value of the light supplement lamp, and the face ratio in the back light photo table is directly proportional to the power supply parameter value of the light supplement lamp; the distance in the distance mapping table is in direct proportion to the power supply parameter of the light supplement lamp.
With reference to the fifth possible implementation manner of the first aspect, an embodiment of the present invention provides a sixth possible implementation manner of the first aspect, where the finding a corresponding mapping table according to the fill light influence value to obtain a corresponding power supply parameter value includes: judging whether the environmental brightness value of the preview image is greater than a set brightness threshold value or not; if yes, determining that the current photo is a backlight photo; if not, determining that the current photo is a direct photo; when the fill-in light influence value comprises an environment brightness value, searching a brightness mapping table to obtain a power supply parameter value corresponding to the environment brightness value; when the light supplement influence value comprises a face proportion value and the current photo is a backlight photo, searching a backlight photo sub-table to obtain a power supply parameter value corresponding to the face proportion value; when the light supplement influence value comprises a face proportion value and the current photo is a front photo, searching a front photo sub-table to obtain a power supply parameter value corresponding to the face proportion value; and when the supplementary lighting influence value comprises a shot object distance value, searching a distance mapping table to obtain a power supply parameter value corresponding to the shot object distance value.
With reference to the fourth possible implementation manner of the first aspect, an embodiment of the present invention provides a seventh possible implementation manner of the first aspect, where the determining, according to the power supply parameter value and the weight corresponding to each parameter of the fill light influence value, an optimal power supply parameter value corresponding to the brightness of the fill light lamp includes: calculating the optimal power supply parameter value corresponding to the luminance of the light supplement lamp according to the following formula:
Figure BDA0001227283130000031
wherein X is the optimal power supply parameter value; the lower corner mark i represents the label of the parameter included in the fill light influence value; x is the number ofiRepresents the power supply parameter value y corresponding to the ith fill-in light influence valueiAnd xiThe weights correspond to the ith fill light influence value one by one; n represents the total number of parameters included in the fill-in light influence value, and the value is 2 or 3.
In a second aspect, an embodiment of the present invention further provides a device for controlling luminance of a light supplement lamp of a camera, including: the light supplement influence determining module is used for determining a light supplement influence value of current photographing according to the preview image when the preview image is captured by the camera function of the terminal, and the light supplement influence value at least comprises two of the following parameters: the environment brightness value, the face proportion value and the shot object distance value; the optimal power supply parameter determining module is used for determining an optimal power supply parameter value corresponding to the brightness of the light supplement lamp according to the light supplement influence value; and the brightness control module is used for controlling the brightness of the light supplement lamp of the terminal according to the optimal power supply parameter value.
In a third aspect, an embodiment of the present invention further provides a terminal, where the terminal has a camera function and a fill-in light, and further includes a device for controlling brightness of the fill-in light of the camera provided in the second aspect.
According to the method, the device and the terminal for controlling the brightness of the camera fill-in light, the current fill-in light influence value (represented by a plurality of parameters) is determined through the preview image, the optimal power supply parameter value corresponding to the brightness of the fill-in light is determined according to the current fill-in light influence value, the brightness of the fill-in light of the terminal is further controlled, and the fill-in light effect of the camera can be better improved.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart illustrating a method for controlling luminance of a light supplement lamp of a camera according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for controlling luminance of a fill-in light of a second camera according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a method for controlling the brightness of a fill-in light of a camera according to a third embodiment of the present invention,
fig. 4 is a flowchart illustrating a fourth method for controlling luminance of a fill-in light of a camera according to an embodiment of the present invention;
fig. 5 is a block diagram illustrating a structure of a device for controlling luminance of a light supplement lamp of a camera according to an embodiment of the present invention;
fig. 6 is a block diagram illustrating a structure of another apparatus for controlling luminance of a fill-in light of a camera according to an embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
At present, when terminals such as mobile phones, digital cameras or digital video cameras take pictures or preview images in an environment with poor brightness, a light supplement lamp is mostly arranged for light supplement, but the brightness of the light supplement lamp is fixed, so that the light supplement effect is poor. Therefore, the embodiment of the invention provides a method, a device and a terminal for controlling the brightness of a light supplement lamp of a camera, which can control the brightness of the light supplement lamp of the terminal according to the current light supplement influence value so as to improve the light supplement effect of the camera.
The embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
The first embodiment is as follows:
fig. 1 shows a flowchart of a method for controlling luminance of a fill-in light of a camera according to an embodiment of the present invention, where the method can be applied to a terminal having a camera function and a fill-in light, and the method includes the following steps:
step S102, when the camera function of the terminal captures the preview image, determining a light supplement influence value of the current photo according to the preview image, wherein the light supplement influence value at least comprises two of the following parameters: the environment brightness value, the face proportion value and the shot object distance value;
the photographing may refer to taking a picture, previewing an image, recording a video, and the like.
Specifically, the environment brightness value is a parameter reflecting the brightness of the current photographing environment.
The face ratio is the proportion of the face in the preview image occupying the whole image, and can indirectly reflect the distance between the shot person and the terminal. In general, when a person is photographed, the closer the camera is to the subject, the greater the proportion of the face in the preview image to the entire image, and thus the distance between the photographed person and the terminal can be indirectly reflected by the face proportion value.
The subject distance value is a parameter directly reflecting the distance between the subject and the terminal, and can be determined from the phase difference of the preview image. In actual shooting, a terminal can directly obtain the phase difference of the current preview image through an existing device, a linear relation (a direct proportion relation) between the phase difference and the distance is stored in the terminal in advance, and the distance between the shot object and the terminal, namely the shot object distance value, can be directly determined according to the linear relation and the current phase difference.
Step S104, determining an optimal power supply parameter value corresponding to the brightness of the supplementary lighting lamp according to the supplementary lighting influence value;
the power supply parameter value is a current value or a voltage value when the fill-in light works, and the optimal power supply parameter value may be a voltage value or a current value corresponding to the fill-in light influence value.
And S106, controlling the brightness of the supplementary lighting lamp of the terminal according to the optimal power supply parameter value. The specific control of the brightness of the light supplement lamp can be real-time control in the process of previewing the image, real-time control in the process of photographing, or real-time control in the process of recording the video; namely, each link after the camera function is started can control the brightness of the light supplement lamp of the terminal according to the optimal power supply parameter value.
In the method of this embodiment, a current fill-in light influence value (represented by a plurality of parameters) is determined through the preview image, and an optimal power supply parameter value corresponding to the fill-in light brightness is determined according to the current fill-in light influence value, so that the fill-in light brightness of the terminal is controlled, and the fill-in light effect of the camera can be better improved.
In order to obtain an optimal power supply parameter value by more efficiently using a plurality of parameters in the fill-in light influence value, so as to provide reliable data support for brightness control of the fill-in light, the step S104 may be performed as follows:
(1) searching a corresponding mapping table according to the light supplement influence value to obtain a corresponding power supply parameter value; wherein, the power supply parameter value is a current value or a voltage value; the environment brightness value, the face proportion value and the shot object distance value respectively correspond to a brightness mapping table, a face proportion mapping table and a distance mapping table;
the human face occupation ratio mapping table comprises power supply parameter values corresponding to various occupation ratios, and the distance mapping table comprises power supply parameter values corresponding to various distances; the mapping table can be stored in advance and can be directly searched when needed.
In general, the darker the environment, the stronger the brightness of the light to be supplemented, and the brightness is in direct proportion to the power supply parameter value of the light supplementing lamp, so the environment brightness value in the brightness mapping table is in inverse proportion to the power supply parameter value;
in order to achieve a better light compensation effect, the face occupation ratio in the embodiment is analyzed for two situations of backlight shooting and forward shooting, generally, when forward shooting is performed, the larger the face occupation ratio is, the closer the shot person is to the camera, and in order to reduce the damage degree of the strong light of the light compensation lamp to human eyes, the brightness of the light compensation lamp is set to be as small as possible, so that the power supply parameter value of the corresponding light compensation lamp is also set to be small; namely, when the photo is taken in the direct light, the face ratio is inversely proportional to the power supply parameter value of the light supplement lamp; on the contrary, when taking a picture in the backlight, the face occupation ratio is larger, the closer the photographed person is to the camera, and the shielding degree of light is larger at the moment, so the brightness of light supplement is stronger, and therefore in taking a picture in the backlight, the face occupation ratio is in direct proportion to the power supply parameter value of the light supplement lamp.
Considering the problems that the stronger the shooting distance is, the stronger the light supplement is dazzling, the farther the shooting distance is, the more difficult the picture is to be clear, and the like, the distance value of the shot object is in direct proportion to the power supply parameter value of the light supplement lamp.
(2) And determining the optimal power supply parameter value corresponding to the brightness of the supplementary lighting lamp according to the power supply parameter value and the weight corresponding to each parameter of the supplementary lighting influence value.
Considering that the environmental brightness value, the face ratio value and the subject distance value can reflect the requirements for the brightness of the fill-in light to different degrees, the fill-in light influence value may include any two or all of the three parameters, and the specific selection mode may refer to the following:
(1) default settings, for example, the default setting fill-in light influence value includes two types of an environment brightness value and a face proportion value, or the default setting environment brightness value, the face proportion value and the subject distance value all include;
(2) the user can select the options for the user to select the environment brightness value, the face proportion value and the shot object distance value according to the requirement, for example, the user can select two or three options on the terminal in a mode of touching or moving a cursor, of course, the user can also select only one option from the environment brightness value, the face proportion value and the shot object distance value, and only the light supplement effect of the mode is poor.
Of course, the terminal may include the above two selection modes, and the user may default to set the option or may change the fill light influence value by himself.
The above method comprehensively considers the influence degree of each parameter in the fill-in light influence value on the brightness of the fill-in light, for example, if the influence degree is high, the corresponding weight is high; meanwhile, in order to simplify the implementation process, the corresponding relation between each parameter (the above-mentioned environment brightness value, the face occupation ratio and the subject distance value) in the fill light influence values and the power supply parameter value is stored in a mapping table mode, so that when each specific fill light influence value is known, the corresponding mapping table is directly searched to obtain the corresponding power supply parameter value, and then the optimal power supply parameter value is comprehensively determined by combining the power supply parameter value corresponding to each parameter and the weight, so that reliable data are provided for the brightness control of the fill light, and the fill light effect of the camera is ensured.
Further, this embodiment provides a specific implementation manner for determining an optimal power supply parameter value corresponding to the luminance of the fill-in light:
calculating the optimal power supply parameter value corresponding to the luminance of the light supplement lamp according to the following formula:
Figure BDA0001227283130000091
wherein X is the optimal power supply parameter value; the lower corner mark i represents the label of the parameter included in the fill light influence value; x is the number ofiRepresents the power supply parameter value y corresponding to the ith fill-in light influence valueiAnd xiThe weights correspond to the ith fill light influence value one by one; n represents the total number of parameters included in the fill-in light influence value, and the value is 2 or 3.
The optimal power supply parameter value is calculated through the formula more accurately and objectively, the formula is simple, the obtaining time of the optimal power supply parameter value can be effectively shortened, and the control speed of the brightness of the light supplement lamp is further improved.
Example two:
on the basis of the first embodiment, the present embodiment specifically describes in detail by taking two examples, that is, the fill-in light influence value includes an environment brightness value and a face ratio value, and fig. 2 shows a flowchart of a second method for controlling the brightness of the fill-in light of the camera according to the embodiment of the present invention, which includes the following steps:
step S202, when a camera function of the terminal captures a preview image, determining a current photographing environment brightness value and a face ratio according to the preview image;
specifically, one implementation manner of determining the ambient brightness value is as follows: determining the average brightness of the preview image as the brightness value of the current photographing environment;
one implementation of determining the face fraction value is as follows: counting the maximum face ratio in the preview image, and determining the maximum face ratio as the face ratio of the current picture;
step S204, respectively searching a brightness mapping table and a face ratio mapping table according to the environment brightness value and the face ratio value to obtain respective corresponding power supply parameter values; wherein, the power supply parameter value is a current value or a voltage value;
and step S206, determining the optimal power supply parameter value corresponding to the brightness of the supplementary lighting lamp according to the power supply parameter value and the weight corresponding to the environment brightness value and the face occupation ratio value respectively. The weight is a preset value and can be obtained by direct search.
And S208, controlling the brightness of the supplementary lighting lamp when the terminal takes a picture according to the optimal power supply parameter value.
In consideration of application scenes such as forward-light shooting and backward-light shooting, in order to achieve a better light supplement effect during shooting, the embodiment further provides a flow chart of a third method for controlling the brightness of a light supplement lamp of a camera shown in fig. 3, which includes the following steps:
step S302, when the camera function of the terminal captures the preview image, determining the average brightness of the preview image as the brightness value of the current photographing environment; determining the maximum face ratio in the preview image as the face ratio of the current photo;
the method comprises the following steps of determining a maximum face ratio in a preview image as a face ratio of a current picture, firstly counting the maximum face ratio in the preview image, and then determining the maximum face ratio as the face ratio of the current picture, wherein the following steps are specifically referred to:
(1) identifying a face region from the preview image by a face identification technology;
(2) counting the total number of pixels of the preview image and the number of pixels corresponding to each face area;
(3) determining the ratio of the number of pixels corresponding to each face area to the total number of pixels as the face proportion of each face area;
(4) and determining the maximum value in the face ratio as the face ratio of the current photo.
In addition, a brightness mapping table and a face proportion mapping table which respectively correspond to the environment brightness value and the face proportion value are stored in the terminal; the brightness in the brightness mapping table is inversely proportional to the power supply parameter value of the light supplement lamp; the face ratio mapping table comprises a forward photo sub-table and a backward photo sub-table, the face ratio in the forward photo sub-table is inversely proportional to the power supply parameter value of the light supplement lamp, and the face ratio in the backward photo sub-table is directly proportional to the power supply parameter value of the light supplement lamp.
Step S304, a brightness mapping table is searched to obtain a power supply parameter value corresponding to the environment brightness value;
step S306, judging whether the environmental brightness value of the preview image is greater than a set brightness threshold value; if yes, determining that the current photo is a backlight photo, and executing step S308; if not, determining that the current photo is a front photo, and executing the step S310;
step S308, searching a backlight photo sub-table in the face ratio mapping table to obtain a power supply parameter value corresponding to the face ratio; wherein, the power supply parameter value is a current value or a voltage value;
step S310, searching a smooth photo sub-table in a face ratio mapping table to obtain a power supply parameter value corresponding to the face ratio;
step S312, determining an optimal power supply parameter value corresponding to the luminance of the fill-in light according to the power supply parameter value and the weight corresponding to the environment luminance value and the face duty value, respectively.
Specifically, the weights corresponding to the environment brightness value and the face proportion value may be obtained by directly searching a weight table stored in advance, and in addition, the weights may be obtained in the following manner:
1. determining a current photographing mode; the photographing mode comprises an indoor mode, an outdoor mode, a night scene mode, a landscape mode or a person mode;
2. and searching the weight corresponding to each parameter of the light supplement influence value according to the current photographing mode.
Specifically, the following formula can be adopted to calculate the optimal power supply parameter value corresponding to the luminance of the fill-in lamp:
Figure BDA0001227283130000111
specifically, X is an optimal power supply parameter value; x is the number of1Representing a value of a power supply parameter, y, corresponding to a value of an ambient brightness1Representing the weight corresponding to the environment brightness value; x is the number of2Representing the value of the power supply parameter, y, corresponding to the face fraction2And representing the weight corresponding to the face ratio.
And step S314, controlling the brightness of the supplementary lighting lamp of the terminal according to the optimal power supply parameter value.
According to the method provided by the embodiment, the influence of the environment brightness and the face ratio on the brightness of the light supplement lamp is considered, the current photographed environment brightness value and the face ratio can be determined according to the preview image, the power supply parameter value and the weight corresponding to the environment brightness value and the face ratio are further obtained, and the optimal power supply parameter value of the light supplement lamp is determined according to the power supply parameter value and the weight, so that the brightness of the light supplement lamp is well controlled, and the light supplement effect is improved.
Example three:
on the basis of the foregoing embodiment, this embodiment specifically describes in detail by taking three examples, that is, a fill-in light influence value includes an environment brightness value, a face proportion value, and a subject distance value, and fig. 4 shows a flowchart of a fourth method for controlling the brightness of a fill-in light of a camera, which includes the following steps:
step S402, when the camera function of the terminal captures the preview image, determining the average brightness of the preview image as the brightness value of the current photographing environment; determining the maximum face ratio in the preview image as the face ratio of the current photo; determining the distance value of the shot object photographed at present according to the phase difference of the preview image;
the determining of the subject distance value of the current photographing according to the phase difference of the preview image can be implemented by specifically referring to the following manners:
(1) determining the phase difference of the preview image through a phase detection technology;
(2) calculating the distance corresponding to the phase difference of the preview image according to the linear corresponding relation between the phase difference and the distance;
(3) the calculated distance is determined as the subject distance value of the current photograph.
Step S404, respectively searching a brightness mapping table, a face proportion mapping table and a distance mapping table according to the environment brightness value, the face proportion value and the shot object distance value to obtain respective corresponding power supply parameter values; wherein, the power supply parameter value is a current value or a voltage value;
step S406, determining the current photographing mode; the shooting mode comprises an indoor mode, an outdoor mode, a night scene mode, a landscape mode or a person mode;
step S408, searching respective corresponding weights of the environment brightness value, the face ratio and the shot object distance value according to the current shooting mode;
step S410, determining an optimal power supply parameter value corresponding to the brightness of the light supplementing lamp according to power supply parameter values and weights corresponding to the environment brightness value, the face ratio and the shot object distance value respectively;
specifically, the following formula can be adopted to calculate the optimal power supply parameter value corresponding to the luminance of the fill-in lamp:
Figure BDA0001227283130000121
wherein X is the optimal power supply parameter value; x is the number of1Representing a value of a power supply parameter, y, corresponding to a value of an ambient brightness1Representing the weight corresponding to the environment brightness value; x is the number of2Representing the value of the power supply parameter, y, corresponding to the face fraction2Representing the weight corresponding to the face proportion value; x is the number of3Indicating subject distance value correspondenceValue of the power supply parameter y3And represents the weight corresponding to the object distance value.
And step S412, controlling the brightness of the supplementary lighting lamp of the terminal according to the optimal power supply parameter value.
According to the method provided by the embodiment, the influence of the ambient brightness, the face occupation ratio and the shot object distance on the brightness of the light supplement lamp is considered, and the optimal power supply parameter value is comprehensively determined according to the corresponding influence degree, so that the brightness of the light supplement lamp is well controlled, and the light supplement effect is improved.
Example four:
fig. 5 is a block diagram illustrating a structure of a device for controlling luminance of a fill-in light of a camera according to an embodiment of the present invention, where the device is applicable to a terminal having a camera function and a fill-in light, and includes:
a light supplement influence determining module 502, configured to determine, according to the preview image, a light supplement influence value of a current photo when the preview image is captured by a camera function of the terminal, where the light supplement influence value includes at least two of the following parameters: the environment brightness value, the face proportion value and the shot object distance value;
specifically, the environment brightness value is a parameter reflecting the brightness of the current photographing environment, the face ratio value is a parameter indirectly reflecting the distance between the photographed person and the terminal, and the photographed object distance value is a parameter directly reflecting the distance between the photographed object and the terminal.
An optimal power supply parameter determining module 504, configured to determine an optimal power supply parameter value corresponding to the luminance of the fill-in light according to the fill-in light influence value;
and a brightness control module 506, configured to control the brightness of the fill-in light of the terminal according to the optimal power supply parameter value. The specific control can be real-time control in the process of previewing the image, real-time control in the process of photographing, or real-time control in the process of recording the video; namely, each link after the camera function is started can control the brightness of the light supplement lamp of the terminal according to the optimal power supply parameter value.
In the apparatus provided in this embodiment, the light supplement influence determining module 502 determines a current light supplement influence value (represented by a plurality of parameters) according to the preview image, and the optimal power supply parameter determining module 504 determines an optimal power supply parameter value corresponding to the luminance of the light supplement lamp according to the current light supplement influence value, so that the luminance of the light supplement lamp at the terminal is controlled by the luminance control module 506, and the light supplement effect of the camera can be better improved.
Fig. 6 is a block diagram illustrating a structure of another apparatus for controlling luminance of a camera fill-in light according to an embodiment of the present invention, where on the basis of fig. 5, the fill-in light influence determining module 502 specifically includes:
an ambient brightness determining unit 5022, configured to determine an average brightness of the preview image as an ambient brightness value of the current photograph when the fill-in light influence value includes an ambient brightness value;
the face proportion determining unit 5024 is used for counting the maximum face proportion value in the preview image when the light filling influence value comprises the face proportion value, and determining the maximum face proportion value as the face proportion value of the current photo;
a distance determining unit 5026, configured to determine a currently photographed subject distance value according to the phase difference of the preview image when the fill-in light influence value includes the subject distance value.
In a specific embodiment, the face proportion determining unit 5024 is further configured to identify a face region from the preview image through a face recognition technology; counting the total number of pixels of the preview image and the number of pixels corresponding to each face area; determining the ratio of the number of pixels corresponding to each face area to the total number of pixels as the face proportion of each face area; and determining the maximum value in the face ratio as the face ratio of the current photo.
A distance determining unit 5026, configured to determine a current photographed subject distance value according to the phase difference of the preview image when the parameter included in the fill-in light influence value has a subject distance value.
In a specific embodiment, the distance determining unit is further configured to: determining the phase difference of the preview image through a phase detection technology; calculating the distance corresponding to the phase difference of the preview image according to the linear corresponding relation between the phase difference and the distance; the calculated distance is determined as the subject distance value of the current photograph.
The optimal power supply parameter determining module 504 may specifically include:
the power supply parameter determining unit 5044 is configured to search a corresponding mapping table according to the light supplement influence value to obtain a corresponding power supply parameter value; wherein, the power supply parameter value is a current value or a voltage value; the environment brightness value, the face proportion value and the shot object distance value respectively correspond to a brightness mapping table, a face proportion mapping table and a distance mapping table;
the device is also internally stored with a brightness mapping table and a face proportion mapping table which respectively correspond to the environment brightness value and the face proportion value; the brightness in the brightness mapping table is inversely proportional to the power supply parameter value of the light supplement lamp; the face ratio mapping table comprises a forward photo sub-table and a backward photo sub-table, the face ratio in the forward photo sub-table is inversely proportional to the power supply parameter value of the light supplement lamp, and the face ratio in the backward photo sub-table is directly proportional to the power supply parameter value of the light supplement lamp.
In consideration of application scenarios such as forward-light photographing and backward-light photographing, in order to achieve a better light supplement effect of photographing, in a specific embodiment, the power supply parameter determination unit 5044 is further configured to: judging whether the environmental brightness value of the preview image is greater than a set brightness threshold value or not; if yes, determining that the current photo is a backlight photo; if not, determining that the current photo is a direct photo; when the fill-in light influence value comprises an environment brightness value, searching a brightness mapping table to obtain a power supply parameter value corresponding to the environment brightness value; when the light supplement influence value comprises a face proportion value and the current photo is a backlight photo, searching a backlight photo sub-table to obtain a power supply parameter value corresponding to the face proportion value; when the light supplement influence value comprises a face proportion value and the current photo is a front photo, searching a front photo sub-table to obtain a power supply parameter value corresponding to the face proportion value; and when the supplementary lighting influence value comprises a shot object distance value, searching a distance mapping table to obtain a power supply parameter value corresponding to the shot object distance value.
And an optimal power supply parameter determining unit 5046, configured to determine an optimal power supply parameter value corresponding to the luminance of the fill-in light according to the power supply parameter value and the weight corresponding to each parameter of the fill-in light influence value.
Wherein, the weight can be obtained by adopting the following method:
(1) determining a current photographing mode; the photographing mode comprises an indoor mode, an outdoor mode, a night scene mode, a landscape mode or a person mode;
(2) and searching the weight corresponding to each parameter of the light supplement influence value according to the current photographing mode.
In a specific embodiment, the optimal power parameter determination unit 5046 is further configured to:
calculating the optimal power supply parameter value corresponding to the luminance of the light supplement lamp according to the following formula:
Figure BDA0001227283130000161
wherein X is the optimal power supply parameter value; the lower corner mark i represents the label of the parameter included in the fill light influence value; x is the number ofiRepresents the power supply parameter value y corresponding to the ith fill-in light influence valueiAnd xiThe weights correspond to the ith fill light influence value one by one; n represents the total number of parameters included in the fill-in light influence value, and the value is 2 or 3.
The device provided by the embodiment has the same implementation principle and technical effect as the foregoing embodiment, and for the sake of brief description, reference may be made to the corresponding contents in the foregoing method embodiment for the portion of the embodiment of the device that is not mentioned.
Example five:
the embodiment provides a terminal, which has a camera function and a fill-in light, and further comprises a control device for the brightness of the fill-in light of the camera provided in the fourth embodiment. The terminal includes but is not limited to a mobile phone, a camera, a video camera, a tablet computer, a smart watch, a smart wearable device, and the like.
The terminal includes a memory and a processor. The Memory may comprise a Random Access Memory (RAM) and may also include a non-volatile Memory, such as at least one disk Memory.
The processor calls various data and programs in the memory to control the mobile terminal to work. The processor may be an integrated circuit chip having signal processing capabilities. The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be 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. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and the processor reads information in the memory.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the terminal described above may refer to the corresponding process in the foregoing embodiment, and is not described herein again.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
The embodiment of the invention also discloses:
A1. a method for controlling the brightness of a camera fill-in light comprises the following steps:
when a camera function of a terminal captures a preview image, determining a light supplement influence value of current photographing according to the preview image, wherein the light supplement influence value at least comprises two of the following parameters: the environment brightness value, the face proportion value and the shot object distance value;
determining an optimal power supply parameter value corresponding to the brightness of the supplementary lighting lamp according to the supplementary lighting influence value;
and controlling the brightness of a supplementary lighting lamp of the terminal according to the optimal power supply parameter value.
A2. According to the method of a1, determining the fill-in light influence value of the current photo according to the preview image includes:
when the fill-in light influence value comprises an environment brightness value, determining the average brightness of the preview image as the current photographing environment brightness value;
when the light supplement influence value comprises a face proportion value, counting a maximum face proportion value in the preview image, and determining the maximum face proportion value as the face proportion value of the current photo;
and when the supplementary lighting influence value comprises a shot object distance value, determining the shot object distance value of the current picture according to the phase difference of the preview image.
A3. According to the method described in a2, counting the maximum face ratio in the preview image, and determining the maximum face ratio as the face ratio of the current photograph includes:
identifying a face region from the preview image by a face identification technology;
counting the total number of pixels of the preview image and the number of pixels corresponding to each face area;
determining the ratio of the number of pixels corresponding to each face area to the total number of the pixels as the face proportion of each face area;
and determining the maximum value in the face ratio as the face ratio of the current photographing.
A4. According to the method of a2, determining the subject distance value of the current photograph from the phase difference of the preview image includes:
determining the phase difference of the preview images through a phase detection technology;
calculating the distance corresponding to the phase difference of the preview image according to the linear corresponding relation between the phase difference and the distance;
and determining the calculated distance as the subject distance value of the current photographing.
A5. According to the method of a1, determining the optimal power supply parameter value corresponding to the luminance of the fill-in light according to the fill-in light influence value includes:
searching a corresponding mapping table according to the light supplement influence value to obtain a corresponding power supply parameter value; wherein the power supply parameter value is a current value or a voltage value; the environment brightness value, the face proportion value and the shot object distance value respectively correspond to a brightness mapping table, a face proportion mapping table and a distance mapping table;
and determining the optimal power supply parameter value corresponding to the brightness of the supplementary lighting lamp according to the power supply parameter value and the weight corresponding to each parameter of the supplementary lighting influence value.
A6. According to the method A5, the brightness in the brightness mapping table is inversely proportional to the power supply parameter value of the fill-in light; the human face ratio mapping table comprises a front light photo table and a back light photo table, wherein the human face ratio in the front light photo table is inversely proportional to a power supply parameter value of the light supplement lamp, and the human face ratio in the back light photo table is directly proportional to the power supply parameter value of the light supplement lamp; and the distance in the distance mapping table is in direct proportion to the power supply parameter of the light supplement lamp.
A7. According to the method of a6, finding a corresponding mapping table according to the fill light influence value, and obtaining a corresponding power supply parameter value includes:
judging whether the environmental brightness value of the preview image is greater than a set brightness threshold value or not;
if yes, determining that the current photo is a backlight photo; if not, determining that the current photo is a direct photo;
when the fill light influence value comprises an environment brightness value, searching the brightness mapping table to obtain a power supply parameter value corresponding to the environment brightness value;
when the light supplement influence value comprises a face proportion value and the current photo is a backlight photo, searching the backlight photo sub-table to obtain a power supply parameter value corresponding to the face proportion value;
when the supplementary lighting influence value comprises a face proportion value and the current photo is a front photo, searching the front photo sub-table to obtain a power supply parameter value corresponding to the face proportion value;
and when the supplementary lighting influence value comprises a shot object distance value, searching the distance mapping table to obtain a power supply parameter value corresponding to the shot object distance value.
A8. According to the method of a5, determining the optimal power supply parameter value corresponding to the luminance of the fill-in light according to the power supply parameter value and the weight corresponding to each parameter of the fill-in light influence value includes:
calculating the optimal power supply parameter value corresponding to the luminance of the light supplement lamp according to the following formula:
Figure BDA0001227283130000201
wherein X is the optimal power supply parameter value; the lower corner mark i represents the label of the parameter included in the fill light influence value; x is the number ofiRepresents the power supply parameter value y corresponding to the ith fill-in light influence valueiAnd xiThe weights correspond to the ith fill light influence value one by one; n represents the total number of parameters included in the fill-in light influence value, and the value is 2 or 3.
A9. According to the method of a5, the weights are obtained in the following manner:
determining a current photographing mode; the photographing mode comprises an indoor mode, an outdoor mode, a night scene mode, a landscape mode or a person mode;
and searching the weight corresponding to each parameter of the light supplement influence value according to the current photographing mode.
B1. A camera fill-in light brightness control device comprises:
the light supplement influence determining module is used for determining a light supplement influence value of current photographing according to a preview image when the preview image is captured by a camera function of the terminal, wherein the light supplement influence value at least comprises two of the following parameters: the environment brightness value, the face proportion value and the shot object distance value;
the optimal power supply parameter determining module is used for determining an optimal power supply parameter value corresponding to the brightness of the light supplement lamp according to the light supplement influence value;
and the brightness control module is used for controlling the brightness of the light supplement lamp of the terminal according to the optimal power supply parameter value.
B2. The apparatus of claim B1, the fill light effect determination module comprising:
the environment brightness determining unit is used for determining the average brightness of the preview image as the current photographing environment brightness value when the fill light influence value comprises an environment brightness value;
a face proportion determining unit, configured to, when the light filling influence value includes a face proportion value, count a maximum face proportion value in the preview image, and determine the maximum face proportion value as a face proportion value of a current photograph;
and the distance determining unit is used for determining the shot object distance value of the current picture according to the phase difference of the preview image when the fill light influence value comprises the shot object distance value.
B3. The apparatus of claim B2, the face proportion determination unit further to:
identifying a face region from the preview image by a face identification technology;
counting the total number of pixels of the preview image and the number of pixels corresponding to each face area;
determining the ratio of the number of pixels corresponding to each face area to the total number of the pixels as the face proportion of each face area;
and determining the maximum value in the face ratio as the face ratio of the current photographing.
B4. The apparatus of claim B2, the distance determination unit further to:
determining the phase difference of the preview images through a phase detection technology;
calculating the distance corresponding to the phase difference of the preview image according to the linear corresponding relation between the phase difference and the distance;
and determining the calculated distance as the subject distance value of the current photographing.
B5. The apparatus of claim B1, the optimal power parameter determination module comprising:
the power supply parameter determining unit is used for searching a corresponding mapping table according to the light supplement influence value to obtain a corresponding power supply parameter value; wherein the power supply parameter value is a current value or a voltage value; the environment brightness value, the face proportion value and the shot object distance value respectively correspond to a brightness mapping table, a face proportion mapping table and a distance mapping table;
and the optimal power supply parameter determining unit is used for determining an optimal power supply parameter value corresponding to the brightness of the light supplement lamp according to the power supply parameter value and the weight corresponding to each parameter of the light supplement influence value.
B6. The apparatus of claim B5, wherein the brightness in the brightness mapping table is inversely proportional to the value of the power supply parameter of the fill light; the human face ratio mapping table comprises a front light photo table and a back light photo table, wherein the human face ratio in the front light photo table is inversely proportional to a power supply parameter value of the light supplement lamp, and the human face ratio in the back light photo table is directly proportional to the power supply parameter value of the light supplement lamp; and the distance in the distance mapping table is in direct proportion to the power supply parameter of the light supplement lamp.
B7. The apparatus of claim B6, the power supply parameter determination unit further to:
judging whether the environmental brightness value of the preview image is greater than a set brightness threshold value or not;
if yes, determining that the current photo is a backlight photo; if not, determining that the current photo is a direct photo;
when the fill light influence value comprises an environment brightness value, searching the brightness mapping table to obtain a power supply parameter value corresponding to the environment brightness value;
when the light supplement influence value comprises a face proportion value and the current photo is a backlight photo, searching the backlight photo sub-table to obtain a power supply parameter value corresponding to the face proportion value;
when the supplementary lighting influence value comprises a face proportion value and the current photo is a front photo, searching the front photo sub-table to obtain a power supply parameter value corresponding to the face proportion value;
and when the supplementary lighting influence value comprises a shot object distance value, searching the distance mapping table to obtain a power supply parameter value corresponding to the shot object distance value.
B8. The apparatus of claim B5, the optimal power parameter determination unit further configured to:
calculating the optimal power supply parameter value corresponding to the luminance of the light supplement lamp according to the following formula:
Figure BDA0001227283130000221
wherein X is the optimal power supply parameter value; the lower corner mark i represents the label of the parameter included in the fill light influence value; x is the number ofiRepresents the ithPower supply parameter value y corresponding to the fill light influence valueiAnd xiThe weights correspond to the ith fill light influence value one by one; n represents the total number of parameters included in the fill-in light influence value, and the value is 2 or 3.
B9. The apparatus of claim B5, the weights being derived by:
determining a current photographing mode; the photographing mode comprises an indoor mode, an outdoor mode, a night scene mode, a landscape mode or a person mode;
and searching the weight corresponding to each parameter of the light supplement influence value according to the current photographing mode.
C1. A terminal is provided with a camera function and a fill-in light, and further comprises a device for controlling the brightness of the fill-in light of the camera from B1 to B9.

Claims (15)

1. A method for controlling the brightness of a camera fill-in light is characterized by comprising the following steps:
when a camera function of a terminal captures a preview image, determining a light supplement influence value of current photographing according to the preview image, wherein the light supplement influence value comprises the following parameters: the ambient brightness value and the face ratio, or the fill-in light influence value includes the following parameters: the environment brightness value, the face proportion value and the shot object distance value;
determining an optimal power supply parameter value corresponding to the brightness of the supplementary lighting lamp according to the supplementary lighting influence value;
controlling the brightness of a supplementary lighting lamp of the terminal according to the optimal power supply parameter value;
determining an optimal power supply parameter value corresponding to the luminance of the supplementary lighting lamp according to the supplementary lighting influence value comprises the following steps:
searching a corresponding mapping table according to the light supplement influence value to obtain a corresponding power supply parameter value; wherein the power supply parameter value is a current value or a voltage value; the environment brightness value, the face proportion value and the shot object distance value respectively correspond to a brightness mapping table, a face proportion mapping table and a distance mapping table;
determining an optimal power supply parameter value corresponding to the brightness of the supplementary lighting lamp according to the power supply parameter value and the weight corresponding to each parameter of the supplementary lighting influence value;
the brightness in the brightness mapping table is inversely proportional to the power supply parameter value of the light supplement lamp; the face ratio mapping table comprises a forward light photo sub-table and a backward light photo sub-table;
searching a corresponding mapping table according to the light supplement influence value, wherein obtaining a corresponding power supply parameter value comprises:
judging whether the environment brightness value of the preview image is larger than a set brightness threshold value or not;
if yes, determining that the current photo is a backlight photo; if not, determining that the current photo is a direct photo;
when the supplementary lighting influence value comprises the environment brightness value, searching the brightness mapping table to obtain a power supply parameter value corresponding to the environment brightness value;
when the light supplement influence value comprises the face proportion value and the current photo is the backlight photo, searching the backlight photo sub-table to obtain a power supply parameter value corresponding to the face proportion value;
when the supplementary lighting influence value comprises the face proportion value and the current photo is the front photo, searching the front photo sub-table to obtain a power supply parameter value corresponding to the face proportion value;
and when the supplementary lighting influence value comprises the shot object distance value, searching the distance mapping table to obtain a power supply parameter value corresponding to the shot object distance value.
2. The method of claim 1, wherein the determining the fill-in light impact value of the current photo according to the preview image comprises:
when the fill-in light influence value comprises the environment brightness value, determining the average brightness of the preview image as the current photographing environment brightness value;
when the light supplement influence value comprises the face proportion value, counting the maximum face proportion value in the preview image, and determining the maximum face proportion value as the face proportion value of the current photo;
and when the supplementary lighting influence value comprises the shot object distance value, determining the shot object distance value of the current picture according to the phase difference of the preview image.
3. The method of claim 2, wherein the counting the maximum face ratio in the preview image, and determining the maximum face ratio as the face ratio of the current photograph comprises:
identifying a face region from the preview image by a face identification technology;
counting the total number of pixels of the preview image and the number of pixels corresponding to each face area;
determining the ratio of the number of pixels corresponding to each face area to the total number of the pixels as the face proportion of each face area;
and determining the maximum value in the face ratio as the face ratio of the current photographing.
4. The method of claim 2, wherein determining the subject distance value of the current photograph from the phase difference of the preview images comprises:
determining the phase difference of the preview images through a phase detection technology;
calculating the distance corresponding to the phase difference of the preview image according to the linear corresponding relation between the phase difference and the distance;
and determining the calculated distance as the subject distance value of the current photographing.
5. The method according to claim 1, wherein the face ratio in the front photo table is inversely proportional to the power supply parameter value of the fill-in light, and the face ratio in the back photo table is directly proportional to the power supply parameter value of the fill-in light; and the distance in the distance mapping table is in direct proportion to the power supply parameter of the light supplement lamp.
6. The method according to claim 1, wherein the determining an optimal power supply parameter value corresponding to the luminance of the fill-in light according to the power supply parameter value and the weight corresponding to each parameter of the fill-in light influence value comprises:
calculating the optimal power supply parameter value corresponding to the luminance of the light supplement lamp according to the following formula:
Figure FDA0002543767800000031
wherein X is the optimal power supply parameter value; the lower corner mark i represents the label of the parameter included in the fill light influence value; x is the number ofiRepresents the power supply parameter value y corresponding to the ith fill-in light influence valueiAnd xiThe weights correspond to the ith fill light influence value one by one; n represents the total number of parameters included in the fill-in light influence value, and the value is 2 or 3.
7. The method of claim 1, wherein the weights are obtained by:
determining a current photographing mode; the photographing mode comprises an indoor mode, an outdoor mode, a night scene mode, a landscape mode or a person mode;
and searching the weight corresponding to each parameter of the light supplement influence value according to the current photographing mode.
8. The utility model provides a controlling means of camera light filling lamp luminance which characterized in that includes:
the light supplement influence determining module is used for determining a light supplement influence value of current photographing according to a preview image when the preview image is captured by a camera function of the terminal, and the light supplement influence value comprises the following parameters: the ambient brightness value and the face ratio, or the fill-in light influence value includes the following parameters: the environment brightness value, the face proportion value and the shot object distance value;
the optimal power supply parameter determining module is used for determining an optimal power supply parameter value corresponding to the brightness of the light supplement lamp according to the light supplement influence value;
the brightness control module is used for controlling the brightness of a supplementary lighting lamp of the terminal according to the optimal power supply parameter value;
wherein the optimal power supply parameter determination module comprises:
the power supply parameter determining unit is used for searching a corresponding mapping table according to the light supplement influence value to obtain a corresponding power supply parameter value; wherein the power supply parameter value is a current value or a voltage value; the environment brightness value, the face proportion value and the shot object distance value respectively correspond to a brightness mapping table, a face proportion mapping table and a distance mapping table;
the optimal power supply parameter determining unit is used for determining an optimal power supply parameter value corresponding to the brightness of the supplementary lighting lamp according to the power supply parameter value and the weight corresponding to each parameter of the supplementary lighting influence values;
the brightness in the brightness mapping table is inversely proportional to the power supply parameter value of the light supplement lamp; the face ratio mapping table comprises a forward light photo sub-table and a backward light photo sub-table;
wherein the power supply parameter determination unit is further configured to:
judging whether the environmental brightness value of the preview image is greater than a set brightness threshold value or not;
if yes, determining that the current photo is a backlight photo; if not, determining that the current photo is a direct photo;
when the supplementary lighting influence value comprises the environment brightness value, searching the brightness mapping table to obtain a power supply parameter value corresponding to the environment brightness value;
when the light supplement influence value comprises the face proportion value and the current photo is the backlight photo, searching the backlight photo sub-table to obtain a power supply parameter value corresponding to the face proportion value;
when the supplementary lighting influence value comprises the face proportion value and the current photo is the front photo, searching the front photo sub-table to obtain a power supply parameter value corresponding to the face proportion value;
and when the supplementary lighting influence value comprises the shot object distance value, searching the distance mapping table to obtain a power supply parameter value corresponding to the shot object distance value.
9. The apparatus of claim 8, wherein the fill light effect determination module comprises:
the environment brightness determining unit is used for determining the average brightness of the preview image as the current photographing environment brightness value when the fill light influence value comprises the environment brightness value;
a face proportion determining unit, configured to, when the light filling influence value includes the face proportion value, count a maximum face proportion value in the preview image, and determine the maximum face proportion value as a face proportion value of a current photograph;
and the distance determining unit is used for determining the shot object distance value of the current photo according to the phase difference of the preview image when the fill light influence value comprises the shot object distance value.
10. The apparatus of claim 9, wherein the face proportion determination unit is further configured to:
identifying a face region from the preview image by a face identification technology;
counting the total number of pixels of the preview image and the number of pixels corresponding to each face area;
determining the ratio of the number of pixels corresponding to each face area to the total number of the pixels as the face proportion of each face area;
and determining the maximum value in the face ratio as the face ratio of the current photographing.
11. The apparatus of claim 9, wherein the distance determining unit is further configured to:
determining the phase difference of the preview images through a phase detection technology;
calculating the distance corresponding to the phase difference of the preview image according to the linear corresponding relation between the phase difference and the distance;
and determining the calculated distance as the subject distance value of the current photographing.
12. The device of claim 8, wherein the face ratio in the front photo table is inversely proportional to the power supply parameter value of the fill light, and the face ratio in the back photo table is directly proportional to the power supply parameter value of the fill light; and the distance in the distance mapping table is in direct proportion to the power supply parameter of the light supplement lamp.
13. The apparatus of claim 8, wherein the optimal power parameter determining unit is further configured to:
calculating the optimal power supply parameter value corresponding to the luminance of the light supplement lamp according to the following formula:
Figure FDA0002543767800000061
wherein X is the optimal power supply parameter value; the lower corner mark i represents the label of the parameter included in the fill light influence value; x is the number ofiRepresents the power supply parameter value y corresponding to the ith fill-in light influence valueiAnd xiThe weights correspond to the ith fill light influence value one by one; n represents the total number of parameters included in the fill-in light influence value, and the value is 2 or 3.
14. The apparatus of claim 8, wherein the weights are obtained by:
determining a current photographing mode; the photographing mode comprises an indoor mode, an outdoor mode, a night scene mode, a landscape mode or a person mode;
and searching the weight corresponding to each parameter of the light supplement influence value according to the current photographing mode.
15. A terminal, characterized in that the terminal has a camera function and a fill-in lamp, and further comprises a device for controlling the brightness of the fill-in lamp of the camera according to any one of claims 8 to 14.
CN201710089033.1A 2017-02-17 2017-02-17 Method and device for controlling brightness of camera fill-in light and terminal Active CN107071272B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710089033.1A CN107071272B (en) 2017-02-17 2017-02-17 Method and device for controlling brightness of camera fill-in light and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710089033.1A CN107071272B (en) 2017-02-17 2017-02-17 Method and device for controlling brightness of camera fill-in light and terminal

Publications (2)

Publication Number Publication Date
CN107071272A CN107071272A (en) 2017-08-18
CN107071272B true CN107071272B (en) 2020-10-16

Family

ID=59621730

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710089033.1A Active CN107071272B (en) 2017-02-17 2017-02-17 Method and device for controlling brightness of camera fill-in light and terminal

Country Status (1)

Country Link
CN (1) CN107071272B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107679482B (en) * 2017-09-27 2021-04-09 Oppo广东移动通信有限公司 Unlocking control method and related product
CN109842763A (en) * 2017-11-29 2019-06-04 深圳市海洋王照明工程有限公司 A kind of automatic light-supplementing method, system and video camera
CN109995984A (en) * 2017-12-29 2019-07-09 杭州萤石软件有限公司 Illumination method, illumination device, electronic equipment and storage medium
CN108449548A (en) * 2018-03-16 2018-08-24 广东小天才科技有限公司 Shooting method, shooting device, shooting equipment and computer-readable storage medium
WO2019196074A1 (en) * 2018-04-12 2019-10-17 深圳阜时科技有限公司 Electronic device and facial recognition method therefor
WO2020042084A1 (en) * 2018-08-30 2020-03-05 深圳市锐明技术股份有限公司 Light supplementing method, light supplementing apparatus and electronic device
CN109068060B (en) * 2018-09-05 2021-06-08 Oppo广东移动通信有限公司 Image processing method and device, terminal device and computer readable storage medium
CN109120864B (en) * 2018-10-23 2021-02-02 Oppo广东移动通信有限公司 Light supplement processing method and device, storage medium and mobile terminal
CN110087002B (en) * 2019-04-25 2020-10-02 维沃移动通信(杭州)有限公司 Shooting method and terminal equipment
CN110418069B (en) * 2019-07-29 2024-02-20 深圳传音控股股份有限公司 Light supplementing control method, mobile terminal and computer readable storage medium
CN110769568A (en) * 2019-10-28 2020-02-07 北京中嘉空间数字艺术有限公司 Automatic light adjusting device and method for cosmetic mirror
CN110830717B (en) * 2019-11-12 2021-06-25 维沃移动通信有限公司 Parameter value acquisition method and electronic equipment
CN113395458B (en) * 2020-03-11 2022-08-23 浙江宇视科技有限公司 Control method and device of light supplement lamp, storage medium and equipment
CN115714906A (en) * 2021-08-19 2023-02-24 Oppo广东移动通信有限公司 Shooting method, shooting device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104853109A (en) * 2015-04-30 2015-08-19 广东欧珀移动通信有限公司 Flashing automatically adjusting method and shooting terminal
CN105554411A (en) * 2016-02-15 2016-05-04 广东欧珀移动通信有限公司 Photographing method and device based on screen light compensation and mobile terminal
CN106331519A (en) * 2016-10-31 2017-01-11 维沃移动通信有限公司 Method for adjusting light-compensating lamp and mobile terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI572966B (en) * 2013-04-10 2017-03-01 群邁通訊股份有限公司 System and method for photographing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104853109A (en) * 2015-04-30 2015-08-19 广东欧珀移动通信有限公司 Flashing automatically adjusting method and shooting terminal
CN105554411A (en) * 2016-02-15 2016-05-04 广东欧珀移动通信有限公司 Photographing method and device based on screen light compensation and mobile terminal
CN106331519A (en) * 2016-10-31 2017-01-11 维沃移动通信有限公司 Method for adjusting light-compensating lamp and mobile terminal

Also Published As

Publication number Publication date
CN107071272A (en) 2017-08-18

Similar Documents

Publication Publication Date Title
CN107071272B (en) Method and device for controlling brightness of camera fill-in light and terminal
US11563897B2 (en) Image processing method and apparatus which determines an image processing mode based on status information of the terminal device and photographing scene information
KR102598109B1 (en) Electronic device and method for providing notification relative to image displayed via display and image stored in memory based on image analysis
EP3609177A1 (en) Control method, control apparatus, imaging device, and electronic device
US8994845B2 (en) System and method of adjusting a camera based on image data
US11431915B2 (en) Image acquisition method, electronic device, and non-transitory computer readable storage medium
TWI530911B (en) Dynamic exposure adjusting method and electronic apparatus using the same
CN111028190A (en) Image processing method, image processing device, storage medium and electronic equipment
CN103888683A (en) Mobile terminal and shooting method thereof
JP5728498B2 (en) Imaging apparatus and light emission amount control method thereof
TWI486057B (en) Image pickup device and image synthesis method thereof
CN106791451B (en) Photographing method of intelligent terminal
CN110708463B (en) Focusing method, focusing device, storage medium and electronic equipment
EP4072121A1 (en) Photographing method and apparatus, storage medium, and electronic device
CN112261292B (en) Image acquisition method, terminal, chip and storage medium
CN109257540B (en) Photographing correction method of multi-photographing lens group and photographing device
CN107682611B (en) Focusing method and device, computer readable storage medium and electronic equipment
CN107547789B (en) Image acquisition device and method for photographing composition thereof
CN106878606B (en) Image generation method based on electronic equipment and electronic equipment
EP2658245B1 (en) System and method of adjusting camera image data
CN112351197A (en) Shooting parameter adjusting method and device, storage medium and electronic equipment
US11405562B2 (en) Image processing apparatus, method of controlling the same, image capturing apparatus, and storage medium
CN114125408A (en) Image processing method and device, terminal and readable storage medium
CN111339330B (en) Photo processing method and device, storage medium and electronic equipment
CN109600547B (en) Photographing method and device, electronic equipment and storage medium

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