Image brightness control method and system

By calculating the positive and negative brightness bias parameters and using logarithmic difference for brightness control, the problem of inconsistent brightness adjustment speed in traditional technology is solved, and the smoothness and stability of image brightness adjustment are achieved.

CN118890552BActive Publication Date: 2024-12-10QINGLAN JICHUANG MEDICAL EQUIP (CHENGDU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411364691.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2024-12-10
Estimated Expiration
2044-09-29

AI Technical Summary

Technical Problem

When adjusting the brightness, traditional image brightness control methods are prone to problems such that the brightness adjustment is too fast, causing the picture to flicker step by step, or the adjustment is too slow, resulting in the brightness convergence time too long, and the picture will fluctuate and flicker when the brightness control is overcharged.

Method used

By calculating the positive and negative luminance bias parameters, different logarithmic differences are used as brightness control parameters when the current frame brightness is less than or greater than the target brightness, respectively, to ensure that the speed of brightness converges from the positive and reverse directions is consistent, and avoiding the The screen vibrates and flickers.

Benefits of technology

This improves the smoothness of image brightness adjustment, avoids the picture oscillation and flicker caused by overcharging of brightness control, and achieves a more stable brightness adjustment process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118890552B_ABST
    Figure CN118890552B_ABST
Patent Text Reader

Abstract

The present invention discloses an image brightness control method and system, which is applied to the image acquisition intelligent control technology, and the method includes: obtaining the current frame brightness of the target image and the target brightness to be achieved; calculating the positive brightness bias parameter or the negative brightness bias parameter, and calculating the correction value; calculating the next frame control parameter according to the correction value and the current frame control parameter; decomposing the next frame control parameter to form the next frame exposure time, the next frame light source brightness and the next frame exposure gain; and performing the next frame image acquisition control according to the next frame exposure time, the next frame light source brightness and the next frame exposure gain. The present invention proposes converting the parameters involved in the image brightness control to the log domain for calculation, and using different logarithmic differences as brightness control when the brightness converges from the positive direction and the reverse direction, which effectively improves the smoothness of the image brightness adjustment and avoids the problems of screen oscillation and flickering caused by overcharging of the brightness control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image acquisition intelligent control, and in particular to an image brightness control method and system. Background Art

[0002] .The traditional linear brightness control method may cause the brightness control parameter in the algorithm to be determined by the difference between the target brightness and the current brightness, which may cause the brightness to flicker in steps due to too fast brightness adjustment, too long convergence time due to too slow brightness adjustment, and oscillation and flickering due to overcharging of brightness control. When the logarithmic difference between the target brightness and the current brightness is directly used as the brightness control parameter to participate in the algorithm, it is determined by the characteristics of the logarithmic function itself. When the current brightness is less than the target brightness, the greater the difference between the current brightness and the target brightness, the greater the brightness control parameter involved in the algorithm, and the faster the convergence speed; when the current brightness is greater than the target brightness, the brightness control parameter enters the low slope linear interval of the logarithmic function, and the control algorithm converges slowly. That is, when the target brightness is constant, there is a large difference in the speed at which the current brightness converges to the target brightness from the positive direction and the reverse direction. Summary of the invention

[0003] In order to at least overcome the above-mentioned deficiencies in the prior art, the purpose of the present application is to provide an image brightness control method and system.

[0004] In a first aspect, an embodiment of the present application provides an image brightness control method, comprising:

[0005] Get the current frame brightness of the target image and the desired target brightness;

[0006] When the current frame brightness is less than the target brightness, the forward brightness bias parameter is calculated by the following formula:

[0007]

[0008] If the forward brightness bias parameter is greater than the forward control threshold, calculating a correction value according to the forward brightness bias parameter;

[0009] When the current frame brightness is greater than the target brightness, the negative brightness bias parameter is calculated by the following formula:

[0010]

[0011]

[0012] If the negative brightness bias parameter is greater than the negative control threshold, calculating a correction value according to the negative brightness bias parameter;

[0013] Calculate the next frame control parameter according to the correction value and the current frame control parameter;

[0014] Decomposing the next frame control parameters to form next frame exposure time, next frame light source brightness and next frame exposure gain;

[0015] The next frame image acquisition control is performed according to the next frame exposure time, the next frame light source brightness and the next frame exposure gain.

[0016] Further, calculating the next frame control parameter according to the correction value and the current frame control parameter includes:

[0017] The current frame control parameters are calculated according to the following formula:

[0018]

[0019] In the formula, is the current exposure time, is the current light source brightness, is the current exposure gain;

[0020] The sum of the correction value and the current frame control parameter is calculated to form the next frame control parameter.

[0021] Further, decomposing the next frame control parameters to form the next frame exposure time, the next frame light source brightness and the next frame exposure gain includes:

[0022] if When , the exposure time of the next frame, the brightness of the light source of the next frame and the exposure gain of the next frame are calculated according to the following formula:

[0023] E_next = E_min ;

[0024] L_next = L_min ;

[0025] G_next = G_min ;

[0026] In the formula, is the minimum exposure time, is the minimum brightness of the light source, is the minimum value of exposure gain, E_next is the exposure time of the next frame, L_next is the brightness of the light source in the next frame, G_next Exposure gain for the next frame.

[0027] Further, decomposing the next frame control parameters to form the next frame exposure time, the next frame light source brightness and the next frame exposure gain includes:

[0028] if ,and , calculate the next frame exposure time, next frame light source brightness and next frame exposure gain according to the following formula:

[0029] ;

[0030] L_next = L_min ;

[0031] G_next = G_min ;

[0032] In the formula, is the minimum exposure time, is the maximum exposure time, is the minimum brightness of the light source, is the minimum value of exposure gain, E_next is the exposure time of the next frame, L_next is the brightness of the light source in the next frame, G_next Exposure gain for the next frame.

[0033] Further, decomposing the next frame control parameters to form the next frame exposure time, the next frame light source brightness and the next frame exposure gain includes:

[0034] if ,and , calculate the next frame exposure time, next frame light source brightness and next frame exposure gain according to the following formula:

[0035] E_next = E_max ;

[0036] ;

[0037] G_next = G_min ;

[0038] In the formula, is the maximum exposure time, is the minimum brightness of the light source, is the maximum value of the light source brightness, is the minimum value of exposure gain, E_next is the exposure time of the next frame, L_next is the brightness of the light source in the next frame, G_next Exposure gain for the next frame.

[0039] Further, decomposing the next frame control parameters to form the next frame exposure time, the next frame light source brightness and the next frame exposure gain includes:

[0040] if ,and , calculate the next frame exposure time, next frame light source brightness and next frame exposure gain according to the following formula:

[0041] E_next = E_max ;

[0042] L_next = L_max ;

[0043] ;

[0044] In the formula, is the maximum exposure time, is the maximum value of the light source brightness, is the minimum value of exposure gain, is the maximum value of exposure gain, E_next is the exposure time of the next frame, L_next is the brightness of the light source in the next frame, G_next Exposure gain for the next frame.

[0045] Further, decomposing the next frame control parameters to form the next frame exposure time, the next frame light source brightness and the next frame exposure gain includes:

[0046] if , calculate the next frame exposure time, next frame light source brightness and next frame exposure gain according to the following formula:

[0047] E_next = E_max ;

[0048] L_next = L_max ;

[0049] G_next = G_max ;

[0050] In the formula, is the maximum exposure time, is the maximum value of the light source brightness, is the maximum value of exposure gain, E_next is the exposure time of the next frame, L_next is the brightness of the light source in the next frame, G_next Exposure gain for the next frame.

[0051] Further, decomposing the next frame control parameters to form the next frame exposure time, the next frame light source brightness and the next frame exposure gain includes:

[0052] The next frame control parameters are input into a preset analysis model, and the next frame exposure time, next frame light source brightness and next frame exposure gain output by the analysis model are received; the analysis model adopts a pre-trained neural network or table model.

[0053] Furthermore, the calculation of the correction value includes:

[0054] The positive brightness bias parameter and the negative brightness bias parameter are used as the brightness bias parameter of the current frame, and the correction value is calculated according to the following formula:

[0055] Correction value = Kp*(brightness bias parameter of current frame - brightness bias parameter of previous frame) + Ki*(brightness bias parameter of current frame) + Kd*(brightness bias parameter of previous two frames - 2*brightness bias parameter of previous frame + brightness bias parameter of current frame);

[0056] Wherein, Kp is the proportional coefficient, Ki is the integral coefficient, and Kd is the differential coefficient; the brightness bias parameter of the previous frame is the brightness bias parameter corresponding to the frame one frame before the current frame; the brightness bias parameters of the first two frames are the brightness bias parameters corresponding to the frames two frames before the current frame.

[0057] In a second aspect, the embodiment of the present application further provides an image brightness control system, including:

[0058] An acquisition unit, configured to acquire the current frame brightness of the target image and the target brightness to be achieved;

[0059] The brightness analysis unit is configured to calculate the forward brightness bias parameter by the following formula when the current frame brightness is less than the target brightness:

[0060]

[0061] If the forward brightness bias parameter is greater than the forward control threshold, calculating a correction value according to the forward brightness bias parameter;

[0062] When the current frame brightness is greater than the target brightness, the negative brightness bias parameter is calculated by the following formula:

[0063]

[0064]

[0065] If the negative brightness bias parameter is greater than the negative control threshold, calculating a correction value according to the negative brightness bias parameter;

[0066] a calculation unit, configured to calculate a next frame control parameter according to the correction value and a current frame control parameter;

[0067] A decomposition unit, configured to decompose the next frame control parameter to form a next frame exposure time, a next frame light source brightness and a next frame exposure gain;

[0068] The control unit is configured to perform next frame image acquisition control according to the next frame exposure time, the next frame light source brightness and the next frame exposure gain.

[0069] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0070] The present invention proposes converting the parameters involved in image brightness control into the log domain for calculation, and using different logarithmic differences as brightness control when the brightness converges from the positive direction and the reverse direction, which effectively improves the smoothness of the image brightness adjustment and avoids problems such as picture oscillation and flickering caused by overcharging of brightness control. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:

