Movatterモバイル変換


[0]ホーム

URL:


CN119676572B - Exposure adjustment method, device and storage medium - Google Patents

Exposure adjustment method, device and storage medium
Download PDF

Info

Publication number
CN119676572B
CN119676572BCN202510171404.5ACN202510171404ACN119676572BCN 119676572 BCN119676572 BCN 119676572BCN 202510171404 ACN202510171404 ACN 202510171404ACN 119676572 BCN119676572 BCN 119676572B
Authority
CN
China
Prior art keywords
exposure
ratio
signal
noise ratio
brightness
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
CN202510171404.5A
Other languages
Chinese (zh)
Other versions
CN119676572A (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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua 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 Zhejiang Dahua Technology Co LtdfiledCriticalZhejiang Dahua Technology Co Ltd
Priority to CN202510171404.5ApriorityCriticalpatent/CN119676572B/en
Publication of CN119676572ApublicationCriticalpatent/CN119676572A/en
Application grantedgrantedCritical
Publication of CN119676572BpublicationCriticalpatent/CN119676572B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Landscapes

Abstract

Translated fromChinese

本申请公开了一种曝光调整方法、设备及存储介质,该曝光调整方法包括:采用当前曝光比进行图像采集得到当前成像画面;计算当前成像画面对应的信噪比,得到当前曝光比对应的信噪比;以及,获取多个与当前曝光比数值临近的曝光比,得到多个候选曝光比,预测当前成像画面在每个候选曝光比下的信噪比,分别得到每个候选曝光比对应的信噪比;从当前曝光比对应的信噪比以及每个候选曝光比对应的信噪比中,选取出最大信噪比对应的曝光比,得到目标曝光比;基于目标曝光比进行后续的图像采集,可以通过遍历各种曝光比对应的信噪比来进行最终曝光比的选取,不容易掉入局部最优解,快速进行曝光调整,且提高调整后成像画面的信噪比。

The present application discloses an exposure adjustment method, a device and a storage medium. The exposure adjustment method comprises: using a current exposure ratio to perform image acquisition to obtain a current imaging picture; calculating a signal-to-noise ratio corresponding to the current imaging picture to obtain a signal-to-noise ratio corresponding to the current exposure ratio; and obtaining a plurality of exposure ratios that are close to the current exposure ratio value to obtain a plurality of candidate exposure ratios, predicting the signal-to-noise ratio of the current imaging picture at each candidate exposure ratio, and respectively obtaining a signal-to-noise ratio corresponding to each candidate exposure ratio; selecting an exposure ratio corresponding to a maximum signal-to-noise ratio from the signal-to-noise ratio corresponding to the current exposure ratio and the signal-to-noise ratio corresponding to each candidate exposure ratio to obtain a target exposure ratio; performing subsequent image acquisition based on the target exposure ratio, and selecting a final exposure ratio by traversing the signal-to-noise ratios corresponding to various exposure ratios, so as to not easily fall into a local optimal solution, quickly perform exposure adjustment, and improve the signal-to-noise ratio of the adjusted imaging picture.

Description

Exposure adjustment method, device and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to an exposure adjustment method, apparatus, and storage medium.
Background
The conventional wide dynamic technology generally adopts a fixed exposure ratio to adjust the exposure degree of a long frame, however, when facing a scene with a high dynamic range and a scene with a low dynamic range, the method of one cut is difficult to combine, which results in improper setting of the exposure ratio and degradation of the image quality of a final composite image. Specifically, if a high exposure ratio is adopted in a low dynamic range scene, dark details in a short frame are excessively fused to a synthesized frame, so that a significant noise problem is caused, whereas if a low exposure ratio is adopted in a high dynamic range scene, the signal to noise ratio of a long frame in a dark region is not improved greatly compared with that of a short frame, and noise is also easy to generate when the dark region is subjected to enhancement processing.
Therefore, how to accurately and effectively adjust the exposure ratio used for image acquisition is a technical problem to be solved by those skilled in the art.
Disclosure of Invention
In order to solve the above technical problems, the present application provides at least one exposure adjustment method, apparatus and storage medium.
The first aspect of the application provides an exposure adjustment method, which comprises the steps of acquiring an image by using a current exposure ratio to obtain a current imaging picture, synthesizing the current imaging picture by a long frame image and a short frame image, calculating a signal-to-noise ratio corresponding to the current imaging picture to obtain a signal-to-noise ratio corresponding to the current exposure ratio, acquiring a plurality of exposure ratios close to a current exposure ratio value to obtain a plurality of candidate exposure ratios, predicting the signal-to-noise ratio of the current imaging picture under each candidate exposure ratio to respectively obtain the signal-to-noise ratio corresponding to each candidate exposure ratio, selecting the exposure ratio corresponding to the maximum signal-to-noise ratio from the signal-to-noise ratio corresponding to the current exposure ratio and the signal-to-noise ratio corresponding to each candidate exposure ratio to obtain a target exposure ratio, and acquiring a subsequent image based on the target exposure ratio.
In one embodiment, the method further comprises the steps of obtaining a current exposure ratio and a brightness signal-to-noise ratio function corresponding to each candidate exposure ratio respectively, wherein the brightness signal-to-noise ratio function is used for describing signal-to-noise ratios corresponding to different pixel brightness, taking a short frame image or a long frame image corresponding to a current imaging picture as a reference image, obtaining a reference histogram, wherein the reference histogram is used for describing the number of pixel points corresponding to different pixel brightness in the reference image, calculating the signal-to-noise ratio corresponding to the current imaging picture to obtain the signal-to-noise ratio corresponding to the current exposure ratio, multiplying the brightness signal-to-noise ratio function corresponding to the current exposure ratio by the value corresponding to each pixel brightness of the reference histogram, accumulating the product of the brightness of each pixel brightness to obtain the signal-to-noise ratio corresponding to the current exposure ratio, predicting the signal-to-noise ratio of the current imaging picture under each candidate exposure ratio to obtain the signal-to-noise ratio corresponding to-candidate exposure ratio respectively, multiplying the brightness signal-to-noise ratio function corresponding to the candidate exposure ratio and the value corresponding to each pixel brightness of the reference histogram, and accumulating the product of each pixel brightness to obtain the corresponding signal-to noise ratio.
In an embodiment, the method comprises the steps of obtaining a current exposure ratio and a brightness signal-to-noise ratio function corresponding to each candidate exposure ratio respectively, constructing a brightness signal-to-noise ratio function of a long frame image and a brightness signal-to-noise ratio function of a short frame image corresponding to each exposure ratio respectively according to the proportion of the brightness of the image to the signal-to-noise ratio, obtaining a long frame signal-to-noise ratio function and a short frame signal-to-noise ratio function corresponding to each exposure ratio respectively, wherein the product between the slope of the long frame signal-to-noise ratio function and the slope of the short frame signal-to-noise ratio function corresponding to any exposure ratio is equal to any exposure ratio, dividing the brightness range of the image into a long frame range, a fusion range and a short frame range from small to large according to the long frame signal-to-noise ratio function corresponding to each exposure ratio respectively, fusing the long frame signal-to-noise ratio function and the short frame signal-to-noise ratio function in the fusion range corresponding to the fusion range, and the short frame signal-to noise ratio function in the fusion range in sequence.
In one embodiment, the image brightness range is divided into a long frame range, a fusion range and a short frame range in sequence from small to large, wherein the method comprises the steps of taking a preset brightness value range in the image brightness range corresponding to the long frame image as the fusion range, taking a brightness range corresponding to a minimum brightness value smaller than the preset brightness value range as the long frame range, and taking a brightness range corresponding to a maximum brightness value larger than the preset brightness value range as the short frame range.
In one embodiment, the method further comprises the steps of responding to the change of the exposure time of a reference image corresponding to any candidate exposure ratio relative to the exposure time of a reference image corresponding to the current exposure ratio, calculating the ratio between the exposure time of the reference image corresponding to the candidate exposure ratio and the exposure time of the reference image corresponding to the current exposure ratio to obtain a signal to noise ratio exposure time coefficient, multiplying the value corresponding to each pixel brightness of a brightness signal to noise ratio function corresponding to the candidate exposure ratio and the value corresponding to each pixel brightness of the reference histogram, accumulating the product of the brightness signal to noise ratio function corresponding to the candidate exposure ratio and the value corresponding to each pixel brightness of the reference histogram to obtain an initial sum, and multiplying the initial sum and the signal to noise ratio exposure time coefficient to obtain the signal to noise ratio corresponding to the candidate exposure ratio.
In one embodiment, the subsequent image acquisition is performed based on the target exposure ratio, and comprises the steps of selecting an exposure ratio value from a value interval from the current exposure ratio to the target exposure ratio to obtain a gradient adjustment value, performing the subsequent image acquisition based on the gradient adjustment value, calculating a new target exposure ratio corresponding to an imaging picture obtained by the gradient adjustment value acquisition, and performing the subsequent image acquisition based on the new target exposure ratio corresponding to the gradient adjustment value until the calculated new target exposure ratio is equal to the gradient adjustment value used for image acquisition, thereby completing exposure adjustment.
In an embodiment, the number of gradient adjustment values is a plurality, and the method further comprises taking the new target exposure ratio corresponding to the preset number of gradient adjustment values as a final adjustment value if the new target exposure ratio calculated by accumulating the preset number of gradient adjustment values is the same, and adopting the final adjustment value to perform subsequent image acquisition.
In one embodiment, the subsequent image acquisition is based on the target exposure ratio, including directly employing the target exposure ratio for subsequent image acquisition.
The second aspect of the application provides an exposure adjustment device, which comprises a current picture acquisition module, an exposure ratio calculation module and an exposure ratio adjustment module, wherein the current picture acquisition module is used for acquiring an image by adopting a current exposure ratio to obtain a current imaging picture, the current imaging picture is synthesized by a long frame image and a short frame image, the current exposure ratio is a ratio between the maximum brightness of the long frame image and the maximum brightness of the short frame image, the signal to noise ratio calculation module is used for calculating a signal to noise ratio corresponding to the current imaging picture to obtain a signal to noise ratio corresponding to the current exposure ratio, the exposure ratios close to the current exposure ratio value are obtained to obtain a plurality of candidate exposure ratios, the signal to noise ratio of the current imaging picture under each candidate exposure ratio is predicted to respectively obtain a signal to noise ratio corresponding to each candidate exposure ratio, the exposure ratio selection module is used for selecting an exposure ratio corresponding to the maximum signal to noise ratio from the signal to noise ratio corresponding to the current exposure ratio and the signal to noise ratio corresponding to each candidate exposure ratio to obtain a target exposure ratio, and the exposure ratio adjustment module is used for carrying out subsequent image acquisition based on the target exposure ratio.
A third aspect of the present application provides an electronic device including a memory and a processor for executing program instructions stored in the memory to implement the above-described exposure adjustment method.
A fourth aspect of the present application provides a computer-readable storage medium having stored thereon program instructions which, when executed by a processor, implement the above-described exposure adjustment method.
According to the scheme, a current imaging picture is obtained through image acquisition by adopting a current exposure ratio, the current imaging picture is synthesized by a long frame image and a short frame image, the current exposure ratio is the ratio between the maximum brightness of the long frame image and the maximum brightness of the short frame image, the signal-to-noise ratio corresponding to the current imaging picture is calculated to obtain the signal-to-noise ratio corresponding to the current exposure ratio, a plurality of exposure ratios close to the current exposure ratio numerical value are obtained to obtain a plurality of candidate exposure ratios, the signal-to-noise ratio of the current imaging picture under each candidate exposure ratio is predicted to respectively obtain the signal-to-noise ratio corresponding to each candidate exposure ratio, the exposure ratio corresponding to the maximum signal-to-noise ratio is selected from the signal-to-noise ratio corresponding to the current exposure ratio and the signal-to-noise ratio corresponding to each candidate exposure ratio to obtain a target exposure ratio, the subsequent image acquisition is performed based on the target exposure ratio, the selection of the final exposure ratio can be performed through traversing the signal-to-noise ratios corresponding to each exposure ratio, the local optimal solution is not easy to fall, the exposure ratio is quickly adjusted, and the signal-to-noise ratio of the adjusted imaging picture is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
FIG. 1 is a schematic diagram of an implementation environment of an embodiment of the present application;
FIG. 2 is a flow chart of an exposure adjustment method according to an exemplary embodiment of the present application;
FIG. 3 is a schematic diagram of a long frame signal-to-noise ratio function and a short frame signal-to-noise ratio function shown in an exemplary embodiment of the application;
FIG. 4 is a schematic diagram illustrating the fusion of a long frame signal-to-noise ratio function and a short frame signal-to-noise ratio function in accordance with an exemplary embodiment of the present application;
FIG. 5 is a schematic diagram showing a change in exposure time of a reference image according to an exemplary embodiment of the present application;
FIG. 6 is a schematic diagram of a calculated signal-to-noise ratio shown in an exemplary embodiment of the application;
FIG. 7 is a schematic diagram showing the signal-to-noise ratios corresponding to respective exposure ratios according to an exemplary embodiment of the present application;
Fig. 8 is a block diagram of an exposure adjustment apparatus shown in an exemplary embodiment of the present application;
fig. 9 is a schematic structural view of an electronic device according to an exemplary embodiment of the present application;
fig. 10 is a schematic diagram of a structure of a computer-readable storage medium according to an exemplary embodiment of the present application.
Detailed Description
The following describes embodiments of the present application in detail with reference to the drawings.
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, interfaces, techniques, etc., in order to provide a thorough understanding of the present application.
The term "and/or" is herein merely an association information describing an associated object, meaning that three relationships may exist, e.g., a and/or B, and may mean that a alone exists, while a and B exist, and B alone exists. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship. Further, "a plurality" herein means two or more than two. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, may mean including any one or more elements selected from the group consisting of A, B and C.
The following describes an exposure adjustment method provided in the embodiment of the present application.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating an implementation environment of an embodiment of the present application. The implementation environment of the scheme may include an image acquisition device 110 and a server 120, where the image acquisition device 110 and the server 120 are communicatively connected to each other.
The image acquisition device 110 is used for image acquisition.
The server 120 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, a content delivery network (Content Delivery Network, CDN), basic cloud computing services such as big data and an artificial intelligent platform.
In one example, the image capturing device 110 internally installs and runs an exposure adjustment program for adjusting the exposure ratio of the image capturing device 110 according to the image captured by the image capturing device 110, and the server 120 may be a background server of the exposure adjustment program for providing background services for the exposure adjustment program.
In one example, the server 120 may analyze an image acquired from the current exposure ratio acquired from the image acquisition device 110 to obtain a target exposure ratio, the server 120 sends the target exposure ratio to the image acquisition device 110, and the image acquisition device 110 performs subsequent image acquisitions based on the target exposure ratio.
In the exposure adjustment method provided by the embodiment of the present application, the main execution body of each step may be the image acquisition device 110, or may be the server 120, or the image acquisition device 110 and the server 120 are interactively and cooperatively executed, that is, a part of the steps of the method are executed by the image acquisition device 110, and another part of the steps are executed by the server 120.
Referring to fig. 2, fig. 2 is a flowchart illustrating an exposure adjustment method according to an exemplary embodiment of the application. The exposure adjustment method can be applied to the implementation environment shown in fig. 1 and is specifically executed by the image capturing device in the implementation environment. It should be understood that the method may be adapted to other exemplary implementation environments and be specifically executed by devices in other implementation environments, and the implementation environments to which the method is adapted are not limited by the present embodiment.
As shown in fig. 2, the exposure adjustment method at least includes steps S210 to S240, and is described in detail as follows:
and S210, acquiring an image by adopting a current exposure ratio to obtain a current imaging picture, wherein the current imaging picture is synthesized by a long frame image and a short frame image, and the current exposure ratio is the ratio between the maximum brightness of the long frame image and the maximum brightness of the short frame image.
The exposure ratio of the current imaging picture is the ratio of the exposure amounts of the long frame image and the short frame image which compose the current imaging picture, namely the ratio between the maximum brightness of the long frame image and the maximum brightness of the short frame image, and can also be regarded as the ratio between the exposure time of the long frame image and the exposure time of the short frame image which compose the current imaging picture.
The exposure time of the long frame image is longer, and the method is mainly used for guaranteeing the definition and good signal to noise ratio of details of a dark area, and the long frame image can capture more detail information in a dark light environment, but overexposure phenomenon can occur in a bright area.
The short frame image has a shorter exposure time, and is mainly used for capturing details of overexposed areas of the long frame image, and in a strong light environment, the short frame image can provide more details of a bright area, but may not perform well ‌ in a dark area. ‌ A
Step S220, calculating a signal-to-noise ratio corresponding to the current imaging picture to obtain a signal-to-noise ratio corresponding to the current exposure ratio, and obtaining a plurality of exposure ratios close to the current exposure ratio value to obtain a plurality of candidate exposure ratios, and predicting the signal-to-noise ratio of the current imaging picture under each candidate exposure ratio to respectively obtain the signal-to-noise ratio corresponding to each candidate exposure ratio.
The signal-to-noise ratio is the ratio of signal intensity to noise intensity, is a key index for measuring the information definition of an image, and high signal-to-noise ratio means that the image signal is pure and the image definition is high, and low signal-to-noise ratio means that the image noise interference is large and the image definition is low.
For example, the signal power and the noise power corresponding to the current imaging picture can be directly calculated, then the signal-to-noise ratio corresponding to the current imaging picture is calculated according to the signal power and the noise power, and the signal-to-noise ratio corresponding to the current imaging picture is used as the signal-to-noise ratio corresponding to the current exposure ratio.
In an exemplary embodiment, if the signal-to-noise ratio is set to be related to the brightness of the image, a histogram corresponding to the current imaging frame, the long frame image or the short frame image is obtained, the histogram describes the number of pixels corresponding to the brightness of different pixels, and the signal-to-noise ratio corresponding to the current exposure ratio is calculated based on the histogram and the functional relationship between the signal-to-noise ratio and the brightness.
And acquiring a plurality of exposure ratios close to the current exposure ratio value to obtain a plurality of candidate exposure ratios.
For example, if the current exposure ratio value is x, all integers in the range of [ x-a, x+b ] are set as exposure ratios close to the current exposure ratio value, so as to obtain a plurality of candidate exposure ratios, and the values of a and b can be preset according to experience or can be set according to the number of candidate exposure ratios selected as required.
For example, if the current exposure ratio value is x, the selected candidate exposure ratio includes x-6, x-3, x-1, x+1, x+3, and x+6, where a specific formula for calculating the candidate exposure ratio may be flexibly set according to an actual application scenario, which is not limited in the present application.
In some embodiments, the number of the selected candidate exposure ratios may be preset, or may be calculated flexibly, for example, according to the signal-to-noise ratio corresponding to the current imaging frame, the number of the candidate exposure ratios to be selected is calculated, if the signal-to-noise ratio corresponding to the current imaging frame is higher, the number of the candidate exposure ratios is smaller, and if the signal-to-noise ratio corresponding to the current imaging frame is lower, the number of the candidate exposure ratios is larger, so that the exposure adjustment is performed rapidly on the premise of saving calculation resources.
And predicting the signal-to-noise ratio of the current imaging picture under each candidate exposure ratio to respectively obtain the signal-to-noise ratio corresponding to each candidate exposure ratio.
In an exemplary embodiment, if the current exposure ratio is currExpRa, because the brightest brightness of the long frame image is just 1/currExpRa of the brightest brightness of the short frame image, and the exposure time of the long frame image is currExpRa times of the exposure time of the short frame image, the maximum signal-to-noise ratio of the long frame image and the short frame image is consistent, so that the signal-to-noise ratio corresponding to the current exposure ratio can be obtained according to the signal-to-noise ratio corresponding to the current exposure ratio, and the signal-to-noise ratio corresponding to other exposure ratios can be obtained according to the association relationship between the brightnesses and the signal-to-noise ratios corresponding to different exposure ratios, so that the signal-to-noise ratio corresponding to each candidate exposure ratio can be estimated.
The signal-to-noise ratio under each candidate exposure ratio can be predicted by using a pre-trained neural network model, so as to obtain the signal-to-noise ratio corresponding to each candidate exposure ratio. The neural network model can be trained by using sample images, the sample images are composed of a plurality of sample pairs, one sample pair comprises a plurality of images shot from the same scene by adopting different exposure ratios, the images acquired under one exposure ratio in the sample pair are input into the pre-trained neural network model, the signal to noise ratio of the images acquired under other exposure ratios of the prediction input by the neural network model is adjusted according to the signal to noise ratio obtained by the prediction and the actual signal to noise ratio of the images, and the network parameters of the pre-trained neural network model are adjusted to obtain the neural network model which is finally trained.
Of course, other manners of predicting the signal-to-noise ratio of the current imaging frame at each candidate exposure ratio may be used, which is not limited by the present application.
Step S230, selecting the exposure ratio corresponding to the maximum signal-to-noise ratio from the signal-to-noise ratio corresponding to the current exposure ratio and the signal-to-noise ratio corresponding to each candidate exposure ratio, and obtaining the target exposure ratio.
By traversing the signal-to-noise ratio corresponding to each candidate exposure ratio, the exposure ratio corresponding to the maximum signal-to-noise ratio is directly selected as the target exposure ratio, so that the exposure adjustment can be rapidly performed, the new exposure ratio is selected with the aim of improving the signal-to-noise ratio, and the image quality of the acquired image is improved.
Step S240, carrying out subsequent image acquisition based on the target exposure ratio.
The method can be used for carrying out subsequent image acquisition by directly adopting the target exposure ratio, or can be used for gradually adjusting the exposure ratio of each image acquisition by taking the target exposure ratio as an adjustment direction.
Some embodiments for calculating the signal-to-noise ratio corresponding to each exposure ratio are described in detail below.
In some embodiments, a current exposure ratio and a luminance signal-to-noise ratio function corresponding to each candidate exposure ratio are obtained, the luminance signal-to-noise ratio function is used for describing signal-to-noise ratios corresponding to different pixel brightnesses, a short frame image or a long frame image corresponding to a current imaging picture is taken as a reference image, a histogram of the reference image is obtained, and a reference histogram is obtained and is used for describing the number of pixel points corresponding to different pixel brightnesses in the reference image.
Calculating the signal-to-noise ratio corresponding to the current imaging picture to obtain the signal-to-noise ratio corresponding to the current exposure ratio, wherein the signal-to-noise ratio comprises the steps of multiplying the brightness signal-to-noise ratio function corresponding to the current exposure ratio and the value corresponding to the brightness of each pixel of the reference histogram, and accumulating the products of the brightness of each pixel to obtain the signal-to-noise ratio corresponding to the current exposure ratio.
The signal-to-noise ratio of the current imaging picture under each candidate exposure ratio is predicted to respectively obtain the signal-to-noise ratio corresponding to each candidate exposure ratio, and the method comprises the steps of multiplying a brightness signal-to-noise ratio function corresponding to the candidate exposure ratio and a value corresponding to the brightness of each pixel of the reference histogram, and accumulating the products of the brightness of each pixel to obtain the signal-to-noise ratio corresponding to the candidate exposure ratio.
The brightness signal-to-noise ratio function can be obtained by analyzing and constructing a large number of images with different exposure ratios, or can be obtained by constructing functions with different exposure ratios according to the association relation between brightness and signal-to-noise ratio.
Taking the example of constructing the luminance signal-to-noise ratio function according to the association relationship between the luminance and the signal-to-noise ratio, the steps of constructing the luminance signal-to-noise ratio function are illustrated:
In some embodiments, the brightness signal-to-noise ratio function of the long frame image and the brightness signal-to-noise ratio function of the short frame image corresponding to each exposure ratio are constructed based on the proportion of the brightness of the image and the signal-to-noise ratio, so as to obtain the long frame signal-to-noise ratio function and the short frame signal-to-noise ratio function corresponding to each exposure ratio, wherein the product between the slope of the long frame signal-to-noise ratio function and the slope of the short frame signal-to-noise ratio function corresponding to any exposure ratio is equal to any exposure ratio.
Optionally, in order to facilitate calculation, the slope of the luminance signal-to-noise ratio function corresponding to the reference image is set to 1, and when the candidate exposure ratio is calculated, the exposure time of the reference image after the exposure ratio is modified is as unchanged as possible based on the reference image, that is, the slope of the luminance signal-to-noise ratio function corresponding to the reference image is kept to 1.
Taking the reference image as a short frame image as an example, the short frame signal-to-noise ratio function is specifically a positive proportion function with a slope of 1, the product between the slope of the long frame signal-to-noise ratio function corresponding to any exposure ratio and the slope of the short frame signal-to-noise ratio function is equal to any exposure ratio, and the long frame signal-to-noise ratio function is specifically a positive proportion function with the slope of the exposure ratio.
For example, taking the current exposure ratio equal to 4 as an example, referring to fig. 3, fig. 3 is a schematic diagram of a long frame signal-to-noise ratio function and a short frame signal-to-noise ratio function according to an exemplary embodiment of the present application, where the slope of the short frame signal-to-noise ratio function is 1, and the slope of the long frame signal-to-noise ratio function is the exposure ratio, that is, the slope of the long frame signal-to-noise ratio function is 4, as shown in fig. 3.
Then, dividing the image brightness range into a long frame range, a fusion range and a short frame range from small to large according to the long frame signal-to-noise ratio function and the short frame signal-to-noise ratio function corresponding to each exposure ratio respectively, fusing the long frame signal-to-noise ratio function and the short frame signal-to-noise ratio function in the fusion range to obtain a fusion function corresponding to the fusion range, and splicing the long frame signal-to-noise ratio function in the long frame range, the fusion function in the fusion range and the short frame signal-to-noise ratio function in the short frame range in sequence to obtain the brightness signal-to-noise ratio function corresponding to each exposure ratio respectively.
The method for fusing the long frame signal-to-noise ratio function and the short frame signal-to-noise ratio function in the fusion range comprises linear interpolation fusion, parabolic interpolation fusion and the like.
Illustratively, a preset luminance value range in the image luminance range corresponding to the long frame image is taken as a fusion range, a luminance range corresponding to a minimum luminance value smaller than the preset luminance value range is taken as a long frame range, and a luminance range corresponding to a maximum luminance value larger than the preset luminance value range is taken as a short frame range.
Of course, the fusion range, the long frame range, and the short frame range may be divided based on the image brightness range corresponding to the short frame image, which is not limited in the present application.
For example, taking the current exposure ratio equal to 4, the luminance value range of 75% to 98% corresponding to the long frame image as the fusion range, the luminance value range of less than 75% corresponding to the long frame image as the long frame range, and the luminance value range of more than 98% corresponding to the long frame image as the short frame range as an example, please refer to fig. 4, which is a schematic diagram of fusing the long frame signal-to-noise ratio function and the short frame signal-to-noise ratio function according to an exemplary embodiment of the present application, as shown in fig. 4, the image luminance range is divided into the long frame range, the fusion range and the short frame range in sequence from small to large, the long frame signal-to-noise ratio function and the short frame signal-to-noise ratio function in the fusion range are fused in a linear interpolation manner to obtain the fusion function corresponding to the fusion range, then, the long frame signal-to-noise ratio function in the long frame range is reserved, the short frame signal-to-noise ratio function in the short frame range is reserved, and finally the luminance signal-to noise ratio function corresponding to the current exposure ratio is obtained.
Similarly, the brightness signal-to-noise ratio function corresponding to each candidate exposure ratio can be obtained through the mode.
The above embodiment mentions that in order to facilitate calculation, when calculating the candidate exposure ratio, the exposure time of the reference image after the exposure ratio is modified is as constant as possible based on the reference image, but there is still a case where the shutter of the reference image is limited, resulting in a change in the exposure time of the reference image, for which normalization of the signal-to-noise ratio corresponding to the finally calculated exposure ratio is required, the specific steps include:
The method comprises the steps of responding to the change of the exposure time of a reference image corresponding to any candidate exposure ratio relative to the exposure time of a reference image corresponding to a current exposure ratio, calculating the ratio between the exposure time of the reference image corresponding to the candidate exposure ratio and the exposure time of the reference image corresponding to the current exposure ratio to obtain a signal to noise ratio exposure time coefficient, multiplying the brightness signal to noise ratio function corresponding to the candidate exposure ratio and the value corresponding to each pixel brightness of the reference histogram, accumulating the product of each pixel brightness to obtain the signal to noise ratio corresponding to the candidate exposure ratio, multiplying the brightness signal to noise ratio function corresponding to the candidate exposure ratio and the value corresponding to each pixel brightness of the reference histogram, accumulating the product of each pixel brightness to obtain an initial sum, and multiplying the initial sum and the signal to noise ratio exposure time coefficient to obtain the signal to noise ratio corresponding to the candidate exposure ratio.
For example, referring to fig. 5, fig. 5 is a schematic diagram showing a reference image exposure time change according to an exemplary embodiment of the present application, as shown in fig. 5, taking a short frame image as a reference image, a current exposure ratio of 4, and a candidate exposure ratio of 8 as examples, a luminance signal to noise ratio function (red curve) corresponding to the current exposure ratio of 4 and a luminance signal to noise ratio function (green curve) corresponding to the candidate exposure ratio of 8 as shown in fig. 5, if the upper limit of the exposure time is maxShut, and a value of maxShut is used herein as an example for 40ms, the exposure time of the short frame image is changed from 40/(4+1) =8 ms of 4 times the exposure ratio to 40/(8+1) =4.44 ms of 8 times the exposure ratio, and the exposure time of the short frame image is reduced by 44.5%.
Calculating the ratio of the exposure time of the reference image corresponding to the candidate exposure ratio to the exposure time of the reference image corresponding to the current exposure ratio to obtain a signal-to-noise ratio exposure time coefficient which is snrExpRa, namely calculating the ratio of 4.44ms of the 8-time exposure ratio to 8ms of the 4-time exposure ratio to obtain a signal-to-noise ratio exposure time coefficient snrExpRa which is 44.5%.
Then, the initial sum calculated by the 8-fold exposure ratio needs to be multiplied by an exposure time coefficient of 44.5%, so as to obtain a signal-to-noise ratio corresponding to the final 8-fold exposure ratio.
By calculating the exposure time coefficient in the mode, the signal to noise ratio under different exposure ratios can be normalized, so that the signal to noise ratios of different exposures are comparable.
It should be noted that, since the exposure involves gain and aperture, even if the short frame exposure time is reduced as shown in fig. 5, the distribution of the histogram of the short frame after the final exposure will not change because of the adjustment of the gain and aperture, and the strong correlation between the signal-to-noise ratio and the amount of incoming light will be explained again.
In summary, after the brightness signal-to-noise ratio function corresponding to each exposure ratio is obtained, the brightness signal-to-noise ratio function and the reference histogram are convolved, so that the signal-to-noise ratio corresponding to each exposure ratio is obtained.
Referring to fig. 6, fig. 6 is a schematic diagram of calculating a signal-to-noise ratio according to an exemplary embodiment of the present application, as shown in fig. 6, a luminance signal-to-noise ratio function (red curve) and a reference histogram (blue curve) corresponding to an exposure ratio to be calculated (e.g., a current exposure ratio, each candidate exposure ratio, etc.) are mapped into a coordinate system, wherein an abscissa of the coordinate system represents luminance, an ordinate represents a signal-to-noise ratio, and convolution calculation is directly performed on the luminance signal-to-noise ratio function and the reference histogram in the coordinate system, and a sum of the calculated signal-to-noise ratios is taken as a signal-to-noise ratio corresponding to the exposure ratio to be calculated.
Specifically, the luminance signal-to-noise ratio function and the value corresponding to the luminance of each pixel of the reference histogram are multiplied, then the product of the luminance of each pixel is accumulated, and the accumulated result is used as the signal-to-noise ratio corresponding to the exposure ratio to be calculated.
By the method, the signal-to-noise ratio corresponding to each exposure ratio is calculated, parameters such as gain used for image acquisition are not needed to be concerned, only the light quantity of the image needs to be considered, the algorithm is simple, and the signal-to-noise ratio can be calculated rapidly.
And then, selecting the exposure ratio corresponding to the maximum signal-to-noise ratio from the signal-to-noise ratio corresponding to the current exposure ratio and the signal-to-noise ratio corresponding to each candidate exposure ratio, and obtaining the target exposure ratio.
For example, referring to fig. 7, fig. 7 is a schematic diagram of signal-to-noise ratios corresponding to each exposure ratio according to an exemplary embodiment of the present application, as shown in fig. 7, the signal-to-noise ratio corresponding to each exposure ratio is calculated in the current scene, and the exposure ratio corresponding to the maximum signal-to-noise ratio is selected to be 10, and then 10 is taken as the target exposure ratio.
It should be noted that, fig. 7 is only a schematic illustration, and the numerical variation curves of the signal to noise ratios corresponding to the respective exposure ratios in other scenes are other expressions, and the exposure ratio corresponding to the selected maximum signal to noise ratio may also be other numerical values, for example, the selected maximum exposure ratio is 4,6, etc.
Next, some embodiments of exposure adjustment will be described.
In some embodiments, the target exposure ratio is directly employed for subsequent image acquisition.
In some embodiments, an exposure ratio value is selected from a value interval from a current exposure ratio to a target exposure ratio to obtain a gradient adjustment value, subsequent image acquisition is performed based on the gradient adjustment value, a new target exposure ratio corresponding to an imaging picture obtained by gradient adjustment value acquisition is calculated, subsequent image acquisition is performed based on the new target exposure ratio corresponding to the gradient adjustment value until the calculated new target exposure ratio is equal to the gradient adjustment value used for image acquisition, and exposure adjustment is completed.
For example, if the current exposure ratio is 4 and the currently calculated target exposure ratio is 10, selecting an exposure ratio value from a value interval from the current exposure ratio to the target exposure ratio to obtain gradient adjustment values including 6, 8 and 10, performing subsequent image acquisition by using the gradient adjustment value 6, and repeating the steps according to an imaging picture acquired by the gradient adjustment value 6 to obtain a new target exposure ratio.
And repeating the steps until the calculated new target exposure ratio is equal to the gradient adjustment value used for image acquisition, and completing exposure adjustment. For example, when the gradient adjustment value 10 is adopted to perform subsequent image acquisition and the new target exposure ratio is still 10 after repeating the steps according to the imaging picture acquired by the gradient adjustment value 10, the optimal exposure ratio is obtained to finish exposure adjustment, or when the gradient adjustment value 8 is adopted to perform subsequent image acquisition and the new target exposure ratio is still 8 after repeating the steps according to the imaging picture acquired by the gradient adjustment value 8, the optimal exposure ratio is obtained to finish exposure adjustment.
The target exposure ratio is calculated while adjusting, so that the more accurate optimal exposure ratio can be obtained.
In some embodiments, the number of gradient adjustment values is a plurality, if the new target exposure ratios calculated by accumulating the preset number of gradient adjustment values are the same, the new target exposure ratio corresponding to the preset number of gradient adjustment values is used as a final adjustment value, and the final adjustment value is adopted to perform subsequent image acquisition.
For example, if the new target exposure ratios obtained by calculating the continuous 3 gradient adjustment values are all 10, the final adjustment value of the exposure ratio is directly determined to be 10, and the final adjustment value 10 is adopted to perform subsequent image acquisition, so that the exposure adjustment speed is increased.
Optionally, after the final adjustment value is adjusted, performing subsequent image acquisition again according to the final adjustment value, repeating the steps according to the imaging picture acquired by the final adjustment value to obtain a new target exposure ratio, verifying again whether the new target exposure ratio is equal to the final adjustment value, if so, indicating that the final adjustment value is the optimal exposure ratio, and finishing exposure adjustment, otherwise, repeating the steps.
The exposure adjustment method provided by the application comprises the steps of acquiring a current imaging picture by adopting a current exposure ratio, synthesizing the current imaging picture by a long frame image and a short frame image, calculating a signal-to-noise ratio corresponding to the current imaging picture to obtain the signal-to-noise ratio corresponding to the current exposure ratio, acquiring a plurality of exposure ratios close to the current exposure ratio value to obtain a plurality of candidate exposure ratios, predicting the signal-to-noise ratio of the current imaging picture under each candidate exposure ratio to respectively obtain the signal-to-noise ratio corresponding to each candidate exposure ratio, selecting the exposure ratio corresponding to the maximum signal-to-noise ratio from the signal-to-noise ratio corresponding to the current exposure ratio and the signal-to-noise ratio corresponding to each candidate exposure ratio to obtain a target exposure ratio, carrying out subsequent image acquisition based on the target exposure ratio, and carrying out final exposure ratio selection by traversing the signal-to-noise ratios corresponding to various exposure ratios, so that local optimal solution is not easy to enter, and the exposure adjustment is carried out quickly, and the signal-to-noise ratio of the adjusted imaging picture is improved.
Fig. 8 is a block diagram of an exposure adjustment apparatus shown in an exemplary embodiment of the present application. As shown in fig. 8, the exemplary exposure adjustment apparatus 800 includes:
the current frame acquisition module 810 is configured to acquire a current imaging frame by using a current exposure ratio, where the current imaging frame is synthesized by a long frame image and a short frame image, and the current exposure ratio is a ratio between a maximum brightness of the long frame image and a maximum brightness of the short frame image;
The signal-to-noise ratio calculation module 820 is used for calculating the signal-to-noise ratio corresponding to the current imaging picture to obtain the signal-to-noise ratio corresponding to the current exposure ratio, and obtaining a plurality of exposure ratios close to the current exposure ratio value to obtain a plurality of candidate exposure ratios, and predicting the signal-to-noise ratio of the current imaging picture under each candidate exposure ratio to respectively obtain the signal-to-noise ratio corresponding to each candidate exposure ratio;
The exposure ratio selecting module 830 is configured to select an exposure ratio corresponding to a maximum signal-to-noise ratio from a signal-to-noise ratio corresponding to a current exposure ratio and a signal-to-noise ratio corresponding to each candidate exposure ratio, to obtain a target exposure ratio;
The exposure ratio adjustment module 840 is configured to perform subsequent image acquisition based on the target exposure ratio.
It should be noted that, the exposure adjustment device provided in the above embodiment and the exposure adjustment method provided in the above embodiment belong to the same concept, and the specific manner in which each module and unit perform the operation has been described in detail in the method embodiment, which is not described herein. In practical application, the exposure adjusting device provided in the above embodiment may distribute the functions to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above, which is not limited herein.
Referring to fig. 9, fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the application. The electronic device 900 comprises a memory 901 and a processor 902, the processor 902 being adapted to execute program instructions stored in the memory 901 for implementing the steps of any of the above-described embodiments of the exposure adjustment method. In a specific implementation scenario, electronic device 900 may include, but is not limited to, a microcomputer, a server, and further, electronic device 900 may also include a mobile device such as a notebook computer, a tablet computer, etc., without limitation.
Specifically, the processor 902 is configured to control itself and the memory 901 to implement the steps in any of the above-described exposure adjustment method embodiments. The processor 902 may also be referred to as a central processing unit (Central Processing Unit, CPU). The processor 902 may be an integrated circuit chip having signal processing capabilities. The Processor 902 may also be a general purpose Processor, a digital signal Processor (DIGITAL SIGNAL Processor, DSP), an Application SPECIFIC INTEGRATED Circuit (ASIC), a Field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, the processor 902 may be commonly implemented by an integrated circuit chip.
Referring to fig. 10, fig. 10 is a schematic structural diagram of an embodiment of a computer readable storage medium according to the present application. The computer readable storage medium 1000 stores program instructions 1010 that can be executed by a processor, the program instructions 1010 being for implementing the steps in any of the above-described exposure adjustment method embodiments.
In some embodiments, functions or modules included in an apparatus provided by the embodiments of the present disclosure may be used to perform a method described in the foregoing method embodiments, and specific implementations thereof may refer to descriptions of the foregoing method embodiments, which are not repeated herein for brevity.
The foregoing description of various embodiments is intended to highlight differences between the various embodiments, which may be the same or similar to each other by reference, and is not repeated herein for the sake of brevity.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical functional division, and there may be additional divisions of actual implementation, e.g., units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical, or other forms.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units. The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the methods of the embodiments of the present application. The storage medium includes a U disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, an optical disk, or other various media capable of storing program codes.

Claims (10)

CN202510171404.5A2025-02-172025-02-17 Exposure adjustment method, device and storage mediumActiveCN119676572B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202510171404.5ACN119676572B (en)2025-02-172025-02-17 Exposure adjustment method, device and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202510171404.5ACN119676572B (en)2025-02-172025-02-17 Exposure adjustment method, device and storage medium

Publications (2)

Publication NumberPublication Date
CN119676572A CN119676572A (en)2025-03-21
CN119676572Btrue CN119676572B (en)2025-05-09

Family

ID=94983909

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202510171404.5AActiveCN119676572B (en)2025-02-172025-02-17 Exposure adjustment method, device and storage medium

Country Status (1)

CountryLink
CN (1)CN119676572B (en)

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JP4630730B2 (en)*2005-05-272011-02-09キヤノン株式会社 Imaging apparatus, camera, and imaging method
WO2007017835A2 (en)*2005-08-082007-02-15Joseph RubnerAdaptive exposure control
US20090059039A1 (en)*2007-08-312009-03-05Micron Technology, Inc.Method and apparatus for combining multi-exposure image data
JP2011254125A (en)*2010-05-312011-12-15Sony CorpImage processing device, camera system, image processing method, and program
CN109218628B (en)*2018-09-202020-12-08Oppo广东移动通信有限公司 Image processing method, device, electronic device and storage medium
CN111709896B (en)*2020-06-182023-04-07三星电子(中国)研发中心Method and equipment for mapping LDR video into HDR video
CN113905194B (en)*2021-08-312024-05-10浙江大华技术股份有限公司Exposure ratio processing method, terminal equipment and computer storage medium
CN118175429A (en)*2022-12-052024-06-11浙江宇视科技有限公司Method, device, equipment and medium for improving image quality of human-vehicle mixed scene
KR102824229B1 (en)*2023-03-032025-06-25베리실리콘 마이크로일렉트로닉스 (상하이) 컴퍼니 리미티드 High dynamic range image denoising method and device
CN116567432A (en)*2023-05-242023-08-08维沃移动通信有限公司 Shooting method and electronic equipment
CN118158538B (en)*2024-05-092024-08-02杭州海康威视数字技术股份有限公司Wide dynamic automatic exposure control method and image acquisition equipment

Also Published As

Publication numberPublication date
CN119676572A (en)2025-03-21

Similar Documents

PublicationPublication DateTitle
Xu et al.Real-world noisy image denoising: A new benchmark
CN110248108B (en)Exposure adjustment and dynamic range determination method under wide dynamic state and related device
CN108174118B (en)Image processing method and device and electronic equipment
EP3046320B1 (en)Method for generating an hdr image of a scene based on a tradeoff between brightness distribution and motion
US8554011B2 (en)Automatic exposure correction of images
TWI697867B (en)Metering compensation method and related monitoring camera apparatus
CN111225162B (en)Image exposure control method, system, readable storage medium and camera equipment
CN114429476B (en) Image processing method, device, computer equipment and storage medium
CN110809146A (en)Image contrast adjusting method and device, terminal equipment and storage medium
CN112738411B (en)Exposure adjusting method, exposure adjusting device, electronic equipment and storage medium
Guthier et al.Flicker reduction in tone mapped high dynamic range video
Jiang et al.Blind quality evaluator of tone-mapped HDR and multi-exposure fused images for electronic display
CN115984570A (en)Video denoising method and device, storage medium and electronic device
Ma et al.Joint over and under exposures correction by aggregated retinex propagation for image enhancement
CN114494044A (en)Attention mechanism-based image enhancement method and system and related equipment
CN119091379A (en) A machine vision unit for smart community security management system
CN119676572B (en) Exposure adjustment method, device and storage medium
CN113891081A (en)Video processing method, device and equipment
CN115103129B (en) Method, device, electronic device and computer storage medium for determining shooting parameters
CN114283092A (en) Image processing method, device, camera module and device
Wang et al.A novel deghosting method for exposure fusion
Neelima et al.Performance Evaluation of Clustering Based Tone Mapping Operators with State-of-Art Methods
CN119697511B (en) White balance adjustment method, device and storage medium based on motion judgment
CN119919617B (en) A dynamic image acquisition method for scene time-space-frequency complementarity
CN116647760B (en)Wide dynamic implementation method, device, camera and storage medium for target detection

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp