CN113438425B - Automatic exposure adjustment method and system - Google Patents

Automatic exposure adjustment method and system Download PDF

Info

Publication number
CN113438425B
CN113438425B CN202110979911.3A CN202110979911A CN113438425B CN 113438425 B CN113438425 B CN 113438425B CN 202110979911 A CN202110979911 A CN 202110979911A CN 113438425 B CN113438425 B CN 113438425B
Authority
CN
China
Prior art keywords
parameter
simulation
parameters
image
exposure
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110979911.3A
Other languages
Chinese (zh)
Other versions
CN113438425A (en
Inventor
赵信宇
魏金生
邢志伟
龙建睿
魏伟
肖崇泳
李骥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Dadao Zhichuang Technology Co.,Ltd.
Original Assignee
Shenzhen Dadao Zhichuang Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Dadao Zhichuang Technology Co ltd filed Critical Shenzhen Dadao Zhichuang Technology Co ltd
Priority to CN202110979911.3A priority Critical patent/CN113438425B/en
Publication of CN113438425A publication Critical patent/CN113438425A/en
Application granted granted Critical
Publication of CN113438425B publication Critical patent/CN113438425B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Abstract

The application relates to an automatic exposure adjustment method and system, which comprises the steps of obtaining a sample and determining a sample image; exposure simulation, namely determining a simulation effect set based on the simulation parameter set and the sample image; constructing a model, namely constructing an effect model based on a simulation effect set and a simulation parameter set; effect matching, namely determining optimization parameters based on an effect model; and adjusting exposure parameters based on the optimized parameters. And carrying out image processing on the sample image by utilizing each simulation gamma parameter, so that the image texture effect of the sample image under different exposure settings can be obtained, and a simulation effect set is obtained. The effect model can reflect the relation between the simulation gamma parameter and the image definition, and the parameter corresponding to the image definition can be extracted from the effect model based on the required image definition so as to determine the optimized parameter, thereby completing automatic exposure adjustment and improving the definition of the subsequently acquired image.

Description

Automatic exposure adjustment method and system
Technical Field
The present application relates to the field of image optimization technology based on exposure parameter setting, and in particular, to an automatic exposure adjustment method and system.
Background
At present, the SLAM (immediate positioning and map construction) technology is mainly applied to positioning navigation and is a key technology for solving the problem of planning the movement route of the autonomous mobile robot. The SLAM can estimate the self pose of the robot and construct a map of the surrounding environment by analyzing images, and because the SLAM analysis depends on the images acquired by the robot, if the images acquired by an image sensor are easy to have the problems of local overexposure and local underexposure, the images are fuzzy, feature points are difficult to extract, and the positioning accuracy of the SLAM is greatly reduced. Therefore, in order to ensure the positioning accuracy of the SLAM, the system also needs to adjust the exposure parameters of the image sensor according to the environment to acquire an image with sufficient definition and abundant texture details.
In the prior art, as disclosed in chinese patent application publication No. CN109510949A, the method for automatically exposing a camera based on effective brightness of image feature points includes the following steps:
calibrating the luminosity response of the camera to obtain a fitting result of a luminosity response function of the camera; extracting feature points of an image acquired by a camera;
establishing local windows around all the feature points, and establishing a mask according to whether the pixels are positioned in the local windows of the feature points;
eliminating overexposure points from pixels in an image area covered by the mask and then calculating average brightness;
estimating the average ambient light intensity according to the average brightness of the pixels in the mask and the camera luminosity response function;
and calculating the target exposure time according to the camera luminosity response function and the average ambient light intensity, and determining the final exposure time by utilizing the moving average.
Aiming at the technical scheme, the inventor considers that the automatic exposure method needs to calibrate the optical performance of the camera, the calibration process is complex, and the automatic exposure adjustment is not fast and accurate enough.
Disclosure of Invention
The application aims to provide an automatic exposure adjusting method which has the characteristics of rapidness and accuracy.
The above object of the present invention is achieved by the following technical solutions:
an automatic exposure adjustment method comprises the steps of,
obtaining a sample and determining a sample image; wherein the sample image is an image acquired based on exposure parameters associated with exposure settings;
exposure simulation, namely determining a simulation effect set based on the simulation parameter set and the sample image; the simulation parameter set comprises a plurality of simulation gamma parameters for simulating different exposure settings, and each parameter in the simulation effect set can reflect the image definition of the sample image corresponding to different exposure settings;
constructing a model, namely constructing an effect model based on a simulation effect set and a simulation parameter set;
effect matching, namely determining optimization parameters based on an effect model; wherein the optimization parameters are used for completing conversion between simulation gamma parameters and exposure parameters;
and adjusting exposure parameters based on the optimized parameters.
By adopting the technical scheme, the sample image is an image which is acquired by the image sensor based on the exposure parameters, and the exposure parameters corresponding to the sample image are determined values. Each simulation gamma parameter in the simulation parameter set corresponds to a plurality of exposure parameters, and each simulation gamma parameter can reflect an exposure setting corresponding to the exposure parameter. Because the image definition of the sample image is related to the exposure setting of the image, the sample image is subjected to image processing by using each simulation gamma parameter, and the image texture effect of the sample image under different exposure settings can be obtained, so that a simulation effect set is obtained. The simulation effect set and the simulation parameter set are used for fitting to obtain an effect model, and the effect model can reflect the relation between the simulation gamma parameter and the image definition, so that the parameters corresponding to the image definition can be extracted from the effect model based on the required image definition, and the optimization parameters are determined. And adjusting the exposure parameters by using the optimized parameters to change the exposure setting, thereby completing automatic exposure adjustment to improve the definition of the subsequently acquired image.
According to the technical scheme, the simulation effect set is adopted to simulate different exposure settings, and the effect model is established based on the exposed effect, so that the relation between the simulation gamma parameter and the image definition is mapped, the adjustment mode of the exposure parameter is determined, the process is simple and direct, and automatic exposure adjustment can be quickly and accurately completed in an actual scene.
Optionally, in a specific method of the exposure simulation, the method includes:
determining a gray level conversion set based on the simulation parameter set and the sample image; the gray level conversion set comprises a plurality of analog gray level samples which are in one-to-one correspondence with the analog gamma parameters, and the analog gray level samples can reflect the image gray levels of the sample images after the gamma conversion is carried out on the sample images based on the analog gamma parameters;
determining a simulation effect set based on the gray level conversion set; the simulation effect set comprises a plurality of simulation gradient parameters which are in one-to-one correspondence with the simulation gray level samples, and the simulation gradient parameters can reflect the total image gradient corresponding to the simulation gray level samples; the effect model can reflect the mapping relation between the simulated gamma parameter and the simulated gradient parameter.
By adopting the technical scheme, the pixel gray scale of the sample image can be changed by the gamma conversion, and the analog gray scale sample can be obtained by performing the gamma conversion on the sample image by utilizing the analog gamma parameter, so that the gray scale conversion effect of the sample image after the exposure parameter is changed can be simulated by the analog gray scale sample. The sample image is subjected to gamma conversion through a plurality of analog gradient parameters to obtain a plurality of analog gray samples, and each analog gray sample is analyzed to obtain the image definition under the influence of different exposure parameters.
Because the effect model is constructed by fitting each simulation gamma parameter and each simulation gradient parameter, the effect model can reflect the mapping relation between different exposure parameter images and different image definitions. By utilizing the effect model, better simulation gradient parameters can be extracted within a reasonable simulation gamma parameter range, and a data basis is provided for selecting the optimal exposure parameters.
Optionally, in the specific method for effect matching, the method includes:
determining an effective gamma set based on the effective range of the simulation gamma parameter;
determining an effective gradient set based on the effect model and the effective gamma set; the effective gradient set comprises simulated gradient parameters corresponding to respective simulated gamma parameters within the effective gamma set;
based on the set of effective gradients, optimization parameters are determined.
By adopting the technical scheme, the value range of the simulated gamma parameter determines the extraction range of the simulated gradient parameter in the effect model, and further determines the extraction of the optimized parameter. The effective range can be set to set a reasonable range of the simulated gamma parameters, so that the risk of overlarge or undersize values of the simulated gamma parameters can be reduced, the simulated gradient parameters and the optimized parameters can be correctly and accurately extracted, and the calculation rate is improved.
Optionally, in a specific method for determining an optimization parameter based on the effective gradient set, the method includes:
determining optimal gradient parameters based on simulated gradient parameters in the effective gradient set; in the effective gradient set, the image gradient corresponding to the optimal gradient parameter is greater than or equal to the image gradient corresponding to other simulated gradient parameters;
determining an optimal gamma parameter based on the simulated gamma parameter corresponding to the optimal gradient parameter;
based on the optimal gamma parameter, an optimization parameter is determined.
By adopting the technical scheme, each simulated gradient parameter in the effective gradient set represents the image definition in exposure setting, and the image gradient corresponding to the optimal gradient parameter is greater than or equal to the image gradients corresponding to other simulated gradient parameters in the effective gradient set, so that the image definition corresponding to the optimal gradient parameter is highest, and the texture details of the image can be embodied most.
Optionally, in a specific method for determining an optimized parameter based on the optimal gamma parameter, the method includes:
determining a proportionality coefficient; wherein the value of the scaling factor is related to the actual environment of image acquisition;
and determining an optimized parameter based on the proportionality coefficient and the optimal gamma parameter.
By adopting the technical scheme, the proportionality coefficient is used for matching with the numerical conversion between the simulation gamma parameter and the optimization parameter, and the numerical value of the proportionality coefficient determines the conversion rate between the simulation gamma parameter and the optimization parameter, so that the change rate of the optimization parameter is influenced. When the optimization parameter is larger, the change of the exposure parameter is quicker, which leads to the worse stability of the continuous automatic exposure, and when the optimization parameter is smaller, the change of the exposure parameter is slower, which leads to the less obvious effect of the continuous automatic exposure.
In practical application, the change rate of automatic exposure adjustment is mainly distinguished in different image acquisition scenes, so that a user can change the proportionality coefficient according to the actual environment of image acquisition to improve the adaptation degree of the automatic exposure adjustment rate and the actual scene.
Optionally, the exposure parameters include an exposure duration parameter, an aperture parameter, and a photosensitive gain parameter.
By adopting the technical scheme, the exposure parameter is adjusted by the cooperation among the exposure duration parameter, the aperture parameter and the photosensitive gain parameter. The exposure time parameter is adjusted with the highest priority, and when the exposure parameter needs to be adjusted, the exposure time parameter should be preferentially changed so as to reduce the problem of noise interference.
Optionally, the specific method for model construction includes: constructing an effect model based on the simulation effect set, the simulation parameter set and the fitting model; wherein the fitting model is a cubic curve model.
By adopting the technical scheme, compared with a quadratic curve model or a primary model, the fitting effect of the cubic curve model is better, and the relation between the simulated gamma parameter and the simulated gradient parameter can be more accurately reflected; compared with a quartic curve model, the method has the advantages that the calculation difficulty is low, the analysis speed is high when the quartic curve model is fitted, and the effect model can be constructed quickly.
Optionally, in a specific method for obtaining a sample, the method includes: the sample image is an image obtained after down-sampling processing.
By adopting the technical scheme, the sampling point number during image analysis can be reduced by adopting the down-sampling, so that the calculation speed is accelerated.
The second purpose of the application is to provide an automatic exposure adjustment system which has the characteristics of rapidness and accuracy.
The second objective of the present invention is achieved by the following technical solutions:
the sample acquisition module is used for determining a sample image; wherein the sample image is an image obtained based on exposure parameters;
the exposure simulation module is used for determining a simulation effect set based on the simulation parameter set and the sample image; the simulation effect set comprises a plurality of simulation gamma parameters corresponding to different simulation exposure parameters, and each parameter in the simulation effect set can reflect the richness of image textures obtained after the sample image is processed based on different exposure parameters;
the model construction module is used for constructing an effect model based on the simulation effect set and the simulation parameter set;
the effect matching module is used for determining optimization parameters based on the effect model; wherein the optimization parameters are used for completing conversion between simulation gamma parameters and exposure parameters;
and the exposure adjusting module is used for adjusting the exposure parameters based on the optimized parameters.
The third purpose of the present application is to provide a computer storage medium, which can store the corresponding program and has the characteristics of rapidness and accuracy
The third object of the invention is achieved by the following technical scheme:
a computer readable storage medium storing a computer program that can be loaded by a processor and executed to perform any of the automatic exposure adjustment methods described above.
Drawings
Fig. 1 is a schematic flow chart of an automatic exposure adjustment method according to the present application.
Fig. 2 is a sub-flowchart of the exposure simulation step and the effect matching step in the automatic exposure adjustment method of the present application.
Fig. 3 is a schematic flow chart of determining an optimized parameter in the automatic exposure adjustment method of the present application.
Fig. 4 is a block diagram of an automatic exposure adjustment system according to the present application.
In the figure, 1, a sample acquisition module; 2. an exposure simulation module; 3. a model building module; 4. an effect matching module; 5. and an exposure adjusting module.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiments of the present application will be described in further detail with reference to fig. 1 to 4 of the specification.
The first embodiment is as follows:
the embodiment of the application provides an automatic exposure adjustment method, and the main flow of the method is described as follows.
Referring to fig. 1, S01, sample acquisition, based on the original image, determines a sample image.
The original image refers to an image acquired by the image sensor based on the exposure setting of the image sensor, and the exposure setting comprises exposure time, aperture size and digital photosensitive gain. In the present embodiment, the exposure setting of the image sensor is reflected by exposure parameters, wherein the exposure parameters include an exposure duration parameter corresponding to the exposure time, an aperture parameter corresponding to the aperture size, and a photosensitive gain parameter corresponding to the digital photosensitive gain.
Under the influence of the brightness environment, the image sensor obtains different definition of the image under different exposure settings, so the exposure setting of the image sensor needs to be adjusted, that is, the exposure parameters are adjusted to obtain a sufficiently clear image. In the embodiment of the present disclosure, the definition of the image is reflected by the total image gradient of the image, and the higher the total image gradient is, the higher the definition of the image is, and the richer the texture details of the image are.
The automatic exposure adjustment method in this embodiment is to select an exposure parameter with a better effect by analyzing the current image and the corresponding exposure parameter, and automatically adjust the exposure setting of the image sensor, so that the image sensor can be in a better working state in the subsequent image acquisition work.
The sample image is obtained after the original image is subjected to down-sampling processing, and the number of sampling points during image analysis can be reduced through the down-sampling processing, so that the calculation speed is increased. It should be noted that, for a plurality of images with the same resolution, the down-sampling has a small influence on the magnitude relation of the total gradient of the image of each image, and since the resolution of the original image is consistent with the resolution of the subsequently acquired image on the premise that the resolution of the image sensor is not changed, the down-sampling processing can be performed on the sample image; if the resolution of the image sensor changes, the original image needs to be reacquired based on the adjusted resolution.
In this embodiment, the sample image is a digitized grayscale image, that is, an image without color and only brightness, and the sample image can be defined as a matrix having a width W pixel and a height H pixel, where the width W and the height H are positive integers, each element in the matrix corresponds to a grayscale of a pixel, and the grayscale value I is one of [0, 255], then the sample image can be represented as: { I (u, v) },
wherein u represents the abscissa value of the pixel, u is an integer, and u is more than or equal to 0 and less than W; v represents the ordinate value of the pixel, v is an integer, and v is greater than or equal to 0 and less than H.
Defining the total image gradient Gr of the sample image, calculating the total image gradient Gr through a formula (1),
Figure 233319DEST_PATH_IMAGE001
(1)
wherein gx is the horizontal gradient of the sample image on the pixel (u, v), gy is the vertical gradient of the sample image on the pixel (u, v),
by using the calculation method of the Sobel operator, gx can be calculated by the formula (2),
Figure 150459DEST_PATH_IMAGE002
(2)
by using the calculation method of the sobel operator, gy can be calculated by formula (3).
Figure 133458DEST_PATH_IMAGE003
(3)
And S02, simulating exposure, and determining a simulation effect set based on the simulation parameter set and the sample image.
The simulation parameter set comprises a plurality of simulation gamma parameters, the numerical values of the simulation gamma parameters are associated with the numerical values of the exposure parameters, and each simulation gamma parameter can represent different exposure settings for simulation.
The simulation effect set comprises a plurality of simulation gradient parameters, and the numerical value of the simulation gradient parameters is related to the total gradient of the image, so that each parameter can reflect different image definition.
In this embodiment, the simulation gamma parameters are used to simulate different exposure settings to perform image processing on the sample image, so as to simulate the image sharpness of the sample image in different exposure settings, thereby obtaining the simulation gradient parameters.
Referring to fig. 2, the specific step of step S02 includes:
and S021, determining a gray level conversion set based on the simulation parameter set and the sample image.
The simulation parameter set includes a plurality of preset simulation gamma parameters, and the simulation parameter set is defined as { gamma 0, gamma 1, …, gamma n-1 }.
The gray conversion set comprises a plurality of analog gray samples, each analog gray sample corresponds to each analog gamma parameter one by one, and each analog gray sample is an image obtained by image processing of the sample image based on the corresponding analog gamma parameter and is used for simulating the influence of different exposure settings on the sample image.
The analog gray sample can also be defined as a matrix having a width W pixel and a height H pixel, each element in the matrix corresponds to the gray of a pixel, and the gray value I is an integer of [0, 255], and the analog gray sample can be expressed as: { I' (u, v) }, wherein u denotes an abscissa value of the pixel, u is an integer, and 0. ltoreq. u < W; v represents the ordinate value of the pixel, v is an integer, and v is greater than or equal to 0 and less than H.
In this embodiment, the analog grayscale sample is obtained by performing gamma conversion on the sample image based on the corresponding analog gamma parameter, and the gamma conversion can change the grayscale of the pixel point of each pixel in the sample image, and the specific method is as in formula (4):
Figure 528668DEST_PATH_IMAGE004
(4)
wherein Imax is the upper limit of the gray scale value, which is 255 in this embodiment; gamma is the simulated gamma parameter. When gamma =1, I' = I, and the pixel points of the sample image keep the original gray; when gamma is less than 1, the gray level of the pixel point of the sample image is increased; when gamma is larger than 1, the gray level of the pixel points of the sample image is reduced.
And S022, determining a simulation effect set based on the gray level conversion set.
The simulation effect set comprises a plurality of simulation gradient parameters, each simulation gradient parameter corresponds to each simulation gray sample one by one, and the simulation gradient parameters are the total image gradient of the corresponding simulation gray sample. In the present embodiment, the simulated gradient parameters may be calculated from the simulated gray scale samples by formula (1), formula (2), and formula (3).
The set of simulation effects is defined as { G0, G1, …, Gn-1}, corresponding to the set of simulation parameters.
In steps S021 to S022, each simulation gamma parameter can simulate different exposure settings, and each simulation gradient parameter can reflect the image sharpness of the sample image at different exposure settings, and by analyzing and comparing each simulation gradient parameter, the sharpness of the image acquired by the image sensor at different exposure settings can be evaluated, and if the simulation gradient parameter is larger, the higher the image sharpness is; if the simulated gradient parameter is reduced, the lower the image definition is.
And S03, constructing a model, and constructing an effect model based on the simulation effect set, the simulation parameter set and the fitting model.
The fitting model is a curve model, the simulation parameter set { gamma 0, gamma 1, …, gamma n-1} and the simulation effect set { Gr0, Gr1, …, Grn-1} are substituted into the fitting model, and the relation between the simulation gamma parameter and the simulation gradient parameter can be fitted, so that the effect model is constructed. Because the simulation gamma parameter is related to the exposure parameter, the simulation gradient parameter can reflect the definition of the image, and therefore the effect model can reflect the mapping relation between the exposure parameter and the definition of the image.
In this embodiment, the fitting model is preferably a cubic curve model, see in particular equation (5),
Figure 483985DEST_PATH_IMAGE005
(5)
compared with a quadratic curve model or a primary model, the cubic curve model has a good fitting effect and can accurately reflect the relation between the simulated gamma parameter and the simulated gradient parameter; compared with a quartic curve model, the method has the advantages that the calculation difficulty is low when the quartic curve model is fitted, the analysis speed is high, and the effect model can be constructed quickly.
And S04, effect matching, and determining optimization parameters based on the effect model.
The optimization parameters refer to parameters related to the exposure parameters and the simulated gamma parameters, and can complete conversion between the exposure parameters and the simulated gamma parameters, which is equivalent to a target for automatically adjusting the exposure parameters. Through the effect model, the maximum value of the simulated gradient parameter can be determined within the range of the preset simulated gamma parameter, so that the optimization parameter is determined.
During analysis and calculation, if the intervention of saturation effect is not counted, the gray scale of the image pixel is basically in a proportional relation with the exposure parameter, as shown in formula (6) and formula (7),
Figure 306448DEST_PATH_IMAGE006
(6)
Figure 980006DEST_PATH_IMAGE007
(7)
wherein I is the pixel gray scale of the image, E is the exposure parameter when the image is acquired, S is the proportionality coefficient between the pixel gray scale and the exposure parameter, texpThe exposure duration parameter is A, the aperture parameter is A, and the sensitization gain parameter is G.
In this embodiment, the optimization parameter is used to reflect the variation of the gray scale of the image pixel under different exposure parameter settings, i.e. the variation of the gray scale of the image pixel corresponding to the gray scale conversion of the image, so that the value of the optimization parameter is related to the ratio between the gray scale of the image pixel of the original image and the gray scale of the image pixel under the influence of different exposure parameters, as shown in formula (8),
Figure 178906DEST_PATH_IMAGE008
(8)
wherein I 'is the pixel gray scale of the adjusted image for exposure setting, E' is the adjusted exposure parameter, texp' is the adjusted exposure duration parameter, A ' is the adjusted aperture parameter, G ' is the adjusted photosensitive gain parameter, and M is the optimized parameter.
The specific method of step S04 includes:
and S041, determining an effective gamma set based on the effective range of the analog gamma parameter.
Wherein, the effective range refers to a reasonable range of the simulated gamma parameters, and the effective range is related to the practical application scene of the image sensor. The effective gamma set refers to each simulated gamma parameter in the effective range, and all the simulated gamma parameters in the effective gamma set can determine the corresponding simulated gradient parameters on the effect model.
In this embodiment, the valid range is preset by the user and input into the system, and in other embodiments, the valid range may be obtained by a big data machine learning method.
And S042, determining an effective gradient set based on the effect model and the effective gamma set.
And substituting all the simulation gamma parameters in the effective gamma set into the effect model to obtain a plurality of simulation gradient parameters corresponding to the simulation gamma parameters, wherein the simulation gradient parameters form the effective gradient set.
And S043, determining optimization parameters based on the effective gradient set.
In steps S041 to S042, the effective gamma set represents different exposure parameters in a reasonable range, the effective gradient set represents changes in image sharpness in the different exposure parameters, and the simulated gamma parameter with the best image sharpness effect can be determined by analyzing each simulated gradient parameter in the effective gradient set, so as to determine the optimized parameter.
In a specific method of step S043, the method includes:
referring to fig. 3, S0431, optimal gradient parameters are determined based on the modeled gradient parameters within the effective gradient set.
And the optimal gradient parameter is the simulated gradient parameter with the maximum value in the effective gradient set. Each simulated gradient parameter in the effective gradient set represents the image definition in exposure setting, and the image gradient corresponding to the optimal gradient parameter is greater than or equal to the image gradients corresponding to other simulated gradient parameters in the effective gradient set, so that the image definition corresponding to the optimal gradient parameter is the highest, and the texture details of the image can be embodied most.
And S0432, determining the optimal gamma parameter based on the simulated gamma parameter corresponding to the optimal gradient parameter.
The optimal gamma parameter is a simulated gamma parameter corresponding to the optimal gradient parameter in the effect model, and the optimal gamma parameter represents exposure setting corresponding to the image with the highest definition.
And S0433, determining an optimized parameter based on the optimal gamma parameter.
Wherein, the optimal gamma parameter is subjected to numerical conversion, and the optimal parameter can be calculated.
In a specific method of S0433, comprising:
and S04331, determining a proportionality coefficient.
The scaling coefficient is a coefficient capable of reflecting the relationship between the simulation gamma parameter and the optimization parameter, so that the numerical conversion between the simulation gamma parameter and the exposure parameter is completed.
Specifically, the relationship between the simulated gamma parameter and the optimization parameter is shown in formula (9),
Figure 51047DEST_PATH_IMAGE009
(9)
wherein K is a proportionality coefficient, gamma is a simulation gamma parameter, and M is an optimization parameter.
In this embodiment, the optimization parameter itself determines the variation speed of the exposure parameter, i.e. the larger the optimization parameter is, the more rapid the variation of the exposure parameter is, resulting in the worse stability of the continuous automatic exposure, while the smaller the optimization parameter is, the more slow the variation of the exposure parameter is, resulting in the less obvious effect of the continuous automatic exposure. Therefore, a scaling factor is required to be introduced, the main function of the scaling factor is to adjust the change speed of the optimization parameter, if the scaling factor is increased, the numerical value of the optimization parameter changes more greatly, the exposure parameter changes more rapidly, and otherwise, the change of the exposure parameter changes more slowly.
In summary, the scaling factor affects the rate of change of the automatic exposure adjustment, which is mainly differentiated in different image capture scenes in practical applications. In order to improve the adaptation degree of automatic exposure adjustment and an actual scene, the numerical value of the scaling factor is related to the actual environment of image acquisition, and the scaling factor needs to be transformed according to different actual scenes. In this embodiment, the scaling factor is adapted to the system by the user offline according to the actual scene.
And S04332, determining an optimization parameter based on the proportionality coefficient and the optimal gamma parameter.
Wherein, substituting the optimal gamma parameter into formula (9) can calculate the specific value of the optimized parameter.
And S05, adjusting exposure parameters based on the optimization parameters.
Wherein, as shown in formula (8), the optimized parameter can reflect the proportional relationship between the original exposure parameter and the adjusted exposure parameter, so that after calculating the specific value of the optimized parameter, the strategy for adjusting the current exposure parameter is obtained, the specific adjustment strategy is as shown in formula (10),
Figure 44411DEST_PATH_IMAGE010
(10)
wherein E 'is the adjusted exposure parameter, texp' is the adjusted exposure duration parameter, A 'is the adjusted aperture parameter, G' is the adjusted photosensitive gain parameter, K is the proportionality coefficient, γoptIs the optimal gamma parameter. When the optimized parameters are calculated, the exposure parameters E can be determinedThe value of the exposure parameter E is adjusted to be consistent with the value of the target exposure parameter E', and automatic exposure adjustment is completed.
The numerical value of the exposure parameter is determined by the aperture parameter, the exposure duration parameter and the photosensitive gain parameter, and the adjustment of the exposure parameter is actually completed by the cooperative adjustment among the aperture parameter, the exposure duration parameter and the photosensitive gain parameter. In this embodiment, the exposure parameter is adjusted in such a way that the aperture parameter and the photosensitive gain parameter are fixed, and the exposure parameter is adjusted by adjusting the exposure duration parameter.
In other embodiments, the exposure parameter may be adjusted by adjusting the exposure duration parameter and the photosensitive gain parameter in a manner that the aperture parameter is fixed, but since the adjustment of the photosensitive gain parameter is likely to cause noise interference, the general principle is to adjust only the exposure duration parameter as much as possible within an adjustment range allowed by the exposure duration parameter, and adjust the photosensitive gain parameter after the exposure duration parameter has been completely adjusted based on the adjustment range.
In practical applications, the interval parameter of the automatic exposure adjustment is preset in the system by the user, and the interval parameter represents the frame number interval (or time interval) between two exposure adjustments. In this embodiment, each time the image sensor acquires an image of one frame, the system uses the image of the current frame as an original image, analyzes the original image in combination with the exposure parameters corresponding to the original image, calculates the optimized parameters, adjusts the exposure parameters based on the optimized parameters, acquires the image of the next frame with a better exposure setting, and realizes continuous automatic exposure adjustment to continuously obtain a better exposure effect.
The implementation principle of the first embodiment of the application is as follows: after the sample image is acquired, each simulation gamma parameter in the simulation parameter set can simulate various exposure settings, and further the image definition of the sample image under different exposure settings is simulated, so that simulation gradient parameters corresponding to different exposure parameters are obtained. The effect model can be obtained by fitting the simulated gamma parameters and the simulated gradient parameters, and the effect model can reflect the mapping relation between the simulated gamma parameters and the simulated gradient parameters, so that the maximum simulated gradient parameters corresponding to the effective range can be obtained only in the effective range of the input simulated gamma parameters, namely the optimal gamma parameters with the maximum image definition can be obtained in a reasonable range. By utilizing the optimal gamma parameter and the scale coefficient, the optimal parameter can be obtained through calculation, and the optimal parameter represents the exposure parameter with the best effect, so that the exposure parameter is adjusted based on the optimal parameter, the image sensor can keep a better working state, the image definition is improved, and the acquired image can keep clearer texture details.
The method reduces the complex calibration of the optical performance of the image sensor in the related technology, directly uses the analog gamma parameter to perform gray scale conversion and curve fitting on the image, has simple and effective process, and can perform automatic exposure adjustment more quickly and accurately in an actual scene, thereby enabling the image sensor to automatically, continuously, stably and accurately keep a better working state.
Example two:
referring to fig. 4, in an embodiment, an automatic exposure adjustment system is provided, which corresponds to the automatic exposure adjustment method in the first embodiment one by one, and includes a sample obtaining module 1, an exposure simulation module 2, a model building module 3, an effect matching module 4, and an exposure adjustment module 5. The functional modules are explained in detail as follows:
the system comprises a sample acquisition module 1, a sample acquisition module and a sample analysis module, wherein the sample acquisition module is used for determining a sample image; wherein, the sample image is an image acquired by the image sensor based on the exposure parameter.
And the exposure simulation module 2 can receive the sample image determined by the sample acquisition module 1. The exposure simulation module 2 is used for determining a simulation effect set based on the simulation parameter set and the sample image; the simulation parameter set comprises a plurality of simulation gamma parameters corresponding to different simulation exposure parameters, and each parameter in the simulation effect set can reflect the richness of the image texture obtained after the sample image is processed based on different exposure parameters.
The model building module 3 is capable of receiving the simulation effect set determined by the exposure simulation module 2. The model construction module 3 is used for constructing an effect model based on the simulation effect set and the simulation parameter set.
And an effect matching module 4 capable of analyzing the effect model constructed by the model construction module 3. The effect matching module 4 is used for determining an optimization parameter based on the effect model; wherein the optimization parameters are used for completing conversion between simulation gamma parameters and exposure parameters.
And the exposure adjusting module 5 can receive the optimized parameters determined by the effect matching module 4 and adjust the exposure parameters of the image sensor based on the optimized parameters.
Example three:
in one embodiment, an intelligent terminal is provided and includes a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the memory stores training data, algorithm formulas, filtering mechanisms, and the like in a training model. The processor is used for providing calculation and control capability, and the processor realizes the following steps when executing the computer program:
and S01, acquiring a sample, and determining a sample image based on the original image.
And S02, simulating exposure, and determining a simulation effect set based on the simulation parameter set and the sample image.
The specific step of step S02 includes:
and S021, determining a gray level conversion set based on the simulation parameter set and the sample image.
And S022, determining a simulation effect set based on the gray level conversion set.
And S03, constructing a model, and constructing an effect model based on the simulation effect set, the simulation parameter set and the fitting model.
And S04, effect matching, and determining optimization parameters based on the effect model.
The specific method of step S04 includes:
and S041, determining an effective gamma set based on the effective range of the analog gamma parameter.
And S042, determining an effective gradient set based on the effect model and the effective gamma set.
And S043, determining optimization parameters based on the effective gradient set.
In a specific method of step S043, the method includes:
and S0431, determining the optimal gradient parameter based on the simulated gradient parameter in the effective gradient set.
And S0432, determining the optimal gamma parameter based on the simulated gamma parameter corresponding to the optimal gradient parameter.
And S0433, determining an optimized parameter based on the optimal gamma parameter.
In a specific method of S0433, comprising:
and S04331, determining a proportionality coefficient.
And S04332, determining an optimization parameter based on the proportionality coefficient and the optimal gamma parameter.
And S05, adjusting exposure parameters based on the optimization parameters.
Example four:
in one embodiment, there is provided a computer-readable storage medium storing a computer program capable of being loaded by a processor and executing the above-mentioned automatic exposure adjustment method, the computer program, when executed by the processor, implementing the steps of:
and S01, acquiring a sample, and determining a sample image based on the original image.
And S02, simulating exposure, and determining a simulation effect set based on the simulation parameter set and the sample image.
The specific step of step S02 includes:
and S021, determining a gray level conversion set based on the simulation parameter set and the sample image.
And S022, determining a simulation effect set based on the gray level conversion set.
And S03, constructing a model, and constructing an effect model based on the simulation effect set, the simulation parameter set and the fitting model.
And S04, effect matching, and determining optimization parameters based on the effect model.
The specific method of step S04 includes:
and S041, determining an effective gamma set based on the effective range of the analog gamma parameter.
And S042, determining an effective gradient set based on the effect model and the effective gamma set.
And S043, determining optimization parameters based on the effective gradient set.
In a specific method of step S043, the method includes:
and S0431, determining the optimal gradient parameter based on the simulated gradient parameter in the effective gradient set.
And S0432, determining the optimal gamma parameter based on the simulated gamma parameter corresponding to the optimal gradient parameter.
And S0433, determining an optimized parameter based on the optimal gamma parameter.
In a specific method of S0433, comprising:
and S04331, determining a proportionality coefficient.
And S04332, determining an optimization parameter based on the proportionality coefficient and the optimal gamma parameter.
And S05, adjusting exposure parameters based on the optimization parameters.
The computer-readable storage medium includes, for example: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments are preferred embodiments of the present application, and the scope of the present application is not limited by the embodiments, so: all equivalent variations made according to the methods and principles of the present application should be covered by the protection scope of the present application.

Claims (10)

1. An automatic exposure adjustment method, comprising:
obtaining a sample and determining a sample image; wherein the sample image is an image acquired based on exposure parameters associated with exposure settings;
exposure simulation, namely determining a simulation effect set based on the simulation parameter set and the sample image; the simulation parameter set comprises a plurality of simulation gamma parameters for simulating different exposure settings, and each parameter in the simulation effect set can reflect the image definition of the sample image corresponding to different exposure settings;
constructing a model, namely constructing an effect model based on a simulation effect set and a simulation parameter set;
effect matching, namely determining optimization parameters based on an effect model; wherein the optimization parameters are used for completing conversion between simulation gamma parameters and exposure parameters;
and adjusting exposure parameters based on the optimized parameters.
2. The automatic exposure adjustment method according to claim 1, wherein in the specific method of exposure simulation, the method comprises:
determining a gray level conversion set based on the simulation parameter set and the sample image; the gray level conversion set comprises a plurality of analog gray level samples which are in one-to-one correspondence with the analog gamma parameters, and the analog gray level samples can reflect the image gray levels of the sample images after the gamma conversion is carried out on the sample images based on the analog gamma parameters;
determining a simulation effect set based on the gray level conversion set; the simulation effect set comprises a plurality of simulation gradient parameters which are in one-to-one correspondence with the simulation gray level samples, and the simulation gradient parameters can reflect the total image gradient corresponding to the simulation gray level samples; the effect model can reflect the mapping relation between the simulated gamma parameter and the simulated gradient parameter.
3. The automatic exposure adjustment method according to claim 2, wherein the specific method of effect matching includes:
determining an effective gamma set based on the effective range of the simulation gamma parameter;
determining an effective gradient set based on the effect model and the effective gamma set; the effective gradient set comprises simulated gradient parameters corresponding to respective simulated gamma parameters within the effective gamma set;
based on the set of effective gradients, optimization parameters are determined.
4. The automatic exposure adjustment method according to claim 3, wherein the specific method for determining the optimization parameter based on the effective gradient set comprises:
determining optimal gradient parameters based on simulated gradient parameters in the effective gradient set; in the effective gradient set, the image gradient corresponding to the optimal gradient parameter is greater than or equal to the image gradient corresponding to other simulated gradient parameters;
determining an optimal gamma parameter based on the simulated gamma parameter corresponding to the optimal gradient parameter;
based on the optimal gamma parameter, an optimization parameter is determined.
5. The automatic exposure adjustment method according to claim 4, wherein the specific method for determining the optimized parameters based on the optimized gamma parameters comprises:
determining a proportionality coefficient; wherein the value of the scaling factor is related to the actual environment of image acquisition;
and determining an optimized parameter based on the proportionality coefficient and the optimal gamma parameter.
6. The automatic exposure adjustment method according to claim 1, characterized in that:
the exposure parameters comprise exposure duration parameters, aperture parameters and photosensitive gain parameters.
7. The automatic exposure adjustment method according to claim 1, wherein the specific method of model construction includes: constructing an effect model based on the simulation effect set, the simulation parameter set and the fitting model; wherein the fitting model is a cubic curve model.
8. The automatic exposure adjustment method according to claim 1, wherein the specific method of sample acquisition includes: the sample image is an image obtained after down-sampling processing.
9. An automatic exposure adjustment system, comprising:
a sample acquisition module (1) for determining a sample image; wherein the sample image is an image obtained based on exposure parameters;
an exposure simulation module (2) for determining a simulation effect set based on the simulation parameter set and the sample image; the simulation effect set comprises a plurality of simulation gamma parameters corresponding to different simulation exposure parameters, and each parameter in the simulation effect set can reflect the richness of image textures obtained after the sample image is processed based on different exposure parameters;
the model building module (3) is used for building an effect model based on the simulation effect set and the simulation parameter set;
an effect matching module (4) for determining optimization parameters based on the effect model; wherein the optimization parameters are used for completing conversion between simulation gamma parameters and exposure parameters;
and the exposure adjusting module (5) is used for adjusting the exposure parameters based on the optimization parameters.
10. A computer-readable storage medium, in which a computer program is stored which can be loaded by a processor and which executes the method of any one of claims 1 to 8.
CN202110979911.3A 2021-08-25 2021-08-25 Automatic exposure adjustment method and system Active CN113438425B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110979911.3A CN113438425B (en) 2021-08-25 2021-08-25 Automatic exposure adjustment method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110979911.3A CN113438425B (en) 2021-08-25 2021-08-25 Automatic exposure adjustment method and system

Publications (2)

Publication Number Publication Date
CN113438425A CN113438425A (en) 2021-09-24
CN113438425B true CN113438425B (en) 2021-11-19

Family

ID=77797834

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110979911.3A Active CN113438425B (en) 2021-08-25 2021-08-25 Automatic exposure adjustment method and system

Country Status (1)

Country Link
CN (1) CN113438425B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114125280B (en) * 2021-11-15 2024-02-13 北京字跳网络技术有限公司 Camera exposure control method, device, equipment and storage medium
CN115379129A (en) * 2022-08-19 2022-11-22 广州虎牙信息科技有限公司 Exposure processing method, device, equipment and readable storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103019027A (en) * 2011-09-22 2013-04-03 南亚科技股份有限公司 Method for improving optical proximity simulation from exposure result

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FI116246B (en) * 2003-06-30 2005-10-14 Nokia Corp Method and system for adjusting the exposure in digital imaging and the like
JP4448039B2 (en) * 2005-01-26 2010-04-07 キヤノン株式会社 Imaging apparatus and control method thereof
US7546026B2 (en) * 2005-10-25 2009-06-09 Zoran Corporation Camera exposure optimization techniques that take camera and scene motion into account
JP2009033469A (en) * 2007-07-26 2009-02-12 Olympus Imaging Corp Imaging apparatus
JP2011119457A (en) * 2009-12-03 2011-06-16 Nikon Corp Alignment condition optimization method and system, pattern forming method and system, exposure device, device manufacturing method, overlay accuracy evaluation method and system
US10018922B2 (en) * 2014-09-02 2018-07-10 Nikon Corporation Tuning of optical projection system to optimize image-edge placement
CN107124561A (en) * 2016-12-27 2017-09-01 福建新大陆自动识别技术有限公司 A kind of bar code image exposure adjustment system and method based on CMOS
CN107071308A (en) * 2016-12-27 2017-08-18 福建新大陆自动识别技术有限公司 A kind of CMOS is quickly adjusted to as system and method
CN109089051A (en) * 2018-09-20 2018-12-25 Oppo广东移动通信有限公司 Generation method, device, electronic equipment and the storage medium of image simulation data
CN111696188B (en) * 2020-04-26 2023-10-03 杭州群核信息技术有限公司 Rendering graph rapid illumination editing method and device and rendering method
CN111866402B (en) * 2020-09-07 2021-10-29 三一重工股份有限公司 Parameter adjusting method and device, electronic equipment and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103019027A (en) * 2011-09-22 2013-04-03 南亚科技股份有限公司 Method for improving optical proximity simulation from exposure result

Also Published As

Publication number Publication date
CN113438425A (en) 2021-09-24

Similar Documents

Publication Publication Date Title
CN113438425B (en) Automatic exposure adjustment method and system
JP5458905B2 (en) Apparatus and method for detecting shadow in image
US9432589B2 (en) Systems and methods for generating high dynamic range images
US9892542B2 (en) Creating bump and normal maps from images with multi-scale control
CN108364305B (en) Vehicle-mounted camera video target tracking method based on improved DSST
CN109510949B (en) Camera automatic exposure method based on effective brightness of image feature points
CN110852982A (en) Self-adaptive exposure adjustment multi-scale entropy fusion underwater image enhancement method
CN112200848B (en) Depth camera vision enhancement method and system under low-illumination weak-contrast complex environment
CN112689097B (en) Automatic brightness control method and system for line laser and storage medium
CN111626379B (en) X-ray image detection method for pneumonia
CN112616028A (en) Vehicle-mounted camera parameter adjusting method and device, electronic equipment and storage medium
CN114708615B (en) Human body detection method based on image enhancement in low-illumination environment, electronic equipment and storage medium
CN110060208B (en) Method for improving reconstruction performance of super-resolution algorithm
US8913829B2 (en) Automatic processing scale estimation for use in an image process
WO2020107308A1 (en) Low-light-level image rapid enhancement method and apparatus based on retinex
CN109357754B (en) Tunnel hole internal and external brightness instrument calibration method and system based on deep learning
CN112651945A (en) Multi-feature-based multi-exposure image perception quality evaluation method
CN115690100B (en) Semi-supervised signal point detection model training method, signal point detection method and device
CN108781280B (en) Test method, test device and terminal
CN113379620B (en) Optical remote sensing satellite image cloud detection method
CN112991236B (en) Image enhancement method and device based on template
CN114782869A (en) Method and terminal for improving flame image recognition accuracy
CN115249357A (en) Bagged citrus detection method based on semi-supervised SPM-YOLOv5
CN112330689A (en) Photovoltaic camera exposure parameter adjusting method and device based on artificial intelligence
CN112258434A (en) Detail-preserving multi-exposure image fusion algorithm in static scene

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 519000 room 510, building 5, No. 16, Jinxing Road, Tangjiawan Town, high tech Zone, Zhuhai, Guangdong Province

Patentee after: Guangdong Dadao Zhichuang Technology Co.,Ltd.

Address before: 518000 room 310b, building F, Tianyou maker Industrial Park, 2 Lixin Road, Qiaotou community, Fuhai street, Bao'an District, Shenzhen City, Guangdong Province

Patentee before: SHENZHEN DADAO ZHICHUANG TECHNOLOGY CO.,LTD.