Flat field correction parameter acquisition method and system for image sensor chip

By automatically adjusting grayscale values ​​and using a binary search method, the nonlinearity of time parameters in the flat field correction of image sensor chips is solved, achieving fully automated parameter acquisition, simplifying the engineer's workflow, and saving time and manpower costs.

CN116614724BActive Publication Date: 2026-01-27NANJING JIUCHUAN SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310360685.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-06
Publication Date
2026-01-27
Estimated Expiration
2043-04-06

AI Technical Summary

Technical Problem

In the existing technology of image sensor chip flat field correction process, the non-linear relationship between erase time and exposure time requires engineers to repeatedly try different time parameters, which consumes a lot of time and manpower and makes it difficult to obtain flat field correction parameters quickly and effectively.

Method used

By automatically adjusting the grayscale value of the image sensor chip and using a binary search method to narrow down the time range, dark and bright field parameters can be quickly obtained. This includes a dark field parameter acquisition module and a bright field parameter acquisition module, achieving fully automated parameter acquisition.

Benefits of technology

It enables rapid acquisition of dark and bright field parameters of image sensor chips without manual intervention, saving time and labor costs and simplifying the flat field correction process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116614724B_ABST
    Figure CN116614724B_ABST
Patent Text Reader

Abstract

The application provides a kind of flat field correction parameter acquisition method and system of image sensor chip, it is related to image processing technical field, comprising: the gray value of the picture currently collected by image sensor chip is adjusted to within the preset bright field target gray value range, then in the preset erasing time range current erasing time is selected, and the dark field picture is obtained by erasing image sensor chip according to current erasing time;The gray value after erasing of dark field picture is obtained, and when the gray value after erasing is within the preset dark field target gray value range, the corresponding current erasing time and dark field picture are saved as dark field parameter;Otherwise, according to current erasing time, the preset erasing time range is reduced, and current erasing time is selected again.The beneficial effect is that the dark field parameter of image sensor chip can be automatically and quickly acquired, without manual intervention, effectively saving the time and labor cost of flat field correction, and solving the annoyance caused by the tedious flat field correction process for engineers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method and system for obtaining flat field correction parameters of an image sensor chip. Background Technology

[0002] In the field of camera sensors, flat-field correction must be performed again before the imaging system leaves the factory or when any part of the imaging system (including the camera unit, illumination, or optical equipment) changes. Flat-field correction is a technique used to improve the quality of digital images. Its main function is to eliminate stripes, shadows, and image noise caused by inconsistent light responses of individual pixels, optical path distortion (uniform illumination), and dark current in the image sensor, thereby maximizing image quality.

[0003] The flat-field correction process comprises two steps: dark-field image acquisition and bright-field image acquisition. The dark-field image acquisition process involves erasing the image sensor chip for a certain period to obtain a dark-field image, and then averaging the pixel values ​​of the dark-field image to obtain its grayscale value. The bright-field image acquisition process involves exposing the image sensor chip for a certain period to obtain a bright-field image with a specified grayscale value, and then averaging the pixel values ​​of the bright-field image to obtain its grayscale value.

[0004] In practice, during both dark and bright image acquisition, engineers typically estimate the erasure and exposure times. However, due to variations in the erasure time and grayscale values ​​of image sensor chips, such as... Figure 1 The nonlinear relationship shown indicates that the exposure time and grayscale value changes of the image sensor chip exhibit, as... Figure 2 The nonlinear relationship shown is inconsistent between different chips. Therefore, engineers need to repeatedly try different erasure times to erase the chip to the specified grayscale range, and similarly, they need to repeatedly try different exposure times to expose the chip to the specified grayscale range, which consumes a lot of time and manpower. Summary of the Invention

[0005] To address the problems existing in the prior art, the present invention provides a method for obtaining flat field correction parameters of an image sensor chip. The flat field correction parameters include dark field parameters, and the method for obtaining the dark field parameters includes:

[0006] Step S1: Adjust the grayscale value of the image currently acquired by the image sensor chip to a preset bright field target grayscale value range, then select the current erasure time within a preset erasure time range, and erase the image sensor chip according to the current erasure time to obtain a dark field image;

[0007] Step S2: Obtain the erased grayscale value of the dark field image, and determine whether the erased grayscale value is within the preset target grayscale value range for the dark field.

[0008] If so, the corresponding current erasure time and the dark field image are saved as dark field parameters;

[0009] If not, then reduce the preset erasure time range based on the current erasure time, and then return to step S1.

[0010] Preferably, the flat field correction parameters further include bright field parameters. Therefore, after executing step S2, a bright field parameter acquisition process is also included, comprising:

[0011] Step A1: Adjust the grayscale value of the image currently acquired by the image sensor chip to the range of the target grayscale value in the bright field, and then erase the image sensor chip once according to the current erasure time included in the dark field parameter;

[0012] Step A2: Select the current exposure time within the preset exposure time range, and expose the image sensor chip according to the current exposure time to obtain a bright field image;

[0013] Step A3: Obtain the grayscale value of the bright-field image after exposure, and determine whether the grayscale value after exposure is within the range of the target grayscale value for the bright-field image.

[0014] If so, the corresponding current exposure time and the bright field image are saved as the bright field parameter;

[0015] If not, then reduce the preset exposure time range based on the current exposure time, and then return to step A2.

[0016] Preferably, the process of adjusting the grayscale value of the image currently acquired by the image sensor chip to the range of the bright-field target grayscale value includes:

[0017] Step B1: Obtain the grayscale value record table corresponding to the image sensor chip. The grayscale value record table contains multiple exposure times, and each exposure time is associated with a corresponding grayscale change value.

[0018] Step B2: Determine whether the grayscale value of the image currently acquired by the image sensor chip is within the range of the bright-field target grayscale value.

[0019] If so, then exit;

[0020] If not, proceed to step B3;

[0021] Step B3: Determine whether the grayscale value of the image currently acquired by the image sensor chip is greater than the upper limit of the grayscale value range of the bright-field target.

[0022] If so, the image sensor chip is erased according to the preset erasure time so that the gray value of the image currently acquired by the image sensor chip is less than the lower limit of the gray value range of the bright field target, and then proceeds to step B4;

[0023] If not, proceed to step B4;

[0024] Step B4: Calculate the grayscale difference between the grayscale value of the image currently acquired by the image sensor chip and the preset target brightfield grayscale value within the range of the target brightfield grayscale value, and process the grayscale difference and each grayscale change value to obtain the corresponding exposure time and exposure times;

[0025] Step B5: Expose the image sensor chip according to the exposure time and number of exposures to obtain an exposed image, and use the exposed image as the image currently acquired by the image sensor chip, then return to step B2.

[0026] Preferably, step B4 includes:

[0027] Step B41: Calculate the grayscale difference between the grayscale value of the image currently acquired by the image sensor chip and the preset target brightfield grayscale value within the range of the target brightfield grayscale value;

[0028] Step B42: In the grayscale value record table, the grayscale change values ​​associated with each exposure time are called sequentially in descending order of the exposure time until the ratio between the grayscale difference and the grayscale change value is not less than one, and then the corresponding ratio is output.

[0029] Step B43: The output ratio is rounded to obtain the number of exposures, and the grayscale change value corresponding to the ratio is taken as the exposure time.

[0030] Preferably, after performing step B43, the method further includes:

[0031] Determine whether the exposure time is greater than the maximum allowable exposure time of the image sensor chip:

[0032] If not, proceed to step B5;

[0033] If so, the total exposure time is obtained by multiplying the number of exposures by the exposure time, and the number of allowed exposures and the allowable exposure time for each exposure are obtained by processing the total exposure time and the maximum allowable exposure time.

[0034] In step B5, the image sensor chip is exposed according to the allowed number of exposures and the allowed exposure time corresponding to each exposure to obtain the exposed image.

[0035] Preferably, step B1 includes:

[0036] Step B11: Erase the image sensor chip according to the preset erasure time;

[0037] Step B12: Expose the image sensor chip sequentially according to the exposure time from smallest to largest, and calculate the grayscale change value before and after each exposure to generate the grayscale value record table.

[0038] Preferably, in step S1, the current erasure time is selected from the middle value of the preset erasure time range.

[0039] In step S2, narrowing the preset erasure time range based on the current erasure time includes:

[0040] When the grayscale value after erasure is less than the lower limit of the grayscale value range of the dark field target, the intermediate value is used as the upper limit of the grayscale value range of the dark field target, in order to narrow the grayscale value range of the dark field target.

[0041] And when the grayscale value after erasure is greater than the upper limit of the grayscale value range of the dark field target, the intermediate value is used as the lower limit of the grayscale value range of the dark field target, so as to narrow the grayscale value range of the dark field target.

[0042] Preferably, in step A2, selecting the current exposure time within the preset exposure time range means selecting the middle value within the preset exposure time range as the current exposure time;

[0043] In step A3, narrowing the preset exposure time range based on the current exposure time includes:

[0044] When the grayscale value after exposure is less than the lower limit of the grayscale value range of the bright field target, the intermediate value is used as the lower limit of the grayscale value range of the bright field target, so as to narrow the grayscale value range of the dark field target.

[0045] And when the grayscale value after exposure is greater than the upper limit of the grayscale value range of the bright field target, the intermediate value is used as the upper limit of the grayscale value range of the bright field target, so as to narrow the grayscale value range of the dark field target.

[0046] This invention also provides a flat-field correction parameter acquisition system for an image sensor chip, applying the above-described flat-field correction parameter acquisition method. The flat-field correction parameter acquisition system includes a dark-field parameter acquisition module, which comprises:

[0047] The erasure control unit is used to adjust the grayscale value of the image currently acquired by the image sensor chip to a preset bright field target grayscale value range, then select the current erasure time within a preset erasure time range, and erase the image sensor chip according to the current erasure time to obtain a dark field image;

[0048] An erasure determination unit, connected to the erasure control unit, is used to acquire the erased grayscale value of the dark field image, and when it is determined that the erased grayscale value is within a preset dark field target grayscale value range, save the corresponding current erasure time and the dark field image as dark field parameters; and when it is determined that the erased grayscale value is not within the preset dark field target grayscale value range, reduce the preset erasure time range according to the current erasure time and send it to the erasure control unit.

[0049] Preferably, it further includes a bright-field parameter acquisition module connected to the dark-field parameter acquisition module, the bright-field parameter acquisition module comprising:

[0050] A primary erasure unit is used to adjust the grayscale value of the image currently acquired by the image sensor chip to the range of the bright field target grayscale value, and then perform a primary erasure on the image sensor chip according to the current erasure time included in the dark field parameters;

[0051] An exposure control unit, connected to the primary erasure unit, is used to select the current exposure time within a preset exposure time range after a primary erasure, and expose the image sensor chip according to the current exposure time to obtain a bright field image;

[0052] An exposure determination unit, connected to the exposure control unit, is used to acquire the grayscale value of the brightfield image after exposure, and when it is determined that the grayscale value after exposure is within the target grayscale value range of the brightfield, save the corresponding current exposure time and the brightfield image as the brightfield parameter; and when it is determined that the grayscale value after exposure is not within the target grayscale value range of the brightfield, reduce the preset exposure time range according to the current exposure time and send it to the exposure control unit.

[0053] The above technical solution has the following advantages or beneficial effects: it can automatically and quickly acquire the dark field parameters and bright field parameters of the image sensor chip without manual intervention, effectively saving the time and manpower cost of flat field calibration, and solving the trouble caused by the tedious flat field calibration process for engineers. Attached Figure Description

[0054] Figure 1 This is a schematic diagram illustrating the nonlinear relationship between the erasure time and grayscale value change of an image sensor chip.

[0055] Figure 2 This is a schematic diagram illustrating the nonlinear relationship between exposure time and grayscale value changes in an image sensor chip.

[0056] Figure 3 This is a flowchart illustrating the method for obtaining dark field parameters in a preferred embodiment of the present invention.

[0057] Figure 4 In a preferred embodiment of the present invention, a flowchart illustrating the process of adjusting the grayscale value of the image currently acquired by the image sensor chip to the range of the target grayscale value in the bright field is shown.

[0058] Figure 5 This is a schematic diagram of a sub-process of step B1 in a preferred embodiment of the present invention;

[0059] Figure 6 This is a schematic diagram of the sub-process of step B4 in a preferred embodiment of the present invention;

[0060] Figure 7 This is a flowchart illustrating the bright-field parameter acquisition process in a preferred embodiment of the present invention.

[0061] Figure 8 This is a schematic diagram of a flat field correction parameter acquisition system for an image sensor chip, which is a preferred embodiment of the present invention. Detailed Implementation

[0062] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. The present invention is not limited to this embodiment; other embodiments that conform to the spirit of the present invention may also fall within the scope of the present invention.

[0063] In a preferred embodiment of the present invention, based on the above-mentioned problems existing in the prior art, a method for obtaining flat field correction parameters of an image sensor chip is provided. The flat field correction parameters include dark field parameters, such as... Figure 3 As shown, the methods for obtaining dark field parameters include:

[0064] Step S1: Adjust the grayscale value of the image currently acquired by the image sensor chip to the preset bright field target grayscale value range, then select the current erasure time within the preset erasure time range, and erase the image sensor chip according to the current erasure time to obtain a dark field image.

[0065] Step S2: Obtain the erased grayscale value of the dark field image and determine whether the erased grayscale value is within the preset target grayscale value range for the dark field.

[0066] If so, the corresponding current erase time and dark field image will be saved as dark field parameters;

[0067] If not, then reduce the preset erasure time range based on the current erasure time, and then return to step S1.

[0068] Specifically, in this embodiment, images with grayscale values ​​within a preset target grayscale value range for bright fields are defined as bright field images, and images with grayscale values ​​within a preset target grayscale value range for dark fields are defined as dark field images. The purpose of obtaining the dark field parameters is to acquire the dark field images and the erasure time from the bright field image to the dark field image (i.e., the saved current erasure time). The aforementioned target grayscale value range for bright fields can be considered to be formed based on the preset target bright field grayscale value v0, and can be expressed as [v0-g1, v0+g1], where g1 represents the allowable error of the preset target bright field grayscale value v0, and can be customized according to requirements. Similarly, the aforementioned target grayscale value range for dark fields can be considered to be formed based on the preset target dark field grayscale value v1, and can be expressed as [v1-g2, v1+g2], where g2 represents the allowable error of the preset target dark field grayscale value v1, and can be customized according to requirements.

[0069] Since it is necessary to obtain the erasure time from the bright field image to the dark field image, it is first necessary to obtain the bright field image. That is, the grayscale value of the image currently acquired by the image sensor chip needs to be adjusted to the preset target grayscale value range of the bright field. Specifically, Figure 4 As shown, the process of adjusting the grayscale value of the image currently acquired by the image sensor chip to the range of the bright-field target grayscale value includes:

[0070] Step B1: Obtain the grayscale value record table corresponding to the image sensor chip. The grayscale value record table contains multiple exposure times, and each exposure time is associated with a corresponding grayscale change value.

[0071] Step B2: Determine whether the grayscale value of the image currently acquired by the image sensor chip is within the range of the bright-field target grayscale value.

[0072] If so, then exit;

[0073] If not, proceed to step B3;

[0074] Step B3: Determine whether the grayscale value of the image currently acquired by the image sensor chip is greater than the upper limit of the grayscale value range of the bright field target.

[0075] If so, the image sensor chip is erased according to the preset erasure time so that the gray value of the image currently acquired by the image sensor chip is less than the lower limit of the gray value range of the bright field target, and then proceeds to step B4.

[0076] If not, proceed to step B4;

[0077] Step B4: Calculate the grayscale difference between the grayscale value of the image currently acquired by the image sensor chip and the preset target brightfield grayscale value within the range of the target brightfield grayscale value, and process the grayscale difference and each grayscale change value to obtain the corresponding exposure time and exposure times.

[0078] Step B5: Expose the image sensor chip according to the exposure time and number of exposures to obtain the exposed image, and use the exposed image as the image currently acquired by the image sensor chip, then return to step B2.

[0079] Specifically, in this embodiment, as Figure 5 As shown, step B1, the process of obtaining the grayscale value record table corresponding to the image sensor chip, includes:

[0080] Step B11: Erase the image sensor chip according to the preset erasure time;

[0081] Step B12: Expose the image sensor chip sequentially according to the exposure time from smallest to largest, and calculate the grayscale change value before and after each exposure to generate a grayscale value record table.

[0082] The preferred method for the above-mentioned preset erasure time is to erase twice, with each erasure lasting 2440ms. This can also be customized according to requirements, as long as the grayscale value obtained from erasure is small enough. Here, "small enough" is preferably a grayscale value below 35.

[0083] Multiple exposure times can be preset. Then, based on a grayscale value of 35 (denoted as G0), the different exposure times can be selected sequentially for each exposure. For example, if the first exposure is 5ms, the grayscale value of the resulting image is G1, and subtracting G0 gives the corresponding grayscale change value D5. Then, if the exposure is 10ms, the grayscale value of the resulting image is G2, and subtracting G1 gives the corresponding grayscale change value D10, and so on. The final grayscale value record table can be represented as follows:

[0084] Exposure time (T / ms) Grayscale change value 1000 D1000 500 D500 400 D400 300 D300 200 D200 100 D100 10 D10 5 D5

[0085] It is understandable that the above exposure times are not limited to these and can be used as a configurable parameter. The main purpose is to find the grayscale change value of the image sensor chip corresponding to different exposure times for subsequent use.

