CN110636229A - Image light supplement adjusting method and device and electronic equipment - Google Patents

Image light supplement adjusting method and device and electronic equipment Download PDF

Info

Publication number
CN110636229A
CN110636229A CN201911015176.3A CN201911015176A CN110636229A CN 110636229 A CN110636229 A CN 110636229A CN 201911015176 A CN201911015176 A CN 201911015176A CN 110636229 A CN110636229 A CN 110636229A
Authority
CN
China
Prior art keywords
brightness
mean value
light
interval
stable
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911015176.3A
Other languages
Chinese (zh)
Other versions
CN110636229B (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.)
Chongqing Unisinsight Technology Co Ltd
Original Assignee
Chongqing Unisinsight 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 Chongqing Unisinsight Technology Co Ltd filed Critical Chongqing Unisinsight Technology Co Ltd
Priority to CN201911015176.3A priority Critical patent/CN110636229B/en
Publication of CN110636229A publication Critical patent/CN110636229A/en
Application granted granted Critical
Publication of CN110636229B publication Critical patent/CN110636229B/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)

Abstract

The embodiment of the invention provides an image light supplement adjusting method and device and electronic equipment, and relates to the technical field of monitoring. The image light supplement adjusting method comprises the following steps: acquiring a brightness mean value of an interested area in the acquired image data; judging whether the brightness mean value meets a preset stable condition or not according to the linear index of a light supplement lamp of the electronic equipment; and if the brightness mean value does not meet the stable condition, adjusting the working state of the light supplement lamp or the exposure of the electronic equipment according to the brightness mean value. So, not only can adapt to the electronic equipment of all kinds of linearity, realize intelligent, nimble light filling, still adopted to adjust the flash light and cooperate with the two kinds of modes of adjusting the exposure, the two advantage of make full use of avoids the light filling lamp to dodge repeatedly the problem.

Description

