Image sensor flaw correction method and system and medium
By setting a transparent target between the light source and the image sensor, adjusting the posture and calculating the image data ratio, the problem of accuracy of defect detection and correction during the use of the image sensor is solved, and efficient and reliable defect detection and correction are achieved.
Patent Information
- Application Number
- CN202511258245.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-04
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-09-04
AI Technical Summary
Existing technologies make it difficult to accurately detect and correct new defects that appear in image sensors during use. Front-end calibration cannot cope with environmental changes, and back-end processing algorithms rely on the scene, which is prone to misjudgment and consumes a lot of computing resources.
By fixing a transparent target between the light source and the image sensor, adjusting the target or sensor posture, calculating the image data ratio, screening the abnormal ratio position and calculating the correction coefficient, defect detection and correction can be achieved.
It achieves accurate detection and rapid correction of new defects added to image sensors after leaving the factory, reduces computing resource consumption, improves detection accuracy and efficiency, avoids light source obstruction problems, and ensures detection reliability and accuracy.
Smart Images

Figure CN120751286A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of machine vision, and in particular relates to an image sensor defect correction method, system and medium. Background Art
[0002] Image sensors are widely used in various imaging devices, and their imaging quality directly impacts the accuracy and reliability of the final image. However, image sensors are prone to various defects during the production process, packaging, or long-term use. These defects primarily manifest themselves in two categories: physical defects in the sensor's semiconductor layer itself (such as dead pixels) and contamination, scratches, or material degradation of the filter covering the sensor surface. A typical manifestation of these defects is a decrease in the pixel responsivity at a specific location on the sensor. This means that the pixel's conversion efficiency for incident light signals is lower than normal, which is reflected in the collected image data as abnormally low (dark) pixel values in that local area.
[0003] The image defects caused by this decrease in local response rate seriously affect the imaging quality and may cause misjudgment or information loss in scenarios such as high-precision detection, scientific imaging, and security monitoring. Currently, the main ways to solve this problem are divided into two types: front-end calibration and back-end processing. Front-end calibration is usually performed in the factory. By shooting a standard light source or target, the bad pixel information is identified and a correction mapping table is generated. However, this can only solve defects that exist at the factory and cannot cope with new defects caused by environmental factors, aging, and other factors during the use of the equipment. Back-end processing relies on complex image processing algorithms to try to identify and repair dark spots at the software level. However, such algorithms are highly dependent on the scene content and can easily misjudge real dark areas or complex textures in the image as defects, resulting in unreliable detection results. It requires a lot of computing resources and is difficult to achieve accurate detection and correction.
[0004] Therefore, in order to accurately detect and correct new defects in image sensors after leaving the factory, the present invention provides an image sensor defect correction method, system and medium. Summary of the Invention
[0005] The purpose of the present invention is to overcome the above problems existing in the prior art and provide an image sensor defect correction method, system and medium. By moving the target or image sensor, the image data before and after the movement of the image sensor is collected and aligned. The same physical position of the target corresponds to different sensor pixel data. The specific defect location can be analyzed by the larger or smaller ratio of the before and after data, thereby realizing defect detection and correction.
[0006] In order to achieve the above technical objectives and the above technical effects, the present invention is implemented through the following technical solutions: A method for correcting image sensor defects utilizes an image sensor to collect different image data to identify the location of image sensor defects and perform corrections. The correction method includes: Fixing the transparent target so that it is located between the light source and the image sensor and parallel to the image sensor; Adjusting the target or image sensor to achieve relative translation or rotation, and calculating the ratio of two pixel values corresponding to the same target position in two image data acquired by the image sensor before and after the adjustment; Screening the image sensor defect position corresponding to when the ratio exceeds a preset threshold range; A correction coefficient of the defect position relative to a normal position outside the defect position is calculated.
[0007] Furthermore, calculating the ratio of two pixel values corresponding to the same target position in two image data acquired by the image sensor before and after the adjustment includes: Confirm the positions of the corresponding marking points in the two image data captured by the image sensor before and after the adjustment; Extracting the region of interest corresponding to the two image data, where the region of interest is bounded by the corresponding marker point position; Calculates the ratio of two pixel values corresponding to the same pixel position in two regions of interest.
[0008] Furthermore, when the ratio exceeds a preset threshold, screening the corresponding image sensor defect position includes: determining the smaller value of the two pixel values according to the ratio of the two pixel values, and marking the image sensor pixel position corresponding to the smaller value as the image sensor defect position.
[0009] Furthermore, the correction coefficient calculation method includes: Obtaining a standard response rate of the image sensor to calculate an average transmittance of the target based on actual pixel values at a normal position of the image sensor; Extracting actual pixel values at the defective position and the normal position of the image sensor to calculate the actual response rates of the defective position and the normal position of the image sensor according to the average transmittance of the target; The average value of the actual response rate of the normal position of the image sensor is calculated, so as to calculate the corresponding correction coefficient according to the actual response rate of the defective position of the image sensor.
[0010] Furthermore, the correction coefficient calculation method includes: calculating the average value of actual pixel values at normal positions of the image sensor, and then calculating the ratio of the average value to the actual pixel value at the defective position of the image sensor as the correction coefficient corresponding to the defective position of the sensor.
[0011] Furthermore, after the image sensor defect position screening is completed, the method further includes: When the ratio falls within the preset threshold range, it is determined whether the corresponding two pixel values are both less than the preset reference threshold: If so, the target or image sensor is adjusted to achieve relative translation or rotation; if not, no response is taken.
[0012] Furthermore, adjusting the target or image sensor to achieve relative translation includes: moving the target or image sensor twice in the horizontal or vertical direction, and the two movements are in opposite directions, so that all pixel positions of the image sensor can capture the target at least twice.
[0013] Furthermore, if the image sensor is a color image sensor, the correction coefficient of each defect position of the image sensor is calculated separately in each channel.
[0014] The present invention also provides an image sensor defect correction system, comprising: A posture adjustment module, used to adjust the target or image sensor to achieve relative translation or rotation; wherein the target is transparent, located between the light source and the image sensor, and parallel to the image sensor; An image analysis module is used to calculate the ratio of two pixel values corresponding to the same target position in two image data acquired by the image sensor before and after adjustment; a ratio analysis module, configured to screen image sensor defect locations corresponding to when the ratio exceeds a preset threshold value; The correction analysis module is used to calculate a correction coefficient of the defect position relative to a normal position outside the defect position.
[0015] The present invention also provides a computer-readable storage medium comprising a computer program, wherein the computer program implements the correction method when executed by a processor.
[0016] The beneficial effects of the present invention are: (1) The present invention can accurately detect defects that are added to image sensors after they leave the factory. The defect location can be quickly and precisely located by simply changing the relative position of the transparent target. The correction coefficient corresponding to the defect location can be quickly analyzed based on the data from the detection process. No additional image detection is required to obtain the correction target. After correction, the correction can be applied to subsequent detection processes without the need for real-time utilization of large amounts of computing resources, effectively improving detection efficiency. The entire defect detection process is simple and efficient, and the correction results are accurate and reliable, effectively reducing usage costs and resource consumption.
[0017] (2) The present invention effectively solves the occlusion problem caused by traditional reflective targets by fixing the transparent target between the light source and the image sensor, avoiding detection defects caused by the light source being between the target and the image sensor or the image sensor being between the target and the light source, and in principle improving the accuracy of subsequent detection. By setting the transparent target and the image sensor parallel to each other, problems such as uneven light intensity distribution and image distortion caused by angle tilt are effectively eliminated, avoiding the introduction of other problematic factors, and ensuring the reliability and accuracy of subsequent detection.
[0018] By changing the relative posture between the target and the image sensor, the same target position on the target can be captured by pixels at different positions on the image sensor. In theory, if the pixels at all positions on the image sensor remain normal, then the pixel data at two different positions on the image sensor corresponding to any position on the target will remain consistent. By analyzing the two image data captured by the image sensor before and after the change, the ratio of the two pixel values corresponding to the same target position in the two image data can be obtained. Based on whether the ratio result is abnormal, it is possible to quickly determine whether a problem occurs, thereby quickly locking the defect position on the image sensor.
[0019] By analyzing whether the ratio corresponding to all target positions falls within the preset threshold range, it is possible to accurately determine whether there are any anomalies in the two positions on the image sensor corresponding to the current target position. Since the relative position between the target and the image sensor is known in advance, the mapping relationship between any target position before and after the change and the image information collected by the image sensor is also known. As long as the above ratio does not fall within the preset threshold range, the ratio result can be used to quickly determine whether the numerator or denominator is smaller. Based on the mapping relationship between all target positions and the image information collected by the image sensor, the image sensor position corresponding to the smaller one can be quickly locked, thereby clearly identifying the location of the image sensor defect.
[0020] By counting the actual pixel values at the defective position and the normal position of the image sensor, the actual pixel value at the normal position of the image sensor can be used as the correction target. Taking into account the fluctuation of actual data, the minimum value, maximum value or average value of the actual pixel values at all normal positions can be used as the target value for defect correction. The corresponding actual pixel response rate can also be calculated from the actual pixel value at the normal position of the image sensor, and then divided by the corresponding data at the defective position of the image sensor to form a correction coefficient. At the same time, in order to ensure the uniformity of global data, the optimization coefficient of the normal area can also be calculated in the same way, thereby forming a corresponding correction coefficient to act on the pixels in the normal area of the image sensor. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings: Figure 1 is a flow chart of the correction method in the present invention; Figure 2 It is a structural block diagram of the correction system in the present invention; Figure 3 It is a structural schematic diagram of the correction device in the present invention.
[0022] In the figure: 1-image sensor; 2-filter; 3-light source; 4-target. DETAILED DESCRIPTION
[0023] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0024] Due to physical defects in the image sensor (such as dead pixels) or contamination, scratches, or material degradation of the filter covering the sensor surface (such as the Bayer filter), the pixel responsivity at a specific location on the sensor decreases. In other words, the pixel's conversion efficiency to incident light signals is lower than normal, which is reflected in the collected image data as abnormally low (dark) pixel values in that local area.
[0025] In order to accurately detect and correct new defects in sensors after they leave the factory, Figure 1 As shown, this embodiment first provides an image sensor defect correction method, which uses an image sensor to collect different image data to confirm the location of image sensor defects and perform corrections. The correction method includes: The transparent target is fixed so that it is located between the light source and the image sensor and is parallel to the image sensor.
[0026] The target is made of a transparent material with uniform transmittance and features several markings distributed across its surface, such as four rectangularly arranged cross-shaped markings in the center. This facilitates quick location during subsequent processing of image data captured by the image sensor. The light source is a uniform, constant, standard light source with a known intensity. Since the subsequent process involves the image sensor detecting image information on the target surface, using a traditional reflective target presents a conflicting need for proper placement of the light source and image sensor. If the light source is positioned between the target and the image sensor, it obscures the image sensor's detection. If the image sensor is positioned between the target and the light source, the obstruction cast by the image sensor severely impacts subsequent detection accuracy. Therefore, by securing the transparent target between the light source and the image sensor, the obstruction problem associated with traditional reflective targets is effectively resolved, avoiding detection defects caused by the light source being positioned between the target and the image sensor, or vice versa. This fundamentally improves subsequent detection accuracy. By aligning the transparent target parallel to the image sensor, the problem of uneven light intensity distribution and image distortion caused by angular tilt is eliminated, preventing other potential issues and ensuring the reliability and accuracy of subsequent detection.
[0027] The target or image sensor is adjusted to achieve relative translation or rotation, and the ratio of two pixel values corresponding to the same target position in two image data acquired by the image sensor before and after the adjustment is calculated.
[0028] Since the target is set in parallel with the image sensor, the results collected by the image sensor are consistent regardless of whether the target or the image sensor is moved. By changing the relative position between the target and the image sensor, the same target position on the target can be collected by pixels at different positions on the image sensor. In theory, if the pixels at all positions on the image sensor remain normal, then the pixel data at two different positions on the image sensor corresponding to any position on the target will remain consistent. By analyzing the two image data captured by the image sensor before and after the change, the ratio of the two pixel values corresponding to the same target position in the two image data can be obtained. The problem can be quickly determined based on whether the ratio result is abnormal, thereby quickly locking the defect position on the image sensor.
[0029] The image sensor defect position corresponding to the ratio exceeding the preset threshold range is screened. That is, the ratio corresponding to all target positions is analyzed to see whether it falls within the preset threshold range, so as to determine the corresponding image sensor defect position based on the ratio exceeding the preset threshold range.
[0030] As can be seen from the above, the ratio corresponding to any position on the target is close to 1 under normal image sensor conditions. Taking into account actual measurement errors and other factors, a preset threshold range (e.g., (0.98, 1.02)) can be set based on experience. By analyzing whether the ratio corresponding to all target positions falls within this preset threshold range, it is possible to accurately determine whether there are any anomalies between the two positions on the image sensor corresponding to the current target position. Because the relative position between the target and the image sensor is known in advance, the mapping relationship between any target position and the image information captured by the image sensor before and after the change is known. As long as the ratio does not fall within the preset threshold range, the ratio result can be used to quickly determine whether the numerator or denominator is smaller. Based on the mapping relationship between all target positions and the image information captured by the image sensor, the image sensor position corresponding to the smaller ratio can be quickly identified, thereby clearly determining the location of the image sensor defect.
[0031] The correction coefficient of the defect position relative to the normal position outside the defect position is calculated, that is, the actual pixel values of the defect position and the normal position of the image sensor are counted, so as to calculate the correction coefficient of each defect position of the image sensor based on the actual pixel value of the normal position of the image sensor.
[0032] Since the defect position of the image sensor has been clearly identified at this time, the actual pixel value of the normal position of the image sensor can be used as the correction target by counting the actual pixel values of the defect position and the normal position of the image sensor. Taking into account the fluctuation of actual data, the minimum value, maximum value or average value of the actual pixel values of all normal positions can be used as the target value for defect correction. The corresponding actual pixel response rate can also be calculated from the actual pixel value of the normal position of the image sensor, and then divided by the corresponding data of the defect position of the image sensor to form a correction coefficient. At the same time, in order to ensure the uniformity of global data, the optimization coefficient of the normal area can also be calculated in the same way, thereby forming a corresponding correction coefficient to act on the pixels in the normal area of the image sensor.
[0033] In order to accurately obtain the ratio of two pixel values corresponding to the same target position in the two image data before and after the change, calculating the ratio of two pixel values corresponding to the same target position in the two image data acquired by the image sensor before and after the adjustment includes: Confirm the corresponding marker points in the two image data captured by the image sensor before and after the adjustment.
[0034] The region of interest corresponding to the two image data is extracted, and the region of interest is bounded by the corresponding marked point position.
[0035] Calculates the ratio of two pixel values corresponding to the same pixel position in two regions of interest.
[0036] As can be seen above, the target or image sensor is adjusted to achieve relative translation or rotation. When translation is selected, the target or image sensor is moved by Δx in the x-direction and Δy in the y-direction. For the two image data captured by the image sensor before and after the change, the corresponding marker locations, such as the four corner points of a rectangular region, can be found through mature image processing techniques such as the centroid calculation algorithm. By extracting the region of interest (ROI) corresponding to the two image data, two ROI images of the same size are formed, denoted as image I1 and image I2. The pixel values at position (i, j) in both images are I1(i, j) and I2(i, j), respectively. For any coordinate position (i, j) in the ROI image, the corresponding sensor coordinate position before translation is (i-Δx, j-Δy). The ratio ρ(i, j) of I1(i, j) and I2(i, j) is calculated as follows:
[0037] Where T(i, j) represents the transmittance at the target position (i, j) (theoretically, they should be the same constant under normal circumstances); L represents the light source intensity (usually, the light source intensity is uniform and known); S(i, j) represents the responsivity at the sensor position (i, j), and S(i-Δx, j-Δy) represents the responsivity at the sensor position (i-Δx, j-Δy). Theoretically, S(i, j) and S(i-Δx, j-Δy) should be the same constant under normal circumstances.
[0038] For normal areas, if T(i, j) and L are uniform, then ρ(i, j) ≈ 1, so the specific analysis is as follows: If threshold_low ≤ ρ(i, j) ≤ threshold_high: the sensor pixel corresponding to the current position is normal. threshold_low and threshold_high respectively preset the lower and upper limits of the threshold interval. threshold_low and threshold_high can be set based on empirical values, such as the mean and standard deviation of a reference normal area.
[0039] If ρ(i, j)>threshold_high: The denominator S(i-Δx, j-Δy) is small, indicating that the sensor position (i-Δx, j-Δy) has a defect (low transmittance).
[0040] If ρ(i, j) < threshold_low: the numerator S(i, j) is small, indicating that the sensor position (i, j) has a defect (low transmittance).
[0041] As can be seen from the above, the target or image sensor is adjusted to achieve relative translation or rotation. When rotation is selected, it means rotating the target or image sensor. Taking the rotation of the image sensor as an example, let the rotation angle be θ and the rotation center be (p i , p j ), for any coordinate position (i, j) in the ROI image, the coordinate position (i', j') of the corresponding sensor before rotation is calculated as follows:
[0042] From the above, we can know that by calculating the ratio ρ(i, j) of I1(i, j) and I2(i, j), it is as follows:
[0043] Thus we get:
[0044] Among them, S(p i +(ip i )cosθ+(jp j )sinθ,p j -(ip i )sinθ+(jp j )cosθ) represents the sensor position (p i +(ip i )cosθ+(jp j )sinθ,p j -(ip i )sinθ+(jp j )cosθ) response rate.
[0045] Regarding the specific method of obtaining the ratio ρ(i, j) by rotation, considering the rotation center (p i , p j ) The corresponding ratio ρ(i,j) must be equal to 1. A rotation can be added as a supplementary detection of this position. The specific analysis method can refer to the above-mentioned translation process. As an extended embodiment of the present invention, rotation and translation can also be combined, which will not be repeated here.
[0046] In order to subsequently correct the defect position of the image sensor, when the ratio exceeds a preset threshold, the corresponding image sensor defect position is screened, including: determining the smaller value of the two pixel values based on the ratio of the two pixel values, and marking the image sensor pixel position corresponding to the smaller value as the image sensor defect position.
[0047] As a specific embodiment of the present invention, if there is a defect at position (i, j), then M(i, j) = 1, otherwise M(i, j) = 0, as follows: If ρ(i, j) > threshold_high: then M(i-Δx, j-Δy) = 1 (the defect is at sensor position (i-Δx, j-Δy)).
[0048] If ρ(i, j) < threshold_low: then M(i, j) = 1 (the defect is at sensor position (i, j)).
[0049] As can be seen from the above, a typical manifestation of image sensor defects is a decrease in pixel responsivity, that is, the pixel's conversion efficiency to incident light signals is lower than normal. This is reflected in the collected image data as abnormally low (dark) pixel values in local areas. Therefore, the correction coefficient calculation method includes: Get the standard response rate S of the image sensor ref , and the average transmittance T of the target is calculated based on the actual pixel value at the normal position of the image sensor avg The light source intensity is L, usually S ref The specific values of and L can be known in advance, and the target transmittance corresponding to each pixel position in the normal area of the image sensor is I1(i, j) / LS ref By accumulating the transmittance of each pixel position in the normal area and averaging it, the average transmittance of the target T can be obtained. avg .
[0050] Extract the actual pixel value I1(i, j) of the defect position and the normal position of the image sensor to calculate the average transmittance T of the target. avg , respectively calculate the actual response rate of the image sensor defect position and normal position, the actual response rate of the defect position and normal position can be obtained by I1(i, j) / LT avg Calculated.
[0051] The average value S of the actual response rate of the statistical image sensor in the normal position normal , thus according to the actual response rate S of the image sensor defect position real (i, j) calculates the corresponding correction coefficient α(i, j), where α(i, j)=S normal / S real (i, j).
[0052] To simplify the algorithm, another embodiment of the present invention includes calculating the correction coefficient by taking the average of the actual pixel values at the normal position of the image sensor and then calculating the ratio of this average to the actual pixel value at the position of the defect, which serves as the correction coefficient corresponding to the sensor defect. This method effectively utilizes the image data collected during the movement process, achieving efficient correction of defect confirmation.
[0053] As can be seen from the above, if the defect area of the image sensor is large, after moving the target or image sensor, I1(i, j) and I2(i, j) at some pixel positions in the ROI image may be abnormal, but the ratio ρ(i, j) is normal. For this situation, after the image sensor defect position screening is completed, the following is also included: When the ratio falls within the preset threshold range, it is determined whether the corresponding two pixel values are both less than the preset reference threshold: If so, the target or image sensor is adjusted to achieve relative translation or rotation, such as increasing the movement amount Δx in the x direction and the movement amount Δy in the y direction. If not, no response is made.
[0054] The preset reference threshold can be set with reference to the global pixel average value. For example, the preset reference threshold is 0.8 times the global pixel average value of the ROI image. The specific multiple can be flexibly adjusted according to the actual experience value. global_avg The calculation formula is as follows:
[0055] Where N is the total number of pixels in the ROI image.
[0056] In this way, the target or image sensor can be moved so that the movement amount in the x-direction and the movement amount in the y-direction exceed the span of the sensor defect in the translation direction, that is, the intersection area of the defect area after translation is avoided, thereby ensuring the reliability and accuracy of the detection results.
[0057] To ensure that defects at all pixel locations on the image sensor can be detected and corrected, adjusting the target or image sensor to achieve relative translation includes moving the target or image sensor twice in the horizontal or vertical direction, with the two movements in opposite directions, so that all pixel locations on the image sensor can capture the target at least twice. Taking the horizontal movement as an example, the size of the two identical ROI images extracted after one movement will inevitably be smaller than the image sensor size. Even in the ideal case, if the height of the ROI image is equal to the height of the image sensor, at least one reverse movement is required to fully cover the entire area of the image sensor, ensuring that all locations on the image sensor can be detected and corrected.
[0058] As a specific embodiment of the present invention, if the image sensor is a color image sensor, correction coefficients are calculated separately for each defect location on the image sensor, channel by channel. Taking a Bayer array area image sensor as an example, RGB data for each pixel location on each image sensor is pre-interpolated. For the R, G, and B channels, the corresponding correction coefficients α(i, j)_R, α(i, j)_G, and α(i, j)_B are calculated using the aforementioned correction method, respectively. This allows for separate channel-by-channel correction of each pixel location on the image sensor.
[0059] like Figure 2 As shown, the second aspect of the present invention further provides an image sensor defect correction system, comprising: The posture adjustment module is used to adjust the target or image sensor to achieve relative translation or rotation; wherein the target is transparent, located between the light source and the image sensor, and parallel to the image sensor.
[0060] The image analysis module is used to calculate the ratio of two pixel values corresponding to the same target position in the two image data acquired by the image sensor before and after adjustment.
[0061] The ratio analysis module is used to screen the image sensor defect position corresponding to when the ratio exceeds a preset threshold range.
[0062] The correction analysis module is used to calculate a correction coefficient of the defect position relative to a normal position outside the defect position.
[0063] For the specific implementation method of the correction system, please refer to the above correction method for operation, which will not be repeated here.
[0064] like Figure 3 As shown, the third aspect of the present invention further provides an image sensor defect correction device, comprising: The image sensor 1 is connected to the image analysis module and is used to collect image information.
[0065] The filter 2 is located in front of the sensing area of the image sensor 1 and forms a component that moves synchronously with the image sensor 1. Usually, contamination of the filter 2 or defects in the image sensor 1 may cause abnormal acquisition results of the image sensor 1.
[0066] The light source 3 is directed towards the sensing area of the image sensor 1 and is used to provide uniform and constant illumination with a known illumination intensity.
[0067] The target 4 is made of a transparent material with uniform transmittance. It is located between the light source 3 and the image sensor 1 and is parallel to the image sensor 1. It forms a component that moves synchronously with the light source 3. Four cross-shaped marks distributed in a rectangular shape can be set in the central area to facilitate rapid positioning when processing the image data collected by the image sensor 1 later.
[0068] The defect detection and correction of the image sensor 1 or the filter 2 are realized based on the correction device. The specific operation method can refer to the above correction method for operation, which will not be repeated here.
[0069] A fourth aspect of the present invention further provides a computer-readable storage medium comprising a computer program, which implements the above-mentioned correction method when executed by a processor.
[0070] In practical applications, computer-readable storage media may take the form of any combination of one or more computer-readable media. Computer-readable media may be computer-readable signal media or computer-readable storage media. Computer-readable storage media may be, but are not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination thereof. More specific examples of computer-readable storage media may include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or component.
[0071] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0072] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0073] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0074] Throughout this specification, references to terms such as "one embodiment," "example," and "specific example" indicate that the specific features, structures, materials, or characteristics described in conjunction with that embodiment or example are included in at least one embodiment or example of the present invention. In this specification, schematic representations of these terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0075] The basic principles, main features, and advantages of the present invention are shown and described above. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are merely illustrative of the principles of the present invention. Various changes and modifications may be made to the present invention without departing from the spirit and scope of the present invention, and such changes and modifications fall within the scope of the invention as claimed.
Claims
1. A method for correcting image sensor defects, using an image sensor to collect different image data to identify the location of image sensor defects and perform corrections, characterized in that: The correction method comprises: Fixing the transparent target so that it is located between the light source and the image sensor and parallel to the image sensor; Adjusting the target or image sensor to achieve relative translation or rotation, and calculating the ratio of two pixel values corresponding to the same target position in two image data acquired by the image sensor before and after the adjustment; Screening the image sensor defect position corresponding to when the ratio exceeds a preset threshold range; A correction coefficient of the defect position relative to a normal position outside the defect position is calculated.
2. The image sensor defect correction method according to claim 1, characterized in that: Calculating the ratio of two pixel values corresponding to the same target position in two image data acquired by the image sensor before and after adjustment includes: Confirm the positions of the corresponding marking points in the two image data captured by the image sensor before and after the adjustment; Extracting the region of interest corresponding to the two image data, where the region of interest is bounded by the corresponding marker point position; Calculates the ratio of two pixel values corresponding to the same pixel position in two regions of interest.
3. The image sensor defect correction method according to claim 2, characterized in that: When the ratio exceeds a preset threshold, the corresponding image sensor defect position includes: determining the smaller value of the two pixel values according to the ratio of the two pixel values, and marking the image sensor pixel position corresponding to the smaller value as the image sensor defect position.
4. The image sensor defect correction method according to claim 3, characterized in that: The correction coefficient calculation method includes: Obtaining a standard response rate of the image sensor to calculate an average transmittance of the target based on actual pixel values at a normal position of the image sensor; Extracting actual pixel values at the defective position and the normal position of the image sensor to calculate the actual response rates of the defective position and the normal position of the image sensor according to the average transmittance of the target; The average value of the actual response rate of the normal position of the image sensor is calculated, so as to calculate the corresponding correction coefficient according to the actual response rate of the defective position of the image sensor.
5. The image sensor defect correction method according to claim 3, wherein: The correction coefficient calculation method includes: calculating the average value of actual pixel values at normal positions of the image sensor, and then calculating the ratio of the average value to the actual pixel value at the defective position of the image sensor as the correction coefficient corresponding to the defective position of the sensor.
6. The image sensor defect correction method according to claim 4 or 5, characterized in that: After the image sensor defect position screening is completed, the method further includes: When the ratio falls within the preset threshold range, it is determined whether the corresponding two pixel values are both less than the preset reference threshold: If so, the target or image sensor is adjusted to achieve relative translation or rotation; if not, no response is taken.
7. The image sensor defect correction method according to claim 6, characterized in that: Adjusting the target or the image sensor to achieve relative translation includes: moving the target or the image sensor twice in the horizontal or vertical direction, and the two movements are in opposite directions, so that all pixel positions of the image sensor can capture the target at least twice.
8. The image sensor defect correction method according to claim 7, characterized in that: If the image sensor is a color image sensor, the correction coefficient of each defect position of the image sensor is calculated separately by channel.
9. An image sensor defect correction system, characterized in that: include: A posture adjustment module, used to adjust the target or image sensor to achieve relative translation or rotation; wherein the target is transparent, located between the light source and the image sensor, and parallel to the image sensor; An image analysis module is used to calculate the ratio of two pixel values corresponding to the same target position in two image data acquired by the image sensor before and after adjustment; a ratio analysis module, configured to screen image sensor defect locations corresponding to when the ratio exceeds a preset threshold value; The correction analysis module is used to calculate a correction coefficient of the defect position relative to a normal position outside the defect position.
10. A computer-readable storage medium comprising a computer program, characterized in that When the computer program is executed by a processor, the correction method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Image dead pixel detection and processing method
CN106210712A
Image sensor dead pixel detection method, shooting device, unmanned aerial vehicle and storage medium
CN110463199A
Image sensor defective pixel detection method and device and electronic device
CN110830795A
Filter flaw detection method and device
CN115656192A
Static bad pixel correction method, image processing chip and camera device
WO2021056202A1