[0072] Figure 1 This is a schematic diagram of the method steps of an embodiment of the present application. DETAILED DESCRIPTION

[0073] To make the purpose, technical scheme and advantages of the embodiment of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the embodiment of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0074] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0075] Please refer to Figure 1 , is a flow chart of an image brightness control method provided in an embodiment of the present invention. Further, the image brightness control method may specifically include the contents described in the following steps S1 to S5.

[0076] S1: Obtain the current frame brightness of the target image and the desired target brightness;

[0077] S2: When the current frame brightness is less than the target brightness, the forward brightness bias parameter is calculated by the following formula:

[0078]

[0079] If the forward brightness bias parameter is greater than the forward control threshold, calculating a correction value according to the forward brightness bias parameter;

[0080] When the current frame brightness is greater than the target brightness, the negative brightness bias parameter is calculated by the following formula:

[0081]

[0082]

[0083] If the negative brightness bias parameter is greater than the negative control threshold, calculating a correction value according to the negative brightness bias parameter;

[0084] S3: Calculating the next frame control parameter according to the correction value and the current frame control parameter;

[0085] S4: Decomposing the next frame control parameters to form the next frame exposure time, the next frame light source brightness and the next frame exposure gain;

[0086] S5: performing next frame image acquisition control according to the next frame exposure time, the next frame light source brightness and the next frame exposure gain.