Image light supplement adjusting method and device and electronic equipment
Technical Field
The invention relates to the technical field of monitoring, in particular to an image light supplement adjusting method and device and electronic equipment.
Background
With the development of artificial intelligence technology, image recognition technology is widely applied in various industries. Especially in the security industry, the monitoring camera capable of carrying out image recognition on the snapshot image is also widely applied to the construction of cities. The key to ensuring accurate image detection and high recognition rate is image quality. The illumination environment when the image is acquired has a great influence on the image quality. For example, when the lighting environment is poor, the brightness of the acquired image data is low, and image processing is difficult. However, the monitoring camera is usually installed in an outdoor environment in which the illumination environment is not controllable, and therefore, light supplement during the operation of the monitoring camera is very important.
The light supplement method provided in the related art completely depends on a light supplement lamp and is not flexible enough. Although the brightness adjustment of the whole acquired image can be realized, the brightness of the region of interest can not be ensured to meet the identification requirement. Moreover, the light supplement method provided by the related art is not universal, and is not good when applied to part of monitoring cameras. In addition, the problem of repeated flashing in the light supplementing process can also occur.
Disclosure of Invention
In view of the above, the present invention provides a method and an apparatus for adjusting supplementary lighting of an image, and an electronic device.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:
in a first aspect, an embodiment provides an image fill-in light adjusting method applied to an electronic device, where the image fill-in light adjusting method includes:
acquiring a brightness mean value of an interested area in the acquired image data;
judging whether the brightness mean value meets a preset stable condition or not according to the linear index of a light supplement lamp of the electronic equipment;
and if the stable condition is not met, adjusting the working state of the light supplement lamp or the exposure of the electronic equipment according to the brightness mean value.
In a second aspect, an embodiment provides an image light supplement adjusting device, which is applied to an electronic device, and the image light supplement adjusting device includes:
the acquisition module is used for acquiring the brightness mean value of the interest area in the acquired image data;
the judging module is used for judging whether the brightness mean value meets a preset stable condition or not according to the linear index of a light supplement lamp of the electronic equipment;
and the adjusting module is used for adjusting the working state of the light supplementing lamp or the exposure of the electronic equipment according to the brightness mean value when the stable condition is not met.
In a third aspect, embodiments provide an electronic device comprising a processor and a memory, the memory storing machine executable instructions capable of being executed by the processor, the processor being capable of executing the machine executable instructions to implement the method described in the foregoing embodiments.
In a fourth aspect, embodiments provide a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the method according to the foregoing embodiments.
The embodiment of the invention provides an image supplementary lighting adjusting method, an image supplementary lighting adjusting device and electronic equipment, wherein the image supplementary lighting adjusting method is used for acquiring a brightness mean value of an interested area in acquired image data. And judging whether light supplement needs to be adjusted or not according to the brightness of the region of interest. And when the light supplement is needed, adjusting the working state of the light supplement lamp or the exposure of the electronic equipment according to the brightness mean value. Therefore, the brightness of the interested area in the image data obtained after the supplementary lighting adjustment is ensured to meet the identification requirement. In addition, when judging whether the light supplement needs to be adjusted, the linear index of the electronic equipment is also considered, so that the method can be suitable for electronic equipment with various linearity degrees, and intelligent and flexible light supplement is realized. In addition, the method also dynamically switches between two modes of adjusting the flash lamp and adjusting the exposure amount based on the brightness mean value, so that the problem that the light supplement lamp flashes repeatedly is avoided.
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 technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 shows a schematic diagram of an electronic device provided by an embodiment of the present invention.
Fig. 2 is a flowchart illustrating steps of an image fill-in light adjusting method according to an embodiment of the present invention.
Fig. 3 shows one of the substep flow diagrams of step S102 of fig. 2.
Fig. 4 shows a second flow chart of substeps of step S102 of fig. 2.
Fig. 5 shows a flowchart of sub-steps of step S103 of fig. 2.
Fig. 6 is a flowchart illustrating steps of another method for adjusting fill-in light of an image according to an embodiment of the present invention.
Fig. 7 is a schematic diagram illustrating an image fill-in light adjusting apparatus according to an embodiment of the present invention.
Icon: 100-an electronic device; 110-a memory; 120-a processor; 130-a communication module; 140-a light supplement lamp; 300-an image light supplement adjusting device; 301-an obtaining module; 302-a judgment module; 303-adjustment module.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It is noted that relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
According to the light supplement lamp control algorithm provided by the related technology, a shooting area is divided into different sub-areas, each light supplement lamp corresponds to one area, the brightness of a picture in the shooting area and the brightness of each sub-area are obtained, and the intensity of each light supplement lamp is adjusted according to the brightness difference between the two areas. That is, the problem of over exposure or under exposure of part of pictures in the images shot by the camera is solved by increasing the number of the light supplement lamps and independently controlling the light supplement lamps. However, the brightness of the whole picture is proper and does not represent that the brightness of the region of interest meets the requirement, so the fill-in light effect is not ideal.
In addition, due to the difference of production processes of manufacturers of the light supplement lamps, the linearity of the light supplement lamps is different, and the effects of the light supplement lamp with high linearity and the light supplement lamp with low linearity in the same environment and under the same control strategy are different. Therefore, the fixed fill light adjustment strategy is not universal. Particularly, the fill-in lamp with low linearity cannot be maintained stably and repeatedly blinked in the adjustment process.
In order to solve the above problem, embodiments of the present invention provide an image fill-in light adjusting method and apparatus, and an electronic device.
Referring to fig. 1, fig. 1 is a block diagram of an electronic device 100 provided in the present application. The electronic device 100 may be a device with an image capturing function, such as a mobile phone, a tablet, a monitoring camera, a bayonet camera, and the like.
The electronic device 100 includes a memory 110, a processor 120, a fill-in light 140, and a communication module 130. The memory 110, the processor 120, the fill light 140 and the communication module 130 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines.
The memory 110 is used to store programs or data. The Memory 110 may be, but is not limited to, a Random Access Memory 110 (RAM), a Read Only Memory 110 (ROM), a Programmable Read Only Memory 110 (PROM), an Erasable Read Only Memory 110 (EPROM), an electrically Erasable Read Only Memory 110 (EEPROM), and the like.
The processor 120 is used to read/write data or programs stored in the memory 110 and perform corresponding functions.
The communication module 130 is configured to establish a communication connection between the electronic device 100 and another communication terminal through the network, and to transmit and receive data through the network.
It should be understood that the structure shown in fig. 1 is only a schematic structural diagram of the electronic device 100, and the electronic device 100 may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
First embodiment
Referring to fig. 2, fig. 2 shows a method for adjusting light supplement of an image according to an embodiment of the present invention. The image fill-in light adjusting method may be applied to the electronic device 100. As shown in fig. 2, the method for adjusting supplementary lighting of an image includes the following steps:
step S101, acquiring a brightness mean value of a region of interest in the acquired image data.
The electronic device 100 continuously performs image acquisition on the monitored area, and puts the image data into a queue to be processed when the acquired image data with the region of interest. The queue to be processed is used for storing image data with an interested area. Optionally, the acquired image data with the region of interest are sequentially buffered in the queue to be processed according to the acquisition time sequence. And after the queue to be processed is full, storing newly acquired image data with the region of interest in the queue to be processed according to a first-in first-out principle, and rejecting the earliest stored image data in the queue to be processed.
The region of interest may be a preselected image region to be identified, for example, a face image region. The electronic device 100 continuously performs image acquisition on the monitored area, and when a human face appears in the acquired image, stores the image into a queue to be processed. If the queue to be processed is full of images, deleting the images stored in the queue to be processed at the earliest time according to a first-in first-out principle, and then storing the images into the queue to be processed.
In the embodiment of the invention, in each light supplementing period, the corresponding brightness mean value is calculated according to the YUV brightness value of the interested area in each image data in the queue to be processed. Optionally, an average luminance value of each image data is calculated according to YUV of the region of interest in each image data. And then counting the sum of the average brightness values of all the image data in the queue to be processed. And calculating the brightness mean value corresponding to the image data in the queue to be processed according to the sum value and the total number of the image data in the queue to be processed. It is understood that the above queue to be processed is continuously updated, and the influence caused by the abnormal brightness of the region of interest in the individual image data is avoided by dynamically calculating the brightness mean value.
Step S102, determining whether the luminance mean value satisfies a preset stable condition according to the linear index of the fill light 140 of the electronic device 100.
The linearity index is a value for characterizing the linearity of the fill-in lamp 140 of the electronic device 100. Optionally, the linearity of the fill-in light and the like of the electronic device 100 is normalized to a specified numerical value interval through a previous test to be used as a linear index corresponding to the electronic device 100. E.g. normalized to between 0 and 100. It is understood that the higher the linearity index of the fill light 140 of the electronic device 100, the higher the linearity is, and vice versa. Generally, different control amounts (for example, control current, control voltage, or control pulse) are input to the fill-in light 140, and the fill-in light 140 generates different fill-in light intensities, and the fill-in light intensities generated are used as output amounts. If the control quantity and the output quantity satisfy the linear relationship, it indicates that the linearity of the fill-in light 140 is high, otherwise, the linearity of the fill-in light 140 is low. Understandably, the light supplement lamp 140 has high linearity, and the light supplement lamp 140 can be precisely adjusted and controlled; light filling lamp 140 linearity is low, and the phenomenon of cascaded jump can appear in the light filling lamp 140 adjustment process, and light filling lamp 140 is difficult to be stable, leads to appearing the phenomenon of twinkling repeatedly. As can be seen, for the light supplement lamp 140 with high linearity, in order to obtain the best light supplement effect, when the luminance average value corresponding to the acquired image data is not good, the light supplement adjustment can be performed. For the fill light 140 with low linearity, in order to avoid repeated flicker caused by skip regulation, the adjustment should be performed as little as possible, that is, even if the brightness mean value is not good, the fill light adjustment may not be performed when the actual recognition is not affected. It can be seen that the controllability is different for different electronic devices 100 due to different linearity. In order to flexibly adapt to the electronic devices 100 with different linearity, different stability conditions can be set for the electronic devices 100 with different linearity.
The stable condition is a condition that an interested area in the collected image data accords with the identification requirement and light supplement adjustment is not needed.
Optionally, when the linear index is not lower than the preset first threshold, as shown in fig. 3, the step of determining whether the brightness mean value meets the preset stable condition includes:
and S102-1, judging whether the brightness mean value belongs to a preset stable brightness interval.
The first threshold may be a value determined from a specified value range through a test, and is used for distinguishing the linearity of the fill-in light 140. Optionally, when the linear index is lower than the first threshold, the linearity of the light supplement lamp 140 corresponding to the characterization is low, and when the linear index is not lower than the first threshold, the linearity of the light supplement lamp 140 corresponding to the characterization is high.
The preset stable brightness interval is a fixed brightness interval determined through a pre-test, and when the average brightness value of the region of interest belongs to the stable brightness interval, the region of interest can be identified. The brightness mean is used to characterize the average brightness of the region of interest in the image data acquired over the most recent period of time. And judging whether the stable condition is met or not by comparing whether the brightness mean value belongs to a preset stable brightness interval or not.
And S102-2, if the brightness mean value does not belong to a preset stable brightness interval, judging that the brightness mean value does not meet the stable condition. The flow advances to step S103.
And S102-3, if the brightness mean value belongs to a preset stable brightness interval, judging that a stable condition is met.
Optionally, when the linear index is lower than the preset first threshold, as shown in fig. 4, the step of determining whether the brightness mean value meets the preset stable condition may include:
and S102-4, judging whether the brightness mean value belongs to the current stable brightness interval.
The current stable luminance section is a stable luminance section corresponding to the electronic device 100. In the embodiment of the present invention, the fill-in light 140 of the electronic device 100 having the linearity index lower than the first threshold has low linearity. In order to adapt to the characteristics of the electronic device 100 with low linearity, the corresponding stable luminance interval may be dynamically changed. Optionally, when the obtained luminance mean value represents that the current light supplement condition is stable and the light supplement is not required to be adjusted continuously, the stable luminance area can be properly enlarged, unnecessary light supplement adjustment is performed when the fluctuation of the subsequent luminance mean value is not serious, and the phenomenon of repeated flicker caused by skip adjustment is avoided.
And S102-5, if the brightness mean value does not belong to the current stable brightness interval, judging that the brightness mean value does not meet the stable condition. The flow advances to step S103.
And S102-6, if the brightness mean value belongs to the current stable brightness interval, judging that a stable condition is met.
In step S103, if the stability condition is not satisfied, the working state of the fill light 140 or the exposure of the electronic device 100 is adjusted according to the brightness average.
In the embodiment of the present invention, in order to adjust the brightness of the region of interest in the image acquired by the electronic device 100 to meet the image recognition requirement, not only light can be supplemented by adjusting the working state of the light supplement lamp 140, but also light can be supplemented by the exposure amount of the electronic device 100. It can be understood that the brightness of the image data collected by the electronic device 100 can be improved to different degrees by adjusting the working state of the fill-in lamp 140 and adjusting the light fill-in strategies such as the exposure. The working state of the light supplement lamp 140 is adjusted by adjusting the input control amount (for example, controlling current, controlling voltage or controlling pulse signal) of the light supplement lamp 140, so as to adjust the light supplement intensity, and the adjustment is fast, but the working state of the light supplement lamp 140 has a large influence on the overall picture brightness and easily affects the subjective feeling of the eyes of the user, so the light supplement lamp 140 cannot be adjusted all the time in the adjustment process. In addition, the exposure quantity is adjusted mainly by adjusting the exposure time and the brightness of the gain enhanced image in the camera photosensitive unit, so that light supplement is realized, and accurate and linear adjustment can be realized. Through the flexible switching cooperation use between the multiple light filling regulation mode, realize the combination of advantage, realize nimble light filling.
In the embodiment of the invention, the required adjustment mode may be selected from the modes of adjusting the operating state of the fill light 140 or adjusting the exposure of the electronic device 100 according to the average brightness value. That is, the selection is performed based on the brightness mean value, and the advantages of different light supplement adjusting modes are fully utilized, so that the multiple light supplement adjusting modes are matched more flexibly. Alternatively, as shown in fig. 5, the step S103 may include the following steps:
and step S103-1, calculating the brightness difference between the brightness mean value and the limit value corresponding to the preset stable brightness interval.
In some embodiments, the limit values corresponding to the preset stable brightness interval include an upper limit value and a lower limit value. It is to be understood that the preset stable luminance section is a section between an upper limit value and a lower limit value. Optionally, the above-mentioned luminance difference between the calculated luminance mean and the limit corresponding to the preset stable luminance interval may be: and when the brightness mean value is larger than the upper limit value, calculating the brightness difference between the brightness mean value and the upper limit value. And when the brightness mean value is smaller than the lower limit value, calculating the brightness difference between the brightness mean value and the lower limit value.
And S103-2, if the brightness difference exceeds a preset second threshold, inquiring corresponding light supplement lamp adjustment steps according to the brightness difference.
In the embodiment of the present invention, if the brightness difference exceeds the preset second threshold, the light supplement is performed by adjusting the working state of the light supplement lamp 140. Before adjusting the working state of the fill-in light 140, the corresponding fill-in light adjustment step needs to be queried according to the brightness difference. It can be understood that the electronic device 100 stores a mapping relationship for querying a corresponding fill light adjustment step. In some embodiments, the mapping relationship may be obtained in a calibration manner, and then stored in the corresponding electronic device 100. The mapping relationship may be calibrated in the following manner: different control quantities are input to the light supplement lamp 140 of the calibrated electronic device 100, and the light supplement intensity change of the light supplement lamp 140 under the control quantities is recorded as a corresponding output quantity. And then, according to the corresponding relation between the control quantity and the output quantity, the corresponding relation between the adjustment step of the light supplement lamp (namely, the variation of the control quantity) and the variation of the light supplement intensity is obtained.
It is to be understood that the mapping relationship mentioned in the embodiment of the present invention includes a first mapping relationship and a second mapping relationship. The first mapping relationship is a one-to-one correspondence relationship between the adjustment step of each fill light and the fill light intensity variation. The first mapping relationship is applicable to the electronic device 100 with high linearity of the fill-in light 140. The second mapping relationship is a corresponding relationship between the light supplement lamp adjustment step and the light supplement intensity variation interval. The second mapping relationship is suitable for the electronic device 100 with low linearity of the fill-in light 140. That is, after calibrating the electronic device 100 whose linear index is lower than the first threshold, the second mapping relationship can be obtained, and the second mapping relationship is stored in the electronic device 100. After the brightness difference is calculated, the light supplement intensity variation interval matched with the brightness difference is inquired from the second mapping relation, and therefore the adjustment step of the light supplement lamp is determined. After the electronic device 100 with the linear index not lower than the first threshold is calibrated, a first mapping relationship can be obtained, and the first mapping relationship is stored in the electronic device 100. After the brightness difference is calculated, the light supplement intensity variable quantity matched with the brightness difference is inquired from the first mapping relation, and therefore the adjustment step of the light supplement lamp is determined.
And step S103-3, adjusting the light supplement intensity of the light supplement lamp 140 step by step based on the light supplement lamp.
In the embodiment of the present invention, the step may be to adjust the fill-in light intensity of the fill-in light 140 to be adjusted to be gradually decreased according to the fill-in light when the average brightness value is greater than the upper limit value. And when the average brightness value is smaller than the lower limit value, adjusting the light supplement intensity of the step-by-step upper-adjustment light supplement lamp 140 according to the light supplement lamp.
In step S103-4, if the brightness difference does not exceed the preset second threshold, the exposure of the electronic device 100 is adjusted.
In the embodiment of the present invention, adjusting the exposure amount of the electronic apparatus 100 may be with conventional AE adjustment. The exposure amount may be adjusted based on the correspondence between the luminance difference and the AE adjustment, and other adjustment manners may also be employed.
In addition, if the luminance average value satisfies the stable condition, the electronic device 100 enters the stable state of light supplement without adjusting the operating state of the light supplement lamp 140 of the electronic device 100 or adjusting the exposure of the electronic device 100.
However, for the electronic device 100 with the low linearity of the fill-in light 140, in order to avoid the poor user experience caused by the repeated adjustment of fill-in light, after determining that the electronic device 100 enters the stable state of fill-in light, the extended luminance interval may be used as the current stable luminance interval. Therefore, as shown in fig. 6, the method for adjusting supplementary lighting of an image according to an embodiment of the present invention may further include:
step S201, when the linear index is lower than a preset first threshold and the luminance average satisfies a stable condition, updating the extended luminance interval to the current stable luminance interval.
The expanded luminance section is a luminance section expanded based on a preset stable luminance section. In an embodiment of the present invention, the method for adjusting supplementary lighting of an image may further include a step of performing an expansion process on a preset stable luminance interval to obtain an expanded luminance interval. Optionally, the step of performing expansion processing on the preset stable luminance interval includes:
(1) and determining an expansion upper limit value larger than the upper limit value based on the upper limit value of a preset stable brightness interval, a preset expansion coefficient and a linear index. For example, based on the upper limit value of the preset stable brightness interval, the preset expansion coefficient and the linear index, the formula is used:
MaxAdj=Max+Max*Ration*L/100;
and calculating an extension upper limit value. Among them, MaxAdjRepresents an expansion upper limit value, Max represents an upper limit value of a preset stable brightness interval, position represents a preset expansion coefficient, and L represents a linear index.
(2) And determining an expansion lower limit value smaller than the lower limit value based on the lower limit value of the preset stable brightness interval, the preset expansion coefficient and the linear index. For example, based on a preset lower limit value of the stable luminance interval, a preset expansion coefficient and a linear index, a formula is used:
MinAdj=Min-Min*Ration*L/100;
and calculating an extension lower limit value. Wherein MinAdjRepresents an expansion lower limit value, Min represents a lower limit value of a preset stable brightness interval, station represents a preset expansion coefficient, and L represents a linear index.
(3) And taking the interval between the expansion upper limit value and the expansion lower limit value as the expansion brightness interval obtained by expansion.
And if the newly acquired brightness mean value in the later period does not belong to the expanded brightness interval, updating the preset stable brightness interval to the current stable brightness interval.
In the embodiment of the present invention, the obtaining of the brightness mean value is a periodic obtaining process. When the linear coefficient corresponding to the electronic device 100 is lower than the first threshold and the current stable luminance interval is updated to the extended luminance interval after the current round of judgment that the luminance average value meets the stable condition. And if the brightness mean value acquired in the next period does not belong to the expanded brightness interval, updating the current stable brightness interval by the preset stable brightness interval, calculating the brightness difference by using the limit of the preset stable brightness interval and the brightness mean value, and performing light supplement adjustment.
In some other embodiments, if the mean brightness value cannot be calculated based on the image data in the queue to be processed, it can be inferred from the ambient brightness whether the brightness of the region of interest of the acquired image data meets the stability condition. The working state of the fill light 140 or the exposure of the electronic device 100 is adjusted according to the brightness of the region of interest of the image data acquired in real time. The principle is the same as above, and is not described in detail herein.
To illustrate an embodiment of the present invention, two examples are described below, in which the fill-in lamp 140 of the electronic device 100 in example 1 has high linearity (i.e., its linearity index is not lower than the first threshold), and the fill-in lamp 140 of the electronic device 100 in example 2 has low linearity (i.e., its linearity index is lower than the first threshold).
Example 1:
s1, a face image region appears in the image data acquired by the electronic device 100, and the image data is stored in a queue to be processed.
And S2, sequentially calculating the average brightness value of the human faces appearing in each image data in the queue to be processed according to a preset time period.
And S3, superposing the average brightness values of the human faces appearing in each image data in the queue to be processed, and dividing the superposed average brightness values by the number of the images in the queue to be processed to obtain a corresponding brightness average value.
And S4, judging whether the brightness mean value belongs to a preset stable brightness interval. If not, the smart adjustment mode is entered, i.e., the flow proceeds to step S5. If so, the luminance stabilization mode is entered, i.e., the flow proceeds to step S11.
S5, if the luminance average value is greater than the upper limit value of the preset stable luminance interval, calculating a luminance difference between the luminance average value and the upper limit value.
S6, when the luminance difference is greater than the second threshold, an adjustment step a corresponding to the luminance difference is queried from the first mapping relationship, and the fill-in light intensity of the fill-in light 140 is adjusted downward accordingly.
S7, when the luminance difference is not greater than the second threshold, the exposure amount of the electronic apparatus 100 is decreased.
S8, if the luminance average value is smaller than the lower limit of the preset stable luminance interval, calculating a luminance difference between the lower limit and the luminance average value.
S9, when the luminance difference is greater than the second threshold, the fill-in light adjustment step corresponding to the luminance difference is queried from the first mapping relationship, and the fill-in light intensity of the fill-in light 140 is adjusted accordingly.
S10, when the luminance difference is not greater than the second threshold, the exposure amount of the electronic apparatus 100 is increased.
S11, the fill light 140 and the exposure of the electronic device 100 are not adjusted.
Example 2
D1, a face image area appears in the image data collected by the electronic device 100, and the image data is stored in a queue to be processed.
And D2, sequentially calculating the average brightness value of the human faces appearing in each image data in the queue to be processed according to a preset time period.
D3, after the average brightness value of the human face appearing in each image data in the queue to be processed is superposed, dividing the superposed average brightness value by the number of the images in the queue to be processed to obtain a corresponding brightness average value.
And D4, judging whether the brightness mean value belongs to the current stable brightness interval. The current stable luminance interval may be a preset stable luminance interval or an extended luminance interval. The extended luminance section is a luminance section extended based on a preset stable luminance section.
If not, then the intelligent predictive adjustment mode is entered, i.e., the flow proceeds to step D5. If yes, enter the brightness stabilization mode, i.e., the flow proceeds to step D11.
And D5, if the brightness mean value is larger than the upper limit value of the preset stable brightness interval, calculating the brightness difference between the brightness mean value and the upper limit value.
D6, when the luminance difference is greater than the second threshold, querying a fill light adjustment step corresponding to the luminance difference from the second mapping relationship, and thus adjusting the fill light intensity of the fill light 140 downward.
And D7, when the brightness difference is not larger than the second threshold, reducing the exposure of the electronic device 100.
D8, if the brightness mean value is less than the lower limit value of the preset stable brightness interval, calculating the brightness difference between the lower limit value and the brightness mean value.
D9, when the luminance difference is greater than the second threshold, querying a fill-in light adjustment step corresponding to the luminance difference from the second mapping relationship, and adjusting the fill-in light intensity of the fill-in light 140 accordingly.
And D10, when the brightness difference is not larger than the second threshold, the exposure of the electronic device 100 is increased.
D11, the fill light 140 and the exposure of the electronic device 100 are not adjusted.
If the current stable brightness interval is the preset stable brightness interval, calculating an expansion lower limit value and an expansion upper limit value based on the upper limit value and the lower limit value of the stable brightness interval. And obtaining an expanded brightness interval according to the expanded lower limit value and the expanded upper limit value. The lower expansion limit is smaller than the lower limit, and the upper expansion limit is larger than the upper limit.
And then taking the obtained expanded brightness interval as a current stable brightness interval, and updating the preset stable brightness interval to the current stable brightness interval until the newly obtained brightness mean value does not belong to the current stable brightness interval.
Based on the above example, the image light supplement adjusting method provided by the invention solves the problem that a light supplement lamp of a common camera cannot be adjusted or the adjusted human face brightness cannot meet intelligent recognition. The intensity of the light supplement lamp is dynamically adjusted according to the average human face brightness provided intelligently, the human face brightness range of intelligent optimal recognition is set, the intensity of the light supplement lamp is dynamically adjusted according to the human face brightness and the brightness difference between the upper limit and the lower limit of the intelligent optimal recognition brightness range, and the effect of rapidly adjusting the light supplement lamp is achieved. Meanwhile, different light supplement lamp adjusting methods are provided according to the linearity of the light supplement lamp. Aiming at a light supplement lamp with high linearity, calibrating a brightness difference and adjusting a stepping mapping table, and adopting brightness difference linear interpolation adjustment to ensure the smooth and stable adjustment process; and a predictive regulation and stability mechanism is adopted for the light supplement lamp with low linearity, so that the brightness stability of the light supplement lamp is maintained as much as possible, and the subjective feeling of human eyes is reduced. The high, stable characteristics of precision are adjusted to the performance exposure, adopt the exposure to adjust and the mode that the light filling lamp adjusted to combine, according to the poor state of real-time people's face luminance, dynamic switching light filling lamp is adjusted and the exposure is adjusted, and full play light filling lamp is adjusted fast, and the exposure is adjusted stably, meticulous characteristics, has guaranteed that whole accommodation process accomplishes fast, stably.
In order to perform the corresponding steps in the foregoing embodiments and various possible manners, an implementation manner of the image fill-in light adjusting device 300 is given below, and optionally, the image fill-in light adjusting device 300 may adopt the device structure of the electronic device 100 shown in fig. 1. Further, referring to fig. 7, fig. 7 is a functional block diagram of an image fill-in light adjusting device 300 according to an embodiment of the present invention. It should be noted that the basic principle and the generated technical effects of the image fill-in light adjusting device 300 provided in the present embodiment are the same as those of the above embodiments, and for the sake of brief description, no part of the present embodiment is mentioned, and reference may be made to the corresponding contents in the above embodiments. The image fill-in light adjusting apparatus 300 includes: an obtaining module 301, a determining module 302 and an adjusting module 303.
The obtaining module 301 is configured to obtain a brightness mean value of a region of interest in the acquired image data.
In the embodiment of the present invention, the step S101 may be executed by the obtaining module 301.
The determining module 302 is configured to determine whether the luminance mean value meets a preset stable condition according to a linear index of the fill light 140 of the electronic device 100.
In an embodiment of the present invention, the step S102 may be executed by the determining module 302. Optionally, the determining module 302 is further configured to:
when the linear index is not lower than a preset first threshold value, judging whether the brightness mean value belongs to a preset stable brightness interval or not; if the brightness mean value does not belong to the preset stable brightness interval, judging that the brightness mean value does not meet the stable condition; if the brightness mean value belongs to the preset stable brightness interval, judging that the stable condition is met;
when the linear index is lower than a preset first threshold value, judging whether the brightness mean value belongs to a current stable brightness interval; if the brightness mean value does not belong to the current stable brightness interval, judging that the brightness mean value does not meet the stable condition; and if the brightness mean value belongs to the current stable brightness interval, judging that the stable condition is met.
The adjusting module 303 is configured to adjust the working state of the light supplement lamp 140 or the exposure amount of the electronic device 100 according to the brightness average value when the stability condition is not satisfied.
In an embodiment of the present invention, the step S103 may be executed by the adjusting module 303. Optionally, the adjusting module 303 is further configured to: calculating the brightness difference between the brightness mean value and a limit value corresponding to the preset stable brightness interval;
if the brightness difference exceeds a preset second threshold value, inquiring corresponding light supplement lamp adjustment steps according to the brightness difference; so as to adjust the fill light intensity of the fill light 140 step by step based on the fill light adjustment;
if the brightness difference does not exceed a preset second threshold, adjusting the exposure of the electronic device 100.
In some embodiments, the apparatus 300 further includes:
the updating module is used for updating the expanded brightness interval to the current stable brightness interval when the linear index is lower than a preset first threshold and the brightness mean value meets a stable condition; and the expanded brightness interval is a brightness interval expanded based on the preset stable brightness interval.
The updating module is further configured to update the preset stable luminance interval to the current stable luminance interval if the newly acquired luminance average does not belong to the extended luminance interval.
Alternatively, the modules may be stored in the memory 110 shown in fig. 1 in the form of software or Firmware (Firmware) or be fixed in an Operating System (OS) of the electronic device 100, and may be executed by the processor 120 in fig. 1. Meanwhile, data, codes of programs, and the like required to execute the above-described modules may be stored in the memory 110.
In summary, embodiments of the present invention provide an image fill-in light adjusting method, an image fill-in light adjusting device, and an electronic device, where the image fill-in light adjusting method includes: acquiring a brightness mean value of an interested area in the acquired image data; judging whether the brightness mean value meets a preset stable condition or not according to the linear index of a light supplement lamp of the electronic equipment; and if the brightness mean value does not meet the stable condition, adjusting the working state of the light supplement lamp or the exposure of the electronic equipment according to the brightness mean value. So, not only can adapt to the electronic equipment of all kinds of linearity, realize intelligent, nimble light filling, still utilize luminance mean value to adjust the flash light and adjust the dynamic switching between the exposure two kinds of modes, avoid the problem that the light filling lamp dodges repeatedly.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules 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.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. An image fill-in light adjusting method is applied to an electronic device, and the image fill-in light adjusting method includes:
acquiring a brightness mean value of an interested area in the acquired image data;
judging whether the brightness mean value meets a preset stable condition or not according to the linear index of a light supplement lamp of the electronic equipment;
and if the brightness mean value does not meet the stable condition, adjusting the working state of the light supplement lamp or the exposure of the electronic equipment according to the brightness mean value.
2. The method for adjusting supplemental lighting for an image according to claim 1, wherein the step of determining whether the average luminance value satisfies a predetermined stable condition comprises:
when the linear index is not lower than a preset first threshold value, judging whether the brightness mean value belongs to a preset stable brightness interval or not; if the brightness mean value does not belong to the preset stable brightness interval, judging that the brightness mean value does not meet the stable condition; if the brightness mean value belongs to the preset stable brightness interval, judging that the stable condition is met;
when the linear index is lower than a preset first threshold value, judging whether the brightness mean value belongs to a current stable brightness interval; if the brightness mean value does not belong to the current stable brightness interval, judging that the brightness mean value does not meet the stable condition; and if the brightness mean value belongs to the current stable brightness interval, judging that the stable condition is met.
3. The method for adjusting supplementary lighting of an image according to claim 2, wherein the step of adjusting the operating state of the supplementary lighting or the exposure of the electronic device according to the average brightness value comprises:
calculating the brightness difference between the brightness mean value and a limit value corresponding to the preset stable brightness interval;
if the brightness difference exceeds a preset second threshold value, inquiring corresponding light supplement lamp adjustment steps according to the brightness difference; so as to adjust the fill-in light intensity of the fill-in light in a stepping manner based on the fill-in light;
and if the brightness difference does not exceed a preset second threshold value, adjusting the exposure of the electronic equipment.
4. The method according to claim 3, wherein the limit values corresponding to the stable luminance interval include an upper limit value and a lower limit value; the step of calculating the luminance difference between the luminance average value and the limit value corresponding to the stable luminance section includes:
when the brightness mean value is larger than the upper limit value, calculating a brightness difference between the brightness mean value and the upper limit value;
when the brightness mean value is smaller than the lower limit value, a brightness difference between the brightness mean value and the lower limit value is calculated.
5. The method according to claim 4, wherein the step of adjusting the fill-in light intensity of the fill-in light in a step-by-step manner based on the fill-in light comprises:
when the brightness mean value is larger than the upper limit value, the light supplement intensity of the light supplement lamp is adjusted and stepped down according to the light supplement lamp;
and when the brightness mean value is smaller than the lower limit value, adjusting the light supplement intensity of the light supplement lamp in a stepping up mode according to the light supplement lamp.
6. The method according to claim 2, further comprising:
updating the expanded brightness interval to the current stable brightness interval when the linear index is lower than a preset first threshold and the brightness mean value meets the stable condition; the expanded brightness interval is a brightness interval obtained by expanding based on the preset stable brightness interval;
and if the newly acquired brightness mean value does not belong to the expanded brightness interval, updating the preset stable brightness interval to the current stable brightness interval.
7. The method according to claim 6, further comprising performing an expansion process on the preset stable luminance interval to obtain the expanded luminance interval; the step of performing expansion processing on the preset stable brightness interval comprises the following steps:
determining an expansion upper limit value larger than the upper limit value based on the upper limit value of the preset stable brightness interval, a preset expansion coefficient and the linear index;
determining an expansion lower limit value smaller than the lower limit value based on the lower limit value of the preset stable brightness interval, a preset expansion coefficient and the linear index;
and taking the interval between the expansion upper limit value and the expansion lower limit value as the expansion brightness interval obtained by expansion.
8. The utility model provides an image light filling adjusting device which characterized in that is applied to electronic equipment, image light filling adjusting device includes:
the acquisition module is used for acquiring the brightness mean value of the interest area in the acquired image data;
the judging module is used for judging whether the brightness mean value meets a preset stable condition or not according to the linear index of a light supplement lamp of the electronic equipment;
and the adjusting module is used for adjusting the working state of the light supplementing lamp or the exposure of the electronic equipment according to the brightness mean value when the stable condition is not met.
9. An electronic device comprising a processor and a memory, the memory storing machine executable instructions executable by the processor to perform the method of any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN201911015176.3A 2019-10-24 2019-10-24 Image light supplement adjusting method and device and electronic equipment Active CN110636229B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911015176.3A CN110636229B (en) 2019-10-24 2019-10-24 Image light supplement adjusting method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911015176.3A CN110636229B (en) 2019-10-24 2019-10-24 Image light supplement adjusting method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN110636229A true CN110636229A (en) 2019-12-31
CN110636229B CN110636229B (en) 2021-06-22

