CN110418067B - Light supplement lamp control method and device, camera equipment and storage medium - Google Patents

Light supplement lamp control method and device, camera equipment and storage medium Download PDF

Info

Publication number
CN110418067B
CN110418067B CN201910526564.1A CN201910526564A CN110418067B CN 110418067 B CN110418067 B CN 110418067B CN 201910526564 A CN201910526564 A CN 201910526564A CN 110418067 B CN110418067 B CN 110418067B
Authority
CN
China
Prior art keywords
brightness
current
gain
current gain
picture
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
CN201910526564.1A
Other languages
Chinese (zh)
Other versions
CN110418067A (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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN201910526564.1A priority Critical patent/CN110418067B/en
Publication of CN110418067A publication Critical patent/CN110418067A/en
Application granted granted Critical
Publication of CN110418067B publication Critical patent/CN110418067B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/74Circuitry for compensating brightness variation in the scene by influencing the scene brightness using illuminating means

Landscapes

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

Abstract

The application relates to a method and a device for controlling a fill-in light, camera equipment and a storage medium. The method comprises the following steps: the method comprises the steps of obtaining the current gain and the current picture brightness of the camera device, determining the current gain brightness ratio according to the current gain and the current picture brightness, inquiring the picture target brightness corresponding to the current gain, determining the starting condition of a light supplementing lamp according to the picture target brightness, and starting the light supplementing lamp if the current gain brightness ratio meets the starting condition. By the method, the control accuracy of the light supplement lamp of the camera shooting equipment can be improved.

Description

Light supplement lamp control method and device, camera equipment and storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a method and an apparatus for controlling a fill-in light, an image capturing device, and a storage medium.
Background
The camera device has wide applications in the aspects of life of people, such as people recording life through the camera device, monitoring public fields through the camera device, and the like.
At present, an image sensor adopted by camera equipment cannot capture a clear image in a dark environment. Therefore, the camera is provided with the light supplementing lamp, the light supplementing lamp can be automatically turned on when light is dark, and the light supplementing lamp is automatically turned off when the light is bright. The light supplement lamp comprises an infrared lamp, a white light lamp and the like. When the light supplement lamp is controlled to be turned on or turned off, the judgment is mostly carried out only according to the scene brightness of the camera equipment or only according to the image brightness collected by the camera equipment, so that the accuracy of the light supplement lamp control is insufficient.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a fill-in light control method and apparatus, an image capturing device, and a storage medium, which can improve accuracy of fill-in light control.
A fill light control method, the method comprising:
acquiring the current gain and the current picture brightness of the camera device;
determining a current gain brightness ratio according to the current gain and the current picture brightness;
inquiring the picture target brightness corresponding to the current gain, and determining the starting condition of the light supplement lamp according to the picture target brightness;
and if the current gain brightness ratio meets the starting condition, starting the light supplement lamp.
In one embodiment, the step of determining the turn-on condition of the fill light includes:
and calculating the starting threshold value in the starting condition according to the preset maximum gain value of the camera equipment, the preset starting gain threshold value of the light supplementing lamp and the picture target brightness corresponding to the current gain.
In one embodiment, the step of turning on the fill light if the current gain luminance ratio satisfies the turn-on condition includes:
and if the current gain brightness ratio exceeds the starting threshold, starting the light supplement lamp.
In one embodiment, the method further comprises:
determining the current adjustment step length of the light supplement lamp according to the current gain brightness ratio and the starting threshold;
and adjusting the brightness of the light supplement lamp according to the current adjustment.
In one embodiment, the step of determining the current adjustment step size of the fill light includes:
determining an upper limit value and a lower limit value of the current gain brightness ratio according to a preset tolerance threshold value and the starting threshold value;
if the current gain brightness ratio exceeds the upper limit value, inquiring an adjustment step length corresponding to the difference value between the current gain brightness ratio and the upper limit value in a preset adjustment step length set;
and if the current gain brightness ratio is lower than the lower limit value, inquiring an adjustment step corresponding to the difference value between the current gain brightness ratio and the lower limit value in the adjustment step set.
In one embodiment, the step of determining the current adjustment step size of the fill light further includes:
and if the current gain brightness ratio is between the upper limit value and the lower limit value, setting the current adjustment step length to be zero so as to keep the brightness of the light supplement lamp unchanged.
In one embodiment, the method further comprises:
inquiring the picture target brightness corresponding to the current gain, and determining a first closing condition of the light supplement lamp according to the picture target brightness corresponding to the current gain;
acquiring the ambient brightness in a preset number of frames of scene pictures acquired by the camera equipment, and determining a second closing condition of the light supplement lamp according to the ambient brightness;
and if the current gain brightness ratio of the camera equipment is detected to meet the first closing condition and the ambient brightness in the scene picture currently collected by the camera equipment meets the second closing condition, closing the light supplementing lamp.
In one embodiment, the step of determining the first off condition of the fill light includes:
and calculating to obtain a closing threshold value in the first closing condition according to a preset maximum gain value of the camera equipment, a preset closing gain threshold value of a fill-in light and the picture target brightness corresponding to the current gain of the camera equipment.
In one embodiment, the step of determining the second off condition of the fill light includes:
when the camera equipment collects the scene pictures of the preset number of frames, acquiring the exposure, the gain and the picture brightness of the camera equipment;
respectively calculating the ambient brightness in the scene pictures of the preset number of frames according to the exposure, the gain and the picture brightness of the camera equipment;
and determining a closing threshold value in the second closing condition according to the ambient brightness in the scene pictures of the preset number of frames.
In one embodiment, the method further comprises:
acquiring initial image brightness and initial environment brightness, wherein the initial image brightness and the initial environment brightness are respectively the image brightness and the environment brightness of the camera equipment when the light supplement lamp is turned on;
if the current environment brightness of the camera equipment exceeds the initial environment brightness, calculating histogram difference value information of the current picture brightness and the initial picture brightness of the camera equipment;
and if the histogram difference information meets a preset closing threshold updating condition, updating a closing threshold in the first closing condition and a closing threshold in the second closing condition.
A fill light control apparatus, the apparatus comprising:
the equipment data acquisition module is used for acquiring the current gain and the current picture brightness of the camera equipment;
the gain brightness ratio calculation module is used for determining the current gain brightness ratio according to the current gain and the current picture brightness;
the starting condition determining module is used for inquiring the picture target brightness corresponding to the current gain and determining the starting condition of the light supplementing lamp according to the picture target brightness; and
and the light supplement lamp starting module is used for starting the light supplement lamp if the current gain brightness ratio meets the starting condition.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring the current gain and the current picture brightness of the camera device;
determining a current gain brightness ratio according to the current gain and the current picture brightness;
inquiring the picture target brightness corresponding to the current gain, and determining the starting condition of the light supplement lamp according to the picture target brightness;
and if the current gain brightness ratio meets the starting condition, starting the light supplement lamp.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring the current gain and the current picture brightness of the camera device;
determining a current gain brightness ratio according to the current gain and the current picture brightness;
inquiring the picture target brightness corresponding to the current gain, and determining the starting condition of the light supplement lamp according to the picture target brightness;
and if the current gain brightness ratio meets the starting condition, starting the light supplement lamp.
According to the method, the device, the camera equipment and the storage medium, the current gain brightness ratio of the camera equipment is determined according to the current gain and the current picture brightness of the camera equipment, the starting condition of the light supplement lamp is determined according to the picture target brightness corresponding to the current gain, and the light supplement lamp on the camera equipment is started when the current gain brightness ratio meets the starting condition, so that the starting condition of the light supplement lamp is adaptively changed when the current gain of the camera equipment is changed, and the starting of the light supplement lamp is controlled by combining the starting condition and the current gain brightness ratio obtained according to the current gain and the picture brightness of the camera equipment, so that the control accuracy of the light supplement lamp of the camera equipment in different environments and different equipment states is effectively improved.
Drawings
FIG. 1 is a diagram of an application environment of a fill light control method in an embodiment;
FIG. 2 is a schematic flow chart illustrating a method for controlling a fill-in light according to an embodiment;
FIG. 3 is a schematic flow chart illustrating a method for controlling a fill-in light according to an embodiment;
FIG. 4 is a flowchart illustrating a fill-in light control method according to an embodiment; and
fig. 5 is a block diagram of a fill light control device in an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The light supplement lamp control method provided by the application can be applied to the application environment shown in fig. 1. The camera device 102 is provided with a light supplement lamp, the camera device 102 can control the on and off of the light supplement lamp, and the brightness of the light supplement lamp can be adjusted to improve the quality of the shot video or images. The camera device 102 may be, but is not limited to, a gun camera, a dome camera, and a dome camera.
In one embodiment, as shown in fig. 2, a fill-in light control method is provided, which is described by taking an example of the method applied to the image capturing apparatus in fig. 1, and includes the following steps:
in step 202, the current gain and the current screen brightness of the image pickup apparatus are acquired.
The image pickup apparatus is provided with an amplifier for amplifying a video signal, the gain of the camera is the gain of the amplifier (i.e. the amplification amount of the amplifier), and the adjustment process of the gain is automatically realized by detecting the average level of the video signal by an automatic gain control circuit (AGC circuit for short). When the ambient brightness is low, the gain of the image pickup device is large, the sensitivity of the image pickup device for acquiring photoelectric signals is increased, the picture definition is increased, but the picture noise is increased. The current picture brightness of the camera device is the average brightness of pixel points on the current collected picture of the camera. The current gain and the current screen brightness of the image pickup apparatus can be directly read from the register of the image pickup apparatus.
Step 204, determining the ratio of the current gain to the current image brightness according to the current gain and the current image brightness.
Specifically, after the current gain and the current screen brightness of the image pickup apparatus are obtained, the current gain brightness ratio is determined by calculating the ratio of the current gain to the current screen brightness.
And step 206, inquiring the picture target brightness corresponding to the current gain, and determining the starting condition of the light supplement lamp according to the picture target brightness.
Specifically, the target brightness of the picture corresponding to different gains of the camera device, that is, the ideal average brightness of the pixel points on the picture acquired by the camera under different gains of the amplifier, is preset. And inquiring the picture target brightness corresponding to the current gain from the preset picture target brightness corresponding to different gains. And calculating a starting threshold of the light supplement lamp according to the inquired picture target brightness, and setting the numerical value size relation between the current gain brightness ratio and the starting threshold as the starting condition of the light supplement lamp.
Specifically, because the magnitude of the current gain is related to the current environment brightness of the place where the camera is located, the starting condition of the fill-in light is determined according to the picture target brightness corresponding to the current gain, instead of adopting a fixed starting condition in different environments and different camera devices, so that the accuracy of the fill-in light control can be effectively improved.
And step 208, if the current gain brightness ratio meets the starting condition, starting the light supplement lamp.
Specifically, if the current gain brightness ratio satisfies the turn-on condition, the light supplement lamp is considered to be required to be turned on currently to increase the brightness of the picture collected by the camera device and improve the picture quality, so that the light supplement lamp is turned on to increase the ambient illumination of the place where the camera device is located. Therefore, the accuracy of the starting control of the light supplementing lamp is improved by combining the gain of the camera, the picture brightness and the current starting condition.
According to the method for controlling the light supplement lamp, the current gain brightness ratio is determined according to the current gain and the current picture brightness, the starting condition of the light supplement lamp is determined according to the picture target brightness corresponding to the current gain, and if the current gain brightness ratio meets the starting condition, the light supplement lamp is started, so that the accuracy of starting control of the light supplement lamp is improved by combining the gain of the camera, the picture brightness and the current starting condition.
In one embodiment, the current gain-to-luminance ratio is calculated as:
cur _ bright is the current gain luminance ratio, cur _ gain is the current gain, cur _ ev is the current picture luminance, and thus the current gain luminance ratio combining the current gain and the current picture luminance is obtained.
In one embodiment, when the picture target brightness corresponding to the current gain is inquired, the starting threshold value in the starting condition is calculated according to the preset maximum gain value of the image pickup device, the preset starting gain threshold value of the fill-in light, and the picture target brightness corresponding to the current gain. Therefore, the accuracy of the starting condition is improved by combining the preset maximum gain value of the camera equipment, the preset starting gain threshold value of the light supplement lamp and the picture target brightness corresponding to the current gain. The preset maximum gain value is the maximum gain of the camera, namely the maximum gain which can be adjusted by an amplifier on the camera, and the preset light supplement lamp turn-on gain threshold value represents that the ambient brightness of the scene where the camera is located is lower when the gain reaches the threshold value.
In one embodiment, when the start threshold value in the start condition is calculated according to the maximum gain value, the fill-in lamp start gain threshold value, and the picture target brightness corresponding to the current gain, the minimum value of the maximum gain value and the fill-in lamp start gain threshold value is obtained, and the ratio of the minimum value to the picture target brightness is calculated, where the ratio indicates that the picture acquired by the image pickup device reaches the picture target brightness under the ambient brightness of the current location, and the gain brightness ratio when the gain of the image pickup device is adjusted to the maximum gain value or the fill-in lamp start gain threshold value. And setting the ratio as a starting threshold of a starting condition, if the current gain brightness ratio exceeds the starting threshold, the current picture brightness is insufficient, the picture noise can be obviously increased by forcibly increasing the gain value, and the target brightness of the picture cannot be reached, so that the light supplement lamp needs to be started.
In one embodiment, according to the maximum gain value, the turn-on gain threshold of the fill-in light, and the target brightness of the picture corresponding to the current gain, the formula for calculating the turn-on threshold is as follows:
IR _ thresh ═ Min (max _ gain, thresh _ gain _ on)/default _ ev, where IR _ thresh is an on threshold, max _ gain is a maximum gain value, thresh _ gain _ on is a fill lamp on gain threshold, and default _ ev is a picture target brightness corresponding to the current gain.
In one embodiment, as shown in fig. 3, a fill-in light control method is provided, which is described by taking an example of the method applied to the image capturing apparatus in fig. 1, and includes the following steps:
step 302, acquiring the current gain and the current picture brightness of the camera device.
Step 304, determining the ratio of the current gain to the current image brightness according to the current gain and the current image brightness.
Step 306, inquiring the picture target brightness corresponding to the current gain, and determining the starting threshold value in the starting condition of the light supplement lamp according to the picture target brightness.
Specifically, after the light supplement lamp is turned on, the brightness of the light supplement lamp needs to be adjusted to adjust the picture brightness of the picture collected by the camera device, so that the picture quality is improved. When the light supplement lamp is turned on, the current gain and the current picture brightness of the camera equipment are greatly changed, and the current gain and the current picture brightness of the camera equipment need to be obtained again. And determining the current gain brightness ratio according to the current gain and the current picture brightness. And inquiring the picture target brightness corresponding to the current gain, and determining a starting threshold value in the starting condition of the light supplement lamp according to the picture target brightness. The calculation process of the current gain luminance ratio and the turn-on threshold may refer to the above description, and is not described again.
And 308, determining the current adjustment step length of the light supplement lamp according to the current gain brightness ratio and the starting threshold value in the starting condition.
And 310, adjusting the brightness of the light supplement lamp according to the current adjustment step length.
Specifically, in the on state of the fill-in light, the illumination brightness at which the image pickup apparatus is located is increased, so that the current gain brightness ratio may exceed the on threshold or may be smaller than the on threshold. After the current gain brightness and the opening threshold value of the light supplement lamp after being started are obtained, the current adjustment step length of the light supplement lamp can be determined according to the numerical value size relation between the current gain brightness ratio and the opening threshold value, the brightness of the light supplement lamp is adjusted according to the current adjustment step length, the adjustment step length of the brightness of the light supplement lamp is flexibly adjusted according to the current gain brightness ratio and the opening threshold value, and the adjustment effect of the brightness of the light supplement lamp is improved.
In one embodiment, when determining the current adjustment step length of the fill-in light, the upper limit value and the lower limit value of the current gain brightness ratio are determined according to the turn-on threshold value and a preset tolerance threshold value. If the current gain brightness ratio exceeds the upper limit value, inquiring the adjustment step length corresponding to the difference value between the current gain brightness ratio and the upper limit value in a preset adjustment step length set, wherein the inquired step length is the current adjustment step length. If the current gain brightness ratio is lower than the lower limit value, the adjustment step length corresponding to the difference value between the current gain brightness ratio and the lower limit value is inquired in the adjustment step length set, and the inquired step length is the current adjustment step length, so that a proper adjustment step length is set for the current gain brightness ratio and the current starting threshold, instead of adopting a single adjustment step length, and the adjustment effect of the brightness of the light supplement lamp is effectively improved.
In one embodiment, the upper limit of the current gain luminance ratio is IR _ thresh + t, the lower limit of the current gain luminance ratio is IR _ thresh-t, and t is the tolerance threshold. If the ratio of the current gain brightness exceeds the upper limit value, i.e. cur _ bright > IR _ thresh + t, the difference between the current gain brightness and the upper limit value is calculated, and the difference is evdiff1Cur _ bright- (IR _ thresh + t). If the ratio of the current gain brightness is lower than the lower limit value, i.e. cur _ bright < IR _ thresh-t, then calculate the difference between the current gain brightness and the lower limit value, the difference is evdiff2Cur _ bright- (IR _ thresh-t). Presetting a difference threshold value set t0,t1,...,tkAnd presetting an adjustment step size set (step)0,step1,...,stepmWhen | evdiff1[ or ] evdiff2| are respectively located at t0~t1、t1~t2……、tk-1~tkWhen the corresponding step length is step0、step1、……、stepm. Therefore, under the condition of considering the tolerance range formed by the tolerance threshold, the adjustment step length which is adaptive to the difference between the current gain brightness ratio and the starting threshold is determined, and the adjustment effect of the brightness of the light supplement lamp is effectively improved.
In one embodiment, if the current gain luminance ratio is between the upper limit value and the lower limit value, i.e. IR _ thresh-t < cur _ bright < IR _ thresh + t, the current adjustment step is set to zero, so that when the difference between the current gain luminance ratio and the turn-on threshold is between tolerance ranges formed by tolerance thresholds, the luminance of the fill-in lamp is kept stable, and the control effect of the fill-in lamp is improved.
In one embodiment, as shown in fig. 4, a fill-in light control method is provided, which is described by taking an example of the method applied to the image capturing apparatus in fig. 1, and includes the following steps:
in step 402, the current gain and the current screen brightness of the image pickup apparatus are acquired.
Step 404, determining a current gain brightness ratio according to the current gain and the current picture brightness.
Specifically, when the fill light is turned on, the ambient brightness of the place where the image pickup device is located may be greatly changed, resulting in a large change in the current gain and the current picture brightness of the camera. Therefore, when the fill-in light is turned on, the current gain and the current picture brightness of the image pickup device need to be obtained again, and the current gain brightness ratio of the image pickup device needs to be calculated. The calculation process of the current gain-luminance ratio has been described in the above embodiment, and is not described in detail.
And 406, inquiring the picture target brightness corresponding to the current gain, and determining a first closing condition of the light supplement lamp according to the picture target brightness corresponding to the current gain.
Specifically, the screen target brightness corresponding to different gains of the image pickup apparatus is preset. And inquiring the picture target brightness corresponding to the current gain from the preset picture target brightness corresponding to different gains. And calculating a closing threshold value in the first closing condition of the light supplement lamp according to the inquired picture target brightness, and setting the numerical value size relation between the current gain brightness ratio and the closing threshold value as the first closing condition of the light supplement lamp.
And step 408, obtaining the ambient brightness in the scene pictures of the preset number of frames collected by the camera device, and determining a second closing condition of the light supplement lamp according to the ambient brightness.
Specifically, the ambient brightness in the preset number of frames of scene pictures collected by the camera device is obtained, the ambient brightness of the scene where the camera device is located is determined according to the ambient brightness in the preset number of frames of scene pictures, the determined ambient brightness is set as a closing threshold value in the second closing condition of the light supplement lamp, and the numerical value size relation between the ambient brightness in the scene pictures collected by the camera device in real time and the closing threshold value is set as the second closing condition of the light supplement lamp.
When determining the ambient brightness of the scene where the image capturing device is located according to the ambient brightness in the preset number of frames of scene pictures, the intermediate value of the ambient brightness in the preset number of frames of scene pictures may be set as the ambient brightness of the scene where the image capturing device is located, or the average value or weighted average value of the ambient brightness in the preset number of frames of scene pictures may be set as the ambient brightness of the scene where the image capturing device is located.
And step 410, if it is detected that the current gain brightness ratio of the camera device meets a first closing condition and the ambient brightness in the scene picture currently collected by the camera device meets a second closing condition, closing the light supplement lamp.
Specifically, the ambient brightness in the scene picture currently acquired by the camera device is acquired in real time, the current gain brightness ratio of the camera device is compared with the closing threshold in the first closing condition, and the ambient brightness in the scene picture currently acquired by the camera device is compared with the closing threshold in the second closing condition. And if the current gain brightness ratio of the camera equipment meets the first closing condition and the ambient brightness in the scene pictures collected by the camera equipment for a plurality of continuous frames meets the second closing condition, indicating that the ambient brightness of the environment where the camera equipment is located is higher, and closing the light supplement lamp.
In one embodiment, when the turn-off threshold in the first turn-off condition of the fill-in light is calculated according to the inquired image target brightness, the turn-off threshold in the first turn-off condition is calculated according to a preset maximum gain value of the image pickup device, a preset turn-off gain threshold of the fill-in light, and the image target brightness corresponding to the current gain of the image pickup device. Therefore, the accuracy of the closing condition is improved by combining the preset maximum gain value of the camera equipment, the preset closing gain threshold value of the light supplement lamp and the picture target brightness corresponding to the current gain. The preset light supplement lamp turn-off gain threshold value represents that the ambient brightness of the scene where the camera is located is high when the gain reaches the threshold value.
In one embodiment, when the turn-off threshold value in the first turn-off condition is calculated according to the maximum gain value, the turn-off gain threshold value of the fill-in lamp, and the picture target brightness corresponding to the current gain, the minimum value of the maximum gain value and the turn-off gain threshold value of the fill-in lamp is obtained, and the ratio of the minimum value to the picture target brightness is calculated, where the ratio indicates that the picture acquired by the image pickup device reaches the picture target brightness under the ambient brightness of the current location, and the gain brightness ratio when the gain of the image pickup device is adjusted to the maximum gain value or the turn-off gain threshold value of the fill-in lamp. The ratio is set to a turn-off threshold for the first turn-off condition, and the current gain luminance ratio less than the turn-off threshold is set to the first turn-off condition.
In one embodiment, the calculation formula for the shutdown threshold in the first shutdown condition is represented as:
IR _ thresh _ off _1 is Min (max _ gain, thresh _ gain _ off)/defualt _ ev, where IR _ thresh _ off _1 is an off threshold in the first off condition, thresh _ gain _ off is a fill lamp off gain threshold, and defualt _ ev is a picture target brightness corresponding to the current gain.
In one embodiment, when the image pickup device collects a preset number of frames of scene pictures, the exposure, the gain and the picture brightness of the image pickup device are obtained, and the ambient brightness in the preset number of frames of scene pictures is respectively calculated according to the exposure, the gain and the picture brightness of the image pickup device. The calculation formula of the ambient brightness is expressed as:
cur _ luma (cur _ gain _ cur _ shunt [ - ])/cur _ ev, wherein cur _ luma is ambient brightness in a preset number of frames of scene pictures of the image pickup apparatus, cur _ shunt is exposure of the image pickup apparatus, and α is a preset adjustment coefficient. According to the ambient brightness cur _ luma in the scene pictures of the preset number of frames, the ambient brightness of the scene where the camera device is located is determined, the ambient brightness is set as a closing threshold IR _ thresh _ off _2 of a second closing condition, and the ambient brightness in the scene pictures collected by the camera device in real time is smaller than the closing threshold and is set as the second closing condition.
In one embodiment, when the fill-in light is turned on, the turn-off threshold in the first turn-off condition and the turn-off threshold in the second turn-off condition are calculated, and whether the scene picture collected by the camera device in real time meets the first turn-off condition and the second condition at the same time is judged. When the environment of the place where the camera device is located is greatly changed, the closing threshold value in the first closing condition and the closing threshold value in the second closing condition also need to be updated accordingly, and the accuracy of closing control of the light supplement lamp can be effectively guaranteed.
In one embodiment, when it is determined whether the environment of the location where the image capturing apparatus is located has changed greatly, an initial picture brightness and an initial environment brightness are obtained, where the initial picture brightness is the picture brightness of the image capturing apparatus when the fill-in light is just turned on, and the initial environment brightness is the environment brightness of the location where the image capturing apparatus is located when the fill-in light is just turned on. The method comprises the steps of obtaining the current environment brightness of a scene where the camera device is located, calculating histogram difference information of the current image brightness and the initial image brightness if the current environment brightness exceeds the initial environment brightness, updating a closing threshold value in a first closing condition according to a calculation process of the closing threshold value in the first closing condition if the calculated histogram difference information meets a preset closing threshold value updating condition, and updating the closing threshold value in a second closing condition according to a calculation process of the closing threshold value in the second closing condition so as to improve the accuracy of light supplement control.
In one embodiment, the histogram information of the brightness of the current picture is obtained by representing the brightness value of each gray component in the current picture by a histogram, the histogram information of the brightness of the initial picture is obtained by representing the brightness value of each gray component in the initial picture by the histogram, the mean square error between the brightness value of each gray component in the histogram information of the brightness of the initial picture and the brightness value of each gray component in the histogram information of the brightness of the current picture is calculated, and the mean square errors are accumulated to obtain the mean square error accumulated value of the histogram information of the brightness of the initial picture and the histogram information of the brightness of the current picture. Meanwhile, the ratio of the histogram information of the initial picture brightness to the histogram information of the previous picture brightness is calculated. The mean square error cumulative value and the ratio of the histogram information of the initial picture brightness and the histogram information of the current picture brightness are the histogram difference information.
In one embodiment, when the mean square error cumulative value of the histogram information of the initial image brightness and the histogram information of the current image brightness is within a preset interval range and the ratio of the histogram information of the initial image brightness and the histogram information of the current image brightness exceeds a preset updating threshold, it is determined that the histogram difference information of the current image brightness and the initial image brightness satisfies a preset closing threshold updating condition.
In one embodiment, the calculation formula of the mean square error cumulative value of the histogram information of the initial picture luminance and the histogram information of the current picture luminance is represented as:
Figure GDA0003030045830000121
wherein sum _ hist is the mean square error cumulative value of the histogram information of the initial image brightness and the histogram information of the current image brightness, base _ hist [ i [ ]]Is the luminance value of the ith gray component in the histogram information of the initial picture luminance, curr _ hist [ i [ ]]The luminance value of the ith gray component in the histogram information of the luminance of the current picture. max, min are the sequence numbers of the gray components in the initial picture and the current picture.
In one embodiment, the calculation formula of the ratio of the histogram information of the initial picture brightness to the histogram information of the current picture brightness is expressed as:
ratio _ bist/curr _ hist, where ratio _ bist is the ratio of histogram information of the initial picture brightness to histogram information of the current picture brightness, base _ hist is the histogram information of the initial picture brightness, and curr _ hist is the histogram information of the current picture brightness.
It should be understood that although the various steps in the flow charts of fig. 1-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 5, there is provided a fill-in lamp control device 500, including: an apparatus data obtaining module 502, a gain luminance ratio calculating module 504, a turn-on condition determining module 506, and a fill light turn-on module 508, wherein:
an apparatus data obtaining module 502, configured to obtain a current gain and a current picture brightness of the image capturing apparatus;
a gain-to-brightness ratio calculation module 504, configured to determine a current gain-to-brightness ratio according to the current gain and the current picture brightness;
a starting condition determining module 506, configured to query the picture target brightness corresponding to the current gain, and determine a starting condition of the fill-in light according to the picture target brightness; and
and a fill light turning-on module 508, configured to turn on a fill light if the current gain luminance ratio satisfies the turning-on condition.
Specifically, the device data obtaining module 502, the gain-to-brightness ratio calculating module 504, the turning-on condition determining module 506, and the fill light turning-on module 508 may refer to the description of the corresponding steps in the foregoing method embodiments, and are not repeated again.
In one embodiment, the turn-on condition determination module 506 includes:
and the starting threshold value calculating module is used for calculating the starting threshold value in the starting condition according to the preset maximum gain value of the camera equipment, the preset starting gain threshold value of the light supplementing lamp and the picture target brightness corresponding to the current gain.
In one embodiment, the fill light turning-on module 508 includes:
and the light supplement lamp starting module is used for starting the light supplement lamp if the current gain brightness ratio exceeds the starting threshold.
In one embodiment, the fill light control device 500 further includes:
the adjustment step length determining module is used for determining the current adjustment step length of the light supplementing lamp according to the current gain brightness ratio and the starting threshold; and
and the light supplement lamp brightness adjusting module is used for adjusting the brightness of the light supplement lamp according to the current adjusting step length.
In one embodiment, the fill light brightness adjusting module includes:
the upper and lower limit determining module is used for determining an upper limit value and a lower limit value of the current gain brightness ratio according to a preset tolerance threshold value and a starting threshold value;
the first step length determining module is used for inquiring an adjusting step length corresponding to a difference value between the current gain brightness ratio and the upper limit value in a preset adjusting step length set if the current gain brightness ratio exceeds the upper limit value; and
and the second step length determining module is used for inquiring the adjustment step length corresponding to the difference value between the current gain brightness ratio and the lower limit value in the adjustment step length set if the current gain brightness ratio is lower than the lower limit value.
In one embodiment, the fill-in lamp brightness adjusting module further includes:
and the third step length determining module is used for setting the current adjustment step length to be zero if the current gain brightness ratio is between the upper limit value and the lower limit value so as to keep the brightness of the fill-in light unchanged.
In one embodiment, the fill light control device 500 further includes:
the first closing condition determining module is used for inquiring the picture target brightness corresponding to the current gain and determining a first closing condition of the light supplementing lamp according to the picture target brightness corresponding to the current gain;
the second closing condition determining module is used for acquiring the ambient brightness in the scene pictures of the preset number of frames acquired by the camera equipment and determining a second closing condition of the light supplementing lamp according to the ambient brightness;
and the light supplement lamp closing module is used for closing the light supplement lamp if the current gain brightness ratio of the camera equipment is detected to meet the first closing condition and the ambient brightness in the scene picture currently collected by the camera equipment meets the second closing condition.
In one embodiment, the first shutdown condition determination module includes:
and the first closing threshold determining module is used for calculating to obtain a closing threshold in the first closing condition according to a preset maximum gain value of the camera equipment, a preset closing gain threshold of the fill-in light and the picture target brightness corresponding to the current gain of the camera equipment.
In one embodiment, the second shutdown condition determination module includes:
the camera shooting data acquisition module is used for acquiring the exposure, the gain and the picture brightness of the camera shooting equipment when the camera shooting equipment collects a preset number of frames of scene pictures;
the environment brightness calculation module is used for respectively calculating the environment brightness in the scene pictures of the preset number of frames according to the exposure, the gain and the picture brightness of the camera equipment;
and the second closing threshold determining module is used for determining a closing threshold in the second closing condition according to the ambient brightness in the scene pictures of the preset number of frames.
In one embodiment, the fill light control device 500 further includes:
the initial data acquisition module is used for acquiring initial image brightness and initial environment brightness which are respectively the image brightness and the environment brightness of the camera equipment when the light supplement lamp is turned on;
the difference value information calculation module is used for calculating histogram difference value information of the current picture brightness and the initial picture brightness of the camera equipment if the current environment brightness of the camera equipment exceeds the initial environment brightness; and
and the closing threshold updating module is used for updating the closing threshold in the first closing condition and the closing threshold in the second closing condition if the histogram difference information meets the preset closing threshold updating condition.
For specific limitations of the fill-in light control device, reference may be made to the above limitations on the fill-in light control method, which is not described herein again. All modules in the fill-in light control device can be completely or partially realized through software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, an image capturing apparatus is provided, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the fill light control method provided in the foregoing embodiments when executing the computer program.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of a fill light control method provided in the above embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (12)

1. A method for controlling a fill-in light is characterized by comprising the following steps:
acquiring the current gain and the current picture brightness of the camera device;
determining a current gain brightness ratio according to the current gain and the current picture brightness;
inquiring the picture target brightness corresponding to the current gain, and determining the starting condition of the light supplement lamp according to the picture target brightness;
if the current gain brightness ratio meets the starting condition, the light supplement lamp is started;
the determining the turn-on condition of the fill light comprises:
acquiring a minimum value of a preset maximum gain value and a preset light supplement lamp starting gain threshold value of the camera shooting equipment;
and obtaining the starting threshold value in the starting condition based on the ratio of the minimum value to the picture target brightness corresponding to the current gain.
2. The method according to claim 1, wherein the step of turning on the fill light if the current gain luminance ratio satisfies the turn-on condition comprises:
and if the current gain brightness ratio exceeds the starting threshold, starting the light supplement lamp.
3. The method of claim 1, further comprising:
determining the current adjustment step length of the light supplement lamp according to the current gain brightness ratio and the starting threshold;
and adjusting the brightness of the light supplement lamp according to the current adjustment step length.
4. The method of claim 3, wherein the step of determining the current adjustment step size of the fill light comprises:
determining an upper limit value and a lower limit value of the current gain brightness ratio according to a preset tolerance threshold value and the starting threshold value;
if the current gain brightness ratio exceeds the upper limit value, inquiring an adjustment step length corresponding to the difference value between the current gain brightness ratio and the upper limit value in a preset adjustment step length set;
and if the current gain brightness ratio is lower than the lower limit value, inquiring an adjustment step corresponding to the difference value between the current gain brightness ratio and the lower limit value in the adjustment step set.
5. The method of claim 4, wherein the step of determining the current adjustment step size of the fill light further comprises:
and if the current gain brightness ratio is between the upper limit value and the lower limit value, setting the current adjustment step length to be zero so as to keep the brightness of the light supplement lamp unchanged.
6. The method of claim 1, further comprising:
inquiring the picture target brightness corresponding to the current gain, and determining a first closing condition of the light supplement lamp according to the picture target brightness corresponding to the current gain;
acquiring the ambient brightness in a preset number of frames of scene pictures acquired by the camera equipment, and determining a second closing condition of the light supplement lamp according to the ambient brightness;
and if the current gain brightness ratio of the camera equipment is detected to meet the first closing condition and the ambient brightness in the scene picture currently collected by the camera equipment meets the second closing condition, closing the light supplementing lamp.
7. The method of claim 6, wherein the step of determining the first off condition of the fill light comprises:
acquiring the minimum value of a preset maximum gain value and a preset turn-off gain threshold value of the light supplement lamp of the camera device;
and obtaining a closing threshold value in the first closing condition based on the ratio of the minimum value to the picture target brightness corresponding to the current gain.
8. The method of claim 7, wherein the step of determining the second off condition of the fill light comprises:
obtaining the product of the current gain, the exposure of the current camera equipment and a preset adjusting coefficient;
obtaining the ambient brightness in the scene pictures of the preset number of frames based on the ratio of the product to the brightness of the current picture;
and determining a closing threshold value in the second closing condition according to the ambient brightness in the scene pictures of the preset number of frames.
9. The method of claim 6, further comprising:
acquiring initial image brightness and initial environment brightness, wherein the initial image brightness and the initial environment brightness are respectively the image brightness and the environment brightness of the camera equipment when the light supplement lamp is turned on;
if the current environment brightness of the camera equipment exceeds the initial environment brightness, calculating histogram difference value information of the current picture brightness and the initial picture brightness of the camera equipment;
and if the histogram difference information meets a preset closing threshold updating condition, updating a closing threshold in the first closing condition and a closing threshold in the second closing condition.
10. A light supplement lamp control device, the device comprising:
the equipment data acquisition module is used for acquiring the current gain and the current picture brightness of the camera equipment;
the gain brightness ratio calculation module is used for determining the current gain brightness ratio according to the current gain and the current picture brightness;
the starting condition determining module is used for inquiring the picture target brightness corresponding to the current gain and determining the starting condition of the light supplementing lamp according to the picture target brightness; the device is also used for acquiring the minimum value of a preset maximum gain value and a preset starting gain threshold value of a light supplement lamp of the camera equipment; obtaining a starting threshold value in the starting condition based on the ratio of the minimum value to the picture target brightness corresponding to the current gain;
and
and the light supplement lamp starting module is used for starting the light supplement lamp if the current gain brightness ratio meets the starting condition.
11. An image capturing apparatus comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 9 when executing the computer program.
12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 9.
CN201910526564.1A 2019-06-18 2019-06-18 Light supplement lamp control method and device, camera equipment and storage medium Active CN110418067B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910526564.1A CN110418067B (en) 2019-06-18 2019-06-18 Light supplement lamp control method and device, camera equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910526564.1A CN110418067B (en) 2019-06-18 2019-06-18 Light supplement lamp control method and device, camera equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110418067A CN110418067A (en) 2019-11-05
CN110418067B true CN110418067B (en) 2021-07-27

Family

ID=68359284

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910526564.1A Active CN110418067B (en) 2019-06-18 2019-06-18 Light supplement lamp control method and device, camera equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110418067B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111935415B (en) * 2020-08-18 2022-02-08 浙江大华技术股份有限公司 Brightness adjusting method and device, storage medium and electronic device
CN112351214B (en) * 2020-09-22 2022-05-06 智博汽车科技(上海)有限公司 Method and device for assisting face image acquisition, readable storage medium and vehicle
CN113840095B (en) * 2021-09-06 2023-03-24 浙江大华技术股份有限公司 Light supplement lamp control method and related device
CN114554105B (en) * 2022-04-27 2022-08-02 深圳比特微电子科技有限公司 Method and device for controlling light supplement lamp, camera and storage medium
CN115225824B (en) * 2022-06-14 2024-04-26 深圳英飞拓仁用信息有限公司 Automatic exposure method and shooting device
CN118244658B (en) * 2024-05-27 2024-07-19 北京智芯微电子科技有限公司 Intelligent control method and device for lighting device, monitoring equipment, chip and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107995437A (en) * 2017-12-22 2018-05-04 努比亚技术有限公司 Photograph taking method for polishing and mobile terminal
CN108289173A (en) * 2018-01-23 2018-07-17 杭州矩视科技有限公司 A kind of camera shooting control method, device, terminal device and storage medium
CN108551553A (en) * 2018-03-16 2018-09-18 浙江大华技术股份有限公司 A kind of light compensating lamp control method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130250168A1 (en) * 2012-03-23 2013-09-26 Lockheed Martin Corporation System, method and computer software product for exposure control of an imaging device using flash lamp pulses

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107995437A (en) * 2017-12-22 2018-05-04 努比亚技术有限公司 Photograph taking method for polishing and mobile terminal
CN108289173A (en) * 2018-01-23 2018-07-17 杭州矩视科技有限公司 A kind of camera shooting control method, device, terminal device and storage medium
CN108551553A (en) * 2018-03-16 2018-09-18 浙江大华技术股份有限公司 A kind of light compensating lamp control method and device

Also Published As

Publication number Publication date
CN110418067A (en) 2019-11-05

Similar Documents

Publication Publication Date Title
CN110418067B (en) Light supplement lamp control method and device, camera equipment and storage medium
US9554059B1 (en) Exposure control system and associated exposure control method
JP4622629B2 (en) Imaging device
KR101341095B1 (en) Apparatus and method for capturing images having optimized quality under night scene conditions
JP4600684B2 (en) Imaging apparatus and imaging method
US8885092B2 (en) Camera device, exposure control method, and program
US8488051B2 (en) Image pickup apparatus and control method therefor
KR20090051099A (en) Dynamic automatic exposure compensation for image capture devices
CN108337447A (en) High dynamic range images exposure compensating value-acquiring method, device, equipment and medium
US20090231464A1 (en) Digital camera, electronic device equipped with digital camera, imaging method for digital camera and storage medium provided with program of digital camera
US8077256B1 (en) Scene-aware automatic-exposure control
KR20030097687A (en) Image processing apparatus, camera apparatus, and automatic exposure control method
CN109510949B (en) Camera automatic exposure method based on effective brightness of image feature points
US20090153727A1 (en) Image-pickup device, method for controlling image-pickup device, program of method for controlling image-pickup device, and recording medium having recorded program of method for controlling image-pickup device thereon
CN118175430B (en) Automatic exposure control method and device and image pickup equipment
US20070280660A1 (en) Method for firing flash of image-capturing device
KR101716818B1 (en) Cctv camera systems for ultra low illumination
KR101005769B1 (en) Auto exposure and auto white-balance method for detecting high dynamic range conditions
US20050147293A1 (en) Image processing and method
CN116132781A (en) Micro-distance light supplementing method, micro-distance light supplementing device, computer equipment and storage medium
JP2007025558A (en) Exposure control method and device, and imaging apparatus
CN113747062B (en) HDR scene detection method and device, terminal and readable storage medium
KR20110067700A (en) Image acquisition method and digital camera system
CN112839182B (en) Automatic exposure control system and method
JP2009063674A (en) Imaging apparatus and flash control method

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