[0086] After obtaining the aforementioned grayscale value record table, it is first stored for later use. Then, it is determined whether the grayscale value of the image currently acquired by the image sensor chip is within the target bright-field grayscale value range. If it is, no adjustment is needed. If not, it is then determined that the grayscale value of the currently acquired image is greater than the upper limit of the target bright-field grayscale value range, indicating that it needs to be erased to reduce the grayscale value. Preferably, the image sensor chip is erased according to a preset erasure time until the grayscale value is less than the lower limit of the target bright-field grayscale value range. The preset erasure time can be configured empirically, preferably by erasing twice, with each erasure lasting 2440ms. At this point, the grayscale value is at a low level. To reach the target bright-field grayscale value range, exposure is required to increase the grayscale value. At this point, the grayscale change value needs to be used to quickly find the optimal exposure time and number of exposures. Specifically, as shown... Figure 6 As shown, step B4 includes:

[0087] Step B41: Calculate the grayscale difference between the grayscale value of the image currently acquired by the image sensor chip and the preset target brightfield grayscale value within the range of the brightfield target grayscale value;

[0088] Step B42: In the grayscale value record table, call up the grayscale change values ​​associated with each exposure time in descending order of exposure time until the ratio between the grayscale difference and the grayscale change value is not less than the corresponding ratio at one time.

[0089] Step B43: Round the output ratio to obtain the number of exposures, and use the grayscale change value corresponding to the ratio as the exposure time.

[0090] In this embodiment, since the grayscale value before exposure is at a low level, a relatively long exposure time is likely required. Therefore, the grayscale value records are called sequentially in descending order of exposure time in the grayscale value record table. For example, D1000 corresponding to an exposure time of 1000ms is selected first, and the ratio is calculated as grayscale difference / D1000. If the ratio is less than one, it means that the 1000ms exposure time is too long and is discarded. Then, D500 corresponding to an exposure time of 500ms is selected, and the ratio is calculated as grayscale difference / D500. If the ratio is still less than one, it is still discarded. This process continues. If the ratio is not less than one, the ratio is rounded to obtain the number of exposures, i.e., the number of exposures n = (int) ratio, and the exposure time for each exposure is D500. Since the exposure count is obtained by rounding, the grayscale value of the image after exposure may still be less than the lower limit of the target grayscale value range for the bright field. Therefore, the grayscale difference between the grayscale value of the image after exposure and the preset target bright field grayscale value within the target bright field grayscale value range is recalculated based on the grayscale value of the image after exposure. The above process is repeated to finally adjust the grayscale value of the image currently acquired by the image sensor chip to the target bright field grayscale value range.

[0091] In a preferred embodiment, considering that different image sensor chips have different maximum permissible exposure times, while the grayscale value recording table can be universally used for all image sensor chips, this may lead to situations where the exposure time exceeds the maximum permissible exposure time. In such cases, the exposure time cannot be directly used for exposure operations, otherwise the image sensor chip will be burned out. Therefore, after executing step B43, the following is also included:

[0092] Determine if the exposure time exceeds the maximum allowable exposure time of the image sensor chip:

[0093] If not, proceed to step B5;

[0094] If so, calculate the product of the number of exposures and the exposure time to get the total exposure time, and process it according to the total exposure time and the maximum allowable exposure time to get the allowable number of exposures and the allowable exposure time corresponding to each exposure;

[0095] In step B5, the image sensor chip is exposed according to the allowed number of exposures and the allowed exposure time for each exposure to obtain the exposed image.

[0096] Specifically, taking an exposure time of 1000ms and two exposures as an example, if the maximum allowable exposure time is 800ms, the total exposure time is first calculated as 1000ms * 2 = 2000ms. Then, the total exposure time is divided by the maximum allowable exposure of 2000 / 800, resulting in an integer of 2 and a remainder of 400. Therefore, the allowable exposure time can be three times, with two of them having an allowable exposure time of 800ms and the other having an allowable exposure time of 400ms, thus protecting the image sensor chip.

[0097] The next step is to find the erase time mentioned above. In this embodiment, the preset erase time range is gradually narrowed down by binary search to find the erase time. Specifically, in step S1, the current erase time is selected as the middle value in the preset erase time range.

[0098] In step S2, narrowing the preset erasure time range based on the current erasure time includes:

[0099] When the grayscale value after erasure is less than the lower limit of the grayscale value range of the dark target, the median value is used as the upper limit of the grayscale value range of the dark target to narrow the grayscale value range of the dark target.

[0100] Furthermore, when the grayscale value after erasure is greater than the upper limit of the grayscale value range of the dark field target, the intermediate value is used as the lower limit of the grayscale value range of the dark field target in order to narrow the grayscale value range of the dark field target.