[0087] When the embodiment of the present application is implemented, the process of controlling the image acquisition parameters of the next frame through the current frame is adopted. When the next frame of the image is acquired, it will also become the current frame, so as to achieve timely adjustment of the parameters in the entire image acquisition process. Preferably, the embodiment of the present application can be applied to the image acquisition of an endoscope. The light source of the endoscopic image imaging is basically generated by local lighting, so in the endoscopic imaging, the image acquisition control can be effectively achieved by controlling the exposure time, light source brightness and exposure gain. It should be understood that the embodiment of the present application can also be applied to other environments where there is no additional background light.

[0088] In the embodiment of the present application, it is necessary to first obtain the current frame brightness and the target brightness. The current frame brightness refers to the brightness of the current frame image, which can be obtained by statistically analyzing the brightness of the current frame image. The target brightness is the brightness that is expected to be achieved. In the implementation of the present application, the brightness of the next frame is not directly adjusted to the target brightness, but the brightness is gradually adjusted to the target brightness through rounds of correction iterations to avoid problems such as slow brightness adjustment resulting in long convergence time of the picture brightness, and overcharging of the brightness control causing picture oscillation and flickering, so that the image brightness control is a smooth process. Specifically, the control process converts the data to logarithmic domain operations. At this time, in order to unify the calculation of the two methods of reducing brightness and increasing brightness in the logarithmic domain, two different bias parameters are used, namely the positive brightness bias parameter and the negative brightness bias parameter. The positive brightness bias parameter is the value of the ratio of the target brightness to the current frame brightness in the logarithmic domain, while the negative brightness bias parameter is converted to the value of the ratio of the maximum brightness of the target image minus the target brightness and the maximum brightness of the target image minus the current frame brightness in the logarithmic domain, where the maximum brightness of the target image is the maximum brightness that the target image can reach. Through this conversion process, the calculation process of reducing brightness and increasing brightness can be unified, so that the two adjustment methods have the same convergence speed.

[0089] In an embodiment of the present application, if the positive brightness bias parameter is less than or equal to the positive control threshold, or the negative brightness bias parameter is less than or equal to the negative control threshold, it means that the current image acquisition control scheme meets the corresponding requirements and does not need to be adjusted; and if the positive brightness bias parameter is greater than the positive control threshold, or the negative brightness bias parameter is greater than the negative control threshold, it means that the image acquisition related parameters need to be adjusted at this time, wherein the adjustment method is based on the correction value obtained by calculating the positive brightness bias parameter or the negative brightness bias parameter. Since the positive brightness bias parameter and the negative brightness bias parameter have been unified in the logarithmic domain, the correction value here can be used to calculate the next frame control parameter by the same set of algorithms. The calculated next frame control parameters need to be decomposed according to the current specific situation to form the next frame exposure time, the next frame light source brightness and the next frame exposure gain; wherein the exposure time refers to the exposure time of the sensor for collecting images, the light source brightness refers to the light source brightness of the light source used for illumination when collecting images, and the exposure gain refers to the exposure gain of the sensor for collecting images. In an embodiment of the present application, the calculated exposure time of the next frame, the light source brightness of the next frame, and the exposure gain of the next frame can be used for related control when capturing the next frame of image.

[0090] In a specific implementation, calculating the next frame control parameter according to the correction value and the current frame control parameter includes:

[0091] The current frame control parameters are calculated according to the following formula:

[0092]

[0093] In the formula, is the current exposure time, is the current light source brightness, is the current exposure gain;

[0094] The sum of the correction value and the current frame control parameter is calculated to form the next frame control parameter.

[0095] When the embodiment of the present application is implemented, a specific current frame control parameter calculation scheme is provided, which is obtained by summing the current exposure time, the current light source brightness and the current exposure gain in the logarithmic domain. The next frame control parameter can be calculated based on the sum of the correction value and the current frame control parameter.

[0096] In a specific implementation, decomposing the next frame control parameter to form the next frame exposure time, the next frame light source brightness and the next frame exposure gain includes:

[0097] if When , the exposure time of the next frame, the brightness of the light source of the next frame and the exposure gain of the next frame are calculated according to the following formula:

[0098] E_next = E_min ;

[0099] L_next = L_min ;

[0100] G_next = G_min ;

[0101] In the formula, is the minimum exposure time, is the minimum brightness of the light source, is the minimum value of exposure gain, E_next is the exposure time of the next frame, L_next is the brightness of the light source in the next frame, G_next Exposure gain for the next frame.

[0102] In a specific implementation, decomposing the next frame control parameter to form the next frame exposure time, the next frame light source brightness and the next frame exposure gain includes:

[0103] if ,and , calculate the next frame exposure time, next frame light source brightness and next frame exposure gain according to the following formula:

[0104] ;

[0105] L_next = L_min ;

[0106] G_next = G_min ;

[0107] In the formula, is the minimum exposure time, is the maximum exposure time, is the minimum brightness of the light source, is the minimum value of exposure gain, E_next is the exposure time of the next frame, L_next is the brightness of the light source in the next frame, G_next Exposure gain for the next frame.

[0108] In a specific implementation, decomposing the next frame control parameter to form the next frame exposure time, the next frame light source brightness and the next frame exposure gain includes:

[0109] if ,and , calculate the next frame exposure time, next frame light source brightness and next frame exposure gain according to the following formula:

[0110] E_next = E_max ;

[0111] ;

[0112] G_next = G_min ;

[0113] In the formula, is the maximum exposure time, is the minimum brightness of the light source, is the maximum value of the light source brightness, is the minimum value of exposure gain, E_next is the exposure time of the next frame, L_next is the brightness of the light source in the next frame, G_next Exposure gain for the next frame.

[0114] In a specific implementation, decomposing the next frame control parameter to form the next frame exposure time, the next frame light source brightness and the next frame exposure gain includes:

[0115] if ,and , calculate the next frame exposure time, next frame light source brightness and next frame exposure gain according to the following formula:

[0116] E_next = E_max ;

[0117] L_next = L_max ;

[0118] ;

[0119] In the formula, is the maximum exposure time, is the maximum value of the light source brightness, is the minimum value of exposure gain, is the maximum value of exposure gain, E_next is the exposure time of the next frame, L_next is the brightness of the light source in the next frame, G_next Exposure gain for the next frame.

[0120] In a specific implementation, decomposing the next frame control parameter to form the next frame exposure time, the next frame light source brightness and the next frame exposure gain includes:

[0121] if , calculate the next frame exposure time, next frame light source brightness and next frame exposure gain according to the following formula:

[0122] E_next = E_max ;

[0123] L_next = L_max ;

[0124] G_next = G_max ;

[0125] In the formula, is the maximum exposure time, is the maximum value of the light source brightness, is the maximum value of exposure gain, E_next is the exposure time of the next frame, L_next is the brightness of the light source in the next frame, G_next Exposure gain for the next frame.

