Exposure processing method, device, equipment and medium
By determining the characteristic brightness value, ambient brightness value and dynamic range value of the image to be processed in the exposure processing technology, and using the target brightness table to match the target brightness value, the problem that the target brightness value in the prior art is not compatible with multiple application scenarios, and a better exposure effect and scope of application are achieved.
Patent Information
- Application Number
- CN202311760871.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-18
- Publication Date
- 2025-06-20
AI Technical Summary
In the existing exposure processing technology, the preset target brightness value is not compatible in different application scenarios, resulting in poor exposure effect and inability to adapt to multiple application scenarios.
By determining the characteristic brightness values, ambient brightness values and dynamic range values of the image to be processed, an appropriate target brightness value is determined based on these values using the target brightness table, thereby performing exposure processing.
It realizes exposure processing suitable for multiple application scenarios, improving the matching degree and scope of application of exposure effects.
Smart Images

Figure CN120186479A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of shooting processing, and particularly to an exposure processing method, apparatus, device, and medium. Background Art
[0002] Exposure is the process of receiving light entering through the lens by a photosensitive device to form an image. During shooting, the brightness intensity of the shooting background or the shooting subject will change. In the case of stronger external light, it is easy to overexpose, resulting in an overly bright captured image lacking in levels and details; or, in the case of weaker external light, it is easy to underexpose, resulting in an overly dark captured image that cannot reflect the true color. Therefore, exposure processing is required during shooting. Exposure processing can be applied to multiple application scenarios such as driving record, field monitoring, extreme sports, augmented reality (AR) glasses, and intelligent driving.
[0003] In a related exposure processing method, first, the brightness value of the image to be exposed in the current frame is calculated; then, according to the brightness value of the image to be exposed in the current frame, a preset target brightness value, and an initial exposure value, the exposure value of the image to be exposed in the next frame is calculated; finally, according to the exposure value of the image to be exposed in the next frame, automatic exposure is performed on the image to be exposed in the next frame.
[0004] In practical applications, the preset target brightness value is usually a fixed value set by those skilled in the art in the first application scenario. However, having a good exposure effect with the preset target brightness value in the first application scenario does not mean that it will also have a good exposure effect in the second application scenario; therefore, the preset target brightness value in the related art has the problem of being unable to be compatible with multiple application scenarios. Summary of the Invention
[0005] An embodiment of this application provides an exposure processing method, which can be compatible with more application scenarios, and thus can improve the applicable range of the technical solution for application scenarios.
[0006] Correspondingly, an embodiment of this application also provides an exposure processing apparatus, an electronic device, and a machine-readable medium to ensure the implementation and application of the above method.
[0007] To solve the above problems, an embodiment of this application discloses an exposure processing method, and the method includes:
[0008] Determine the characteristic brightness value, ambient brightness value, and dynamic range value corresponding to the image to be processed;
[0009] Determine the target brightness value corresponding to the image to be processed according to the environmental brightness value, the dynamic range value, and the target brightness table; the target brightness table is used to record the first mapping relationship between the environmental brightness value, the dynamic range value, and the target brightness value;
[0010] Perform exposure processing on the image to be processed according to the target brightness value corresponding to the image to be processed and the characteristic brightness value.
[0011] An embodiment of the present application also discloses an exposure processing device, and the device includes:
[0012] An image feature determination module, configured to determine the characteristic brightness value, the environmental brightness value, and the dynamic range value corresponding to the image to be processed;
[0013] A target brightness value determination module, configured to determine the target brightness value corresponding to the image to be processed according to the environmental brightness value, the dynamic range value, and the target brightness table; the target brightness table is used to record the first mapping relationship between the environmental brightness value, the dynamic range value, and the target brightness value;
[0014] An exposure processing module, configured to perform exposure processing on the image to be processed according to the target brightness value corresponding to the image to be processed and the characteristic brightness value.
[0015] Optionally, the image to be processed is an image acquired by an image sensor; the image feature determination module includes:
[0016] An environmental brightness value determination module, configured to use the second mapping relationship corresponding to the environmental brightness value, and determine the environmental brightness value corresponding to the image to be processed according to the sensor compensation value corresponding to the image sensor, and the aperture value, the exposure time value, the sensitivity value, and the average brightness value corresponding to the image to be processed;
[0017] Wherein, the second mapping relationship is used to record the mapping relationship between the sensor compensation value corresponding to the image sensor, and the aperture value, the exposure time value, the sensitivity value, and the average brightness value corresponding to the image and the environmental brightness value corresponding to the image;
[0018] The determination process of the sensor compensation value includes:
[0019] When the environmental brightness value is a preset brightness value, use the image sensor to capture a first image, and determine the sensor compensation value corresponding to the image sensor according to the aperture value, the exposure time value, the sensitivity value, the average brightness value corresponding to the first image, the preset brightness value, and the second mapping relationship.
[0020] Optionally, the determination process of the target brightness table includes:
[0021] For an application scenario, M second images corresponding to M exposure values are collected respectively;
[0022] Select a target second image from the M second images;
[0023] Generate a data record of the target brightness table according to the environmental brightness value, dynamic range value and characteristic brightness value corresponding to the target second image; the fields of the data record include: environmental brightness value, dynamic range value and target brightness value.
[0024] Optionally, generating the data record of the target brightness table includes:
[0025] Determine a first data range according to the dynamic range values corresponding to the target second images in N application scenarios and the node interval of the first node;
[0026] Determine a second data range according to the environmental brightness values corresponding to the target second images in N application scenarios and the node interval of the second node;
[0027] Establish a plane rectangular coordinate system according to the dimension corresponding to the dynamic range value and the dimension corresponding to the environmental brightness value;
[0028] Set a corresponding rectangular area block in the plane rectangular coordinate system according to the first data range and the second data range;
[0029] Determine the target brightness values of the corresponding vertices of the rectangular area block according to the target brightness values of the data points covered by the rectangular area block; the coordinates of the data points include: the dynamic range value and the environmental brightness value corresponding to the target second image;
[0030] Generate a data record of the target brightness table according to the target brightness values of the vertices.
[0031] Optionally, the target brightness value determination module includes:
[0032] A target rectangular area block determination module, configured to determine the target rectangular area block where the target data point is located in the plane rectangular coordinate system corresponding to the target brightness table according to the target data point corresponding to the environmental brightness value and the dynamic range value of the image to be processed;
[0033] An interpolation module, configured to use the bilinear interpolation method to determine the target brightness value of the target data point according to the target brightness values of the four vertices in the target rectangular area block, as the target brightness value corresponding to the image to be processed; the target brightness values of the four vertices in the target rectangular area block are recorded in the target brightness table.
[0034] Optionally, the exposure processing module includes:
[0035] A ratio determination module, configured to determine a ratio of a target brightness value corresponding to the image to be processed to the feature brightness value;
[0036] An exposure step value determination module, configured to determine an exposure step value according to the ratio;
[0037] An execution brightness value determination module, configured to determine an execution brightness value corresponding to the image to be processed according to the exposure step value and an average brightness value corresponding to the image to be processed.
[0038] Optionally, the image feature determination module includes:
[0039] A division module, configured to divide the image to be processed into a plurality of image blocks;
[0040] A feature brightness value determination module, configured to determine a feature brightness value corresponding to the image to be processed according to a block statistical value, a spatial weight value, and a brightness weight value of the image block.
[0041] An embodiment of the present application also discloses an electronic device, including: a processor; and a memory, storing executable code thereon, which when executed, causes the processor to execute the method as described in the embodiment of the present application.
[0042] An embodiment of the present application also discloses a machine-readable medium, storing executable code thereon, which when executed, causes a processor to execute the method as described in the embodiment of the present application.
[0043] The embodiments of the present application have the following advantages:
[0044] In the technical solution of the embodiment of the present application, a target brightness value corresponding to the target application scenario where the image to be processed is located can be matched according to the ambient brightness value and dynamic range value corresponding to the image to be processed, and the target brightness table; in this way, the target brightness value obtained by the embodiment of the present application has the characteristics of being dynamic and matching the target application scenario. In other words, the embodiment of the present application can improve the matching degree between the target brightness value and the target application scenario. On this basis, the embodiment of the present application can match corresponding target brightness values for different application scenarios according to the ambient brightness value and dynamic range value corresponding to the image to be processed in different application scenarios, and the target brightness table; therefore, the embodiment of the present application can be compatible with more application scenarios, and further can improve the applicable range of the technical solution for application scenarios. Description of the Drawings
[0045] Figure 1 is a schematic structural diagram of a shooting processing system according to an embodiment of the present application;
[0046] Figure 2It is a schematic flowchart of the steps of an exposure processing method according to an embodiment of the present application;
[0047] Figure 3 It is a schematic diagram of the rectangular coordinate system corresponding to the target brightness table according to an embodiment of the present application;
[0048] Figure 4 It is a schematic diagram of the rectangular coordinate system corresponding to the target brightness table according to an embodiment of the present application;
[0049] Figure 5 It is a schematic structural diagram of an exposure processing device according to an embodiment of the present application;
[0050] Figure 6 It is a schematic structural diagram of a device provided by an embodiment of the present application. Detailed implementation manners
[0051] To make the above objects, features, and advantages of the present application more obvious and understandable, the present application will be further described in detail below with reference to the accompanying drawings and specific implementation manners.
[0052] The embodiments of the present application can be applied to the field of shooting processing technology. In the field of shooting processing technology, the application scenario can characterize the environment where an image sensor with an image shooting function is located. For example, the application scenario can include, but is not limited to: driving record, field monitoring, extreme sports, augmented reality glasses, intelligent driving, etc. It can be understood that the embodiments of the present application do not limit the specific application scenarios.
[0053] Referring to Figure 1 , a schematic structural diagram of a shooting processing system according to an embodiment of the present application is shown. The shooting processing system can be located in an electronic device such as a camera, a mobile phone, or a video camera, and specifically can include: an optical lens 101, an image sensor 102, an ISP (Image Signal Processing) 103, and a storage display device 104.
[0054] Among them, the optical lens 101 is used to focus light on the image sensor 102 to obtain a light signal. The image sensor 102 is used to convert the light signal into an electrical signal. The ISP 103 is used to process the electrical signal obtained by the image sensor 102 to obtain a visible image. The storage display device 104 is used to store and display the target image.
[0055] The ISP 103 can control the optical lens 101 and the sensor 102, and thus complete functions such as automatic aperture, automatic exposure, and automatic white balance.
[0056] In one implementation, ISP 103 may include: firmware and a logic unit. In addition to performing a part of image algorithm processing, the logic unit may also calculate real-time information of the captured image. The firmware obtains the image statistical information of the logic unit, recalculates, and feeds back to control the optical lens 101, the sensor 102, and the logic unit, so as to achieve the purpose of automatically adjusting the image quality. It can be understood that the specific working principle of ISP 103 in the embodiments of this application is not limited.
[0057] The AE (Automatic Exposure) function is a function of ISP 103. The automatic exposure function can improve the image quality based on exposure processing during shooting.
[0058] In a related art exposure processing method, first, calculate the brightness value of the current frame to-be-exposed image; then, calculate the exposure value of the next frame to-be-exposed image according to the brightness value of the current frame to-be-exposed image, a preset target brightness value, and an initial exposure value; finally, perform automatic exposure on the next frame to-be-exposed image according to the exposure value of the next frame to-be-exposed image.
[0059] In practical applications, the preset target brightness value is usually a fixed value set by those skilled in the art in the first application scenario. However, the fact that the preset target brightness value has a good exposure effect in the first application scenario does not mean that the preset target brightness value has a good exposure effect in the second application scenario; therefore, the preset target brightness value in the related art has the problem of being unable to be compatible with multiple application scenarios.
[0060] In view of the technical problem that the preset target brightness value in the related art cannot be compatible with multiple application scenarios, the embodiments of this application provide an exposure processing method, which may specifically include: determining a characteristic brightness value, an ambient brightness value, and a dynamic range value corresponding to the to-be-processed image; determining the target brightness value corresponding to the to-be-processed image according to the ambient brightness value, the dynamic range value, and a target brightness table; the target brightness table is used to record a first mapping relationship between the ambient brightness value, the dynamic range value, and the target brightness value; performing exposure processing on the to-be-processed image according to the target brightness value corresponding to the to-be-processed image and the characteristic brightness value.
[0061] The embodiments of this application use the ambient brightness (BV, brightness value) and the dynamic range (DR, dynamic range) to characterize the dimensional characteristics of the application scenario. Among them, the ambient brightness value is used to characterize the light brightness of the environment where the image sensor is located. The dynamic range value may refer to the ratio of the maximum output signal supported by the camera to the minimum output signal, or the gray-scale ratio of the brightness upper limit value to the brightness lower limit value of the image.
[0062] Moreover, the embodiments of the present application provide a target brightness table, which is used to record the first mapping relationship between the environmental brightness value, the dynamic range value, and the target brightness value.
[0063] Referring to Table 1, a schematic diagram of the target brightness table according to an embodiment of the present application is shown. Among them, BVi represents the i-th environmental brightness value, DRj represents the j-th dynamic range value, and Obj_i_j represents the target brightness value jointly corresponding to BVi and DRj.
[0064] Table 1
[0065] Target brightness value DR1 DR2 ... DRn-1 DRn BV1 Obj_1_1 Obj_1_2 ... Obj_1_n-1 Obj_1_n BV2 Obj_2_1 Obj_2_2 ... Obj_2_n-1 Obj_2_n ... ... ... ... ... ... BVn-1 Obj_n-1_1 Obj_n-1_2 ... Obj_n-1_n-1 Obj_n-1_n BVn Obj_n_1 Obj_n_2 ... Obj_n_n-1 Obj_n_n
[0066] Table 2 can also illustrate the first mapping relationship recorded by the target brightness table. Specifically, Table 2 includes three fields: environmental brightness value, dynamic range value, and target brightness value.
[0067] Table 2
[0068] Ambient brightness value Dynamic range value Target brightness value BV1 DR1 Obj_1_1 …… …… …… BVi DRj Obj_i_j
[0069] Since the embodiments of the present application can match the corresponding target brightness value for the target application scenario where the image to be processed is located according to the environmental brightness value and dynamic range value corresponding to the image to be processed, and the target brightness table; in this way, the target brightness value obtained by the embodiments of the present application has the characteristics of being dynamic and matching the target application scenario. In other words, the embodiments of the present application can improve the matching degree between the target brightness value and the target application scenario. On this basis, the embodiments of the present application can match the corresponding target brightness value for different application scenarios according to the environmental brightness value and dynamic range value corresponding to the image to be processed in different application scenarios, and the target brightness table; therefore, the embodiments of the present application can be compatible with more application scenarios, and thus can improve the applicable range of the technical solution for application scenarios.
[0070] Method Embodiment 1
[0071] Reference Figure 2 , a schematic flowchart of the exposure processing method according to an embodiment of the present application is shown. The method may specifically include the following steps:
[0072] Step 201, determine the characteristic brightness value, environmental brightness value, and dynamic range value corresponding to the image to be processed;
[0073] Step 202, determine the target brightness value corresponding to the image to be processed according to the environmental brightness value, dynamic range value, and target brightness table; the target brightness table is used to record the first mapping relationship between the environmental brightness value, dynamic range value, and target brightness value;
[0074] Step 203: Perform exposure processing on the image to be processed according to the target brightness value and the feature brightness value corresponding to the image to be processed.
[0075] The embodiments of the present application are used to perform exposure processing on the image to be processed collected by an image sensor. The image to be processed may be an image in RAW (raw, unprocessed) format.
[0076] The exposure processing in the embodiments of the present application may be AE. AE is a mechanism in which an image sensor automatically adjusts exposure parameters according to the intensity of external light to prevent overexposure or underexposure. The exposure parameters in the embodiments of the present application may include at least one of aperture parameters, exposure time, gain, etc. Among them, the aperture parameter controls the intensity of the light illuminance reaching the photosensitive chip during exposure by using the light inlet hole and can control the light input amount; the exposure time can control the photon sampling time of the photosensitive chip by using the length of the opening time; the gain may refer to the sensitivity of the photosensitive component, and the stronger the sensitivity, the greater the brightness of the image.
[0077] The embodiments of the present application may determine the exposure parameters corresponding to the (k + 1)-th frame of the image to be processed according to the k-th frame of the image to be processed, and use the exposure parameters corresponding to the (k + 1)-th frame of the image to be processed to capture the (k + 1)-th frame of the image to be processed. In the embodiments of the present application, i, j, and k may all be positive integers.
[0078] In step 201, the image to be processed may be the k-th frame of the image to be processed collected by the image sensor.
[0079] The feature brightness value may characterize the brightness information of the image to be processed itself. The process of determining the feature brightness value in the embodiments of the present application includes: dividing the image to be processed into multiple image blocks; determining the feature brightness value corresponding to the image to be processed according to the block statistical value, spatial weight value, and brightness weight value of the image block.
[0080] Formula (1) shows the process of determining the feature brightness value.
[0081]
[0082] Among them, N represents the number of image blocks in the image to be processed; Si is the block statistical value of the i-th image block; Wi represents the spatial weight value of the i-th block; Bi is the brightness weight value of the i-th image block.
[0083] In practical applications, N may be a square number. For example, N = R × C, where R and C may be the same or different, R may be a value corresponding to 2 to the power of Q, and numerical examples of R and C may be 32, etc.
[0084] In a specific implementation, the maximum value among Yi, Ri, Gi, and Bi of the i-th image block can be taken as the block statistic value Si of the i-th image block. Among them, Yi represents the block statistic value of the Y (luminance) channel of the i-th image block, Ri represents the block statistic value of the R (red) channel of the i-th image block, Gi represents the block statistic value of the G (green) channel of the i-th image block, and Bi represents the block statistic value of the B (blue) channel of the i-th image block. In practical applications, assuming that the i-th image block includes H×V pixel points, the average value of the channel point statistic values corresponding to the H×V pixel points can be obtained to get the channel block statistic value of the i-th image block. Taking Yi as an example, the sum of the Y-channel point statistic values corresponding to the H×V pixel points is calculated, and then the sum result is divided by (H×V) to obtain Yi.
[0085] The process of determining the spatial weight value Wi specifically includes: determining the spatial weight value Wi according to the spatial position of the image block. Specifically, the spatial weight value Wi can be determined in the order from the center to the periphery (from the inside to the outside) of the spatial position. The spatial weight value corresponding to the center can be greater than the spatial weight value corresponding to the periphery. Generally speaking, the farther the spatial position is from the center, the smaller the spatial weight value. Of course, the embodiments of the present application do not limit the specific spatial weight value Wi.
[0086] The process of determining the luminance weight value Bi specifically includes:
[0087] First, perform a second sorting in ascending order of the block statistic values to obtain the corresponding second sorting result, and determine the sorting position L of the image block in the second sorting result; then, determine the luminance weight value Bi corresponding to the image block according to the sorting position L.
[0088] Specifically, when L is less than the first threshold, the luminance weight value Bi corresponding to the image block = 0; or
[0089] When L is greater than the first threshold and less than the second threshold,
[0090] Bi = (L - the first threshold) / (the second threshold - the first threshold) * 128; or
[0091] When L is greater than the second threshold and less than the third threshold, Bi = 128; or
[0092] When L is greater than the third threshold and less than the fourth threshold,
[0093] Bi = (the fourth threshold - L) / (the fourth threshold - the third threshold) * 128; or
[0094] When L is greater than the fourth threshold, Bi = 0.
[0095] When N = 32×32, the first threshold value can be a value such as 1, the second threshold value can be a value such as 62, the third threshold value can be a value such as 972, and the fourth threshold value can be a value such as 1022.
[0096] The ambient lightness value is used to characterize the lightness of the environment where the image sensor is located.
[0097] Assume that the image to be processed is an image acquired by an image sensor; then the determination process of the ambient lightness value specifically includes: using the second mapping relationship corresponding to the ambient lightness value, and according to the sensor compensation value corresponding to the image sensor, as well as the aperture value, exposure time value, sensitivity value, and average brightness value corresponding to the image to be processed, determine the ambient lightness value corresponding to the image to be processed;
[0098] Wherein, the second mapping relationship is used to record the mapping relationship between the sensor compensation value corresponding to the image sensor, and the aperture value, exposure time value, sensitivity value, and average brightness value corresponding to the image and the ambient lightness value corresponding to the image.
[0099] Formula (2) shows an example of the second mapping relationship.
[0100]
[0101] Wherein, BV represents the ambient lightness value; F represents the aperture value; shutter represents the exposure time; ISO represents the sensitivity value; y_avg represents the average brightness of the image to be processed; Grey18 is the result of multiplying the upper limit value of the gray scale range of the image to be processed by 0.18; BVoffset is the sensor compensation value obtained through calibration.
[0102] The gray scale range can be determined by those skilled in the art according to actual application requirements. Examples of the gray scale range can include: 0 - 1023, 0 - 255, or 0 - 4095, etc.
[0103] Formula (3) shows the determination process of y_avg.
[0104]
[0105] Wherein, N represents the number of image blocks in the image to be processed; Yi is the Y-channel block statistical value of the i-th image block.
[0106] The embodiments of the present application propose the concept of a sensor compensation value, which is used to compensate the ambient lightness value according to the difference in photosensitive performance between different image sensors. Since the embodiments of the present application determine the ambient lightness value considering the difference in photosensitive performance between different image sensors, the embodiments of the present application can improve the matching degree between the ambient lightness value and the image sensor, that is, can improve the accuracy of the ambient lightness value.
[0107] In the embodiments of the present application, the process of determining the above-mentioned sensor compensation value specifically includes: when the environmental brightness value is a preset brightness value, using an image sensor to capture a first image, and determining the sensor compensation value corresponding to the image sensor according to the aperture value, exposure time value, sensitivity value, average brightness value, preset brightness value corresponding to the first image, and the second mapping relationship.
[0108] The preset brightness value can be determined by those skilled in the art according to actual application requirements. For example, the preset brightness value can be a value between 4 and 9. In the embodiments of the present application, when the environmental brightness value is the preset brightness value, using an image sensor to capture a first image. In this case, the parameter values in formula (2) except for the sensor compensation value Bvoffset are already available, and thus the sensor compensation value Bvoffset corresponding to the image sensor can be obtained.
[0109] In practical applications, for different image sensors, the corresponding sensor compensation value Bvoffset can be determined, and the third mapping relationship between the identification of the image sensor and the sensor compensation value Bvoffset can be saved. In this way, during the process of determining the environmental brightness value, according to the identification of the image sensor corresponding to the image to be processed, it can be searched in the third mapping relationship to obtain the sensor compensation value corresponding to the image sensor. Of course, the sensor compensation value Bvoffset can also be saved locally in the image sensor for reading.
[0110] The dynamic range value can refer to the ratio of the maximum output signal supported by the camera to the minimum output signal, or the gray-scale ratio of the brightness upper limit value to the brightness lower limit value of the image.
[0111] In the embodiments of the present application, the dynamic range value DR can be determined using formula (4).
[0112]
[0113] Among them, bitRange represents the gray-scale range of the image to be processed; brightToneThres represents the threshold of the bright area of the image to be processed, which can be equivalent to the aforementioned third threshold; darkToneThres represents the threshold of the dark area of the image to be processed, which can be equivalent to the aforementioned second threshold; hist represents the gray-scale histogram of the image to be processed; hist i represents the abscissa of the gray-scale histogram.
[0114] In step 202, according to the environmental brightness value and dynamic range value corresponding to the image to be processed, and the target brightness table, the corresponding target brightness value can be matched for the target application scenario where the image to be processed is located.
[0115] In a specific implementation, the target brightness table can be presented in the form corresponding to Table 1 or Table 2, and then the ambient brightness value and dynamic range value corresponding to the image to be processed can be respectively matched with the ambient brightness value and dynamic range value in the target brightness table.
[0116] As shown in Table 2, the target brightness table specifically includes multiple data records, and the fields of the data records include: ambient brightness value, dynamic range value, and target brightness value. If the ambient brightness value corresponding to the image to be processed matches the ambient brightness value of the k-th data record, and the dynamic range value corresponding to the image to be processed matches the dynamic range value of the k-th data record, then the target brightness value of the k-th data record can be used as the target brightness value corresponding to the image to be processed.
[0117] Among them, the successful matching of the ambient brightness value corresponding to the image to be processed with the ambient brightness value of the k-th data record can include: the absolute value of the difference between the ambient brightness value corresponding to the image to be processed and the ambient brightness value of the k-th data record is less than the fifth threshold. The successful matching of the dynamic range value corresponding to the image to be processed with the dynamic range value of the k-th data record can include: the absolute value of the difference between the dynamic range value corresponding to the image to be processed and the dynamic range value of the k-th data record is less than the sixth threshold, etc.
[0118] In the case where there is no data record that successfully matches both the ambient brightness value and the dynamic range value corresponding to the image to be processed, the embodiments of the present application can map the target brightness table to a plane rectangular coordinate system, regard the ambient brightness value and dynamic range value of the image to be processed as a target data point in the plane rectangular coordinate system, and represent the first mapping relationship as a function corresponding to Obj = f(BV, DR).
[0119] In this case, the process of step 202 for determining the target brightness value corresponding to the image to be processed specifically includes:
[0120] Step A1: According to the target data point corresponding to the ambient brightness value and dynamic range value of the image to be processed, determine the target rectangular region block where the target data point is located in the plane rectangular coordinate system corresponding to the target brightness table;
[0121] Step A2: Using the bilinear interpolation method, determine the target brightness value of the target data point according to the target brightness values of the four vertices in the target rectangular region block, and use it as the target brightness value corresponding to the image to be processed; the target brightness values of the four vertices in the target rectangular region block are recorded in the target brightness table.
[0122] Refer to Figure 3, which shows a schematic diagram of a rectangular coordinate system corresponding to the target brightness table according to an embodiment of the present application. In the rectangular coordinate system, the horizontal axis represents the dynamic range value DR, and the vertical axis represents the ambient brightness value BV. In the rectangular coordinate system, the first nodes are obtained on the horizontal axis at a first preset interval (such as 1000 in the figure), and the second nodes are obtained on the vertical axis at a second preset interval (such as 1000 in the figure). The combination of the first nodes and the second nodes can form Figure 3 the rectangular area blocks in
[0123] In step A1, assuming that the target data point T is inside the target rectangular area block ABCD, then in step A2, the bilinear interpolation method can be used to determine the target brightness value of the target data point T.
[0124] Bilinear interpolation, also known as bilinear interpolation. Mathematically, bilinear interpolation is a linear interpolation extension of an interpolation function with two variables, and its core idea is to perform linear interpolation in two directions respectively. In a specific implementation, the bilinear interpolation method can perform a weighted operation on the target brightness values of the four vertices to obtain the target brightness value corresponding to the image to be processed.
[0125] Referring to Figure 3 , which shows a schematic diagram of the implementation process of the bilinear interpolation method according to an embodiment of the present application. Among them, the four vertices of the target rectangular area block are: A(x1, y2), B(x2, y2), C(x2, y1), and D(x1, y1). The goal of bilinear interpolation is to determine the target brightness value of the target data point T(x, y).
[0126] The first bilinear interpolation method can first perform linear interpolation in the x direction and then perform linear interpolation in the y direction. Or, the second bilinear interpolation method can first perform linear interpolation in the y direction and then perform linear interpolation in the x direction.
[0127] For example, the process of the first bilinear interpolation method specifically includes:
[0128] First, perform linear interpolation in the x direction.
[0129] Specifically, assuming that f(x, y) represents the target brightness value of any point (x, y), then the target brightness value f(x, y1) of point F can be determined using formula (5), and the target brightness value f(x, y2) of point E can be determined using formula (6).
[0130]
[0131]
[0132] Then, perform linear interpolation in the y direction. Specifically, the target brightness value of the second pixel T(x, y) can be determined using Equation (7).
[0133]
[0134] Therefore, in the case where there is no data record that successfully matches both the ambient brightness value and the dynamic range value corresponding to the image to be processed, the embodiments of the present application can use the bilinear interpolation method to determine the target brightness value corresponding to the image to be processed.
[0135] In step 203, perform exposure processing on the image to be processed according to the target brightness value corresponding to the image to be processed and the feature brightness value.
[0136] In a specific implementation, the process of performing exposure processing on the image to be processed specifically includes:
[0137] Step B1: Determine the ratio of the target brightness value corresponding to the image to be processed to the feature brightness value;
[0138] Step B2: Determine the exposure step value according to the ratio;
[0139] Step B3: Determine the execution brightness value corresponding to the image to be processed according to the exposure step value and the average brightness value corresponding to the image to be processed.
[0140] Equation (8) shows the processing procedure of Step B1.
[0141]
[0142] Among them, luma_obj represents the target brightness value corresponding to the image to be processed; luma_weight represents the feature brightness value corresponding to the image to be processed; total_gain represents the ratio.
[0143] Equation (9) shows the processing procedure of Step B2.
[0144] step_gain = f(total_gain) (9)
[0145] Among them, f is a mapping relationship, which is used to map the ratio total_gain to a smaller exposure step value step_gain. If the value of total_gain is small, then the mapped step_gain is 0, which is equivalent to that the exposure parameters of the current picture do not need to be adjusted.
[0146] Equation (10) shows the processing procedure of Step B3.
[0147] The expected brightness of the current frame after being adjusted by the automatic exposure algorithm can be represented by the following process:
[0148] y_new = y_avg * step_gain(10)
[0149] Among them, y_new represents the execution brightness value; y_avg is the average brightness value corresponding to the image to be processed; step_gain represents the exposure step size.
[0150] In practical applications, assuming that y_avg is the average brightness value corresponding to the image to be processed in the k-th frame, and step_gain is the exposure step size obtained according to the image to be processed in the k-th frame, then the execution brightness value y_new can be applied to the shooting process of the image to be processed in the (k + 1)-th frame.
[0151] In summary, the exposure processing method of the embodiments of the present application can match the corresponding target brightness value for the target application scenario where the image to be processed is located according to the environmental brightness value, dynamic range value, and target brightness table corresponding to the image to be processed; in this way, the target brightness value that can be obtained by the embodiments of the present application has the characteristics of being dynamic and matching the target application scenario. In other words, the embodiments of the present application can improve the matching degree between the target brightness value and the target application scenario. On this basis, the embodiments of the present application can match the corresponding target brightness value for different application scenarios according to the environmental brightness value, dynamic range value, and target brightness table corresponding to the image to be processed in different application scenarios; therefore, the embodiments of the present application can be compatible with more application scenarios, and thus can improve the applicable range of the technical solution for application scenarios.
[0152] Moreover, the embodiments of the present application propose the concept of a sensor compensation value, which is used to compensate the environmental brightness value according to the difference in photosensitive performance between different image sensors. Since the embodiments of the present application determine the environmental brightness value considering the difference in photosensitive performance between different image sensors, the embodiments of the present application can improve the matching degree between the environmental brightness value and the image sensor, that is, can improve the accuracy of the environmental brightness value.
[0153] Method Embodiment 2
[0154] The embodiments of the present application illustrate the determination process of the target brightness table.
[0155] In one implementation manner of the present application, the target brightness value corresponding to each data record in the target brightness table can be a value determined by those skilled in the art according to actual application requirements. Among them, different target brightness values can be set for different combinations of different environmental brightness values and dynamic range values for different data records.
[0156] In another implementation of the present application, M second images with different brightness levels can be collected for an application scenario, a target second image that meets the preset high-quality conditions can be selected from the M second images, and a data record of the target brightness table can be generated based on the target second image. The above-mentioned determination process of the target brightness table can save the workload of on-site collection and debugging and improve the determination efficiency of the target brightness table.
[0157] Correspondingly, the above-mentioned determination process of the target brightness table specifically includes:
[0158] Step C1: For an application scenario, use M exposure values to collect the corresponding M second images respectively;
[0159] Step C2: Select a target second image from the M second images;
[0160] Step C3: Generate a data record of the target brightness table according to the ambient brightness value, dynamic range value, and characteristic brightness value corresponding to the target second image; the fields of the data record include: ambient brightness value, dynamic range value, and target brightness value.
[0161] In Step C1, the M exposure values correspond to M different brightness levels. For example, the exposure value range includes: -m,..., -2, -1, 0, 1, 2,..., m, where the difference between adjacent exposure values in the exposure value range is 1, and the M exposure values can correspond to all or part of the exposure value range.
[0162] In Step C2, a target second image that meets the preset high-quality conditions can be selected from the M second images. The above selection can be performed manually. Alternatively, the performance characteristics corresponding to the M second images can be determined, and a target second image that meets the preset high-quality conditions can be selected from the M second images according to the performance characteristics. The above performance characteristics can include, but are not limited to, one or more of image entropy, gradient, and contrast.
[0163] Referring to Table 3, an example of the information of the target second image corresponding to the application scenario of an embodiment of the present application is shown.
[0164] Table 3
[0165] Application scenario Ambient brightness value Dynamic range value Characteristic brightness value Application scenario 1 BV_Scene1 DR_Scene1 luma_weight_Scene1 Application scenario 2 BV_Scene2 DR_Scene2 luma_weight_Scene2 Application scenario 3 BV_Scene3 DR_Scene3 luma_weight_Scene3 Application scenario 4 BV_Scene4 DR_Scene4 luma_weight_Scene4 ... ... ... ... Application scenario N BV_SceneN DR_SceneN luma_weight_SceneN
[0166] In Step C3, a data record of the target brightness table can be generated according to the ambient brightness value, dynamic range value, and characteristic brightness value corresponding to the target second image.
[0167] In one implementation of the present application, the data record of the target brightness table may include: the ambient brightness value, the dynamic range value, and the characteristic brightness value corresponding to the target second image. Among them, the characteristic brightness value corresponding to the target second image may be used as the field content of the target brightness value in the data record.
[0168] In another implementation of the present application, the dynamic range value and the ambient brightness value corresponding to the target second image may be respectively converted into a first node and a second node in a rectangular coordinate system. Among them, the node interval of the first node may be a multiple of 10, and the node interval of the second node may be a multiple of 10.
[0169] Correspondingly, the process of generating the data record of the target brightness table specifically includes:
[0170] Step D1: Determine the first data range according to the dynamic range value corresponding to the target second image in N application scenarios and the node interval of the first node;
[0171] Step D2: Determine the second data range according to the ambient brightness value corresponding to the target second image in N application scenarios and the node interval of the second node;
[0172] Step D3: Establish a rectangular coordinate system according to the dimension corresponding to the dynamic range value and the dimension corresponding to the ambient brightness value;
[0173] Step D4: Set a corresponding rectangular area block in the rectangular coordinate system according to the first data range and the second data range;
[0174] Step D5: Determine the target brightness value of the corresponding vertex of the rectangular area block according to the target brightness value of the data points covered by the rectangular area block; the coordinates of the data points specifically include: the dynamic range value and the ambient brightness value corresponding to the target second image;
[0175] Step D6: Generate the data record of the target brightness table according to the target brightness value of the vertex.
[0176] In step D1, the first data range may be determined according to the minimum value and the maximum value of the dynamic range value corresponding to the target second image in N application scenarios. For example, if the minimum value of the dynamic range value is 120, the maximum value of the dynamic range value is 9500, and the node interval of the first node is 1000, then the first data range is specifically: {0, 1000, 2000,..., 10000}.
[0177] The determination process of the second data range is similar to the determination process of the first data range, which will not be elaborated here and can be referred to each other.
[0178] Step D3 can establishFigure 3 The rectangular coordinate system corresponding to the target brightness table shown, where the horizontal axis of the rectangular coordinate system represents the dynamic range value DR, and the vertical axis of the rectangular coordinate system represents the ambient brightness value BV.
[0179] Step D4 can set a corresponding rectangular region block in the rectangular coordinate system according to the first data range and its corresponding first preset interval, and the second data range and its corresponding second preset interval, as Figure 3 shown.
[0180] Refer to Figure 4 , which shows a schematic diagram of the rectangular coordinate system corresponding to the target brightness table in an embodiment of the present application. Among them, the rectangular region block ABCD contains the data points E, F, and G corresponding to the target second image. The embodiment of the present application can use the binary linear regression method to determine the target brightness values of the four vertices included in the rectangular region block ABCD.
[0181] Formula (11) shows an example of the binary linear regression function. Among them, BV represents the variable corresponding to the ambient brightness value, DR represents the variable corresponding to the dynamic range value, and b(1), b(2), and b(3) respectively represent the coefficients.
[0182] OBJ = b(3)*BV + b(2)*DR + b(1) (11)
[0183] Optionally, the regress function in the matlab tool can be used to solve the above binary linear regression function, and then the target brightness values of the four vertices included in the rectangular region block ABCD can be obtained.
[0184] In some cases, if the rectangular region block does not contain data points, or the number of data points included in the rectangular region block is less than 2, since the above binary linear regression function cannot be solved, the target brightness values of the corresponding vertices of the rectangular region block can be set by those skilled in the art.
[0185] Step D6 can generate a data record of the target brightness table according to the target brightness values of the vertices. Table 4 shows an example of the data record of the target brightness table in the embodiment of the present application, where the ambient brightness value and the dynamic range value can be set at intervals of 1000.
[0186] Table 4
[0187] Ambient brightness value Dynamic range value Target brightness value 0 0 Brightness L1 1000 0 Brightness L2 1000 1000 Brightness L3 1000 2000 Brightness L4 …… …… …… 6000 7000 Brightness X
[0188] In summary, the embodiments of the present application can collect M second images with different brightness levels for an application scenario, select a target second image that meets the preset high-quality conditions from the M second images, and generate a data record of the target brightness table based on the target second image. The above-mentioned process for determining the target brightness table can save the workload of on-site acquisition and debugging, and improve the efficiency of determining the target brightness table.
[0189] It should be noted that for the method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the embodiments of the present application are not limited by the described action sequence, because according to the embodiments of the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily essential for the embodiments of the present application.
[0190] Based on the above embodiments, the present embodiment further provides an exposure processing device.
[0191] Referring to Figure 5 , a schematic structural diagram of an exposure processing device according to an embodiment of the present application is shown. The device may specifically include: an image feature determination module 501, a target brightness value determination module 502, and an exposure processing module 503.
[0192] Among them, the image feature determination module 501 is used to determine the characteristic brightness value, ambient brightness value, and dynamic range value corresponding to the image to be processed;
[0193] The target brightness value determination module 502 is used to determine the target brightness value corresponding to the image to be processed according to the ambient brightness value, dynamic range value, and target brightness table; the target brightness table is used to record the first mapping relationship between the ambient brightness value, dynamic range value, and target brightness value;
[0194] The exposure processing module 503 is used to perform exposure processing on the image to be processed according to the target brightness value corresponding to the image to be processed and the characteristic brightness value.
[0195] Optionally, the image to be processed is an image collected by an image sensor; the image feature determination module 501 specifically includes:
[0196] The ambient brightness value determination module is used to use the second mapping relationship corresponding to the ambient brightness value to determine the ambient brightness value corresponding to the image to be processed according to the sensor compensation value corresponding to the image sensor, and the aperture value, exposure time value, sensitivity value, and average brightness value corresponding to the image to be processed;
[0197] Among them, the second mapping relationship is used to record the mapping relationship between the sensor compensation value corresponding to the image sensor, and the aperture value, exposure time value, sensitivity value, and average brightness value corresponding to the image and the ambient brightness value corresponding to the image;
[0198] The process of determining the sensor compensation value specifically includes:
[0199] In the case where the ambient brightness value is a preset brightness value, use the image sensor to capture a first image, and determine the sensor compensation value corresponding to the image sensor according to the aperture value, exposure time value, sensitivity value, average brightness value, and preset brightness value corresponding to the first image and the second mapping relationship.
[0200] Optionally, the process of determining the target brightness table specifically includes:
[0201] For an application scenario, use M exposure values to capture the corresponding M second images respectively;
[0202] Select a target second image from the M second images;
[0203] Generate a data record of the target brightness table according to the ambient brightness value, dynamic range value, and characteristic brightness value corresponding to the target second image; the fields of the data record include: ambient brightness value, dynamic range value, and target brightness value.
[0204] Optionally, generating the data record of the target brightness table specifically includes:
[0205] Determine a first data range according to the dynamic range values corresponding to the target second images in N application scenarios and the node interval of the first node;
[0206] Determine a second data range according to the ambient brightness values corresponding to the target second images in N application scenarios and the node interval of the second node;
[0207] Establish a plane rectangular coordinate system according to the dimension corresponding to the dynamic range value and the dimension corresponding to the ambient brightness value;
[0208] Set corresponding rectangular region blocks in the plane rectangular coordinate system according to the first data range and the second data range;
[0209] Determine the target brightness values of the vertices corresponding to the rectangular region blocks according to the target brightness values of the data points covered by the rectangular region blocks; the coordinates of the data points include: the dynamic range value and the ambient brightness value corresponding to the target second image;
[0210] Generate a data record of the target brightness table according to the target brightness values of the vertices.
[0211] Optionally, the target brightness value determination module 502 specifically includes:
[0212] A target rectangular area block determination module, configured to determine a target rectangular area block where the target data point is located in a plane rectangular coordinate system corresponding to the target brightness table according to the environmental brightness value and the target data point corresponding to the dynamic range value of the image to be processed;
[0213] An interpolation module, configured to use a bilinear interpolation method to determine the target brightness value of the target data point according to the target brightness values of four vertices in the target rectangular area block as the target brightness value corresponding to the image to be processed; the target brightness values of four vertices in the target rectangular area block are recorded in the target brightness table.
[0214] Optionally, the exposure processing module 503 specifically includes:
[0215] A ratio determination module, configured to determine a ratio of the target brightness value corresponding to the image to be processed to the characteristic brightness value;
[0216] An exposure step value determination module, configured to determine an exposure step value according to the ratio;
[0217] An execution brightness value determination module, configured to determine an execution brightness value corresponding to the image to be processed according to the exposure step value and the average brightness value corresponding to the image to be processed.
[0218] Optionally, the image feature determination module 501 specifically includes:
[0219] A partitioning module, configured to partition the image to be processed into multiple image blocks;
[0220] A characteristic brightness value determination module, configured to determine a characteristic brightness value corresponding to the image to be processed according to the block statistical value, the spatial weight value, and the brightness weight value of the image block.
[0221] In summary, the exposure processing device according to the embodiments of the present application can match a corresponding target brightness value for a target application scenario where the image to be processed is located according to the environmental brightness value and the dynamic range value corresponding to the image to be processed, and the target brightness table; in this way, the target brightness value obtained by the embodiments of the present application has the characteristics of being dynamic and matching the target application scenario. In other words, the embodiments of the present application can improve the matching degree between the target brightness value and the target application scenario. On this basis, the embodiments of the present application can match corresponding target brightness values for different application scenarios according to the environmental brightness value and the dynamic range value corresponding to the image to be processed in different application scenarios, and the target brightness table; therefore, the embodiments of the present application can be compatible with more application scenarios, and further can improve the applicable range of the technical solution for application scenarios.
[0222] Moreover, the embodiments of the present application introduce the concept of sensor compensation values, which are used to compensate the environmental brightness values according to the differences in photosensitive performance between different image sensors. Since the embodiments of the present application determine the environmental brightness values considering the differences in photosensitive performance between different image sensors, the embodiments of the present application can improve the matching degree between the environmental brightness values and the image sensors, that is, can improve the accuracy of the environmental brightness values.
[0223] The embodiments of the present application also provide a non-volatile readable storage medium, in which one or more modules (programs) are stored. When the one or more modules are applied to a device, the device can be caused to execute the instructions (instructions) of the method steps in the embodiments of the present application.
[0224] The embodiments of the present application provide one or more machine-readable media, on which instructions are stored. When executed by one or more processors, the electronic device is caused to execute the method as described in one or more of the above embodiments. In the embodiments of the present application, the electronic device includes various types of devices such as terminal devices and servers (clusters). The electronic device can be an electronic device applied to an image sensor.
[0225] The embodiments of the present disclosure can be implemented as a device configured as desired using any suitable hardware, firmware, software, or any combination thereof. The device can include: terminal devices, servers (clusters), electronic devices, and other electronic devices. Figure 6 Exemplary device 1100 that can be used to implement the various embodiments described in the present application is schematically shown.
[0226] For one embodiment, Figure 6 Exemplary device 1100 is shown, which has one or more processors 1102, a control module (chipset) 1104 coupled to at least one of the (one or more) processors 1102, a memory 1106 coupled to the control module 1104, a non-volatile memory (NVM) / storage device 1108 coupled to the control module 1104, one or more input / output devices 1110 coupled to the control module 1104, and a network interface 1112 coupled to the control module 1104.
[0227] Processor 1102 can include one or more single-core or multi-core processors. Processor 1102 can include any combination of general-purpose processors or dedicated processors (such as graphics processors, application processors, baseband processors, etc.). In some embodiments, device 1100 can act as the terminal device, server (cluster), and other devices described in the embodiments of the present application.
[0228] In some embodiments, device 1100 may include one or more computer-readable media (e.g., memory 1106 or NVM / storage device 1108) having instructions 1114, and one or more processors 1102 coupled to the one or more computer-readable media and configured to execute the instructions 1114 to implement modules to perform the actions described in this disclosure.
[0229] For one embodiment, control module 1104 may include any suitable interface controller to provide any suitable interface to at least one of processors 1102 and / or any suitable device or component in communication with control module 1104.
[0230] Control module 1104 may include a memory controller module to provide an interface to memory 1106. The memory controller module may be a hardware module, a software module, and / or a firmware module.
[0231] Memory 1106 may be used to load and store data and / or instructions 1114 for device 1100, for example. For one embodiment, memory 1106 may include any suitable volatile memory, such as suitable DRAM. In some embodiments, memory 1106 may include double data rate type four synchronous dynamic random access memory (DDR4 SDRAM).
[0232] For one embodiment, control module 1104 may include one or more input / output controllers to provide an interface to NVM / storage device 1108 and (one or more) input / output devices 1110.
[0233] For example, NVM / storage device 1108 may be used to store data and / or instructions 1114. NVM / storage device 1108 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable (one or more) non-volatile storage devices (e.g., one or more hard disk drives (HDDs), one or more optical discs (CDs) drives, and / or one or more digital versatile discs (DVD) drives).
[0234] NVM / storage device 1108 may include storage resources physically part of a device on which device 1100 is installed, or it may be accessible by the device without being part of the device. For example, NVM / storage device 1108 may be accessed via network through (one or more) input / output devices 1110.
[0235] (One or more) input / output devices 1110 may provide an interface for device 1100 to communicate with any other suitable device. The input / output devices 1110 may include communication components, audio components, sensor components, etc. The network interface 1112 may provide an interface for device 1100 to communicate through one or more networks. Device 1100 may wirelessly communicate with one or more components of a wireless network according to any one of one or more wireless network standards and / or protocols, such as accessing a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, etc., or a combination thereof for wireless communication.
[0236] For one embodiment, at least one of (one or more) processors 1102 may be logically packaged with one or more controllers of the control module 1104 (e.g., the memory controller module). For one embodiment, at least one of (one or more) processors 1102 may be logically packaged with one or more controllers of the control module 1104 to form a system-in-package (SiP). For one embodiment, at least one of (one or more) processors 1102 may be logically integrated with one or more controllers of the control module 1104 on the same die. For one embodiment, at least one of (one or more) processors 1102 may be logically integrated with one or more controllers of the control module 1104 on the same die to form a system-on-chip (SoC).
[0237] In various embodiments, device 1100 may be, but is not limited to: a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.) and other terminal devices. In various embodiments, device 1100 may have more or fewer components and / or a different architecture. For example, in some embodiments, device 1100 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touch screen display), a non-volatile memory port, multiple antennas, a graphics chip, an application specific integrated circuit (ASIC), and a speaker.
[0238] Among them, a main control chip may be used as a processor or a control module in the detection device. Sensor data, location information, etc. are stored in a memory or an NVM / storage device. The sensor group may be used as an input / output device, and the communication interface may include a network interface.
[0239] For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple. For related parts, please refer to the partial description of the method embodiment.
[0240] Each embodiment in this specification is described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the embodiments, reference can be made to each other.
[0241] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal devices generate a device for implementing the functions specified in one or more processes of the flowchart and / or one or more blocks of the block diagram.
[0242] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions specified in one or more processes of the flowchart and / or one or more blocks of the block diagram.
[0243] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, so that a series of operation steps are executed on the computer or other programmable terminal device to generate a computer-implemented process. Therefore, the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in one or more processes of the flowchart and / or one or more blocks of the block diagram.
[0244] Although the preferred embodiments of the embodiments of the present application have been described, those skilled in the art can make additional changes and modifications once they know the basic creative concepts. Therefore, the appended claims are intended to be construed as including the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present application.
[0245] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or terminal device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or terminal device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or terminal device comprising the said element.
[0246] The above has introduced in detail an exposure processing method and apparatus, an electronic device and a machine-readable medium provided by the present application. Specific examples are used in this text to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. An exposure processing method, characterized in that, The method includes: Determining a characteristic brightness value, an ambient brightness value, and a dynamic range value corresponding to the image to be processed; Determining a target brightness value corresponding to the image to be processed according to the ambient brightness value, the dynamic range value, and a target brightness table; the target brightness table is used to record a first mapping relationship between the ambient brightness value, the dynamic range value, and the target brightness value; Performing exposure processing on the image to be processed according to the target brightness value and the characteristic brightness value corresponding to the image to be processed.
2. The method according to claim 1, characterized in that, The image to be processed is an image acquired by an image sensor; the determining of the characteristic brightness value, the ambient brightness value, and the dynamic range value corresponding to the image to be processed includes: Using a second mapping relationship corresponding to the ambient brightness value, and determining the ambient brightness value corresponding to the image to be processed according to the sensor compensation value corresponding to the image sensor, as well as the aperture value, exposure time value, sensitivity value, and average brightness value corresponding to the image to be processed; Wherein, the second mapping relationship is used to record the mapping relationship between the sensor compensation value corresponding to the image sensor, and the aperture value, exposure time value, sensitivity value, and average brightness value corresponding to the image and the ambient brightness value corresponding to the image; The determining process of the sensor compensation value includes: When the ambient brightness value is a preset brightness value, using the image sensor to capture a first image, and determining the sensor compensation value corresponding to the image sensor according to the aperture value, exposure time value, sensitivity value, average brightness value, and preset brightness value corresponding to the first image and the second mapping relationship.
3. The method according to claim 1, characterized in that, The determining process of the target brightness table includes: For an application scenario, respectively using M exposure values to acquire corresponding M second images; Selecting a target second image from the M second images; Generating a data record of the target brightness table according to the ambient brightness value, dynamic range value, and characteristic brightness value corresponding to the target second image; the fields of the data record include: ambient brightness value, dynamic range value, and target brightness value.
4. The method according to claim 3, characterized in that, The generating of the data record of the target brightness table includes: Determining a first data range according to the dynamic range values corresponding to the target second images in N application scenarios, and the node interval of the first node; Determining a second data range according to the ambient brightness values corresponding to the target second images in N application scenarios, and the node interval of the second node; Establishing a plane rectangular coordinate system according to the dimension corresponding to the dynamic range value and the dimension corresponding to the ambient brightness value; Setting corresponding rectangular region blocks in the plane rectangular coordinate system according to the first data range and the second data range; Determining the target brightness values of the vertices corresponding to the rectangular region blocks according to the target brightness values of the data points covered by the rectangular region blocks; the coordinates of the data points include: the dynamic range value and the ambient brightness value corresponding to the target second image; Generating a data record of the target brightness table according to the target brightness values of the vertices.
5. The method according to any one of claims 1 to 4, characterized in that, The determining of the target brightness value corresponding to the image to be processed according to the ambient brightness value, the dynamic range value, and the target brightness table includes: Determine a target rectangular region block where the target data point is located in the plane rectangular coordinate system corresponding to the target brightness table according to the environmental brightness value and the target data point corresponding to the dynamic range value of the image to be processed; Using the bilinear interpolation method, determine the target brightness value of the target data point according to the target brightness values of the four vertices in the target rectangular region block as the target brightness value corresponding to the image to be processed; the target brightness values of the four vertices in the target rectangular region block are recorded in the target brightness table.
6. The method according to any one of claims 1 to 4, characterized in that, The exposure processing of the image to be processed according to the target brightness value corresponding to the image to be processed and the characteristic brightness value includes: Determine the ratio of the target brightness value corresponding to the image to be processed to the characteristic brightness value; Determine the exposure step value according to the ratio; Determine the execution brightness value corresponding to the image to be processed according to the exposure step value and the average brightness value corresponding to the image to be processed.
7. The method according to any one of claims 1 to 4, characterized in that, The determination of the characteristic brightness value, environmental brightness value and dynamic range value corresponding to the image to be processed includes: Divide the image to be processed into multiple image blocks; Determine the characteristic brightness value corresponding to the image to be processed according to the block statistical value, spatial weight value and brightness weight value of the image block.
8. An exposure processing device, characterized in that, The device includes: An image feature determination module for determining the characteristic brightness value, environmental brightness value and dynamic range value corresponding to the image to be processed; A target brightness value determination module for determining the target brightness value corresponding to the image to be processed according to the environmental brightness value, dynamic range value and target brightness table; the target brightness table is used to record the first mapping relationship between the environmental brightness value, dynamic range value and target brightness value; An exposure processing module for performing exposure processing on the image to be processed according to the target brightness value corresponding to the image to be processed and the characteristic brightness value.
9. An electronic device, characterized in that, Including: A processor; And A memory, on which executable code is stored, and when the executable code is executed, the processor executes the method according to any one of claims 1-7.
10. A machine-readable medium having executable code stored thereon, which, when executed, causes a processor to perform the method according to any one of claims 1-7.