[0101] Specifically, in this embodiment, the preset erasure time range is preferably [0, C0], where C0 is preferably 2440ms. The first erasure time selected within the preset erasure time range is C0 / 2. Subsequently, the image sensor chip is erased. If the grayscale value after erasure is less than the lower limit of the target grayscale value range in the dark field, it indicates that the erasure time is too long, and the actual required erasure time should be less than C0 / 2. Then, C0 / 2 is used as the upper limit of the preset erasure time range to form a new preset erasure time range, denoted as [0, C0 / 2]. If the grayscale value after erasure is greater than the upper limit of the target grayscale value range in the dark field, it indicates that the erasure time is too short, and the actual required erasure time should be greater than C0 / 2. Then, C0 / 2 is used as the lower limit of the preset erasure time range to form a new preset erasure time range, denoted as [C0 / 2, C0], and so on.

[0102] In summary, the process of acquiring dark field parameters has been completed. It can be seen that the entire dark field process can automatically and quickly acquire the dark field parameters of the image sensor chip without human intervention.

[0103] In addition to the flat field correction parameters, the bright field parameters are also included. Therefore, after executing step S2, as follows... Figure 7 As shown, it also includes the process of obtaining bright-field parameters, including:

[0104] Step A1: Adjust the grayscale value of the image currently acquired by the image sensor chip to the range of the target grayscale value in the bright field, and then erase the image sensor chip once according to the current erasure time included in the dark field parameters;

[0105] Step A2: Select the current exposure time within the preset exposure time range, and expose the image sensor chip according to the current exposure time to obtain a bright field image;

[0106] Step A3: Obtain the grayscale value of the bright-field image after exposure, and determine whether the grayscale value after exposure is within the range of the target grayscale value for the bright-field image.

[0107] If so, the corresponding current exposure time and bright field image will be saved as bright field parameters;

[0108] If not, then reduce the preset exposure time range based on the current exposure time, and then return to step A2.

[0109] Specifically, in this embodiment, the purpose of acquiring the bright-field parameters is to obtain the exposure time from the dark-field image to the bright-field image (i.e., the saved current exposure time) and the corresponding bright-field image. Based on this, it is necessary to first acquire the dark-field image. Since the erasure time from the bright-field image to the dark-field image has already been acquired during the dark-field parameter acquisition process, the required dark-field image can be obtained by directly calling the erasure time after adjusting the grayscale value of the image currently acquired by the image sensor chip to the target grayscale value range of the bright field. The process of adjusting the grayscale value of the image currently acquired by the image sensor chip to the target grayscale value range of the bright field is the same as the adjustment process in the dark-field parameter acquisition process. Subsequently, the preset exposure time range is gradually narrowed down using a binary search method to find an exposure time. Specifically, the current exposure time is selected as the median value within the preset exposure time range.

[0110] In step A3, narrowing the preset exposure time range based on the current exposure time includes:

[0111] When the grayscale value after exposure is less than the lower limit of the grayscale value range of the bright-field target, the median value is used as the lower limit of the grayscale value range of the bright-field target to narrow the grayscale value range of the dark-field target.

[0112] And when the grayscale value after exposure is greater than the upper limit of the grayscale value range of the bright field target, the middle value is used as the upper limit of the grayscale value range of the bright field target in order to narrow the grayscale value range of the dark field target.

[0113] The execution process of the binary search method is the same as the process of finding the erasure time, so it will not be described again here.

[0114] This invention also provides a system for acquiring flat-field correction parameters of an image sensor chip, applying the above-described method for acquiring flat-field correction parameters, such as... Figure 8 As shown, the flat field correction parameter acquisition system includes a dark field parameter acquisition module, and the dark field parameter acquisition module 1 includes:

[0115] The erasure control unit 11 is used to adjust the grayscale value of the image currently acquired by the image sensor chip to a preset bright field target grayscale value range, then select the current erasure time within the preset erasure time range, and erase the image sensor chip according to the current erasure time to obtain a dark field image.

[0116] The erasure judgment unit 12 is connected to the erasure control unit 11. It is used to obtain the grayscale value of the dark field image after erasure. When it is determined that the grayscale value after erasure is within the preset dark field target grayscale value range, it saves the corresponding current erasure time and dark field image as dark field parameters. When it is determined that the grayscale value after erasure is not within the preset dark field target grayscale value range, it narrows the preset erasure time range according to the current erasure time and sends it to the erasure control unit.

