Dead pixel detection and correction method and system for image sensor
By calculating the optimal fit slope and intercept of each pixel point of the image sensor, a parameter matrix is constructed, and the bad points of the image sensor are detected and corrected, which solves the problems of low detection accuracy, poor correction effect and poor applicability in the prior art, and achieves more efficient bad point detection and correction.
Patent Information
- Application Number
- CN202411846338.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-15
AI Technical Summary
The prior art has problems such as low detection accuracy, poor correction effect and poor applicability in the detection and correction of bad points of image sensors.
By acquiring multiple original images of the image sensor under different radiation amounts, calculating the optimal fit slope and intercept of each pixel point, building a parameter matrix, and determining and correcting the bad points based on this.
It improves the accuracy and correction effect of bad point detection, reduces image distortion, improves the results of image processing, and is suitable for different types of image sensors and application scenarios.
Smart Images

Figure CN119835401A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a bad pixel detection and correction method and system for an image sensor. Background Art
[0002] In modern technology, image sensors are widely used in various devices, such as mobile phones, cameras, computer vision systems, etc. The main function of an image sensor is to convert light signals into electrical signals, and then convert electrical signals into digital signals for further image processing. In the existing technology, there is a bad pixel detection and correction device for an image sensor with publication number CN105430385A; an image bad pixel cluster correction method, computer device and computer-readable storage medium with publication number CN112911174A; a bad pixel detection method, device, electronic device and storage medium with publication number CN113674238A; and a bad pixel detection method and device with publication number CN115002364A. The above-mentioned prior art mainly adopts the following methods for bad pixel detection and correction of image sensors:
[0003] Hardware correction: Repair bad pixels through hardware methods, such as laser repair, physical replacement, etc. However, this method is costly and has high requirements for equipment, making it difficult to promote;
[0004] Software correction: Detect and correct bad pixels through software algorithms. For example, static bad pixels can be detected by comparing images with different exposure times under the same scene. Then, the response value of the bad pixels can be corrected using methods such as mean filtering and median filtering.
[0005] Although the existing software correction method can solve the bad pixel problem to a certain extent, it still has some shortcomings:
[0006] Low detection accuracy: Existing methods often rely on image content, such as contrast and brightness, when detecting bad pixels. When the image content is complex, it is easy to make misjudgments or miss judgments.
[0007] Poor correction effect: Existing methods usually use mean filtering, median filtering and other methods to correct bad pixels. Although these methods can reduce the significance of bad pixels, they may also affect other details of the image and cause image blur.
[0008] Poor applicability: Existing methods are usually targeted at specific sensors or specific application scenarios, with poor versatility and difficulty in adapting to different sensors and different application scenarios. Summary of the invention
[0009] In view of the deficiencies of the prior art, the present invention provides a method and system for bad pixel detection and correction of image sensors, which solves the technical problems of low detection accuracy, poor correction effect and poor applicability in the prior art for bad pixel detection and correction of image sensors.
[0010] In order to solve the above technical problems, the present invention provides the following technical solutions: a bad pixel detection and correction method for an image sensor, the method comprising the following steps:
[0011] S1. Obtain L original images I of all pixels of the image sensor under different radiation levels L , L=1,2,…,k;
[0012] S2, calculate L original images I L The optimal fitting slope k for each pixel in c and intercept b c , and constitutes the original image I L The parameter matrix [K c ,B c ], the statistical information includes the best fit slope k of size m×n, and each element corresponds to a pixel c and intercept b c The slope matrix K c And the intercept matrix B c ;
[0013] S3, based on the parameter matrix [K c ,B c ] to judge the bad pixels in the pixels and generate the same image as the original image I L The corresponding bad point table BadPoints;
[0014] S4, based on the calculation of the non-bad points in the bad point table BadPoints, the parameter matrix [K c ,B c The correction parameter K of c_mean and B c_mean ;
[0015] S5. Use correction parameter K c_mean and B c_mean For the parameter matrix [K c ,B c ] to obtain the corrected correction parameter matrix [K c1 ,B c1 ];
[0016] S6, according to the correction parameter matrix [K c1 ,B c1 ] and the bad pixel table BadPoints are used to correct the bad pixels in the sensor image.
[0017] Furthermore, in step S1, the specific process includes the following steps:
[0018] S11, using an integrating sphere to provide the sensor with constant and uniform light intensity;
[0019] S12, adjusting the exposure time of the sensor from a short time to a long time and gradually increasing it at equal intervals until the image begins to be overexposed;
[0020] S13, collect L original images I of all pixels of the sensor at different exposure times L , and record the corresponding exposure time.
[0021] Furthermore, in step S2, the specific process includes the following steps:
[0022] S21, calculate each original image I L The image mean M contains m×n pixels k , the calculation formula is as follows:
[0023]
[0024] Where M k represents the image mean of the kth original image, that is, the average value of all pixel grayscale values; m and n are the row height and column width of the original image respectively; I L (i,j) represents the original image I L The gray value of the pixel at the i-th row and j-th column in ;
[0025] S22, according to the grayscale image mean M k Define the gray value sequence P of each pixel k ;
[0026] S23, using the least squares method to calculate the gray value sequence P of each pixel k Perform linear fitting to obtain m×n optimal fitting slopes k c and intercept b c , the calculation formula is as follows:
[0027]
[0028] Where L represents the number of original images; P k Represents the gray value of pixel (i, j) in the kth image;
[0029] S24, the m×n optimal fitting slopes k c and intercept b c The integration is performed to obtain the slope matrix K of size m×n c and the intercept matrix B c .
[0030] Furthermore, in step S3, the specific process includes the following steps:
[0031] S31. Calculate the slope matrix K c The mean value μK c and standard deviation σK c , the calculation formula is:
[0032]
[0033] Where m and n are the row height and column width of the original image respectively; K c (i,j) represents the slope matrix K c The coordinate value of the pixel (i, j) in;
[0034] S32, according to the mean μK c and standard deviation σK c Determine the bad pixels in the pixels;
[0035] If |K c (i,j)-μK c |>α·σK c , then the pixel is a bad pixel, α is the threshold coefficient, and the value is 3;
[0036] On the contrary, the pixel is not a bad pixel;
[0037] S33, let the bad pixel be represented by "1" and the non-bad pixel be represented by "0" to establish a bad pixel table BadPoints, the expression is:
[0038]
[0039] The size of the bad point table BadPoints is m×n, and each element in the bad point table BadPoints corresponds to a pixel.
[0040] Furthermore, in step S4, the correction parameter K c_mean and B c_mean The calculation formula is as follows:
[0041]
[0042]
[0043] In the formula, K c ′(i,j), B c ′(i,j) represents the slope matrix K of the non-bad points c ′ and intercept matrix B c′; BadPoints(i,j) represents the pixel (i,j) corresponding to the element “0” in the bad point table BadPoints.
[0044] Furthermore, in step S5, the correction parameter matrix [K c1 ,B c1 The calculation formula of ] is as follows:
[0045]
[0046] B c1 (i,j)=-K c (i,j)·B c (i,j)+B c_mean
[0047] In the formula, K c (i,j),B c (i,j) represent the slope matrix K c and the intercept matrix B c The coordinate value of pixel (i, j) in .
[0048] Furthermore, in step S6, the specific process includes the following steps:
[0049] S61, obtaining the original image img of the image sensor;
[0050] S62, read the calibration parameter file, including the parameter matrix [K c1 ,B c1 ] and bad point table BadPoints;
[0051] S63, judging whether any pixel point (i, j) in the original image img is a bad pixel according to the bad pixel table BadPoints;
[0052] If yes, proceed to step S64;
[0053] If not, then end;
[0054] S64, determine the calibration parameter K c1 Is (i,j) equal to 0?
[0055] If so, each pixel point (i, j) is corrected to obtain the processed pixel point (i′, j′). The correction expression is:
[0056] (i′,j′)=(i,j)*K c1 (i,j)+B c1 (i,j)
[0057] If not, the processed pixel (i′, j′) is obtained by replacing the value in the 5*5 window;
[0058] S65. Repeat steps S63-S64 to traverse all pixel points step by step to obtain the corrected image imgc.
[0059] The technical solution also provides a system for implementing the above-mentioned bad pixel detection and correction method, including:
[0060] An image acquisition unit, wherein the image acquisition unit is used to acquire a plurality of original images under different radiation amounts required for sensor calibration;
[0061] A bad pixel detection unit, wherein the bad pixel detection unit detects bad pixels according to a response curve of the pixel and generates a bad pixel table;
[0062] A correction parameter storage unit, wherein the correction parameter storage unit stores a correction parameter file corresponding to a bad pixel based on a response curve of the pixel;
[0063] A data input unit, wherein the data input unit is used to input an original image img with bad pixels;
[0064] A correction processing unit, the correction processing unit is used to read the correction parameter file and the original image img, and perform correction processing on the bad pixels existing in the original image img;
[0065] A data output unit, wherein the data output unit is used to output the corrected image imgc.
[0066] By means of the above technical solution, the present invention provides a method and system for detecting and correcting bad pixels of an image sensor, which has at least the following beneficial effects:
[0067] 1. The present invention can effectively improve the quality of images, reduce image distortion, and thus improve the results of image processing. Especially when the image content is relatively complex, bad pixels can be detected and corrected more accurately, thereby improving the detection accuracy and correction effect.
[0068] 2. The present invention can effectively reduce the prominence of bad pixels while avoiding affecting other details of the image, thereby improving the clarity and quality of the image. This has important application value for fields that require high-quality images, such as medical imaging, satellite imaging, security monitoring, etc.
[0069] 3. The present invention can be widely applied to various image sensors, such as cameras, computer vision systems, etc. Since the technical solution is highly versatile and can adapt to different sensors and different application scenarios, it has broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0071] Figure 1 It is a flow chart of the bad pixel detection and correction method in the present invention;
[0072] Figure 2 A flowchart of correcting bad pixels of a sensor image in the present invention;
[0073] Figure 3 It is a principle block diagram of the bad pixel detection and correction system in the present invention;
[0074] Figure 4 This is a result diagram of image correction in the present invention. DETAILED DESCRIPTION
[0075] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific implementation methods, so that the implementation process of how the present application uses technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly.
[0076] In actual applications, image sensors may have bad pixels, that is, the response values of some pixels are abnormal, which may be caused by manufacturing defects, physical damage or other reasons. These bad pixels will affect the quality of the image, causing image distortion, thus affecting the results of image processing. In order to improve the detection accuracy, correction effect and applicability of bad pixel detection and correction, please refer to Figure 1-Figure 4 This embodiment proposes a bad pixel detection and correction method for an image sensor, which can effectively improve the image quality, reduce image distortion, and thus improve the image processing results. In particular, when the image content is relatively complex, the bad pixels can be detected and corrected more accurately, improving the detection accuracy and correction effect. The method includes the following steps:
[0077] S1. Obtain L original images I of all pixels of the image sensor under different radiation levels L , L = 1, 2, ..., k; in step S1, the specific process includes the following steps:
[0078] S11, using an integrating sphere to provide the sensor with constant and uniform light intensity;
[0079] S12, adjusting the exposure time of the sensor from a short time to a long time and gradually increasing it at equal intervals until the image begins to be overexposed;
[0080] S13, collect L original images I of all pixels of the sensor at different exposure times L, and record the corresponding exposure time.
[0081] In this embodiment, the image sensor can study the response characteristics of all pixels under a fixed light source intensity by collecting raw images at a series of different exposure times. The light source uses an integrating sphere to provide uniform illumination, and the light intensity is kept constant. The exposure time of the sensor starts from a shorter time and gradually increases until the image begins to be overexposed. Each increase in exposure time is at equal intervals and is precisely adjusted by the control software. As the exposure time increases, the brightness of the image gradually increases until the pixel value of the sensor is close to saturation, resulting in overexposure. Through the above acquisition operations, L raw images I of all pixels of the sensor under different radiation amounts can be obtained. L , and record the corresponding exposure time.
[0082] S2, calculate L original images I L The optimal fitting slope k for each pixel in c and intercept b c , and constitutes the original image I L The parameter matrix [K c ,B c ], the statistical information includes the best fit slope k of size m×n, and each element corresponds to a pixel c and intercept b c The slope matrix K c And the intercept matrix B c ; In step S2, the specific process includes the following steps:
[0083] S21, calculate each original image I L The image mean M contains m×n pixels k , assuming that the resolution of the original image is m×n, and the sequence of L original images is I1, I2, …, I L , then each original image contains m×n pixels. Calculate the image mean M of each original image k , and obtain the mean sequence M1,M2,…,M k , for each original image, its image mean M k The calculation formula is as follows:
[0084]
[0085] Where M k represents the image mean of the kth original image, that is, the average value of all pixel grayscale values; m and n are the row height and column width of the original image respectively; I L (i,j) represents the original image I L The grayscale value of the pixel in the i-th row and j-th column.
[0086] S22, according to the grayscale image mean M k Define the gray value sequence P of each pixel k , L original images of the sequence I1,I2,…,I L , the corresponding image means are M1,M2,…,M k , so each pixel has a gray value sequence P1, P2, ..., P k .
[0087] S23, using the least squares method to calculate the gray value sequence P of each pixel k Perform linear fitting to obtain m×n optimal fitting slopes k c and intercept b c ; The gray value sequence P of each pixel k The least squares method can be used to perform linear fitting to obtain the fitting slope and intercept. For each pixel point (i, j), where i represents the pixel in the i-th row and j represents the pixel in the j-th column, the optimal fitting slope k for the pixel needs to be found. c and intercept b c , the calculation formula is as follows:
[0088]
[0089] Where L represents the number of original images; P k Represents the grayscale value of pixel (i, j) in the kth image.
[0090] S24, the m×n optimal fitting slopes k c and intercept b c The integration is performed to obtain the slope matrix K of size m×n c and the intercept matrix B c ; Complete the operation in step S23 pixel by pixel, and after completing the linear fitting of all pixels, obtain m×n optimal fitting slopes k c and intercept b c , and then the optimal fitting slope k of all pixels is c and intercept b c Organized into two matrices K c and B c , their size is m×n, and each element corresponds to the best fit slope k of a pixel c and intercept b c .
[0091] S3, based on the parameter matrix [K c ,B c ] to judge the bad pixels in the pixels and generate the same image as the original image I LThe corresponding bad point table BadPoints; in the image sensor, the light response matrix of each pixel (i.e., the slope matrix K c ) represents the linear relationship between the gray value of the pixel and the exposure time. The slope matrix K obtained by least squares fitting c It can be used to analyze the response characteristics of the image sensor, especially to detect which pixels have abnormal behavior (i.e., bad pixels). In step S3, the specific process includes the following steps:
[0092] S31. Calculate the slope matrix K c The mean value μK c and standard deviation σK c , the calculation formula is:
[0093]
[0094] Where m and n are the row height and column width of the original image respectively; K c (i,j) represents the slope matrix K c The coordinate value of the pixel (i, j) in;
[0095] S32, according to the mean μK c and standard deviation σK c Determine the bad pixels in the pixels;
[0096] If |K c (i,j)-μK c |>α·σK c , then the pixel is a bad pixel, α is the threshold coefficient, and the value is 3. In this embodiment, 3 is selected to detect abnormal values exceeding 3 standard deviations;
[0097] On the contrary, the pixel is not a bad pixel;
[0098] S33, let the bad pixel be represented by "1" and the non-bad pixel be represented by "0" to establish a bad pixel table BadPoints, the expression is:
[0099]
[0100] The size of the bad point table BadPoints is m×n, and each element in the bad point table BadPoints corresponds to a pixel.
[0101] S4, based on the calculation of the non-bad points in the bad point table BadPoints, the parameter matrix [K c ,B c The correction parameter K of c_mean and B c_mean ; As described in step S2, calculate the slope matrix K of the non-bad points in the bad point table BadPoints c′ and the intercept matrix B c ', use the pixels outside the bad pixel table (i.e., pixels with BadPoints(i,j)=0) to calculate the slope matrix K c ′ and the intercept matrix B c The average value of ′ is used to obtain the correction parameter K c_mean and B c_mean , the calculation formula is as follows:
[0102]
[0103] In the formula, K c ′(i,j), B c ′(i,j) represents the slope matrix K of the non-bad points c ′ and intercept matrix B c ′; BadPoints(i,j) represents the pixel (i,j) corresponding to the element “0” in the bad point table BadPoints.
[0104] S5. Use correction parameter K c_mean and B c_mean For the parameter matrix [K c ,B c ] to obtain the corrected correction parameter matrix [K c1 ,B c1 ], the correction formula is as follows:
[0105]
[0106] B c1 (i,j)=-K c (i,j)·B c (i,j)+B c_mean
[0107] In the formula, K c (i,j),B c (i,j) represent the slope matrix K c and the intercept matrix B c The coordinate value of the pixel (i, j) in;
[0108] S6, according to the correction parameter matrix [K c1 ,B c1 ] and the bad point table BadPoints to correct the bad points of the sensor image; after obtaining the correction parameter matrix [K c1 ,B c1 ] and the bad point table BadPoints, the above parameters are the correction parameter files required for bad point correction, which can be saved as binary files for subsequent reading from the storage unit and correction processing. In step S6, the specific process includes the following steps:
[0109] S61, obtaining the original image img of the image sensor;
[0110] S62, read the calibration parameter file, including the parameter matrix [K c1 ,B c1 ] and bad point table BadPoints;
[0111] S63, judging whether any pixel point (i, j) in the original image img is a bad pixel according to the bad pixel table BadPoints;
[0112] If yes, proceed to step S64;
[0113] If not, then end;
[0114] S64, determine the calibration parameter K c1 Is (i,j) equal to 0?
[0115] If so, each pixel point (i, j) is corrected to obtain the processed pixel point (i′, j′). The correction expression is:
[0116] (i′,j′)=(i,j)*K c1 (i,j)+B c1 (i,j)
[0117] If not, the processed pixel (i′, j′) is obtained by replacing the value in the 5*5 window;
[0118] S65. Repeat steps S63-S64 to traverse all pixel points step by step to obtain the corrected image imgc.
[0119] This embodiment establishes the light response curve of the image sensor by fitting the slope and solution, and uses whether the response is abnormal to detect static bad pixels, avoiding relying on the image content for judgment, thereby improving the detection accuracy of bad pixels. Then, according to the static bad pixel table, the original response curve of the bad pixel is corrected, and the corresponding correction parameter matrix [K c1 ,B c1 ], and distinguish K c1 0 (no response at all) and K c1 This correction method can not only reduce the prominence of bad pixels, but also will not affect other details of the image, thereby optimizing the bad pixel correction effect. In addition, this solution mainly involves the fields of "image processing technology", "sensor technology" and "digital image correction technology", and can be widely used in different image sensors and different application scenarios, thereby enhancing the versatility of this solution.
[0120] Please refer to Figure 3This embodiment proposes a bad pixel detection and correction system for an image sensor, which is composed of an image acquisition unit, a bad pixel detection unit, a correction parameter storage unit, a data input unit, a correction processing unit, and a data output unit.
[0121] The image acquisition unit is used to acquire multiple original images under different radiation amounts required for sensor calibration; the bad pixel detection unit detects bad pixels according to the response curve of the pixels and generates a bad pixel table; the correction parameter storage unit stores the correction parameter file corresponding to the bad pixels based on the response curve of the pixels; the data input unit is used to input the original image img with bad pixels; the correction processing unit is used to read the correction parameter file and the original image img, and perform correction processing on the bad pixels in the original image img; the data output unit is used to output the corrected image imgc.
[0122] This embodiment verifies the effect of the corrected image imgc. Figure 4 As shown (uniform display range, pseudo-color display), the left side is the original image img originally output by the image sensor, which has many bad pixels, and the right side is the image imgc obtained after bad pixel correction, and the number of bad pixels is 0.
[0123] Based on the above embodiments, the present invention can be widely used in application fields such as the field of image processing technology, the field of sensor technology, and the field of digital image correction technology.
[0124] First, in the field of image processing technology, this embodiment provides a new bad pixel detection and correction method, which can effectively improve the quality of the image, reduce image distortion, and thus improve the image processing results. Especially when the image content is relatively complex, the present invention can more accurately detect and correct bad pixels, thereby improving the detection accuracy and correction effect.
[0125] Secondly, in the field of sensor technology, the present invention can be widely applied to various image sensors, such as cameras, computer vision systems, etc. Since the present invention has strong versatility and can adapt to different sensors and different application scenarios, it has broad application prospects.
[0126] Finally, in the field of digital image correction technology, the present invention can effectively reduce the prominence of bad pixels while avoiding affecting other details of the image, thereby improving the clarity and quality of the image. This has important application value for fields that require high-quality images, such as medical imaging, satellite imaging, security monitoring, etc.
[0127] In general, with the wide application of image sensors in various fields, the requirements for image quality are getting higher and higher. The present invention provides a new bad pixel detection and correction method and system, which can effectively improve the quality of images and meet the market demand for high-quality images, so it has broad market application prospects.
[0128] Those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, so the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0129] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the above embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0130] The above implementation methods have been described in detail. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A bad pixel detection and correction method for an image sensor, characterized in that: The method comprises the following steps: S1. Obtain L original images I of all pixels of the image sensor under different radiation levels L , L=1,2,…,k; S2, calculate L original images I L The optimal fitting slope k for each pixel in c and intercept b c , and constitutes the original image I L The parameter matrix [K c ,B c ], the statistical information includes the best fit slope k of size m×n, and each element corresponds to a pixel c and intercept b c The slope matrix K c And the intercept matrix B c ; S3, based on the parameter matrix [K c ,B c ] to judge the bad pixels in the pixels and generate the same image as the original image I L The corresponding bad point table BadPoints; S4, based on the calculation of the non-bad points in the bad point table BadPoints, the parameter matrix [K c ,B c The correction parameter K of c_mean and B c_mean ; S5. Use correction parameter K c_mean and B c_mean For the parameter matrix [K c ,B c ] to obtain the corrected correction parameter matrix [K c1 ,B c1 ]; S6, according to the correction parameter matrix [K c1 ,B c1 ] and the bad pixel table BadPoints are used to correct the bad pixels in the sensor image.
2. The bad pixel detection and correction method according to claim 1, characterized in that: In step S1, the specific process includes the following steps: S11, using an integrating sphere to provide the sensor with constant and uniform light intensity; S12, adjusting the exposure time of the sensor from a short time to a long time and gradually increasing it at equal intervals until the image begins to be overexposed; S13, collect L original images I of all pixels of the sensor at different exposure times L , and record the corresponding exposure time.
3. The bad pixel detection and correction method according to claim 1, characterized in that: In step S2, the specific process includes the following steps: S21, calculate each original image I L The image mean M contains m×n pixels k , the calculation formula is as follows: Where M k represents the image mean of the kth original image, that is, the average value of all pixel grayscale values; m and n are the row height and column width of the original image respectively; I L (i,j) represents the original image I L The gray value of the pixel at the i-th row and j-th column in ; S22, according to the grayscale image mean M k Define the gray value sequence P of each pixel k ; S23, using the least squares method to calculate the gray value sequence P of each pixel k Perform linear fitting to obtain m×n optimal fitting slopes k c and intercept b c , the calculation formula is as follows: Where L represents the number of original images; P k Represents the gray value of pixel (i, j) in the kth image; S24, the m×n optimal fitting slopes k c and intercept b c The integration is performed to obtain the slope matrix K of size m×n c and the intercept matrix B c .
4. The bad pixel detection and correction method according to claim 1, characterized in that: In step S3, the specific process includes the following steps: S31. Calculate the slope matrix K c The mean value μK c and standard deviation σK c , the calculation formula is: Where m and n are the row height and column width of the original image respectively; K c (i,j) represents the slope matrix K c The coordinate value of the pixel (i, j) in; S32, according to the mean μK c and standard deviation σK c Determine the bad pixels in the pixels; If |K c (i,j)-μK c |>α·σK c , then the pixel is a bad pixel, α is the threshold coefficient, and the value is 3; On the contrary, the pixel is not a bad pixel; S33, let the bad pixel be represented by "1" and the non-bad pixel be represented by "0" to establish a bad pixel table BadPoints, the expression is: The size of the bad point table BadPoints is m×n, and each element in the bad point table BadPoints corresponds to a pixel.
5. The bad pixel detection and correction method according to claim 1, characterized in that: In step S4, the correction parameter K c_mean and B c_mean The calculation formula is as follows: In the formula, K c ′(i,j), B c ′(i,j) represents the slope matrix K of the non-bad points c ′ and intercept matrix B c ′; BadPoints(i,j) represents the pixel (i,j) corresponding to the element "0" in the bad point table BadPoints.
6. The bad pixel detection and correction method according to claim 1, characterized in that: In step S5, the correction parameter matrix [K c1 ,B c1 The calculation formula of ] is as follows: B c1 (i,j)=-K c (i,j)·B c (i,j)+B c_mean In the formula, K c (i,j),B c (i,j) represent the slope matrix K c and the intercept matrix B c The coordinate value of the pixel (i, j) in .
7. The bad pixel detection and correction method according to claim 1, characterized in that: In step S6, the specific process includes the following steps: S61, obtaining the original image img of the image sensor; S62, read the calibration parameter file, including the parameter matrix [K c1 ,B c1 ] and bad point table BadPoints; S63, judging whether any pixel point (i, j) in the original image img is a bad pixel according to the bad pixel table BadPoints; If yes, proceed to step S64; If not, then end; S64, determine the calibration parameter K c1 Is (i,j) equal to 0? If so, each pixel point (i, j) is corrected to obtain the processed pixel point (i′, j′). The correction expression is: (i′,j′)=(i,j)*K c1 (i,j)+B c1 (i,j) If not, the processed pixel point (i′, j′) is obtained by replacing the value in the 5*5 window; S65. Repeat steps S63-S64 to traverse all pixel points step by step to obtain the corrected image imgc.
8. A system for implementing the bad pixel detection and correction method according to any one of claims 1 to 7, characterized in that: include: An image acquisition unit, the image acquisition unit is used to acquire multiple original images under different radiation amounts required for sensor calibration; A bad pixel detection unit, wherein the bad pixel detection unit detects bad pixels according to a response curve of the pixel and generates a bad pixel table; A correction parameter storage unit, wherein the correction parameter storage unit stores a correction parameter file corresponding to a bad pixel based on a response curve of the pixel; A data input unit, the data input unit is used to input an original image img with bad pixels; A correction processing unit, the correction processing unit is used to read the correction parameter file and the original image img, and perform correction processing on the bad pixels existing in the original image img; A data output unit, wherein the data output unit is used to output the corrected image imgc.
Citation Information
Patent Citations
Method and device for dead pixel detection and correction of image sensor
CN105430385A
Image dead pixel cluster correction method, computer device and computer readable storage medium
CN112911174A
Dead pixel detection method and device, electronic equipment and storage medium
CN113674238A
Dead pixel detection method and device
CN115002364A
Cited By
Camera pixel dead pixel detection and correction method and system, terminal and medium
CN121462754A
A camera pixel bad point detection and correction method, system, terminal and medium
CN121462754B
Camera pixel non-uniformity correction method and system, terminal and medium
CN121486694A
A camera pixel non-uniformity correction method, system, terminal and medium
CN121486694B