Family

ID=68977392

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911015176.3A Active CN110636229B (en) 2019-10-24 2019-10-24 Image light supplement adjusting method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN110636229B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111447374A (en) * 2020-05-13 2020-07-24 重庆紫光华山智安科技有限公司 Light supplement adjusting method and device, electronic equipment and storage medium
CN111951194A (en) * 2020-08-26 2020-11-17 重庆紫光华山智安科技有限公司 Image processing method, image processing device, electronic equipment and computer readable storage medium
CN113301263A (en) * 2021-05-21 2021-08-24 重庆紫光华山智安科技有限公司 Light supplement lamp intensity adjusting method and device, monitoring equipment and storage medium
CN113382174A (en) * 2021-05-18 2021-09-10 北京优彩科技有限公司 Method and device for adjusting light supplement lamp of ultraviolet imaging device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003015195A (en) * 2001-06-28 2003-01-15 Casio Comput Co Ltd Imaging unit, and method for controlling auxiliary light quantity therfor, and recording medium
US20090261748A1 (en) * 2008-04-15 2009-10-22 Mckinney Steven Modified dimming LED driver
CN101873437A (en) * 2009-09-15 2010-10-27 杭州海康威视系统技术有限公司 Method and device for regulating exposure
CN102262330A (en) * 2010-05-25 2011-11-30 北京中星微电子有限公司 Automatic exposure method and apparatus thereof
CN102752513A (en) * 2011-04-22 2012-10-24 奥林巴斯映像株式会社 Camera and method for controlling camera
CN103888680A (en) * 2014-03-28 2014-06-25 中国科学技术大学 Method for adjusting exposure time of camera
CN106060415A (en) * 2016-05-25 2016-10-26 努比亚技术有限公司 Mobile terminal and photographing method thereof
CN108462837A (en) * 2018-03-13 2018-08-28 中兴通讯股份有限公司 Image pickup method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003015195A (en) * 2001-06-28 2003-01-15 Casio Comput Co Ltd Imaging unit, and method for controlling auxiliary light quantity therfor, and recording medium
US20090261748A1 (en) * 2008-04-15 2009-10-22 Mckinney Steven Modified dimming LED driver
CN101873437A (en) * 2009-09-15 2010-10-27 杭州海康威视系统技术有限公司 Method and device for regulating exposure
CN102262330A (en) * 2010-05-25 2011-11-30 北京中星微电子有限公司 Automatic exposure method and apparatus thereof
CN102752513A (en) * 2011-04-22 2012-10-24 奥林巴斯映像株式会社 Camera and method for controlling camera
CN103888680A (en) * 2014-03-28 2014-06-25 中国科学技术大学 Method for adjusting exposure time of camera
CN106060415A (en) * 2016-05-25 2016-10-26 努比亚技术有限公司 Mobile terminal and photographing method thereof
CN108462837A (en) * 2018-03-13 2018-08-28 中兴通讯股份有限公司 Image pickup method and device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111447374A (en) * 2020-05-13 2020-07-24 重庆紫光华山智安科技有限公司 Light supplement adjusting method and device, electronic equipment and storage medium
CN111951194A (en) * 2020-08-26 2020-11-17 重庆紫光华山智安科技有限公司 Image processing method, image processing device, electronic equipment and computer readable storage medium
CN111951194B (en) * 2020-08-26 2024-02-02 重庆紫光华山智安科技有限公司 Image processing method, apparatus, electronic device, and computer-readable storage medium
CN113382174A (en) * 2021-05-18 2021-09-10 北京优彩科技有限公司 Method and device for adjusting light supplement lamp of ultraviolet imaging device
CN113301263A (en) * 2021-05-21 2021-08-24 重庆紫光华山智安科技有限公司 Light supplement lamp intensity adjusting method and device, monitoring equipment and storage medium
CN113301263B (en) * 2021-05-21 2022-06-03 重庆紫光华山智安科技有限公司 Light supplement lamp intensity adjusting method and device, monitoring equipment and storage medium