[0117] In a preferred embodiment of the present invention, such as Figure 8 As shown, it also includes a bright-field parameter acquisition module 2, connected to the dark-field parameter acquisition module 1. The bright-field parameter acquisition module 2 includes:

[0118] The first erasure unit 21 is used to adjust the grayscale value of the image currently acquired by the image sensor chip to the range of the bright field target grayscale value, and then perform a first erasure on the image sensor chip according to the current erasure time included in the dark field parameters.

[0119] The exposure control unit 22 is connected to the first erasure unit 21. After the first erasure, it selects the current exposure time within the preset exposure time range and exposes the image sensor chip according to the current exposure time to obtain a bright field image.

[0120] Exposure determination unit 23 is connected to exposure control unit 22. It is used to obtain the grayscale value of the exposed bright field image, and when it is determined that the grayscale value after exposure is within the target grayscale value range of the bright field, it saves the corresponding current exposure time and bright field image as bright field parameters. When it is determined that the grayscale value after exposure is not within the target grayscale value range of the bright field, it reduces the preset exposure time range according to the current exposure time and sends it to the exposure control unit.

[0121] The above description is merely a preferred embodiment of the present invention and does not limit the implementation and protection scope of the present invention. Those skilled in the art should realize that any equivalent substitutions and obvious changes made using the content of this specification and illustrations should be included within the protection scope of the present invention.

Claims

1. A method for obtaining flat-field correction parameters of an image sensor chip, characterized in that, Flat field correction parameters include dark field parameters, and the method for obtaining the dark field parameters includes: Step S1: Adjust the grayscale value of the image currently acquired by the image sensor chip to a preset bright field target grayscale value range, then select the current erasure time within a preset erasure time range, and erase the image sensor chip according to the current erasure time to obtain a dark field image; Step S2: Obtain the erased grayscale value of the dark field image, and determine whether the erased grayscale value is within the preset target grayscale value range for the dark field. If so, the corresponding current erasure time and the dark field image are saved as dark field parameters; If not, then reduce the preset erasure time range according to the current erasure time, and then return to step S1; The flat field correction parameters also include bright field parameters. Therefore, after executing step S2, the process of obtaining bright field parameters is also included, including: Step A1: Adjust the grayscale value of the image currently acquired by the image sensor chip to the range of the target grayscale value in the bright field, and then erase the image sensor chip once according to the current erasure time included in the dark field parameter; Step A2: Select the current exposure time within the preset exposure time range, and expose the image sensor chip according to the current exposure time to obtain a bright field image; Step A3: Obtain the grayscale value of the bright-field image after exposure, and determine whether the grayscale value after exposure is within the range of the target grayscale value for the bright-field image. If so, the corresponding current exposure time and the bright field image are saved as the bright field parameter; If not, then reduce the preset exposure time range based on the current exposure time, and then return to step A2.

2. The method for obtaining flat field correction parameters according to claim 1, characterized in that, The process of adjusting the grayscale value of the image currently acquired by the image sensor chip to the range of the bright field target grayscale value includes: Step B1: Obtain the grayscale value record table corresponding to the image sensor chip. The grayscale value record table contains multiple exposure times, and each exposure time is associated with a corresponding grayscale change value. Step B2: Determine whether the grayscale value of the image currently acquired by the image sensor chip is within the range of the bright-field target grayscale value. If so, then exit; If not, proceed to step B3; Step B3: Determine whether the grayscale value of the image currently acquired by the image sensor chip is greater than the upper limit of the grayscale value range of the bright-field target. If so, the image sensor chip is erased according to the preset erasure time so that the gray value of the image currently acquired by the image sensor chip is less than the lower limit of the gray value range of the bright field target, and then proceeds to step B4; If not, proceed to step B4; Step B4: Calculate the grayscale difference between the grayscale value of the image currently acquired by the image sensor chip and the preset target brightfield grayscale value within the range of the target brightfield grayscale value, and process the grayscale difference and each grayscale change value to obtain the corresponding exposure time and exposure times; Step B5: Expose the image sensor chip according to the exposure time and number of exposures to obtain an exposed image, and use the exposed image as the image currently acquired by the image sensor chip, then return to step B2.

3. The method for obtaining flat field correction parameters according to claim 2, characterized in that, Step B4 includes: Step B41: Calculate the grayscale difference between the grayscale value of the image currently acquired by the image sensor chip and the preset target brightfield grayscale value within the range of the target brightfield grayscale value; Step B42: In the grayscale value record table, the grayscale change values ​​associated with each exposure time are called sequentially in descending order of the exposure time until the ratio between the grayscale difference and the grayscale change value is not less than one, and then the corresponding ratio is output. Step B43: The output ratio is rounded to obtain the number of exposures, and the grayscale change value corresponding to the ratio is taken as the exposure time.