[0126] When the embodiment of the present application is implemented, in order to decompose the next frame control parameters into the next frame exposure time, the next frame light source brightness and the next frame exposure gain and use them for the control of the next frame image acquisition, they are divided into five cases for control. The minimum and maximum values ​​of the sensor exposure time are defined as E_min and E_max respectively; the minimum and maximum values ​​of the light source brightness are defined as L_min and L_max respectively; the minimum and maximum values ​​of the sensor exposure gain are defined as G_min and G_max respectively. Define the next frame sensor exposure time E_next, the next frame light source brightness L_next, and the next frame sensor exposure gain G_next. The next frame control parameters can obtain the above parameters by case through their different value ranges:

[0127] In case 1, the next frame control parameter is less than or equal to the sum of the minimum exposure gain, the minimum exposure time and the minimum light source brightness in the logarithmic domain, which means that the target brightness that needs to be adjusted to the current image brightness can only be set by minimizing all parameters.

[0128] In the second case of case 2, the next frame control parameter is greater than the sum of the minimum value of the exposure gain, the minimum value of the exposure time, and the minimum value of the light source brightness in the logarithmic domain, but less than or equal to the sum of the minimum value of the exposure gain, the maximum value of the exposure time, and the minimum value of the light source brightness in the logarithmic domain. In this case, the main idea of ​​the embodiment of the present application is to set priorities for the adjustment of different parameters, give priority to adjusting the exposure time, adjust the light source brightness again, and finally adjust the exposure gain. The main reason is that the image finally collected needs to be provided to personnel, and the inventors have found in scientific practice that the human eye's perception of brightness changes is not linear. The human eye perceives brightness changes more obviously in low brightness states. When the brightness is high, the brightness change must be relatively large for the human eye to perceive it. Therefore, when increasing the brightness, our three parameters are arranged in the order of gradually increasing impact on the brightness itself. At the same time, using exposure time and light source to adjust the brightness generally does not introduce too much additional noise, but if the brightness gain is adjusted directly, the noise will also be amplified to affect the image quality, so the gain should be adjusted last.

[0129] Based on this idea, the corresponding control conditions are set, that is, the exposure time is adjusted first. In the second case, since the control parameters of the next frame will not reach the sum of the minimum exposure gain, the maximum exposure time and the minimum light source brightness in the logarithmic domain, the light source brightness and exposure gain in the control parameters of the next frame take the minimum value, and the exposure time removes the above minimum value from the control parameters of the next frame to complete the calculation.

[0130] In the third case, case 3, the control parameter of the next frame is greater than the sum of the maximum exposure time, the minimum light source brightness and the minimum exposure gain in the logarithmic domain, but is less than or equal to the sum of the maximum exposure time, the maximum light source brightness and the minimum exposure gain in the logarithmic domain; this means that the exposure time in the control parameters of the next frame needs to be taken as the maximum value, and the exposure gain needs to be taken as the minimum value, and the exposure gain and exposure time need to be removed from the control parameters of the next frame to complete the light source brightness calculation.

[0131] In the fourth case, case 4, the control parameter of the next frame is greater than the sum of the maximum exposure time, the maximum light source brightness and the minimum exposure gain in the logarithmic domain, but is less than or equal to the sum of the maximum exposure time, the maximum light source brightness and the maximum exposure gain in the logarithmic domain; this means that the exposure time in the control parameters of the next frame needs to be taken as the maximum value, the light source brightness needs to be taken as the minimum value, and the light source brightness and exposure time need to be removed from the control parameters of the next frame to complete the exposure gain calculation.

[0132] In case 5, the next frame control parameter is greater than or equal to the sum of the maximum exposure time, the maximum light source brightness, and the maximum exposure gain in the logarithmic domain, which means that the target brightness that needs to be adjusted to the current image brightness can only be set by maximizing all parameters. The above technical solution can effectively realize the control of image imaging related parameters.

[0133] In a specific implementation, decomposing the next frame control parameter to form the next frame exposure time, the next frame light source brightness and the next frame exposure gain includes:

[0134] The next frame control parameters are input into a preset analysis model, and the next frame exposure time, next frame light source brightness and next frame exposure gain output by the analysis model are received; the analysis model adopts a pre-trained neural network or table model.

[0135] When the embodiment of the present application is implemented, a specific technical solution for decomposing the next frame control parameters is also provided. When a mature neural network model is used to form an analysis model, corresponding test samples can be obtained through experiments. The input data in the test samples are the next frame control parameters, and the output data are the next frame exposure time, the next frame light source brightness, and the next frame exposure gain. The actual analysis model generation can be achieved by training the neural network model with the test samples.

[0136] When implementing the embodiment, a specific technical solution for decomposing the next frame control parameters is also provided. When using the prefabricated table model for decomposition, the five schemes of the above embodiment are tabulated, and the sensor exposure time, light source brightness L, and sensor exposure gain G values ​​are tabulated in the order of case1 to case5. Each index value index in the table corresponds to a set of brightness control parameters E, L, and G values, where the minimum index value corresponds to case1. At this time, the control algorithm output value is:

[0137] E_next = E_min;

[0138] L_next = L_min;

[0139] G_next = G_min.

[0140] The maximum value of index corresponds to case 5, and the control algorithm output value is:

[0141] E_next = E_max;

[0142] L_next = L_max;

[0143] G_next = G_max.

[0144] The middle index corresponds to the change of a single variable in E, L, and G between its maximum and minimum values ​​according to the values ​​of case2~case4, and the specific change process is the same as case2~case4.

[0145] Define the index value index_current of the current frame:

[0146] log2(index_current) → current frame control parameters

[0147] Substitute the current frame brightness bias parameter into the control algorithm to calculate the correction value of the next frame image brightness compared to the current frame image brightness, and then add it to the current frame control parameter to obtain the next frame control parameter:

[0148] Current frame control parameters + current frame image brightness correction value → next frame control parameters

[0149] Define the index value index_next of the next frame. The next frame control parameter corresponds to the parameter index value index_next of the next frame. You can use the table lookup method to get the value of the brightness control parameter that should be output in the next frame:

[0150] Next frame control parameters → E_next, L_next, G_next.

[0151] In a specific implementation, the calculation of the correction value includes:

[0152] The positive brightness bias parameter and the negative brightness bias parameter are used as the brightness bias parameter of the current frame, and the correction value is calculated according to the following formula:

[0153] Correction value = Kp*(brightness bias parameter of current frame - brightness bias parameter of previous frame) + Ki*(brightness bias parameter of current frame) + Kd*(brightness bias parameter of previous two frames - 2*brightness bias parameter of previous frame + brightness bias parameter of current frame);

[0154] Wherein, Kp is the proportional coefficient, Ki is the integral coefficient, and Kd is the differential coefficient; the brightness bias parameter of the previous frame is the brightness bias parameter corresponding to the frame one frame before the current frame; the brightness bias parameters of the first two frames are the brightness bias parameters corresponding to the frames two frames before the current frame.

[0155] When the embodiment of the present application is implemented, a specific calculation scheme for the correction value is also provided, which uses an incremental PID controller to perform iterative calculation to generate the correction value, wherein the brightness bias parameter of the current frame, the brightness bias parameter of the previous frame, and the brightness bias parameter of the previous two frames need to be considered; when the brightness bias parameter of the previous frame and the brightness bias parameter of the previous two frames do not exist, the corresponding proportional coefficient or differential coefficient can be selected as 0. In this way, the specific correction value can be effectively solved.

[0156] In a specific implementation, a technical solution for brightness control in a specific application scenario is provided:

[0157] Assume that the minimum and maximum values ​​of the sensor exposure time E are 2 and 100 respectively;

[0158] Assume that the minimum and maximum values ​​of the light source brightness L are 2 and 100 respectively;

[0159] Assume that the minimum and maximum values ​​of the sensor exposure gain G are 2 and 100 respectively;

[0160] Assume that when the system starts, the above parameters are preset as follows: Emin = Lmin = Gmin = 2,

[0161] Then we can calculate:

[0162] Current frame control parameter = log2(Emin)+log2(Lmin)+log2(Gmin)

[0163] = log2(2)+log2(2)+log2(2)

[0164] = 3

[0165] When the system starts, the brightness will be counted, and the statistical value is the brightness of the current frame.

[0166] Assuming that the current frame brightness is 10 and the target brightness is 100, the brightness should be increased at this time, then:

[0167] Current frame brightness bias parameter = forward brightness bias parameter

[0168] = log2(target brightness)-log2(current brightness)

[0169] = log2(100)-log2(10)

[0170] = 3.32

[0171] Assuming that the brightness positive control threshold is 0.1, when the positive brightness bias parameter is greater than the positive control threshold, the positive brightness bias parameter is substituted into the control algorithm for iteration to obtain a correction value of the brightness of the next frame image compared to the brightness of the current frame image.

[0172] Quote Incremental PID Controller:

[0173] Correction value = Kp*(brightness bias parameter of current frame - brightness bias parameter of previous frame) + Ki*(brightness bias parameter of current frame) + Kd*(brightness bias parameter of previous two frames - 2*brightness bias parameter of previous frame + current bias parameter)

[0174] Assume Kp = Ki = Kd = 0.2

[0175] Since this is the first iteration after the control algorithm is started, the current frame is the first frame after the system is started, and the system has not performed brightness statistics and records before, the corresponding values ​​of Kp and Kd are both 0

[0176] Correction value = Ki*(current frame brightness bias parameter)

[0177] = 0.2*2.32

[0178] = 0.464