Also Published As

Publication number Publication date
CN110636229B (en) 2021-06-22

Similar Documents

Publication Publication Date Title
CN110636229B (en) Image light supplement adjusting method and device and electronic equipment
JP6922066B2 (en) Adjustment methods for automatic exposure control of areas of interest, terminal equipment, and non-temporary computer-readable storage media
CN112752023B (en) Image adjusting method and device, electronic equipment and storage medium
CN104715736B (en) The backlight Automatic adjustment method and device of a kind of electronic equipment
CN105185301B (en) Brightness of display screen adjusting method
CN101359148A (en) Method for automatic exposure regulation and control system
CN108551553B (en) Method and device for controlling light supplement lamp
CN106157932B (en) The control method and device of screen intensity
CN106297675A (en) A kind of method for controlling backlight thereof and device
CN107437402B (en) Method for controlling backlight thereof, device and display equipment
CN106548763A (en) A kind of method for displaying image and device and terminal
CN112233631B (en) Automatic screen brightness adjusting device and method for all-solid tablet personal computer
CN111506181B (en) Automatic equipment brightness adjusting method, device, equipment and storage medium
CN108494963B (en) Brightness control method for mobile phone display screen
US10809957B2 (en) Control method and apparatus for display screen
CN113301694B (en) Display lamp respiration control method, storage medium and electronic equipment
CN115035851B (en) Gamma white balance rapid adjustment method and related device
CN114612635B (en) Method and device capable of switching between augmented reality mode and virtual reality mode
KR100752850B1 (en) Digital image photographing apparatus and method
CN113301263B (en) Light supplement lamp intensity adjusting method and device, monitoring equipment and storage medium
CN114339028A (en) Photographing method, electronic device and computer-readable storage medium
CN111510636B (en) Method and device for acquiring brightness evaluation value and computer storage medium
CN115695690B (en) Automatic regulating method for television screen brightness
CN113937866B (en) Method and device for controlling equipment operation, terminal equipment and storage medium
CN116095914B (en) Intelligent building illumination adjusting method and system based on big data

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