Image sensor correction algorithm capable of saving storage space
Through the image sensor correction algorithm that calculates row, column and background mean, the problem of excessive storage space of array-type sensors is solved, and the storage space saving and cost reduction are achieved.
Patent Information
- Application Number
- CN202411267853.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2044-09-11
AI Technical Summary
In the prior art, the inconsistent noise floor of each pixel point of an array-type sensor leads to poor graph consistency. The commonly used compensation method requires a large amount of storage space, which increases the cost of the MCU and chip.
By calculating the row mean, column mean and background overall mean, it is stored in non-volatile memory, and data calculation is performed after image acquisition, and finally converted into 8-bit output, reducing storage requirements.
Significantly reduces storage space requirements and reduces MCU and chip requirements.
Smart Images

Figure CN120343423A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image sensors, and in particular to an image sensor correction algorithm that saves storage space. Background Art
[0002] In array sensors, such as fingerprint sensors, CIS sensors, and infrared focusing plane sensors, there is a problem of inconsistent background noise for each pixel in the array, resulting in Figure 1 There are differences in consistency. This difference is inevitable. The commonly used supplementary method uses complex filtering algorithms or compensates for each point separately, but there are problems of large amount of calculation, time-consuming and storage resource consumption. In the most direct single-point compensation method, for an M*N array, if a single point is 8-bit data, a background matrix needs to be stored, and the required storage space is M*N bytes. In the case of a larger array, the storage space will be very large. For example, in a 256*360 array of a fingerprint sensor, the storage space required is 92.16KB. This storage space will increase the demand for the MCU or the cost of the chip itself, whether on the MCU side of the system or on the chip side that collects the image. Summary of the invention
[0003] The object of the present invention is to provide an image sensor correction algorithm that saves storage space, so as to solve the problem that the conventional single-point compensation method requires too much storage space.
[0004] In order to solve the above technical problems, the present invention adopts the following technical solutions: An image sensor correction algorithm that saves storage space includes the following steps: S1, the image sensor sends a command to collect the background image and obtains the intermediate data DATA_BG(i, j); S2, the obtained intermediate data DATA_BG(i, j) is used to calculate the row mean H_AVG(j), column mean V_AVG(i) and background overall mean AVG_BG through software or hardware tools. The total data storage capacity is: , Where N*Mstore2 is the required storage space size, M is the row in the image, N is the column in the image, and P is the width of a single pixel. S3, putting the data obtained after calculation in S2 into a non-volatile memory to complete the background collection work; S4, after the background acquisition work of the image sensor is completed, the image acquisition work is performed again to obtain the raw data RAW_D(i, j); S5. Calculate the following with the obtained raw data RAW_D(i, j), the stored row mean H_AVG(j), column mean V_AVG(i), and overall background mean AVG_BG to obtain the final data DATA(i, j): ; S6. Then convert the final data DATA(i, j) to 8-bit output to obtain the final image formation.
[0005] A further technical solution is that in the step S2, the calculation formula for the row mean H_AVG(j) is as follows: .
[0006] A further technical solution is that the data volume obtained after calculating the row mean H_AVG(j) is M * P.
[0007] A further technical solution is that in the step S2, the calculation formula for the column mean V_AVG(i) is as follows: .
[0008] A further technical solution is that the data volume obtained after calculating the column mean V_AVG(i) is N * P.
[0009] A further technical solution is that in the step S2, the calculation formula for the overall background mean AVG_BG is as follows: .
[0010] A further technical solution is that the data volume obtained after calculating the overall background mean AVG_BG is P.
[0011] A further technical solution is that in the step S2, the value range of the single-pixel point width P is 8-bit to 24-bit.
[0012] A further technical solution is that in the step S3, the non-volatile memory uses an MTP, OTP, or EEPROM memory.
[0013] Compared with the prior art, the beneficial effects of the present invention are: When calculating the data volume to be stored in the present invention, the intermediate data DATA_BG(i, j) is first used to calculate the row mean H_AVG(j), column mean V_AVG(i), and overall background mean AVG_BG through software or hardware tools, and then calculated with the raw data RAW_D(i, j). Finally, the final image formation is obtained. Compared with the prior art using the single-point compensation method, it can be known through the algorithm in the present invention that the data volume to be stored is very small, which will place very low requirements on the MCU or the chip itself. Description of the Drawings
[0014] Figure 1 It is a step diagram of a conventional image correction method in the prior art; Figure 2 It is a step diagram of the present invention; Figure 3 It is a schematic structural diagram of an array in the present invention; Figure 4 It is a comparison diagram before and after correction in the present invention.
[0015] Reference numerals: 31 - array, 32 - pixel point, 41 - original background image, 42 - original background histogram, 43 - corrected background image, 44 - corrected background histogram. Detailed implementation manners
[0016] In order to make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0017] Embodiment 1 An image sensor correction algorithm for saving storage space includes the following steps: S1. The image sensor issues a command to perform background acquisition work to obtain intermediate data DATA_BG(i, j); S2. The obtained intermediate data DATA_BG(i, j) is respectively calculated through software or hardware tools to obtain the row average value H_AVG(j), the column average value V_AVG(i) and the overall background average value AVG_BG. The total data storage amount is: , where, N*Mstore2 is the required storage space size, M is the number of rows in the image, N is the number of columns in the image, and P is the bit width of a single pixel point.
[0018] S3. The data obtained after calculation in S2 is put into a non-volatile memory such as MTP, OTP or EEPROM to complete the background acquisition work; S4. After the background acquisition work of the image sensor is completed, image acquisition work is performed to obtain original data RAW_D(i, j); S5. The obtained original data RAW_D(i, j) is calculated with the stored row average value H_AVG(j), column average value V_AVG(i) and overall background average value AVG_BG as follows to obtain the final data DATA(i, j): ; S6. Then the final data DATA(i, j) is converted to 8-bit output to obtain the final image, and the entire image acquisition process ends.
[0019] Embodiment 2 Based on Embodiment 1, the calculation formula of the row mean H_AVG(j) is as follows: .
[0020] Furthermore, the amount of data obtained after calculating the row mean H_AVG(j) is M*P.
[0021] Embodiment 3 Based on Embodiment 2, the calculation formula of the column mean V_AVG(i) is as follows: .
[0022] Furthermore, the amount of data obtained after calculating the column mean V_AVG(i) is N*P.
[0023] Embodiment 4 Based on Embodiment 3, the calculation formula of the overall background mean AVG_BG is as follows: .
[0024] Furthermore, the amount of data obtained after calculating the overall background mean AVG_BG is P.
[0025] Embodiment 5 Based on Embodiment 4, the value range of the single-pixel point width P is 8-bit to 24-bit.
[0026] Embodiment 6 Based on Embodiment 5, the non-volatile memory uses a conventional device in the prior art, preferably an MTP, OTP or EEPROM memory.
[0027] Taking the MTP memory as an example, when the array size is 256*360 and the single-pixel point value is 12 bits: When using a conventional background correction method, as Figure 1 shown, the following steps are performed: First, start background acquisition, send a command to start acquiring the background image, and then obtain the background data DATA_BG(i,j). The storage amount of this background data DATA_BG(i,j) is: , Then store the background data DATA_BG(i,j) in the non-volatile memory MTP, then start image acquisition to obtain the raw data RAW_D(i,j), and calculate the obtained raw data RAW_D(i,j) with the stored background data DATA_BG(i,j) to obtain the final data DATA(i,j): , Then convert the final data DATA(i,j) to 8-bit output to obtain the final image.
[0028] When using the algorithm in the present invention, asFigure 2 As shown, the following steps are carried out: First, start background acquisition, issue a command to start acquiring the background image, then obtain the intermediate data DATA_BG(i,j), and then calculate the row average H_AVG(j), column average V_AVG(i), and overall background average AVG_BG from the obtained intermediate data DATA_BG(i,j) through software or hardware tools. The total amount of data that needs to be stored can be obtained through the formula in the above embodiments as: , Then store these data in the non-volatile memory MTP, and then start image acquisition to obtain the raw data RAW_D(i,j). Perform the following calculations on the obtained raw data RAW_D(i,j) and the stored row average H_AVG(j), column average V_AVG(i), and overall background average AVG_BG to obtain the final data DATA(i,j): ; Then convert the final data DATA(i,j) to 8-bit output to obtain the final formed image.
[0029] Therefore, the comparison of the storage space size between the algorithm proposed in the present invention and the conventional method is: , Since M, N, and P are all positive integers, so when and only when M + N ≤ 5, ΔMTPstore ≤ 0, and in other cases, ΔMTPstore > 0. Especially when M and N are relatively large, ΔMTPstore is far greater than zero. Therefore, the amount of data that needs to be stored by the conventional single-point compensation method is much larger than the data amount of the algorithm proposed in the present invention. Using the algorithm in the present invention to store data can significantly save storage space.
[0030] Figure 3 is a schematic structural diagram of the array that must be used when an array-type sensor acquires an image. Whether it is the prior art or the technical solution in the present invention, an array needs to be used.
[0031] Figure 4 is a comparison diagram before and after the correction of this algorithm using the original background collected by 256x360 in the present invention. Among them, 41 is the original background image, 42 is the original background histogram, 43 is the corrected background image, and 44 is the corrected background histogram. From the comparison of the background histograms, it can be seen that the background is basically 1 / 3 the width of the original after correction, and the background uniformity has been improved. The present invention achieves the effect of correcting the background and can also be used to correct the actual formed image.
[0032] Although the present invention has been described herein with reference to a number of illustrative embodiments, it should be understood that many other modifications and implementations can be devised by those skilled in the art, which will fall within the scope and spirit of the principles disclosed in this application. More specifically, within the scope of the appended drawings and claims of this application, various variations and improvements can be made to the components and / or layout of the subject combination layout. In addition to the variations and improvements to the components and / or layout, other uses will also be apparent to those skilled in the art.
Claims
1. An image sensor calibration algorithm for saving storage space, characterized in that: It includes the following steps: S1. The image sensor issues a command to perform background acquisition work to obtain intermediate data DATA_BG(i, j); S2. Calculate the row average H_AVG(j), column average V_AVG(i), and overall background average AVG_BG from the obtained intermediate data DATA_BG(i, j) through software or hardware tools. The total data storage amount is: , where N*Mstore2 is the required storage space size, M is the number of rows in the image, N is the number of columns in the image, and P is the single-pixel bit width; S3. Put the data obtained after calculation in S2 into a non-volatile memory to complete the background acquisition work; S4. After the background acquisition work of the image sensor is completed, perform image acquisition to obtain the original data RAW_D(i, j); S5. Calculate the final data DATA(i, j) from the obtained raw data RAW_D(i, j), the stored trip average H_AVG(j), the column average V_AVG(i), and the background overall average AVG_BG as follows: ; S6. Then convert the final data DATA(i, j) to 8-bit output to obtain the final image.
2. The image sensor calibration algorithm for saving storage space according to claim 1, wherein: In the step S2, the calculation formula of the row average H_AVG(j) is as follows: 。 3. The image sensor calibration algorithm for saving storage space according to claim 2, characterized in that: The data amount obtained after calculating the row average H_AVG(j) is M*P.
4. An image sensor calibration algorithm for saving storage space according to claim 1, characterized in that: In the step S2, the calculation formula of the column mean value V_AVG(i) is as follows: .
5. An image sensor calibration algorithm for saving storage space according to claim 4, characterized in that: The data amount obtained after calculating the column average V_AVG(i) is N*P.
6. The image sensor calibration algorithm for saving storage space according to claim 1, characterized in that: In the step S2, the calculation formula of the overall background mean value AVG_BG is as follows: .
7. An image sensor calibration algorithm for saving storage space according to claim 6, characterized in that: The data amount obtained after calculating the overall background average AVG_BG is P.
8. An image sensor calibration algorithm for saving storage space according to claim 1, characterized in that: In the step S2, the value range of the single-pixel bit width P is 8-bit to 24-bit.
9. An image sensor calibration algorithm for saving storage space according to claim 1, characterized in that: In the step S3, the non-volatile memory uses MTP, OTP, or EEPROM memory.
Citation Information
Patent Citations
Image processing apparatus, image forming apparatus and image processing method
CN102480581A
Calibration method for contact image sensor
CN106572348A
Nonuniformity correction method and system of infrared image
CN107255521A
Method for improving efficiency of infrared image single-point correction algorithm
CN111223056A
Flat field correction parameter acquisition method and device
CN113808046A