A dark current calibration method, system and device based on a characterization model
Through the method based on the feature model, the relationship between dark current and exposure time and temperature is established, and the problems of dark current fluctuations and inaccurate correction in the prior art are solved, thereby achieving higher image quality and correction accuracy.
Patent Information
- Application Number
- CN202411916581.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-04
AI Technical Summary
When processing dark currents, the prior art causes dark current fluctuations due to factors such as temperature, exposure time and brightness gain. Single mean correction cannot reflect the real dark current of the sensor, reducing the accuracy of the correction results.
Using a method based on the feature model, a calibration image of the exposure time interval is obtained by covering the camera lens, recording the shooting temperature, fitting the relationship between the exposure time and the temperature mean and the dark current correction value, and establishing a dark current characteristic model.
The dark current value is predicted through the characteristic model, the image quality is improved, the accuracy of dark current correction is enhanced, and the noise impact is reduced.
Smart Images

Figure CN119762601A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a dark current calibration method, system and device based on a characterization model. Background Art
[0002] Dark current, also known as unilluminated current, refers to the current flowing in the light-receiving element in the absence of light. When the sensor converts the analog signal to a digital signal, it cannot distinguish a very small part of the voltage value due to the limitation of conversion accuracy, so a value needs to be added to ensure the dark details of the image. In addition, there must be current noise interference when the sensor works. In this way, even in a completely dark environment, the sensor output still has signal strength, which must not be zero after quantization. The conventional processing method is to simply count the mean grayscale of pixels in a dark environment and subtract this mean as the dark current. However, directly subtracting a single statistical mean may cause changes in the ratio between channels, resulting in large errors in the subsequent image processing results.
[0003] Affected by factors such as temperature, exposure time, and light gain, the dark current will fluctuate. The single mean value based on dark scene statistics cannot reflect the true dark current of the sensor. Using this mean value as the dark current for correction will inevitably reduce the accuracy of the correction result, making the results of subsequent image processing unreliable. Summary of the invention
[0004] In order to solve the above technical problems, the present application provides a dark current calibration method, system and device based on a characterization model, which are used to predict the dark current value and improve the image quality.
[0005] The technical solution provided in this application is described below:
[0006] The first aspect of the present application provides a dark current calibration method based on a characterization model, comprising:
[0007] Cover the camera lens and obtain the exposure time interval;
[0008] Obtaining a minimum exposure time value in the exposure time interval, setting the minimum exposure time value as the exposure time, continuously shooting a preset number of calibration images, and recording a shooting temperature corresponding to when shooting the calibration images;
[0009] Increasing the exposure time according to a preset density, taking a preset number of calibration images and corresponding shooting temperatures each time the exposure time is increased, until obtaining a calibration image and a corresponding shooting temperature corresponding to a maximum exposure time in the exposure time interval;
[0010] Calculate the dark current correction value of each set of calibration images one by one;
[0011] Calculate the average value of the shooting temperature corresponding to each group of calibration images one by one to obtain the temperature average;
[0012] The temperature mean and dark current correction values corresponding to all exposure times are fitted to obtain a dark current characterization model.
[0013] Optionally, after fitting the dark current characterization model through the temperature mean values and dark current correction values corresponding to all exposure times, the method further includes:
[0014] Get the bright field image of the current environment and record the current exposure time and current shooting temperature;
[0015] Inputting the current exposure time and the current shooting temperature into the dark current characterization model to obtain an exposure time offset and a shooting temperature offset respectively;
[0016] Calculating the exposure time weight and the shooting temperature weight corresponding to the exposure time offset and the shooting temperature offset;
[0017] Performing weighted calculation on the dark current correction value according to the exposure time weight and the shooting temperature weight to obtain a target dark current correction value corresponding to the bright field image;
[0018] Dark current correction is performed on the bright field image using the target dark current correction value.
[0019] Optionally, the inputting the current exposure time and the current shooting temperature into the dark current characterization model to obtain an exposure time offset and a shooting temperature offset respectively includes:
[0020] Obtaining the actual point position on the dark current characterization model corresponding to the current exposure time and the current shooting temperature;
[0021] Get the coordinate difference between the actual point and the exposure time to get the exposure time offset
[0022] The coordinate difference between the actual point and the temperature mean is obtained to obtain the shooting temperature offset.
[0023] Optionally, the calculating the exposure time weight and the shooting temperature weight corresponding to the exposure time offset and the shooting temperature offset includes:
[0024] The exposure time weight and the shooting temperature weight are calculated by the following formula:
[0025]
[0026]
[0027] Among them, Δx is the exposure time offset, and Δy is the shooting temperature offset.
[0028] Optionally, performing weighted calculation on the dark current correction value according to the exposure time weight and the shooting temperature weight to obtain a target dark current correction value corresponding to the bright field image includes:
[0029] The dark current correction value is weighted and calculated according to the exposure time weight and the shooting temperature weight by the following formula:
[0030] OB = exposure time weight * OB t_c + Shooting temperature weight *OB T_c ;
[0031] Where OB is the target dark current correction value, OB t_c is the dark current correction value corresponding to the current exposure time in the dark current characterization model, OB T_c is the dark current correction value corresponding to the current shooting temperature in the dark current characterization model.
[0032] Optionally, calculating the dark current correction value of each group of calibration images one by one includes:
[0033] Perform multi-frame averaging processing on the calibration images obtained at each exposure time one by one to obtain the target image;
[0034] The mean value of the average image of the target image is calculated to obtain a dark current correction value.
[0035] Optionally, fitting the temperature mean values and dark current correction values corresponding to all exposure times to obtain a dark current characterization model includes:
[0036] The exposure time and the corresponding temperature mean are used as independent variables, the dark current correction value is used as a dependent variable, and a dark current characterization model is fitted by the least squares method, so that the dark current of the image sensor is calibrated by the dark current characterization model.
[0037] The second aspect of the present application provides a dark current calibration system based on a characterization model, comprising:
[0038] A first acquisition unit, used to cover the camera lens and acquire an exposure time interval;
[0039] a second acquisition unit, configured to acquire a minimum exposure time value in the exposure time interval, set the minimum exposure time value as the exposure time, continuously shoot a preset number of calibration images, and record a shooting temperature corresponding to when shooting the calibration images;
[0040] A third acquisition unit is used to increase the exposure time according to a preset density, and to capture a preset number of calibration images and corresponding shooting temperatures each time the exposure time is increased, until the calibration image and the corresponding shooting temperature corresponding to the maximum exposure time in the exposure time interval are obtained;
[0041] A first calculation unit, used for calculating the dark current correction value of each group of calibration images one by one;
[0042] The second calculation unit is used to calculate the average value of the shooting temperature corresponding to each group of calibration images one by one to obtain the temperature average value;
[0043] The fitting unit is used to fit the temperature mean and dark current correction value corresponding to all exposure times to obtain a dark current characterization model.
[0044] Optionally, the system further includes:
[0045] A fourth acquisition unit is used to acquire a bright field image of the current environment and record the current exposure time and the current shooting temperature;
[0046] An input unit, used for inputting the current exposure time and the current shooting temperature into the dark current characterization model to obtain an exposure time offset and a shooting temperature offset respectively;
[0047] A third calculation unit, used to calculate the exposure time weight and the shooting temperature weight corresponding to the exposure time offset and the shooting temperature offset;
[0048] a fourth calculation unit, configured to perform weighted calculation on the dark current correction value according to the exposure time weight and the shooting temperature weight to obtain a target dark current correction value corresponding to the bright field image;
[0049] A correction unit is used to perform dark current correction on the bright field image by using the target dark current correction value.
[0050] Optionally, the input unit is specifically used for:
[0051] Obtaining the actual point position on the dark current characterization model corresponding to the current exposure time and the current shooting temperature;
[0052] The coordinate difference between the actual point and the exposure time is obtained to obtain the exposure time offset. The coordinate difference between the actual point and the temperature mean is obtained to obtain the shooting temperature offset.
[0053] Optionally, the third computing unit is specifically used for:
[0054] The exposure time weight and the shooting temperature weight are calculated by the following formula:
[0055]
[0056]
[0057] Among them, Δx is the exposure time offset, and Δy is the shooting temperature offset.
[0058] Optionally, the fourth computing unit is specifically configured to:
[0059] The dark current correction value is weighted and calculated according to the exposure time weight and the shooting temperature weight by the following formula:
[0060] OB = exposure time weight * OB t_c + Shooting temperature weight * OB T_c ;
[0061] Where OB is the target dark current correction value, OB t_c is the dark current correction value corresponding to the current exposure time in the dark current characterization model, OB T_c is the dark current correction value corresponding to the current shooting temperature in the dark current characterization model.
[0062] Optionally, the first computing unit is specifically configured to:
[0063] Perform multi-frame averaging processing on the calibration images obtained at each exposure time one by one to obtain the target image;
[0064] The mean value of the average image of the target image is calculated to obtain a dark current correction value.
[0065] Optionally, the fitting unit is specifically used for:
[0066] The exposure time and the corresponding temperature mean are used as independent variables, the dark current correction value is used as a dependent variable, and a dark current characterization model is fitted by the least squares method, so that the dark current of the image sensor is calibrated by the dark current characterization model.
[0067] The third aspect of the present application provides a dark current calibration system based on a characterization model, the device comprising:
[0068] Processor, memory, input-output unit, and bus;
[0069] The processor is connected to the memory, the input and output unit, and the bus;
[0070] The memory stores a program, and the processor calls the program to execute the first aspect and any optional method in the first aspect.
[0071] A fourth aspect of the present application provides a computer-readable storage medium, on which a program is stored. When the program is executed on a computer, the program executes the first aspect and any optional method in the first aspect.
[0072] It can be seen from the above technical solutions that this application has the following advantages:
[0073] A calibration image for a lightless environment is established by covering the camera, and the shooting temperature and exposure time of the calibration image are recorded. By analyzing the calibration image, a corresponding relationship between the dark current-related data in the calibration image and the exposure time and shooting temperature of the camera is established, so that when the bright field image is analyzed later, the dark current correction of the bright field image can be performed more accurately. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] In order to more clearly illustrate the technical solution in the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0075] Figure 1 A schematic diagram of an embodiment of a dark current calibration method based on a characterization model in the present application;
[0076] Figure 2 It is a flowchart of another embodiment of the dark current calibration method based on the characterization model in the present application;
[0077] Figure 3 A schematic diagram of the structure of an embodiment of a dark current calibration system based on a characterization model in the present application;
[0078] Figure 4 It is a structural schematic diagram of another embodiment of a dark current calibration system based on a characterization model in the present application;
[0079] Figure 5 It is a structural schematic diagram of another embodiment of a dark current calibration device based on a characterization model in the present application;
[0080] Figure 6 This is a schematic diagram of a dark current characterization model based on shooting temperature and exposure time in this application;
[0081] Figure 7 Schematic diagram of dark current correction based on the dark current characterization model in this application. DETAILED DESCRIPTION
[0082] It should be noted that the dark current calibration method based on the characterization model provided in this application can be applied to a terminal, a system, or a server. For example, the terminal can be a smart phone or a computer, a tablet computer, a smart TV, a smart watch, a portable computer terminal, or a fixed terminal such as a desktop computer. For the convenience of explanation, this application uses the terminal as an example for explanation.
[0083] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0084] See also Figure 1 The present application first provides an embodiment of a dark current calibration method based on a characterization model, the embodiment comprising:
[0085] S101, covering the camera lens and obtaining an exposure time interval;
[0086] Cover the camera lens and set different exposure times t. The exposure time interval is t∈[t_min,t_max], and the exposure time is within the exposure interval.
[0087] Specifically, in a completely dark environment (i.e., with the camera covered), different exposure conditions are set and a series of images are taken. At this time, the signals captured in the images mainly come from dark current rather than light, so these images will contain pixel values generated by dark current. By analyzing the images obtained under each exposure condition taken when the camera is covered, the dark current pixel value of the current camera can be calculated through image analysis.
[0088] S102, obtaining a minimum exposure time value in an exposure time interval, setting the minimum exposure time value as the exposure time, continuously shooting a preset number of calibration images, and recording a shooting temperature corresponding to shooting the calibration images;
[0089] The calibration image is the image obtained by covering the camera lens.
[0090] The preset density is used to divide the total time length included in the exposure time interval into equal parts of the same exposure time length, wherein the length of the exposure time corresponding to each part = preset density / t_max-t_min.
[0091] The preset number of calibration images is a preset value set externally. After the camera is set to the corresponding exposure time, it will obtain the corresponding number of images under the current exposure time to determine the dark current pixels through multiple images, thereby improving the accuracy of obtaining dark current information from the calibration image.
[0092] After obtaining a calibration image corresponding to an exposure time, the terminal also records the current temperature corresponding to the calibrated image, and all images in the calibration image obtained by the terminal have the corresponding ambient temperature when they were shot.
[0093] Specifically, the increase in shooting temperature makes the electrons in the valence band more active, and more electrons are excited to the conduction band, resulting in a significant increase in dark current. This relationship is usually exponential, that is, the dark current will increase by a multiple for every certain increase in temperature. At low temperatures, the dark current is mainly dominated by diffusion current and the generation of recombination current, while at high temperatures, diffusion current becomes the main dark current mechanism. As the temperature increases, the dominant mechanism of the dark current changes, which affects the performance of the detector. The increase in temperature not only increases the absolute value of the dark current, but also causes an increase in the uncertainty (shot noise) of the dark current. This is because the volatility of the dark current is proportional to its average value. The larger the dark current, the greater the noise.
[0094] S103, increasing the exposure time according to a preset density, and taking a preset number of calibration images and corresponding shooting temperatures each time the exposure time is increased, until obtaining a calibration image and a corresponding shooting temperature corresponding to a maximum exposure time in the exposure time interval;
[0095] The preset time density is used to evenly divide t∈[t_min,t_max]. Specifically, the preset time density is represented by tx. In step S102, the terminal has acquired a preset number of calibration images when the exposure time is equal to t_min. Next, the terminal will acquire calibration images at different exposure times one by one according to the preset density tx and the preset number, specifically acquiring calibration images taken when the exposure time is equal to t_min+tx, until t_min+tx=t_max, that is, after the calibration image of t_max is acquired, the acquisition of the calibration image is completed.
[0096] When all calibration images are stored in the same collection, the calibration images are grouped according to the exposure time. When the terminal needs to perform subsequent processing on the calibration images, it will obtain images with the same exposure time one by one for analysis.
[0097] S104, calculating the dark current correction value of each group of calibration images one by one;
[0098] Specifically, the process of obtaining the dark current correction value is as follows:
[0099] Obtain calibration images by covering the camera to collect black frames; calculate the average value of all pixel values in each black frame, which represents the impact of dark current on the image sensor under the exposure time and ISO value. That is, after obtaining a preset number of calibration images through the above steps, the terminal can analyze the dark current correction value of the corresponding exposure time and the corresponding exposure time under the shooting temperature through the calibration images.
[0100] S105, calculating the average of the shooting temperatures corresponding to each group of calibration images one by one to obtain the temperature average;
[0101] Specifically, in a preset number of calibration images corresponding to an exposure time, each image records the corresponding shooting temperature, and in actual situations, calibration images corresponding to the same exposure time are acquired quickly. Therefore, a preset number of calibration images corresponding to an exposure time are used to take the average of the shooting temperatures corresponding to this group of calibration images for the shooting temperature corresponding to the exposure time, that is, the temperature mean.
[0102] S106 , fitting the temperature mean values and dark current correction values corresponding to all exposure times to obtain a dark current characterization model.
[0103] See also Figure 6 , Figure 6 The figure is a schematic diagram of a dark current characterization model based on shooting temperature and exposure time, wherein the x-axis is the exposure time, the y-axis is the temperature, and the curve is the corresponding dark current characterization curve. After obtaining the calibration image corresponding to the exposure time and the shooting temperature corresponding to the calibration image, the terminal will establish a coordinate system for representing the dark current correction value with the exposure time as the x-axis and the shooting temperature as the y-axis, and fit these discrete points through the least squares method to obtain the dark current characterization model of the current sensor, wherein the curve is the dark current characterization curve obtained by fitting the dark current correction value corresponding to the exposure time as the x-axis and the shooting temperature as the y-axis.
[0104] It should be noted that the exposure time and the shooting temperature are monotonically related to the dark current value, so the monotonic relationship of the model result obtained by fitting the two by superimposing them in this application will not change. In actual situations, the fitting verification process is completed in Matlab or other software. The choice of fitting software is not specifically limited here. The choice of fitting formula is related to the sensor actually used for image acquisition. The formula actually used for fitting will change according to the change of the sensor. For the judgment of the fitting result, when the discrete point fitting is performed according to the least squares method, the smaller the distance value between the fitting result and the original discrete point, the better the fitting result. Therefore, when the dark current value fitting model is fitted to the same calibration image through multiple software, the optimal dark current characterization model will be determined based on the distance value between the fitting result and the original discrete point.
[0105] This embodiment establishes a calibration image for a lightless environment by covering the camera, and records the shooting temperature and exposure time of the calibration image. By analyzing the calibration image, a correspondence between the dark current-related data in the calibration image and the exposure time and shooting temperature of the camera is established, so that when the bright field image is subsequently analyzed, the dark current correction of the bright field image can be more accurately performed.
[0106] See also Figure 2 The present application embodiment provides another embodiment of a dark current calibration method based on a characterization model, the embodiment comprising:
[0107] S201, covering the camera lens and obtaining an exposure time interval;
[0108] S202, obtaining a minimum exposure time value in an exposure time interval, setting the minimum exposure time value as the exposure time, continuously shooting a preset number of calibration images, and recording a shooting temperature corresponding to shooting the calibration images;
[0109] S203, increasing the exposure time according to a preset density, and taking a preset number of calibration images and corresponding shooting temperatures each time the exposure time is increased, until obtaining a calibration image and a corresponding shooting temperature corresponding to a maximum exposure time in the exposure time interval;
[0110] Steps S201 to S203 in this embodiment are similar to steps S101 to S103 in the aforementioned embodiment, and will not be described in detail here.
[0111] S204, performing multi-frame averaging processing on the calibration images obtained at each exposure time one by one to obtain a target image;
[0112] Specifically, the multi-frame averaging process is as follows:
[0113] Align the calibration images; perform pixel-by-pixel average calculation on the corresponding pixels of each frame of the image, specifically, add the pixel values of each image, divide the sum by the number of image frames, and obtain the average value of each pixel; use the calculated average pixel value to generate a new image, which is called an average image, which represents the average effect of the signal captured in multiple frames of images; perform post-processing on the generated average image, such as contrast enhancement, sharpening, etc., to further improve the image quality and obtain the target image.
[0114] S205 , calculating the mean value of the average image of the target image to obtain a dark current correction value.
[0115] Specifically, the method for calculating the dark current correction value by the image mean of the target image is as follows:
[0116]
[0117] Where M is the number of rows in the image, N is the number of columns in the image and is the average pixel value at position (i, j) in the image.
[0118] S206, calculating the average of the shooting temperatures corresponding to each group of calibration images one by one to obtain the temperature average;
[0119] Step S206 in this embodiment is similar to step S105 in the above embodiment, and will not be described in detail here.
[0120] S207, taking the exposure time and the corresponding temperature mean as independent variables and the dark current correction value as the dependent variable, fitting a dark current characterization model by the least square method, so as to calibrate the dark current of the image sensor by the dark current characterization model.
[0121] In the above steps, the fixed data carried by the calibration image are exposure time and shooting temperature, and these two data have actual influence on the dark current correction value. Therefore, the establishment of the dark current characterization model is actually to determine the relationship between exposure time and shooting temperature and dark current.
[0122] Specifically, the process of establishing the dark current characterization model is as follows:
[0123] The data for determining the calibration image include exposure time (t), shooting temperature (T) and the corresponding dark current correction value (I dark ); wherein the fitting process is to use the least squares method to fit the discrete points formed on the image by the exposure time and shooting temperature carried by the calibration image and its corresponding dark current correction value to obtain a dark current characterization curve. The relationship between the dark current characterization curve and the exposure time and shooting temperature is the dark current characterization model.
[0124] S208, obtaining a bright field image of the current environment, and recording the current exposure time and the current shooting temperature;
[0125] After the dark current characterization model is determined through the above steps, dark current correction is performed on the normal image (bright field image) acquired under this environment, so it is necessary to acquire a bright field image.
[0126] The bright field image is an image taken after removing the lens cover. In this embodiment, the bright field image is usually used to photograph objects with detection. Therefore, in the acquisition environment of the bright field image, except for the temperature and exposure interval, other shooting parameters will not change.
[0127] S209, obtaining the actual point position on the dark current characterization model corresponding to the current exposure time and the current shooting temperature;
[0128] The terminal obtains the exposure time and shooting temperature corresponding to the bright field image when shooting, that is, the current exposure time and the current shooting temperature. Because the x-axis and y-axis of the dark current characterization curve are the exposure time and the shooting temperature, respectively, an actual point can be determined in the dark current characterization model through the current exposure time and the current shooting temperature.
[0129] S210, obtaining the coordinate difference between the actual point and the exposure time, and obtaining the exposure time offset;
[0130] After determining the actual point, the terminal will calculate the coordinate difference between the actual point and the exposure time and shooting temperature corresponding to the dark current characterization model according to the distance between the actual point and the corresponding curve of the dark current characterization model.
[0131] The difference between the current exposure time and the exposure time is the exposure time offset.
[0132] Specifically, the coordinates of the actual point are expressed as (t, T), so the current exposure time corresponding to the actual point is t, and at the same shooting temperature, the exposure time corresponding to the dark current characterization model is t_c, and when the exposure time offset is Δx, Δx = |t-t_c|. The purpose of taking the absolute value is to facilitate the subsequent weight calculation.
[0133] S211, obtaining the coordinate difference between the actual point and the temperature mean, and obtaining the shooting temperature offset.
[0134] Similar to step S210, the coordinates of the actual point are expressed as (t, T), so the current shooting temperature corresponding to the actual point is T, and under the same exposure time, the shooting temperature corresponding to the dark current characterization model is T_c, and when the shooting temperature offset is Δy, that is, Δy = |T-T_c|.
[0135] S212, the exposure time weight and the shooting temperature weight are calculated by the following formula:
[0136]
[0137]
[0138] Among them, Δx is the exposure time offset, and Δy is the shooting temperature offset.
[0139] Please refer to Figure 7 , Figure 7 Schematic diagram of dark current correction based on the dark current characterization model, where the test point is the actual point, t_c is the exposure time of the bright field image, and T_c is the shooting temperature of the bright field image.
[0140] Specifically, the above two formulas are used to obtain the exposure time weight and the shooting temperature weight, respectively, where the exposure time weight is the ratio of Δx to the sum of Δx and Δy, and the shooting temperature weight is the ratio of Δy to the sum of Δx and Δy, which is used to indicate the contribution of the deviations generated by the exposure time and the shooting temperature to the total deviation. In general, the weight ranges from 0 to 1. If Δx is large, it means that the exposure time deviation has a greater impact on the dark current correction value, and the weight is also large; if Δy is large, it means that the temperature deviation has a greater impact on the dark current correction value, and the weight is small.
[0141] S213, performing weighted calculation on the dark current correction value according to the exposure time weight and the shooting temperature weight by using the following formula:
[0142] OB = exposure time weight * OB t_c + Shooting temperature weight * OB T_c ;
[0143] Where OB is the target dark current correction value, OB t_c is the dark current correction value corresponding to the current exposure time in the dark current characterization model, OB T_c is the dark current correction value corresponding to the current shooting temperature in the dark current characterization model.
[0144] S214, performing dark current correction on the bright field image using the target dark current correction value.
[0145] Under actual shooting conditions, collect bright field images I light Contains the illumination signal of the actual scene plus the dark current signal. A series of images are taken in a completely dark environment (for example, covering the camera). These images are called black frames. The average of the average images of these black frames is calculated to obtain the dark current correction value I dark , subtract the dark current correction value from the bright field image to eliminate the influence of dark current. The formula is: I corrected =I light -I dark According to the above steps, after the dark current correction value is corrected, the target dark current correction value obtained is OB. Therefore, in this embodiment, the formula for eliminating the influence of dark current is: corrected =I light -OB.
[0146] The dark current calibration method based on the characterization model in the embodiment of the present application is described in detail above. The dark current calibration system and device based on the characterization model will be described in detail below.
[0147] See also Figure 3 The present application provides an embodiment of a dark current calibration system based on a characterization model, and the embodiment includes:
[0148] A first acquisition unit 301 is used to cover the camera lens and acquire an exposure time interval;
[0149] The second acquisition unit 302 is used to acquire the minimum exposure time in the exposure time interval, set the minimum exposure time as the exposure time, continuously shoot a preset number of calibration images, and record the shooting temperature corresponding to the shooting of the calibration images;
[0150] The third acquisition unit 303 is used to increase the exposure time according to a preset density, and to capture a preset number of calibration images and corresponding shooting temperatures each time the exposure time is increased, until the calibration image and corresponding shooting temperature corresponding to the maximum exposure time in the exposure time interval are acquired;
[0151] A first calculation unit 304, used to calculate the dark current correction value of each group of calibration images one by one;
[0152] The second calculation unit 305 is used to calculate the average value of the shooting temperature corresponding to each group of calibration images one by one to obtain the temperature average value;
[0153] The fitting unit 306 is used to fit the temperature mean values and dark current correction values corresponding to all exposure times to obtain a dark current characterization model.
[0154] In this embodiment, the functions of each unit are the same as those described above. Figure 1 The steps in the illustrated embodiments correspond to each other and will not be described again here.
[0155] See also Figure 4 The present application provides an embodiment of a dark current calibration system based on a characterization model, and the embodiment includes:
[0156] A first acquisition unit 401 is used to cover the camera lens and acquire an exposure time interval;
[0157] The second acquisition unit 402 is used to acquire the minimum exposure time in the exposure time interval, set the minimum exposure time as the exposure time, continuously shoot a preset number of calibration images, and record the shooting temperature corresponding to the shooting of the calibration images;
[0158] The third acquisition unit 403 is used to increase the exposure time according to a preset density, and to capture a preset number of calibration images and corresponding shooting temperatures each time the exposure time is increased, until the calibration image and corresponding shooting temperature corresponding to the maximum exposure time in the exposure time interval are acquired;
[0159] A first calculation unit 404, used to calculate the dark current correction value of each group of calibration images one by one;
[0160] The second calculation unit 405 is used to calculate the average value of the shooting temperature corresponding to each group of calibration images one by one to obtain the temperature average value;
[0161] The fitting unit 406 is used to fit the temperature mean values and dark current correction values corresponding to all exposure times to obtain a dark current characterization model.
[0162] The fourth acquisition unit 407 is used to acquire a bright field image of the current environment and record the current exposure time and the current shooting temperature;
[0163] An input unit 408 is used to input the current exposure time and the current shooting temperature into the dark current characterization model to obtain an exposure time offset and a shooting temperature offset respectively;
[0164] A third calculation unit 409 is used to calculate the exposure time weight and the shooting temperature weight corresponding to the exposure time offset and the shooting temperature offset;
[0165] A fourth calculation unit 410 is used to perform weighted calculation on the dark current correction value according to the exposure time weight and the shooting temperature weight to obtain a target dark current correction value corresponding to the bright field image;
[0166] The correction unit 411 is used to perform dark current correction on the bright field image by using a target dark current correction value.
[0167] Optionally, the input unit 408 is specifically used for:
[0168] Get the actual point on the dark current characterization model corresponding to the current exposure time and the current shooting temperature;
[0169] Get the coordinate difference between the actual point and the exposure time to get the exposure time offset
[0170] Get the coordinate difference between the actual point and the mean temperature to get the shooting temperature offset.
[0171] Optionally, the third calculation unit 409 is specifically configured to:
[0172] The exposure time weight and shooting temperature weight are calculated using the following formula:
[0173]
[0174]
[0175] Among them, Δx is the exposure time offset, and Δy is the shooting temperature offset.
[0176] Optionally, the fourth calculating unit 410 is specifically configured to:
[0177] The dark current correction value is weighted and calculated according to the exposure time weight and the shooting temperature weight using the following formula:
[0178] OB = exposure time weight * OB t_c + Shooting temperature weight *OB T_c ;
[0179] Where OB is the target dark current correction value, OB t_c is the dark current correction value corresponding to the current exposure time in the dark current characterization model, OB T_c is the dark current correction value corresponding to the current shooting temperature in the dark current characterization model.
[0180] Optionally, the first calculating unit 404 is specifically configured to:
[0181] Perform multi-frame averaging processing on the calibration images obtained at each exposure time one by one to obtain the target image;
[0182] Calculate the mean of the average image of the target image to obtain the dark current correction value.
[0183] Optionally, the fitting unit 406 is specifically configured to:
[0184] The exposure time and the corresponding temperature mean are taken as independent variables, the dark current correction value is taken as the dependent variable, and the dark current characterization model is fitted by the least squares method, so that the dark current of the image sensor can be calibrated by the dark current characterization model.
[0185] In this embodiment, the functions of each unit are the same as those described above. Figure 2 The steps in the illustrated embodiments correspond to each other and will not be described again here.
[0186] See also Figure 5 The present application embodiment provides another embodiment of a dark current calibration device based on a characterization model, including:
[0187] Processor 501, memory 502, input and output unit 503, bus 504;
[0188] The processor 501 is connected to the memory 502, the input and output unit 503 and the bus 504;
[0189] Processor 501 specifically executes Figure 1 to Figure 2 The operations corresponding to the steps in the method are not described in detail here.
[0190] The present application also relates to a computer-readable storage medium, on which a program is stored, and when the program is run on a computer, the computer executes any of the above methods. The present application also relates to a computer-readable storage medium, on which a program is stored, and when the program is run on a computer, the computer executes any of the above methods.
[0191] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0192] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0193] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0194] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0195] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.
Claims
1. A dark current calibration method based on a characterization model, characterized in that: The method comprises: Cover the camera lens and obtain the exposure time interval; Obtaining a minimum exposure time value in the exposure time interval, setting the minimum exposure time value as the exposure time, continuously shooting a preset number of calibration images, and recording a shooting temperature corresponding to when shooting the calibration images; Increasing the exposure time according to a preset density, taking a preset number of calibration images and corresponding shooting temperatures each time the exposure time is increased, until obtaining a calibration image and a corresponding shooting temperature corresponding to a maximum exposure time in the exposure time interval; Calculate the dark current correction value of each set of calibration images one by one; Calculate the average value of the shooting temperature corresponding to each group of calibration images one by one to obtain the temperature average; The temperature mean and dark current correction values corresponding to all exposure times are fitted to obtain a dark current characterization model.
2. The method according to claim 1, characterized in that After fitting the dark current characterization model through the temperature mean values and dark current correction values corresponding to all exposure times, the method further includes: Get the bright field image of the current environment and record the current exposure time and current shooting temperature; Inputting the current exposure time and the current shooting temperature into the dark current characterization model to obtain an exposure time offset and a shooting temperature offset respectively; Calculating the exposure time weight and the shooting temperature weight corresponding to the exposure time offset and the shooting temperature offset; Performing weighted calculation on the dark current correction value according to the exposure time weight and the shooting temperature weight to obtain a target dark current correction value corresponding to the bright field image; Dark current correction is performed on the bright field image using the target dark current correction value.
3. The method according to claim 2, characterized in that The inputting the current exposure time and the current shooting temperature into the dark current characterization model to obtain the exposure time offset and the shooting temperature offset respectively includes: Obtaining the actual point position on the dark current characterization model corresponding to the current exposure time and the current shooting temperature; Get the coordinate difference between the actual point and the exposure time to get the exposure time offset The coordinate difference between the actual point and the temperature mean is obtained to obtain the shooting temperature offset.
4. The method according to claim 3, characterized in that The calculating the exposure time weight and the shooting temperature weight corresponding to the exposure time offset and the shooting temperature offset includes: The exposure time weight and the shooting temperature weight are calculated by the following formula: Among them, Δx is the exposure time offset, and Δy is the shooting temperature offset.
5. The method according to claim 4, characterized in that The step of performing weighted calculation on the dark current correction value according to the exposure time weight and the shooting temperature weight to obtain a target dark current correction value corresponding to the bright field image includes: The dark current correction value is weighted and calculated according to the exposure time weight and the shooting temperature weight by the following formula: OB = exposure time weight * OB t_c + Shooting temperature weight * OB T_c ; Where OB is the target dark current correction value, OB t_c is the dark current correction value corresponding to the current exposure time in the dark current characterization model, OB T_c is the dark current correction value corresponding to the current shooting temperature in the dark current characterization model.
6. The method according to any one of claims 1 to 5, characterized in that The step of calculating the dark current correction value of each group of calibration images one by one includes: Perform multi-frame averaging processing on the calibration images obtained at each exposure time one by one to obtain the target image; The mean value of the average image of the target image is calculated to obtain a dark current correction value.
7. The method according to any one of claims 1 to 5, characterized in that The fitting of the temperature mean values and dark current correction values corresponding to all exposure times to obtain a dark current characterization model includes: The exposure time and the corresponding temperature mean are used as independent variables, the dark current correction value is used as a dependent variable, and a dark current characterization model is fitted by the least squares method, so that the dark current of the image sensor is calibrated by the dark current characterization model.
8. A dark current calibration system based on a characterization model, characterized in that: The system comprises: A first acquisition unit, used to cover the camera lens and acquire an exposure time interval; a second acquisition unit, configured to acquire a minimum exposure time value in the exposure time interval, set the minimum exposure time value as the exposure time, continuously shoot a preset number of calibration images, and record a shooting temperature corresponding to shooting the calibration images; A third acquisition unit is used to increase the exposure time according to a preset density, and to capture a preset number of calibration images and corresponding shooting temperatures each time the exposure time is increased, until the calibration image and the corresponding shooting temperature corresponding to the maximum exposure time in the exposure time interval are obtained; A first calculation unit, used for calculating the dark current correction value of each group of calibration images one by one; The second calculation unit is used to calculate the average value of the shooting temperature corresponding to each group of calibration images one by one to obtain the temperature average value; The fitting unit is used to fit the temperature mean and dark current correction value corresponding to all exposure times to obtain a dark current characterization model.
9. A dark current calibration device based on a characterization model, characterized in that: The device comprises: Processor, memory, input-output unit, and bus; The processor is connected to the memory, the input and output unit, and the bus; The memory stores a program, and the processor calls the program to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a program stored thereon, wherein the program, when executed on a computer, performs the method according to any one of claims 1 to 7.