[0179] Then the correction value is added to the current frame control parameter to get the next frame control parameter:

[0180] Next frame control parameter = current frame brightness control parameter + correction value

[0181] = 3 + 0.464

[0182] = 3.464

[0183] At this time, the current situation is judged to belong to case 2 according to the threshold. According to the result analysis of case 2:

[0184] Case 2: Next frame control parameters>log2(E_min) + log2(L_min) + log2(G_min),

[0185] And the next frame control parameter ≤ log2(E_max) + log2(L_min) + log2(G_min);

[0186] Decompose the next frame control parameters into:

[0187] L_next = L_min = 2;

[0188] G_next = G_min = 2;

[0189] E_next = 2^(next frame control parameter - log2(L_min) - log2(G_min))

[0190] = 2^(3.464 - log2(2) - log2(2))

[0191] = 2^(3.464 - 1 - 1)

[0192] = 5.517

[0193] The above process completes the iteration of one frame. At this time, the system will output E, L, and G decomposed from the next frame control parameters to the corresponding hardware and take effect. Then the brightness is re-counted, and the brightness statistics value is the current frame brightness. The new current frame brightness bias parameter is obtained by the ratio of the current frame brightness to the target brightness.

[0194] New current frame control parameter = log2(E)+log2(L)+log2(G)

[0195] = log2(5.517)+log2(2)+log2(2)

[0196] = 4.4639

[0197] Assume the new brightness statistic is 20 and the target brightness remains unchanged at 100.

[0198] Current frame brightness bias parameter = forward brightness bias parameter

[0199] = log2(target brightness)-log2(current brightness)

[0200] = log2(100)-log2(20)

[0201] = 2.322

[0202] It is known that the brightness positive control threshold is 0.1. When the positive brightness bias parameter is greater than the positive control threshold, the control algorithm is started to start the next iteration until the brightness bias parameter falls within the threshold range, and the iteration is terminated.

[0203] Based on the same inventive concept, the embodiment of the present application also provides an image brightness control system, including:

[0204] An acquisition unit, configured to acquire the current frame brightness of the target image and the target brightness to be achieved;

[0205] The brightness analysis unit is configured to calculate the forward brightness bias parameter by the following formula when the current frame brightness is less than the target brightness:

[0206]

[0207] If the forward brightness bias parameter is greater than the forward control threshold, calculating a correction value according to the forward brightness bias parameter;

[0208] When the current frame brightness is greater than the target brightness, the negative brightness bias parameter is calculated by the following formula:

[0209]

[0210]

[0211] If the negative brightness bias parameter is greater than the negative control threshold, calculating a correction value according to the negative brightness bias parameter;

[0212] a calculation unit, configured to calculate a next frame control parameter according to the correction value and a current frame control parameter;

[0213] A decomposition unit, configured to decompose the next frame control parameter to form a next frame exposure time, a next frame light source brightness and a next frame exposure gain;

[0214] The control unit is configured to perform next frame image acquisition control according to the next frame exposure time, the next frame light source brightness and the next frame exposure gain.

[0215] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0216] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or it can be an electrical, mechanical or other form of connection.

[0217] The units described as separate components may or may not be physically separated. As units, it is obvious that a person of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0218] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0219] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a grid device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0220] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for controlling image brightness, characterized in that: include: Get the current frame brightness of the target image and the target brightness to be achieved; When the current frame brightness is less than the target brightness, the forward brightness bias parameter is calculated by the following formula: ; If the forward brightness bias parameter is greater than the forward control threshold, calculating a correction value according to the forward brightness bias parameter; When the current frame brightness is greater than the target brightness, the negative brightness bias parameter is calculated by the following formula: ; If the negative brightness bias parameter is greater than the negative control threshold, calculating a correction value according to the negative brightness bias parameter; Calculate the next frame control parameter according to the correction value and the current frame control parameter; Decomposing the next frame control parameters to form next frame exposure time, next frame light source brightness and next frame exposure gain; Performing next frame image acquisition control according to the next frame exposure time, the next frame light source brightness and the next frame exposure gain; Calculating the next frame control parameter according to the correction value and the current frame control parameter includes: The current frame control parameters are calculated according to the following formula: ; In the formula, is the current exposure time, is the current light source brightness, is the current exposure gain; The sum of the correction value and the current frame control parameter is calculated to form the next frame control parameter.

2. The image brightness control method according to claim 1, characterized in that: Decomposing the next frame control parameters to form the next frame exposure time, the next frame light source brightness and the next frame exposure gain includes: if When , the exposure time of the next frame, the brightness of the light source of the next frame and the exposure gain of the next frame are calculated according to the following formula: E_next = E_min ; L_next = L_min ; G_next = G_min ; In the formula, is the minimum exposure time, is the minimum brightness of the light source, is the minimum value of exposure gain, E_next is the exposure time of the next frame, L_next is the brightness of the light source in the next frame, G_next Exposure gain for the next frame.

