Exposure control method, device, equipment and storage medium
By obtaining and calculating the exposure adjustment coefficient and brightness linear parameters, the brightness after adjustment of the exposure parameters is predicted, which solves the problem of brightness overshoot during the automatic exposure process, realizes timely adjustment of the exposure parameters, and prevents brightness overshoot.
Patent Information
- Application Number
- CN202111450858.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-01
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2041-12-01
AI Technical Summary
During the automatic exposure process, the camera is prone to causing brightness overshoot. The main reason is that the brightness statistics caused by the delay in taking effect of the exposure parameters need to be calculated after 2 frames. As a result, brightness overshoot is easily caused when the exposure is adjusted in each frame.
By obtaining the exposure adjustment coefficient and brightness of the current frame image, determine the brightness linear parameters, and predict the brightness after the exposure parameters are adjusted based on these parameters. If there is no overshoot, adjust the exposure parameters of the next frame to prevent brightness overshoot. Specific methods include using a proportional-integral-derivative control algorithm to calculate exposure adjustment coefficients, and calculating exposure parameters through linear and nonlinear predicted brightness.
Effectively predict and adjust exposure parameters to prevent brightness overshoot and ensure that the brightness of the image reaches the desired effect.
Smart Images

Figure CN114125317B
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and specifically to an exposure control method, device, equipment and storage medium. Background Art
[0002] Currently, cameras have become an essential component of more and more electronic devices, such as mobile phones, travel recorders, etc. The performance of cameras is also increasingly valued by users. Automatic exposure is an important performance indicator of cameras.
[0003] Automatic exposure means that the camera automatically adjusts the exposure according to the light intensity to prevent overexposure or underexposure from causing the picture brightness to not reach the ideal effect. In the process of adjusting the exposure, the camera first detects the actual brightness of the current scene, then compares it with the target brightness, calculates the brightness difference and then adjusts the exposure, so that the actual brightness and the target brightness are close, that is, the exposure converges.
[0004] During the entire exposure convergence process, the exposure parameters often cannot take effect immediately due to the exposure parameter effectiveness mechanism of the image photosensitive device used in the camera. It takes 1-2 frames to know the brightness corresponding to the above exposure parameters. For example, the exposure parameters of the current frame input to the image photosensitive device need to be calculated after 2 frames to calculate the corresponding brightness value. In this way, if the exposure is adjusted in each frame, the new exposure parameters are calculated. However, since the brightness statistics corresponding to the exposure parameters need to be calculated after 2 frames of delay, it is easy to cause brightness overshoot. Summary of the invention
[0005] In view of this, the present application provides an exposure control method, device, equipment and storage medium to help solve the problem of brightness overshoot that is easily caused during the automatic exposure process in the prior art.
[0006] In a first aspect, an embodiment of the present application provides an exposure control method, which is applied to an electronic device, and the method includes:
[0007] Get the exposure adjustment coefficient of the current frame image;
[0008] Obtaining the brightness of the current frame image and the target brightness, and determining the brightness linear parameter according to the brightness of the current frame image and the target brightness;
[0009] Determine the predicted brightness corresponding to the exposure parameter adjustment according to the exposure adjustment coefficient of the current frame image, the brightness linear parameter and the brightness of the current frame image;
[0010] Determining whether the predicted brightness is overshoot according to the predicted brightness and the target brightness corresponding to the exposure parameter adjustment;
[0011] If it is determined that the predicted brightness does not have brightness overshoot, the currently used exposure parameter of the current frame image is obtained, and the exposure parameter is adjusted according to the exposure adjustment coefficient of the current frame image and the currently used exposure parameter of the current frame image.
[0012] Preferably, the method further comprises:
[0013] If it is determined that the predicted brightness overshoots, the exposure adjustment coefficient of the current frame image is reduced, and the step is re-executed to determine the predicted brightness corresponding to the exposure parameter adjustment according to the exposure adjustment coefficient of the current frame image, the brightness linear parameter and the brightness of the current frame image, until the step of if it is determined that the predicted brightness overshoots, the exposure adjustment coefficient of the current frame image is reduced, until it is determined that the predicted brightness does not overshoot, then the currently used exposure parameters of the current frame image are obtained, and the exposure parameters are adjusted according to the exposure adjustment coefficient of the current frame image and the currently used exposure parameters of the current frame image.
[0014] Preferably, the step of obtaining the exposure adjustment coefficient of the current frame image includes:
[0015] Get the brightness and target brightness of the current frame image, and the exposure adjustment coefficient of the previous frame image;
[0016] The exposure adjustment coefficient of the current frame image is obtained according to the brightness of the current frame image and the target brightness, the exposure adjustment coefficient of the previous frame image, and the proportional integral differential control algorithm.
[0017] Preferably, the step of obtaining the exposure adjustment coefficient of the current frame image by using a proportional-integral-differential control algorithm according to the brightness of the current frame image and the target brightness, the exposure adjustment coefficient of the previous frame image, comprises:
[0018] According to the brightness of the current frame image and the target brightness, the exposure adjustment coefficient of the previous frame image is calculated using the formula ΔK 当前 =-A*K1-B*ΔK 上 +ΔK 上 , get the exposure adjustment coefficient of the current frame image; where ΔK 当前 represents the exposure adjustment coefficient of the current frame image; A represents the gain of the preset integral control unit; B represents the gain of the preset differential control unit; ΔK 上 Indicates the exposure adjustment coefficient of the previous frame image, and K1 indicates the difference between the brightness of the current frame image and the target brightness.
[0019] Preferably, determining the brightness linear parameter according to the brightness of the current frame image and the target brightness includes:
[0020] When the absolute value of the difference between the brightness of the current frame image and the target brightness is less than the first preset threshold value, the brightness linear parameter is determined to be the first preset value;
[0021] When the absolute value of the difference between the brightness of the current frame image and the target brightness is greater than the second preset threshold value, the brightness linear parameter is determined to be the second preset value;
[0022] When the absolute value of the difference between the brightness of the current frame image and the target brightness is not less than the first preset threshold value and not greater than the second preset threshold value, the brightness linear parameter is determined according to the absolute value of the difference between the brightness of the current frame image and the target brightness.
[0023] Preferably, determining the predicted brightness corresponding to the exposure parameter adjustment according to the exposure adjustment coefficient of the current frame image, the brightness linear parameter and the brightness of the current frame image comprises:
[0024] Determine the linear prediction brightness and the nonlinear prediction brightness according to the brightness of the current frame image and the exposure adjustment coefficient of the current frame image;
[0025] The predicted brightness corresponding to the adjusted exposure parameter is calculated according to the brightness linear parameter, the linear predicted brightness and the nonlinear predicted brightness.
[0026] Preferably, determining the linear prediction brightness and the nonlinear prediction brightness according to the brightness of the current frame image and the exposure adjustment coefficient of the current frame image comprises:
[0027] According to the brightness of the current frame image and the exposure adjustment coefficient of the current frame image, the formula expect_lum_line = luma*ΔK is used. 当前 , calculate the linear prediction brightness; where expect_lum_line represents the linear prediction brightness, and luma represents the brightness of the current frame image;
[0028] According to the brightness of the current frame image and the exposure adjustment coefficient of the current frame image, the formula expect_lum_noline = 256–256*[(256-luma) / 256] is used. ΔK当前 , calculate the nonlinear predicted brightness; where expect_lum_noline represents the nonlinear predicted brightness.
[0029] Preferably, the calculation of the predicted brightness corresponding to the adjusted exposure parameter according to the brightness linear parameter, the linear predicted brightness and the nonlinear predicted brightness includes:
[0030] According to the brightness linear parameter, the linear predicted brightness and the nonlinear predicted brightness, the formula expect_lum=line_weight*expect_lum_line+(1-line_weight)*expect_lum_noline is used to calculate the predicted brightness corresponding to the exposure parameter adjustment; wherein expect_lum represents the predicted brightness corresponding to the exposure parameter adjustment, line_weight represents the linear parameter, expect_lum_line represents the linear predicted brightness, and expect_lum_noline represents the nonlinear predicted brightness.
[0031] Preferably, if it is determined that the predicted brightness is overshoot, reducing the exposure adjustment coefficient of the current frame image includes:
[0032] If it is determined that the predicted brightness overshoots, the gain of the integral control unit is reduced and / or the gain of the differential control unit is increased.
[0033] In a second aspect, an embodiment of the present application provides an exposure control device, comprising:
[0034] An acquisition unit, used to acquire an exposure adjustment coefficient of a current frame image;
[0035] The acquisition unit is further used to acquire the brightness of the current frame image and the target brightness, and determine the brightness linear parameter according to the brightness of the current frame image and the target brightness;
[0036] A determination unit, configured to determine a predicted brightness corresponding to the exposure parameter adjustment according to the exposure adjustment coefficient of the current frame image, the brightness linear parameter and the brightness of the current frame image;
[0037] The determining unit is further used to determine whether the predicted brightness is overshoot according to the predicted brightness corresponding to the exposure parameter adjustment and the target brightness;
[0038] The processing unit is used to obtain the currently used exposure parameters of the current frame image if it is determined that the predicted brightness does not have brightness overshoot, and adjust the exposure parameters according to the exposure adjustment coefficient of the current frame image and the currently used exposure parameters of the current frame image.
[0039] Preferably, the processing unit is also used to reduce the exposure adjustment coefficient of the current frame image if it is determined that the predicted brightness overshoots, and trigger the determination unit to re-execute the predicted brightness corresponding to the exposure parameter adjustment based on the exposure adjustment coefficient of the current frame image, the brightness linear parameter and the brightness of the current frame image, and determine whether the predicted brightness is overshoot based on the predicted brightness corresponding to the exposure parameter adjustment and the target brightness.
[0040] Preferably, the acquisition unit is specifically used to acquire the brightness and target brightness of the current frame image, and the exposure adjustment coefficient of the previous frame image;
[0041] The exposure adjustment coefficient of the current frame image is obtained according to the brightness of the current frame image and the target brightness, the exposure adjustment coefficient of the previous frame image, and the proportional integral differential control algorithm.
[0042] Preferably, the acquisition unit is specifically used to adjust the exposure of the previous frame image according to the brightness of the current frame image and the target brightness, using the formula ΔK 当前 =-A*K1-B*ΔK 上 +ΔK 上 , get the exposure adjustment coefficient of the current frame image; where ΔK 当前 represents the exposure adjustment coefficient of the current frame image; A represents the gain of the preset integral control unit; B represents the gain of the preset differential control unit; ΔK 上 Indicates the exposure adjustment coefficient of the previous frame image, and K1 indicates the difference between the brightness of the current frame image and the target brightness.
[0043] Preferably, the determining unit is specifically configured to determine the brightness linear parameter as a first preset value when the absolute value of the difference between the brightness of the current frame image and the target brightness is less than a first preset threshold value;
[0044] When the absolute value of the difference between the brightness of the current frame image and the target brightness is greater than the second preset threshold value, the brightness linear parameter is determined to be the second preset value;
[0045] When the absolute value of the difference between the brightness of the current frame image and the target brightness is not less than the first preset threshold value and not greater than the second preset threshold value, the brightness linear parameter is determined according to the absolute value of the difference between the brightness of the current frame image and the target brightness.
[0046] Preferably, the determination unit is specifically used to determine the linear prediction brightness and the nonlinear prediction brightness according to the brightness of the current frame image and the exposure adjustment coefficient of the current frame image;
[0047] The predicted brightness corresponding to the adjusted exposure parameter is calculated according to the brightness linear parameter, the linear predicted brightness and the nonlinear predicted brightness.
[0048] Preferably, the determination unit is specifically configured to use the formula expect_lum_line=luma*ΔK according to the brightness of the current frame image and the exposure adjustment coefficient of the current frame image. 当前 , calculate the linear prediction brightness; where expect_lum_line represents the linear prediction brightness, and luma represents the brightness of the current frame image;
[0049] According to the brightness of the current frame image and the exposure adjustment coefficient of the current frame image, the formula expect_lum_noline = 256–256*[(256-luma) / 256] is used. ΔK当前 , calculate the nonlinear predicted brightness; where expect_lum_noline represents the nonlinear predicted brightness.
[0050] Preferably, the determination unit is specifically used to calculate the predicted brightness corresponding to the exposure parameter adjustment according to the brightness linear parameter, the linear predicted brightness and the nonlinear predicted brightness, using the formula expect_lum=line_weight*expect_lum_line+(1-line_weight)*expect_lum_noline; wherein expect_lum represents the predicted brightness corresponding to the exposure parameter adjustment, line_weight represents the linear parameter, expect_lum_line represents the linear predicted brightness, and expect_lum_noline represents the nonlinear predicted brightness.
[0051] Preferably, the processing unit is specifically configured to reduce the gain of the integral control unit and / or increase the gain of the differential control unit if it is determined that the predicted brightness overshoots.
[0052] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed, the electronic device executes any one of the methods described in the first aspect above.
[0053] In a fourth aspect, an embodiment of the present application provides a storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute any method described in the first aspect above.
[0054] By adopting the scheme provided in the embodiment of the present application, the exposure adjustment coefficient of the current frame image is obtained, and the brightness linear parameter is determined by obtaining the brightness of the current frame image and the target brightness. According to the exposure adjustment system of the current frame image, the brightness linear parameter, and the brightness of the current frame image, the predicted brightness corresponding to the exposure parameter adjustment is determined. According to the preview brightness and the target brightness, it is determined whether the preview brightness is overshooting; if it is not overshooting, the exposure parameter of the next frame image is determined according to the currently used exposure parameter and the exposure adjustment coefficient of the current frame image. In this way, the brightness of the adjusted exposure parameter of the current frame image can be predicted, so as to determine whether the brightness after the preview is overshooting. When the predicted brightness is not overshooting, the exposure parameter is adjusted, so as to prevent the brightness overshooting. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0056] Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0057] Figure 2 A schematic flow chart of an exposure control method provided in an embodiment of the present application;
[0058] Figure 3 A schematic flow chart of another exposure control method provided in an embodiment of the present application;
[0059] Figure 4 A schematic structural diagram of an exposure control device provided in an embodiment of the present application;
[0060] Figure 5 A schematic diagram of the structure of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0061] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0062] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0063] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0064] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0065] Before a detailed introduction to the embodiments of the present application, the terms that are applied or may be applied to the embodiments of the present application are first explained.
[0066] AE (Automatic Exposure), the purpose of automatic exposure is to achieve the desired brightness level or so-called target brightness level in different lighting conditions and scenes, so that the captured video or image is neither too dark nor too bright. To achieve this goal, the lens aperture, sensor exposure time, sensor analog gain and sensor / ISP digital gain are adjusted. This process is called automatic exposure.
[0067] PID (Proportion Integral Differential) controls the controlled object by linearly combining the proportion, integral and differential of the deviation to form a control variable, which is called the PID algorithm.
[0068] Exposure time mainly refers to the light-sensitive time of the film.
[0069] See also Figure 1 , is a schematic diagram of an electronic device provided in an embodiment of the present application. Figure 1 The electronic device is described in detail by taking the mobile phone 100 as an example. Figure 1 1 shows a front view and a rear view of a mobile phone 100, wherein two front cameras 111 and 112 are arranged on the front side of the mobile phone 100, and four rear cameras 121, 122, 123, and 124 are arranged on the rear side of the mobile phone 100. Through the multiple cameras, a plurality of shooting modes can be provided for the user, for example, a front shooting mode, a rear shooting mode, a front and rear dual shooting mode, etc. The user can select a corresponding shooting mode to shoot according to the shooting scene to improve the user experience.
[0070] Understandable, Figure 1 The above is only an exemplary description and should not be used as a limitation on the scope of protection of this application. For example, different mobile phones may have different camera configuration numbers and configuration locations. In addition, in addition to mobile phones, the electronic devices involved in the embodiments of the present application may also be tablet computers, personal computers (PCs), personal digital assistants (PDAs), smart watches, netbooks, wearable electronic devices, augmented reality (AR) devices, virtual reality (VR) devices, vehicle-mounted devices, smart cars, smart speakers, robots, smart glasses, smart TVs, etc.
[0071] It should be noted that in some possible implementations, the electronic device may also be called a terminal device, a user equipment (UE), etc., which is not limited in the embodiments of the present application.
[0072] In the prior art, automatic exposure is the process by which the camera of an electronic device automatically adjusts the exposure according to the intensity of light, to prevent overexposure or underexposure from causing the brightness of the picture to not reach the ideal effect. In the process of adjusting the exposure, the camera first detects the actual brightness of the current scene, then compares it with the target brightness, calculates the brightness difference, and then adjusts the exposure, so that the actual brightness and the target brightness are finally close, that is, the exposure converges.
[0073] During the entire exposure convergence process, the exposure parameters often cannot take effect immediately due to the exposure parameter effectiveness mechanism of the image photosensitive device used in the camera. It takes 1-2 frames to know the brightness corresponding to the above exposure parameters. For example, the exposure parameters of the current frame input to the image photosensitive device need to be calculated after 2 frames to calculate the corresponding brightness value. In this way, if the exposure is adjusted in each frame, the new exposure parameters are calculated. However, since the brightness statistics corresponding to the exposure parameters need to be calculated after 2 frames of delay, it is easy to cause brightness overshoot.
[0074] In view of the above problems, an embodiment of the present application provides an exposure control method, which can obtain the exposure adjustment coefficient of the current frame image, determine the brightness linear parameters by obtaining the brightness and target brightness of the current frame image, determine the predicted brightness corresponding to the exposure parameter adjustment according to the exposure adjustment system of the current frame image, the brightness linear parameters, and the brightness of the current frame image, and determine whether the preview brightness is overshooting according to the preview brightness and the target brightness; if not, determine the exposure parameters of the next frame image according to the currently used exposure parameters and exposure adjustment coefficient of the current frame image. In this way, the brightness of the adjusted exposure parameters of the current frame image can be predicted, so as to determine whether the brightness after preview is overshooting. When the predicted brightness is not overshooting, the exposure parameters are adjusted to prevent brightness overshooting. The following is a detailed description.
[0075] See also Figure 2 , is a flow chart of an exposure control method provided in an embodiment of the present application. The method is applied to the above Figure 1 The electronic equipment shown. Figure 2 As shown, the method includes:
[0076] Step S201: Obtain the exposure adjustment coefficient of the current frame image.
[0077] In an embodiment of the present application, the electronic device needs to automatically adjust the exposure time and gain during the automatic exposure process. The electronic device can make adjustments based on the currently used exposure time and gain. At this time, the electronic device can first obtain an exposure adjustment coefficient. The exposure adjustment coefficient can be pre-set or calculated based on the brightness of the current frame image and the target brightness.
[0078] In a possible implementation, the electronic device may calculate and obtain an exposure adjustment coefficient of the current frame image according to the brightness of the current frame image and the target brightness. In this case, obtaining the exposure adjustment coefficient of the current frame image includes:
[0079] The brightness and target brightness of the current frame image, and the exposure adjustment coefficient of the previous frame image are obtained; the exposure adjustment coefficient of the current frame image is obtained according to the brightness and target brightness of the current frame image, the exposure adjustment coefficient of the previous frame image, and the proportional integral differential control algorithm.
[0080] That is, the electronic device performs data statistics based on the current frame image captured by the camera to obtain the brightness of the current frame image, for example, the brightness is calculated based on the RGB data of each pixel in the current frame image, and the average brightness of each pixel is calculated as the brightness of the current frame image. The electronic device can obtain the target brightness in the storage medium and obtain the exposure adjustment coefficient of the previous frame image in the storage medium. The electronic device calculates the exposure adjustment coefficient of the current frame image according to the PID algorithm based on the acquired brightness of the current frame image, the target brightness and the exposure adjustment coefficient of the previous frame image.
[0081] As a possible implementation method, according to the brightness of the current frame image and the target brightness, the exposure adjustment coefficient of the previous frame image, the proportional integral differential control algorithm obtains the exposure adjustment coefficient of the current frame image, including:
[0082] According to the brightness of the current frame image and the target brightness, the exposure adjustment coefficient of the previous frame image is adjusted using the formula ΔK 当前 =-A*K1-B*ΔK 上 +ΔK 上 , get the exposure adjustment coefficient of the current frame image; where ΔK 当前 represents the exposure adjustment coefficient of the current frame image; A represents the gain of the preset integral control unit; B represents the gain of the preset differential control unit; ΔK 上 Indicates the exposure adjustment coefficient of the previous frame image, and K1 indicates the difference between the brightness of the current frame image and the target brightness.
[0083] In an embodiment of the present application, after the electronic device obtains the brightness of the current frame image and the target brightness, it can calculate the difference between the brightness of the current frame image and the target brightness, for example, by the formula K1=log2(luma / target_luma), where K1 represents the difference between the brightness of the current frame image and the target brightness, luma represents the brightness of the current frame image, and target_luma represents the target brightness. The difference between the brightness of the current frame image and the target brightness is calculated according to the above formula K1=log2(luma / target_luma). The electronic device uses the formula ΔK based on the exposure adjustment system of the previous frame image and the difference between the brightness of the current frame image and the target brightness. 当前 =-A*K1-B*ΔK 上 +ΔK 上 , and calculate the exposure adjustment coefficient of the current frame image. Wherein, the gain A of the integral control unit and the gain B of the differential control unit can be preset.
[0084] It should be noted that in the embodiment of the present application, the electronic device can also obtain the exposure adjustment coefficient of the current frame image in other ways, such as presetting the exposure adjustment coefficient, or determining a new exposure parameter based on the currently used exposure parameter, and then determining the exposure adjustment coefficient. Or other ways, which are not limited to this.
[0085] Step S202: Obtain the brightness of the current frame image and the target brightness, and determine the brightness linear parameter according to the brightness of the current frame image and the target brightness.
[0086] In an embodiment of the present application, after the electronic device captures the current frame image through a camera, the brightness value of each pixel can be calculated based on the RGB data of each pixel in the current frame image, and then the brightness average of all pixels can be calculated, and the brightness average of all pixels in the frame image can be determined as the brightness of the frame image. The target brightness can be pre-set and stored in a storage medium. The electronic device obtains the target brightness in the storage medium. After obtaining the brightness of the current frame image and the target brightness, the electronic device can calculate the linear difference between the brightness of the current frame image and the target brightness, and then the brightness linear parameter can be determined based on the linear difference.
[0087] As a possible implementation, determining the brightness linear parameter according to the brightness of the current frame image and the target brightness includes: when the absolute value of the difference between the brightness of the current frame image and the target brightness is less than the first preset threshold value, the brightness linear parameter is determined as the first preset value. When the absolute value of the difference between the brightness of the current frame image and the target brightness is greater than the second preset threshold value, the brightness linear parameter is determined as the second preset value. When the absolute value of the difference between the brightness of the current frame image and the target brightness is not less than the first preset threshold value and not greater than the second preset threshold value, the brightness linear parameter is determined according to the absolute value of the difference between the brightness of the current frame image and the target brightness.
[0088] That is, the electronic device calculates the absolute value of the difference between the brightness of the current frame image and the target brightness, and compares the absolute value of the difference between the brightness of the current frame image and the target brightness with the first preset threshold value and the second preset threshold value. If the absolute value of the difference between the brightness of the current frame image and the target brightness is less than the first preset threshold value, it means that the brightness of the current frame image and the target brightness are relatively close, and the brightness linear parameter is set to the first preset value. If the absolute value of the difference between the brightness of the current frame image and the target brightness is greater than the second preset threshold value, it means that the brightness of the current frame image and the target brightness are greatly different, and the linear parameter is set to the second preset value. If the absolute value of the difference between the brightness of the current frame image and the target brightness is not less than the first preset threshold value, and is not greater than the second preset threshold value, the brightness linear parameter can be determined according to the absolute value of the difference between the brightness of the current frame image and the target brightness. For example, the reciprocal of the absolute value of the difference between the brightness of the current frame image and the target brightness can be determined as the brightness linear parameter.
[0089] It should be noted that the first preset threshold value, the second preset threshold value, the first preset value, and the second preset value are all preset according to actual needs.
[0090] As a possible implementation manner, the first preset value is 1, and the second preset value is 0.
[0091] Step S203: determining the predicted brightness corresponding to the exposure parameter adjustment according to the exposure adjustment coefficient of the current frame image, the brightness linear parameter and the brightness of the current frame image.
[0092] In a possible implementation, determining the predicted brightness corresponding to the exposure parameter adjustment according to the exposure adjustment coefficient of the current frame image, the brightness linear parameter, and the brightness of the current frame image includes:
[0093] According to the brightness of the current frame image and the exposure adjustment coefficient of the current frame image, the linear prediction brightness and the nonlinear prediction brightness are determined; and according to the brightness linear parameter, the linear prediction brightness and the nonlinear prediction brightness are used to calculate the predicted brightness corresponding to the exposure parameter adjustment.
[0094] In an embodiment of the present application, after the exposure parameters are adjusted, the brightness includes a linear adjustment area and a nonlinear adjustment area. Among them, the linear adjustment area is the area where the brightness change is the same as the change in the exposure parameter and is linearly related. That is, when the exposure parameter is adjusted by 1.2 times, the brightness of the area also changes by 1.2 times accordingly. The nonlinear adjustment area is the area where the brightness change is different from the change in the exposure parameter. In order to more accurately preview the brightness after the exposure parameters are adjusted, it is necessary to predict the brightness of the linear area and the brightness of the nonlinear area. At this time, the electronic device can determine the linear predicted brightness and the nonlinear predicted brightness based on the brightness of the current frame image and the exposure adjustment coefficient of the current frame image. According to the brightness linear parameter, the brightness nonlinear parameter can be calculated, so that the corresponding predicted brightness after the exposure parameter adjustment can be calculated according to the linear predicted brightness, the brightness linear parameter, the nonlinear predicted brightness and the brightness nonlinear adjustment coefficient.
[0095] As a possible implementation manner, the above-mentioned determining the linear prediction brightness and the nonlinear prediction brightness according to the brightness of the current frame image and the exposure adjustment coefficient of the current frame image includes:
[0096] According to the brightness of the current frame image and the exposure adjustment coefficient of the current frame image, the formula expect_lum_line = luma*ΔK is used. 当前 , calculate the linear prediction brightness. Where expect_lum_line represents the linear prediction brightness, luma represents the brightness of the current frame image, ΔK 当前 Indicates the exposure adjustment factor of the current frame image.
[0097] According to the brightness of the current frame image and the exposure adjustment coefficient of the current frame image, the formula expect_lum_noline = 256–256*[(256-luma) / 256] is used. ΔK当前 , calculate the nonlinear predicted brightness. Where expect_lum_noline represents the nonlinear predicted brightness.
[0098] That is, when predicting the brightness of the linear area, since the brightness change in the linear area is the same as the adjustment of the exposure parameter, the formula expect_lum_line = luma*ΔK can be used according to the exposure adjustment coefficient and the brightness of the current frame image. 当前 , calculate the linear prediction brightness.
[0099] When predicting the brightness of a nonlinear area, the formula expect_lum_noline = 256–256*[(256-luma) / 256] can be used. ΔK当前 , the nonlinear predicted brightness is calculated according to the brightness of the current frame image and the exposure adjustment coefficient of the current frame image.
[0100] As a possible implementation, the predicted brightness corresponding to the adjusted exposure parameter calculated by the linear predicted brightness and the nonlinear predicted brightness according to the brightness linear parameter includes:
[0101] According to the brightness linear parameter, the linear prediction brightness and the nonlinear prediction brightness, the formula expect_lum=line_weight*expect_lum_line+(1-line_weight)*expect_lum_noline is used to calculate the predicted brightness corresponding to the exposure parameter adjustment.
[0102] Among them, expect_lum represents the predicted brightness corresponding to the exposure parameter adjustment, line_weight represents the linear parameter, expect_lum_line represents the linear predicted brightness, and expect_lum_noline represents the nonlinear predicted brightness.
[0103] In the embodiment of the present application, the electronic device has obtained the brightness linear parameter in the above steps, and the brightness nonlinear parameter can also be calculated, that is, 1-brightness linear parameter. After the brightness nonlinear parameter is calculated, the brightness linear parameter can be used as the weight of the linear prediction brightness, and the brightness nonlinear parameter can be used as the weight of the nonlinear prediction brightness, so as to calculate the predicted brightness corresponding to the final exposure parameter adjustment according to the formula expect_lum=line_weight*expect_lum_line+(1-line_weight)*expect_lum_noline.
[0104] Step S204: Determine whether the predicted brightness is a brightness overshoot according to the predicted brightness and the target brightness corresponding to the adjusted exposure parameters.
[0105] In an embodiment of the present application, after calculating the predicted brightness corresponding to the exposure parameter adjustment, the electronic device can compare the calculated predicted brightness with the target brightness to detect whether the predicted brightness is greater than the target brightness. If it is greater than the target brightness, it is determined that the predicted brightness is a brightness overshoot, and the exposure adjustment coefficient needs to be reduced. If the predicted brightness is not greater than the target brightness, it is determined that the predicted brightness is not a brightness overshoot, and the exposure adjustment coefficient may not be changed.
[0106] Step S205: if it is determined that the predicted brightness does not have brightness overshoot, then obtain the currently used exposure parameter of the current frame image, and adjust the exposure parameter according to the exposure adjustment coefficient of the current frame image and the currently used exposure parameter of the current frame image.
[0107] In an embodiment of the present application, if the electronic device determines that the predicted brightness does not overshoot, it means that the current exposure adjustment coefficient can be used. At this time, the electronic device can obtain the currently used exposure parameters of the current frame image, that is, to obtain the currently used exposure time and gain, and adjust the currently used exposure parameters according to the exposure adjustment coefficient of the current frame image to obtain new exposure parameters. For example, the product of the exposure parameter of the frame image and the exposure adjustment coefficient is used as the new exposure parameter. After determining the new exposure parameter, the electronic device can use the new exposure parameter to capture the image when capturing the image subsequently.
[0108] See also Figure 3 , is a flow chart of another exposure control method provided in an embodiment of the present application. The method is applied to the above Figure 1 Compared with the above embodiment, the embodiment of the present application adds a step of adjusting the exposure adjustment coefficient when predicting brightness overshoot. Figure 3 As shown, the method includes:
[0109] Step S301: Obtain the exposure adjustment coefficient of the current frame image.
[0110] For details, please refer to step S201 and no further details will be given here.
[0111] Step S302: Obtain the brightness of the current frame image and the target brightness, and determine the brightness linear parameter according to the brightness of the current frame image and the target brightness.
[0112] For details, please refer to step S202 and no further details will be given here.
[0113] Step S303: Determine the predicted brightness corresponding to the exposure parameter adjustment according to the exposure adjustment coefficient of the current frame image, the brightness linear parameter and the brightness of the current frame image.
[0114] For details, please refer to step S203 and no further details will be given here.
[0115] Step S304: Determine whether the predicted brightness is a brightness overshoot according to the predicted brightness and the target brightness corresponding to the exposure parameter adjustment.
[0116] For details, please refer to step S204 and no further details will be given here.
[0117] It should be noted that the electronic device performs different steps according to different results of determining whether the predicted brightness is overshoot. If it is determined that the predicted brightness is not overshoot, the following step S305 is performed; if it is determined that the predicted brightness is overshoot, the following step 306 is performed.
[0118] Step S305: if it is determined that the predicted brightness does not have brightness overshoot, the currently used exposure parameter of the current frame image is obtained, and the exposure parameter is adjusted according to the exposure adjustment coefficient of the current frame image and the currently used exposure parameter of the current frame image.
[0119] For details, please refer to step S205 and no further details will be given here.
[0120] Step S306: If it is determined that the predicted brightness overshoots, the exposure adjustment coefficient of the current frame image is reduced, and the above steps are re-executed to determine the predicted brightness corresponding to the exposure parameter adjustment according to the exposure adjustment coefficient of the current frame image, the brightness linear parameter and the brightness of the current frame image, until the step S306: If it is determined that the predicted brightness overshoots, the exposure adjustment coefficient of the current frame image is reduced, until it is determined that the predicted brightness does not overshoot, then the currently used exposure parameters of the current frame image are obtained, and the exposure parameters are adjusted according to the exposure adjustment coefficient of the current frame image and the currently used exposure parameters of the current frame image.
[0121] In an embodiment of the present application, if the electronic device determines that the predicted brightness is greater than the target brightness, it determines that the brightness is overshooting. At this time, it means that the adjustment coefficient of the exposure parameter is too large and needs to be reduced. The electronic device can reduce the exposure adjustment coefficient of the current frame image. And re-acquire the reduced exposure adjustment coefficient of the current frame image, and re-determine the predicted brightness corresponding to the exposure parameter adjustment according to the reduced exposure adjustment coefficient of the current frame image, the brightness linear parameter and the brightness of the current frame image; and re-detect whether the updated predicted brightness is brightness overshooting according to the target brightness and the newly determined predicted brightness, and continue to reduce the exposure adjustment coefficient of the current frame image when it is determined that the updated predicted brightness is brightness overshooting. And re-execute the above step of determining the predicted brightness according to the reduced exposure adjustment coefficient until it is determined that the predicted brightness is not brightness overshooting.
[0122] As a possible implementation, when the exposure adjustment coefficient is obtained according to the PID algorithm, the purpose of reducing the exposure adjustment coefficient can be achieved by adjusting the gain of the integral control unit and / or the gain of the differential control unit. At this time, if it is determined that the predicted brightness overshoot is determined, reducing the exposure adjustment coefficient of the current frame image includes: if it is determined that the predicted brightness overshoot is determined, reducing the gain of the integral control unit and / or increasing the gain of the differential control unit.
[0123] That is, by changing the gain of the integral control unit and / or the gain of the differential control unit in the PID algorithm, the purpose of reducing the exposure adjustment coefficient is achieved, which makes adjustment convenient.
[0124] In this way, each time the exposure adjustment coefficient is determined, the brightness is predicted based on the exposure adjustment coefficient, and it is detected whether the predicted brightness is overshooting. When the brightness is overshooting, the exposure adjustment coefficient is readjusted to reduce the exposure adjustment coefficient. When it is determined that the predicted brightness corresponding to the exposure adjustment coefficient is not overshooting, the exposure parameters are updated according to the exposure adjustment coefficient, which can prevent the brightness of the captured image from overshooting.
[0125] See also Figure 4 , is a schematic diagram of the structure of an exposure control device provided in an embodiment of the present application. Figure 4 As shown, the device comprises:
[0126] The acquisition unit 401 is used to acquire the exposure adjustment coefficient of the current frame image.
[0127] Specifically, the acquisition unit 401 is specifically used to obtain the brightness and target brightness of the current frame image, and the exposure adjustment coefficient of the previous frame image; based on the brightness and target brightness of the current frame image, the exposure adjustment coefficient of the previous frame image, and the proportional integral differential control algorithm, the exposure adjustment coefficient of the current frame image is obtained.
[0128] As a possible implementation, the acquisition unit 401 is specifically configured to obtain the exposure adjustment coefficient of the previous frame image according to the brightness of the current frame image and the target brightness, using the formula ΔK 当前 =-A*K1-B*ΔK 上 +ΔK 上 , get the exposure adjustment coefficient of the current frame image. Among them, ΔK 当前 represents the exposure adjustment coefficient of the current frame image; A represents the gain of the preset integral control unit; B represents the gain of the preset differential control unit; ΔK 上 Indicates the exposure adjustment coefficient of the previous frame image, and K1 indicates the difference between the brightness of the current frame image and the target brightness.
[0129] The acquisition unit 401 is further used to acquire the brightness of the current frame image and the target brightness, and determine the brightness linear parameter according to the brightness of the current frame image and the target brightness.
[0130] Specifically, the acquisition unit 401 is specifically used to determine the brightness linear parameter as the first preset value when the absolute value of the difference between the brightness of the current frame image and the target brightness is less than the first preset threshold value; determine the brightness linear parameter as the second preset value when the absolute value of the difference between the brightness of the current frame image and the target brightness is greater than the second preset threshold value; and determine the brightness linear parameter according to the absolute value of the difference between the brightness of the current frame image and the target brightness when the absolute value of the difference between the brightness of the current frame image and the target brightness is not less than the first preset threshold value and not greater than the second preset threshold value.
[0131] The determination unit 402 is used to determine the predicted brightness corresponding to the exposure parameter adjustment according to the exposure adjustment coefficient of the current frame image, the brightness linear parameter and the brightness of the current frame image.
[0132] Specifically, the determination unit 402 is specifically used to determine the linear prediction brightness and the nonlinear prediction brightness according to the brightness of the current frame image and the exposure adjustment coefficient of the current frame image; according to the brightness linear parameter, the linear prediction brightness and the nonlinear prediction brightness calculate the predicted brightness corresponding to the exposure parameter adjustment.
[0133] As a possible implementation, the determination unit 402 is specifically configured to use the formula expect_lum_line=luma*ΔK according to the brightness of the current frame image and the exposure adjustment coefficient of the current frame image. 当前 , calculate the linear prediction brightness. According to the brightness of the current frame image and the exposure adjustment coefficient of the current frame image, use the formula expect_lum_noline = 256-256*[(256-luma) / 256] ΔK当前 , calculate the nonlinear predicted brightness. Wherein, expect_lum_line represents the linear predicted brightness, luma represents the brightness of the current frame image, ΔK 当前 It indicates the exposure adjustment coefficient of the current frame image, and expect_lum_noline indicates the nonlinear predicted brightness.
[0134] As a possible implementation manner, the determination unit 402 is specifically configured to calculate the predicted brightness corresponding to the adjusted exposure parameters using the formula expect_lum=line_weight*expect_lum_line+(1-line_weight)*expect_lum_noline according to the brightness linear parameter, the linear predicted brightness and the nonlinear predicted brightness.
[0135] Among them, expect_lum represents the predicted brightness corresponding to the exposure parameter adjustment, line_weight represents the linear parameter, expect_lum_line represents the linear predicted brightness, and expect_lum_noline represents the nonlinear predicted brightness.
[0136] The determination unit 402 is further configured to determine whether the predicted brightness is a brightness overshoot according to the predicted brightness corresponding to the adjusted exposure parameters and the target brightness.
[0137] The processing unit 403 is used to obtain the currently used exposure parameter of the current frame image if it is determined that the predicted brightness does not have brightness overshoot, and adjust the exposure parameter according to the exposure adjustment coefficient of the current frame image and the currently used exposure parameter of the current frame image.
[0138] As a possible implementation method, the above-mentioned processing unit 403 is also used to reduce the exposure adjustment coefficient of the current frame image if it is determined that the predicted brightness is overshoot, and trigger the determination unit 402 to re-execute the above-mentioned steps to determine the predicted brightness corresponding to the exposure parameter adjustment according to the exposure adjustment coefficient of the current frame image, the brightness linear parameter and the brightness of the current frame image, and then to the step of determining whether the predicted brightness is overshoot according to the predicted brightness corresponding to the exposure parameter adjustment and the target brightness.
[0139] As a possible implementation manner, the processing unit 403 is specifically configured to reduce the gain of the integral control unit and / or increase the gain of the differential control unit if it is determined that the predicted brightness overshoot occurs.
[0140] Corresponding to the above embodiments, the present application also provides an electronic device. Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present invention, the electronic device 500 may include: a processor 501, a memory 502 and a communication unit 503. These components communicate through one or more buses, and those skilled in the art can understand that the structure of the server shown in the figure does not constitute a limitation on the embodiment of the present invention, it can be a bus structure or a star structure, and can also include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0141] The communication unit 503 is used to establish a communication channel so that the storage device can communicate with other devices, receive user data sent by other devices or send user data to other devices.
[0142] The processor 501 is the control center of the storage device. It uses various interfaces and lines to connect various parts of the entire electronic device. It runs or executes software programs and / or modules stored in the memory 502, and calls data stored in the memory to perform various functions of the electronic device and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of a plurality of packaged ICs with the same or different functions. For example, the processor 501 can include only a central processing unit (CPU). In an embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.
[0143] The memory 502 is used to store the execution instructions of the processor 501. The memory 502 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0144] When the execution instruction in the memory 502 is executed by the processor 501, the electronic device 500 can execute Figure 3 Some or all of the steps in the illustrated embodiments.
[0145] In a specific implementation, the present invention further provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment of the exposure control method provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0146] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention or some parts of the embodiments.
[0147] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the device embodiment and the terminal embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.
Claims
1. An exposure control method, It is characterized in that Applied to electronic equipment, the method comprises: Get the exposure adjustment coefficient of the current frame image; Obtaining the brightness of the current frame image and the target brightness, and determining the brightness linear parameter according to the brightness of the current frame image and the target brightness; Determine the predicted brightness corresponding to the exposure parameter adjustment according to the exposure adjustment coefficient of the current frame image, the brightness linear parameter and the brightness of the current frame image; Determining whether the predicted brightness is overshoot according to the predicted brightness and the target brightness corresponding to the exposure parameter adjustment; If it is determined that the predicted brightness does not have brightness overshoot, then obtaining the currently used exposure parameter of the current frame image, and adjusting the exposure parameter according to the exposure adjustment coefficient of the current frame image and the currently used exposure parameter of the current frame image; The method further comprises: If it is determined that the predicted brightness is overshooting, the exposure adjustment coefficient of the current frame image is reduced, and the step of determining the predicted brightness corresponding to the exposure parameter adjustment according to the exposure adjustment coefficient of the current frame image, the brightness linear parameter and the brightness of the current frame image is re-executed, until the step of if it is determined that the predicted brightness is overshooting, reducing the exposure adjustment coefficient of the current frame image, until it is determined that the predicted brightness is not overshooting, then obtaining the currently used exposure parameter of the current frame image, and adjusting the exposure parameter according to the exposure adjustment coefficient of the current frame image and the currently used exposure parameter of the current frame image; The step of obtaining the exposure adjustment coefficient of the current frame image includes: Get the brightness and target brightness of the current frame image, and the exposure adjustment coefficient of the previous frame image; According to the brightness of the current frame image and the target brightness, the exposure adjustment coefficient of the previous frame image is calculated using the formula ΔK 当前 =-A*K 1 -B*ΔK 上 +ΔK 上 , get the exposure adjustment coefficient of the current frame image; where ΔK 当前 represents the exposure adjustment coefficient of the current frame image; A represents the gain of the preset integral control unit; B represents the gain of the preset differential control unit; ΔK 上 Indicates the exposure adjustment coefficient of the previous frame image, K 1 Indicates the difference between the brightness of the current frame image and the target brightness; Determining the predicted brightness corresponding to the exposure parameter adjustment according to the exposure adjustment coefficient of the current frame image, the brightness linear parameter and the brightness of the current frame image includes: According to the brightness of the current frame image and the exposure adjustment coefficient of the current frame image, the formula expect_lum_line = luma*ΔK is used. 当前 , calculate the linear prediction brightness; where expect_lum_line represents the linear prediction brightness, and luma represents the brightness of the current frame image; According to the brightness of the current frame image and the exposure adjustment coefficient of the current frame image, the formula expect_lum_noline = 256–256*[(256-luma) / 256] is used. ΔK当前 , calculate the nonlinear predicted brightness; where expect_lum_noline represents the nonlinear predicted brightness; According to the brightness linear parameter, the linear predicted brightness and the nonlinear predicted brightness, the formula expect_lum=line_weight*expect_lum_line+(1-line_weight)*expect_lum_noline is used to calculate the predicted brightness corresponding to the exposure parameter adjustment; wherein expect_lum represents the predicted brightness corresponding to the exposure parameter adjustment, line_weight represents the linear parameter, expect_lum_line represents the linear predicted brightness, and expect_lum_noline represents the nonlinear predicted brightness.
2. The method according to claim 1, It is characterized in that Determining the brightness linear parameter according to the brightness of the current frame image and the target brightness includes: When the absolute value of the difference between the brightness of the current frame image and the target brightness is less than the first preset threshold value, the brightness linear parameter is determined to be the first preset value; When the absolute value of the difference between the brightness of the current frame image and the target brightness is greater than the second preset threshold value, the brightness linear parameter is determined to be the second preset value; When the absolute value of the difference between the brightness of the current frame image and the target brightness is not less than the first preset threshold value and not greater than the second preset threshold value, the brightness linear parameter is determined according to the absolute value of the difference between the brightness of the current frame image and the target brightness.
3. The method according to claim 1, It is characterized in that If it is determined that the predicted brightness is overshoot, reducing the exposure adjustment coefficient of the current frame image includes: If it is determined that the predicted brightness overshoots, the gain of the integral control unit is reduced and / or the gain of the differential control unit is increased.
4. An exposure control device, It is characterized in that include: An acquisition unit, used to acquire an exposure adjustment coefficient of a current frame image; The acquisition unit is further used to acquire the brightness of the current frame image and the target brightness, and determine the brightness linear parameter according to the brightness of the current frame image and the target brightness; A determination unit, used to determine the predicted brightness corresponding to the exposure parameter adjustment according to the exposure adjustment coefficient of the current frame image, the brightness linear parameter and the brightness of the current frame image; The determining unit is further used to determine whether the predicted brightness is overshoot according to the predicted brightness corresponding to the exposure parameter adjustment and the target brightness; a processing unit, configured to obtain a currently used exposure parameter of a current frame image if it is determined that the predicted brightness does not have a brightness overshoot, and adjust the exposure parameter according to the exposure adjustment coefficient of the current frame image and the currently used exposure parameter of the current frame image; The processing unit is further configured to reduce the exposure adjustment coefficient of the current frame image if it is determined that the predicted brightness is overshooting, and trigger the determination unit to re-execute the predicted brightness corresponding to the exposure parameter adjustment according to the exposure adjustment coefficient of the current frame image, the brightness linear parameter and the brightness of the current frame image, and to determine whether the predicted brightness is overshooting according to the predicted brightness corresponding to the exposure parameter adjustment and the target brightness; The acquisition unit is specifically used for: Get the brightness and target brightness of the current frame image, and the exposure adjustment coefficient of the previous frame image; According to the brightness of the current frame image and the target brightness, the exposure adjustment coefficient of the previous frame image is calculated using the formula ΔK 当前 =-A*K 1 -B*ΔK 上 +ΔK 上 , get the exposure adjustment coefficient of the current frame image; where ΔK 当前 represents the exposure adjustment coefficient of the current frame image; A represents the gain of the preset integral control unit; B represents the gain of the preset differential control unit; ΔK 上 Indicates the exposure adjustment coefficient of the previous frame image, K 1 Indicates the difference between the brightness of the current frame image and the target brightness; The determining unit is specifically used for: According to the brightness of the current frame image and the exposure adjustment coefficient of the current frame image, the formula expect_lum_line = luma*ΔK is used. 当前 , calculate the linear prediction brightness; where expect_lum_line represents the linear prediction brightness, and luma represents the brightness of the current frame image; According to the brightness of the current frame image and the exposure adjustment coefficient of the current frame image, the formula expect_lum_noline = 256–256*[(256-luma) / 256] is used. ΔK当前 , calculate the nonlinear predicted brightness; where expect_lum_noline represents the nonlinear predicted brightness; According to the brightness linear parameter, the linear predicted brightness and the nonlinear predicted brightness, the formula expect_lum=line_weight*expect_lum_line+(1-line_weight)*expect_lum_noline is used to calculate the predicted brightness corresponding to the exposure parameter adjustment; wherein expect_lum represents the predicted brightness corresponding to the exposure parameter adjustment, line_weight represents the linear parameter, expect_lum_line represents the linear predicted brightness, and expect_lum_noline represents the nonlinear predicted brightness.
5. An electronic device, It is characterized in that include: A processor and a memory, wherein the memory stores a computer program, and when the computer program is executed, the electronic device executes the method according to any one of claims 1 to 3.
6. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 3.