4. The method for obtaining flat field correction parameters according to claim 3, characterized in that, After performing step B43, the method further includes: Determine whether the exposure time is greater than the maximum allowable exposure time of the image sensor chip: If not, proceed to step B5; If so, the total exposure time is obtained by multiplying the number of exposures by the exposure time, and the number of allowed exposures and the allowable exposure time for each exposure are obtained by processing the total exposure time and the maximum allowable exposure time. In step B5, the image sensor chip is exposed according to the allowed number of exposures and the allowed exposure time corresponding to each exposure to obtain the exposed image.

5. The method for obtaining flat field correction parameters according to claim 2, characterized in that, Step B1 includes: Step B11: Erase the image sensor chip according to the preset erasure time; Step B12: Expose the image sensor chip sequentially according to the exposure time from smallest to largest, and calculate the grayscale change value before and after each exposure to generate the grayscale value record table.

6. The method for obtaining flat field correction parameters according to claim 1, characterized in that, In step S1, the current erasure time is selected from the middle value of the preset erasure time range. In step S2, narrowing the preset erasure time range based on the current erasure time includes: When the grayscale value after erasure is less than the lower limit of the grayscale value range of the dark field target, the intermediate value is used as the upper limit of the grayscale value range of the dark field target, in order to narrow the grayscale value range of the dark field target. And when the grayscale value after erasure is greater than the upper limit of the grayscale value range of the dark field target, the intermediate value is used as the lower limit of the grayscale value range of the dark field target, so as to narrow the grayscale value range of the dark field target.

7. The method for obtaining flat field correction parameters according to claim 1, characterized in that, In step A2, selecting the current exposure time within the preset exposure time range means selecting the middle value within the preset exposure time range as the current exposure time. In step A3, narrowing the preset exposure time range based on the current exposure time includes: When the grayscale value after exposure is less than the lower limit of the grayscale value range of the bright field target, the intermediate value is used as the lower limit of the grayscale value range of the bright field target, so as to narrow the grayscale value range of the dark field target. And when the grayscale value after exposure is greater than the upper limit of the grayscale value range of the bright field target, the intermediate value is used as the upper limit of the grayscale value range of the bright field target, so as to narrow the grayscale value range of the dark field target.

8. A system for acquiring flat-field correction parameters for an image sensor chip, characterized in that, The method for obtaining flat field correction parameters according to any one of claims 1-7 is used, wherein the flat field correction parameter acquisition system includes a dark field parameter acquisition module, and the dark field parameter acquisition module includes: The erasure control unit is used to adjust the grayscale value of the image currently acquired by the image sensor chip to a preset bright field target grayscale value range, then select the current erasure time within a preset erasure time range, and erase the image sensor chip according to the current erasure time to obtain a dark field image; The erasure judgment unit, connected to the erasure control unit, is used to obtain the erased grayscale value of the dark field image, and when it is determined that the erased grayscale value is within the preset dark field target grayscale value range, save the corresponding current erasure time and the dark field image as dark field parameters; and when it is determined that the erased grayscale value is not within the preset dark field target grayscale value range, reduce the preset erasure time range according to the current erasure time and send it to the erasure control unit. It also includes a bright-field parameter acquisition module, connected to the dark-field parameter acquisition module, the bright-field parameter acquisition module comprising: A primary erasure unit is used to adjust the grayscale value of the image currently acquired by the image sensor chip to the range of the bright field target grayscale value, and then perform a primary erasure on the image sensor chip according to the current erasure time included in the dark field parameters; An exposure control unit, connected to the primary erasure unit, is used to select the current exposure time within a preset exposure time range after a primary erasure, and expose the image sensor chip according to the current exposure time to obtain a bright field image; An exposure determination unit, connected to the exposure control unit, is used to acquire the grayscale value of the brightfield image after exposure, and when it is determined that the grayscale value after exposure is within the target grayscale value range of the brightfield, save the corresponding current exposure time and the brightfield image as the brightfield parameter; and when it is determined that the grayscale value after exposure is not within the target grayscale value range of the brightfield, reduce the preset exposure time range according to the current exposure time and send it to the exposure control unit.

Citation Information

Patent Citations

  • Image processing method and apparatus using same

    CN107454388A

  • Method and terminal of correcting camera exposure response

    CN108510462A