3. The image brightness control method according to claim 1, characterized in that: Decomposing the next frame control parameters to form the next frame exposure time, the next frame light source brightness and the next frame exposure gain includes: if ,and , calculate the next frame exposure time, next frame light source brightness and next frame exposure gain according to the following formula: ; L_next = L_min ; G_next = G_min ; In the formula, is the minimum exposure time, is the maximum exposure time, is the minimum brightness of the light source, is the minimum value of exposure gain, E_next is the exposure time of the next frame, L_next is the brightness of the light source in the next frame, G_next Exposure gain for the next frame.

4. The image brightness control method according to claim 1, characterized in that: Decomposing the next frame control parameters to form the next frame exposure time, the next frame light source brightness and the next frame exposure gain includes: if ,and , calculate the next frame exposure time, next frame light source brightness and next frame exposure gain according to the following formula: E_next = E_max ; ; G_next = G_min ; In the formula, is the maximum exposure time, is the minimum brightness of the light source, is the maximum value of the light source brightness, is the minimum value of exposure gain, E_next is the exposure time of the next frame, L_next is the brightness of the light source in the next frame, G_next Exposure gain for the next frame.

5. The image brightness control method according to claim 1, characterized in that: Decomposing the next frame control parameters to form the next frame exposure time, the next frame light source brightness and the next frame exposure gain includes: if ,and , calculate the next frame exposure time, next frame light source brightness and next frame exposure gain according to the following formula: E_next = E_max ; L_next = L_max ; ; In the formula, is the maximum exposure time, is the maximum value of the light source brightness, is the minimum value of exposure gain, is the maximum value of exposure gain, E_next is the exposure time of the next frame, L_next is the brightness of the light source in the next frame, G_next Exposure gain for the next frame.

6. The image brightness control method according to claim 1, characterized in that: Decomposing the next frame control parameters to form the next frame exposure time, the next frame light source brightness and the next frame exposure gain includes: if , calculate the next frame exposure time, next frame light source brightness and next frame exposure gain according to the following formula: E_next = E_max ; L_next = L_max ; G_next = G_max ; In the formula, is the maximum exposure time, is the maximum value of the light source brightness, is the maximum value of exposure gain, E_next is the exposure time of the next frame, L_next is the brightness of the light source in the next frame, G_next Exposure gain for the next frame.

7. The image brightness control method according to claim 1, characterized in that: Decomposing the next frame control parameters to form the next frame exposure time, the next frame light source brightness and the next frame exposure gain includes: The next frame control parameters are input into a preset analysis model, and the next frame exposure time, next frame light source brightness and next frame exposure gain output by the analysis model are received; the analysis model adopts a pre-trained neural network or table model.

8. The image brightness control method according to claim 1, characterized in that: The calculation of the correction value includes: The positive brightness bias parameter and the negative brightness bias parameter are used as the brightness bias parameter of the current frame, and the correction value is calculated according to the following formula: Correction value = Kp*(brightness bias parameter of current frame - brightness bias parameter of previous frame) + Ki*(brightness bias parameter of current frame) + Kd*(brightness bias parameter of previous two frames - 2*brightness bias parameter of previous frame + brightness bias parameter of current frame); Wherein, Kp is the proportional coefficient, Ki is the integral coefficient, and Kd is the differential coefficient; the brightness bias parameter of the previous frame is the brightness bias parameter corresponding to the frame one frame before the current frame; the brightness bias parameters of the first two frames are the brightness bias parameters corresponding to the frames two frames before the current frame.

9. An image brightness control system using the method according to any one of claims 1 to 8, characterized in that: include: An acquisition unit, configured to acquire the current frame brightness of the target image and the target brightness to be achieved; The brightness analysis unit is configured to calculate the forward brightness bias parameter by the following formula when the current frame brightness is less than the target brightness: ; If the forward brightness bias parameter is greater than the forward control threshold, calculating a correction value according to the forward brightness bias parameter; When the current frame brightness is greater than the target brightness, the negative brightness bias parameter is calculated by the following formula: ; If the negative brightness bias parameter is greater than the negative control threshold, calculating a correction value according to the negative brightness bias parameter; a calculation unit, configured to calculate a next frame control parameter according to the correction value and a current frame control parameter; A decomposition unit, configured to decompose the next frame control parameter to form a next frame exposure time, a next frame light source brightness and a next frame exposure gain; The control unit is configured to perform next frame image acquisition control according to the next frame exposure time, the next frame light source brightness and the next frame exposure gain.