Fixed pattern noise correction method, device and storage medium

By obtaining the noise response function and digital gain, calculating the composite coefficients and performing a multiplication operation, the problem of amplification of rounding error in fixed-mode noise correction is solved, achieving effective correction of images under high digital gain, avoiding the generation of stripes, and improving image quality.

CN122340374APending Publication Date: 2026-07-03ZHEJIANG HUARAY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG HUARAY TECH CO LTD
Filing Date
2026-05-06
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing technologies for correcting fixed-pattern noise in images suffer from rounding errors that amplify with gain, resulting in poor image correction, especially the generation of vertical stripes at high digital gains.

Method used

By acquiring the pre-calibrated noise response function and digital gain, and combining them with the pixel values ​​of the image to be corrected, the composite coefficients are calculated and a multiplication operation is performed. Fixed-mode noise correction and digital gain are performed directly within a single module, avoiding the amplification of rounding errors.

Benefits of technology

It effectively avoids the generation of image stripes under high digital gain, improves image correction effect, reduces rounding error, and enhances image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122340374A_ABST
    Figure CN122340374A_ABST
Patent Text Reader

Abstract

This application discloses a fixed-pattern noise correction method, device, and storage medium. The method includes: acquiring an image to be corrected; and acquiring a pre-calibrated noise response function and digital gain. The noise response function describes the mapping relationship between pixel values ​​and fixed-pattern noise. The method substitutes the pixel value of the current pixel in the image to be corrected into the noise response function to obtain the fixed-pattern noise corresponding to the current pixel. The fixed-pattern noise and digital gain are combined to obtain a final composite coefficient. Based on the composite coefficient, the pixel value of the current pixel is multiplied once to obtain the corrected value of the current pixel. By simultaneously performing fixed-pattern noise correction and digital gain correction within a single module using the composite coefficient, and directly rounding the product of the composite coefficient and the pixel value, the rounding error is linearly amplified with the digital gain to less than 1, avoiding image stripes under high digital gain and improving the image correction effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of video processing technology, and in particular to a fixed-pattern noise correction method, device and storage medium. Background Technology

[0002] Images output by image sensors generally contain fixed pattern noise (FPN), which mainly manifests as stripes or pixels with abnormal brightness, affecting image uniformity.

[0003] Currently, the flat field correction (FFC) method is commonly used, which obtains correction coefficients through calibration to correct the image. During correction, FPN correction is performed first, followed by multiplication by digital gain.

[0004] However, due to the rounding involved in FPN correction, the rounding error of FPN correction amplifies with the gain, resulting in vertical stripes and affecting the image correction effect. Summary of the Invention

[0005] To address the aforementioned technical problems, this application provides at least one fixed-mode noise correction method, device, and storage medium.

[0006] The first aspect of this application provides a fixed-pattern noise correction method, the method comprising: acquiring an image to be corrected, and acquiring a pre-calibrated noise response function and a digital gain; wherein the noise response function is used to describe the mapping relationship between pixel values ​​and fixed-pattern noise; substituting the pixel value of the current pixel in the image to be corrected into the noise response function to obtain the fixed-pattern noise corresponding to the current pixel; combining the fixed-pattern noise and the digital gain to obtain the final composite coefficient; and performing a multiplication operation on the pixel value of the current pixel based on the composite coefficient to obtain the correction value of the current pixel.

[0007] In one embodiment, obtaining a pre-calibrated noise response function includes: acquiring multiple sets of uniform images with different brightness under a uniform light source; calculating the ratio between the average pixel value of each column of pixels in the uniform image and the average pixel value of the uniform image to obtain the column coefficients corresponding to the uniform image; and performing linear fitting based on the column coefficients and brightness of each set of uniform images to obtain the noise response function.

[0008] In one embodiment, the noise response function includes a low-brightness function and a high-brightness function; the noise response function is obtained by linearly fitting the column coefficients and brightness corresponding to each group of uniform images, including: dividing each group of uniform images into low-brightness images or high-brightness images based on the relationship between the brightness corresponding to each group of uniform images and a preset brightness threshold; linearly fitting the column coefficients and brightness corresponding to each low-brightness image to obtain the low-brightness function corresponding to each column; and linearly fitting the column coefficients and brightness corresponding to each high-brightness image to obtain the high-brightness function corresponding to each column.

[0009] In one embodiment, the pixel value of the current pixel in the image to be corrected is substituted into a noise response function to obtain the fixed-mode noise corresponding to the current pixel. This includes: classifying the current pixel into a low-brightness pixel or a high-brightness pixel based on the relationship between the pixel value of the current pixel and a preset brightness threshold; if the current pixel is a low-brightness pixel, the pixel value of the current pixel is substituted into the low-brightness function corresponding to the column in which the current pixel is located to obtain the fixed-mode noise corresponding to the current pixel; if the current pixel is a high-brightness pixel, the pixel value of the current pixel is substituted into the high-brightness function corresponding to the column in which the current pixel is located to obtain the fixed-mode noise corresponding to the current pixel.

[0010] In one embodiment, calculating the ratio between the average pixel value of each column of pixels in the uniform image and the average pixel value of the uniform image to obtain the column coefficients corresponding to the uniform image includes: calculating the ratio between the average pixel value of each column of pixels in the uniform image and the average pixel value of the uniform image to obtain the first column coefficients; extracting the trend of lens shadow variation along the column direction in the uniform image to obtain the second column coefficients; and dividing the first column coefficients by the second column coefficients to obtain the final column coefficients of the uniform image.

[0011] In one embodiment, extracting the trend of lens shadow variation along the column direction in a uniform image to obtain the second column coefficients includes: downsampling the uniform image in the column direction to obtain a downsampled image; performing a strong low-pass filter on the downsampled image to obtain the brightness variation trend; and upsampling the brightness variation trend back to the original column number of the uniform image to obtain the second column coefficients.

[0012] In one embodiment, combining fixed-mode noise and digital gain to obtain the final composite coefficient includes: calculating the lens shading correction coefficient corresponding to the image to be corrected; multiplying the lens shading correction coefficient and fixed-mode noise to obtain a fusion coefficient; and combining the fusion coefficient and digital gain to obtain the final composite coefficient.

[0013] In one embodiment, the method further includes: calculating the product of the pixel value of the current pixel and the digital gain to obtain the increased brightness; dividing the current pixel into dark region pixels or normal pixels based on the relationship between the increased brightness and a preset dark area threshold; if the current pixel belongs to the dark region pixels, performing a multiplication operation on the pixel value of the current pixel based on the digital gain to obtain the corrected value of the current pixel; if the current pixel belongs to the normal pixel, performing a step of calculating the composite coefficient, performing a multiplication operation on the pixel value of the current pixel based on the composite coefficient to obtain the corrected value of the current pixel.

[0014] A second aspect of this application provides a fixed-pattern noise correction device, comprising: a data acquisition module for acquiring an image to be corrected, and acquiring a pre-calibrated noise response function and digital gain; wherein the noise response function describes the mapping relationship between pixel values ​​and fixed-pattern noise; a noise determination module for substituting the pixel value of the current pixel in the image to be corrected into the noise response function to obtain the fixed-pattern noise corresponding to the current pixel; a combination module for combining the fixed-pattern noise and the digital gain to obtain the final composite coefficient; and a correction module for performing a multiplication operation on the pixel value of the current pixel based on the composite coefficient to obtain the correction value of the current pixel.

[0015] A third aspect of this application provides an electronic device, including a memory and a processor, wherein the processor is configured to execute program instructions stored in the memory to implement the aforementioned fixed-mode noise correction method.

[0016] The fourth aspect of this application provides a computer-readable storage medium having program instructions stored thereon, which, when executed by a processor, implement the above-described fixed-mode noise correction method.

[0017] The above scheme obtains the fixed-mode noise corresponding to the current pixel by substituting the pixel value of the current pixel in the image to be corrected into the noise response function; the fixed-mode noise and digital gain are combined to obtain the final composite coefficient; the pixel value of the current pixel is multiplied based on the composite coefficient to obtain the corrected value of the current pixel. Fixed-mode noise correction and digital gain are performed simultaneously in one module through the composite coefficient. The product of the composite coefficient and the pixel value is directly rounded, so that the rounding error is linearly amplified with the digital gain to an error of less than 1, avoiding image stripes under high digital gain and improving the image correction effect.

[0018] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application. Attached Figure Description

[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application.

[0020] Figure 1 This is a flowchart illustrating a fixed-mode noise correction method in an exemplary embodiment of this application; Figure 2 This is a schematic diagram illustrating image correction in an exemplary embodiment of this application; Figure 3 This is a schematic diagram illustrating image correction as shown in another exemplary embodiment of this application; Figure 4 This is a block diagram illustrating a fixed-mode noise correction device in an exemplary embodiment of this application; Figure 5 This is a schematic diagram of the structure of an electronic device shown in an exemplary embodiment of this application; Figure 6 This is a schematic diagram illustrating the structure of a computer-readable storage medium, as shown in an exemplary embodiment of this application. Detailed Implementation

[0021] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0022] In the following description, specific details such as particular system architectures, interfaces, and technologies are presented for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of this application.

[0023] In this document, the term "and / or" is merely a description of the association information of related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this document means two or more. Moreover, the term "at least one" in this document means any combination of at least two of any one or more of a plurality of elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.

[0024] The fixed-mode noise correction method provided in the embodiments of this application is described below.

[0025] Please see Figure 1 , Figure 1 This is a flowchart illustrating a fixed-pattern noise correction method in an exemplary embodiment of this application, which can be applied to any type of image acquisition device.

[0026] like Figure 1As shown, the fixed-mode noise correction method includes at least steps S110 to S140, which are described in detail below: Step S110: Obtain the image to be corrected, and obtain the pre-calibrated noise response function and digital gain; wherein the noise response function is used to describe the mapping relationship between pixel values ​​and fixed pattern noise.

[0027] The image to be corrected is usually the original image format output by the image sensor, i.e., RAW image. Of course, it can also be other images, such as video frames that have not been corrected by FPN.

[0028] The noise response function is a parameter that is measured in advance by testing and shooting under specific conditions, such as shooting under a uniform light source, and fitting the noise response function to the captured image.

[0029] Because fixed-pattern noise is usually not a constant value, it changes with the pixel value. The noise response function is used to describe the fixed-pattern noise offset at the current pixel value.

[0030] Additionally, obtain the value of the digital gain applied in the current image processing chain.

[0031] Step S120: Substitute the pixel value of the current pixel in the image to be corrected into the noise response function to obtain the fixed pattern noise corresponding to the current pixel.

[0032] The current pixel refers to the pixel at any location in the image to be corrected.

[0033] The fixed-mode noise corresponding to the current pixel is obtained by calculating the pixel value of the current pixel using the noise response function.

[0034] Step S130: Combine the fixed-mode noise and digital gain to obtain the final composite coefficient.

[0035] The Image Signal Processing Pipeline (ISP Pipeline) is adjusted by combining the FPN correction module and the digital gain module to obtain a fusion module. In the fusion module, FPN correction and digital gain are performed simultaneously. Specifically, the fixed-mode noise and digital gain are combined in the fusion module to obtain the final composite coefficient.

[0036] Optionally, FPN correction can be directly integrated into the digital gain module, performing both FPN correction and digital gain simultaneously within the digital gain module.

[0037] Step S140: Perform a multiplication operation on the pixel value of the current pixel based on the composite coefficient to obtain the correction value of the current pixel.

[0038] Specifically, within a single module, the pixel value of the current pixel is multiplied once using the following formula 1: (Formula 1) Where X is the corrected value of the current pixel; x is the original pixel value of the current pixel; This is the fixed-pattern noise obtained by substituting the pixel value of the current pixel into the noise response function; gain is the digital gain. The composite coefficient is obtained by combining fixed-mode noise and digital gain.

[0039] Compared to existing technologies that first perform FPN correction and rounding before applying digital gain, resulting in a magnified rounding error, this application performs FPN correction and digital gain simultaneously within a single module using the aforementioned formula 1. It employs a composite coefficient to perform a single multiplication operation on the pixel value, directly... Rounding is performed so that the rounding error is linearly amplified with the digital gain to be less than 1, thus avoiding image stripes under high digital gain and improving the image correction effect.

[0040] The following is a detailed description of some embodiments of this application.

[0041] In some implementations, obtaining a pre-calibrated noise response function in step S110 includes the following steps S111 to S113.

[0042] Step S111: Collect multiple sets of uniform images with different brightness levels under a uniform light source.

[0043] A camera (with or without a lens) captures multiple sets of uniform images ranging from dark to bright under uniform light.

[0044] This can involve changing the brightness of the light source or changing the exposure time to acquire uniform images with different brightness levels.

[0045] Each set of uniform images can contain multiple frames taken consecutively under the same brightness. The average of the multiple frames in the set can be calculated, and the result can be used as the uniform image corresponding to that brightness.

[0046] Step S112: Calculate the ratio between the average pixel value of each column of pixels in the uniform image and the average pixel value of the uniform image to obtain the column coefficients corresponding to the uniform image.

[0047] It should be noted that the pixel values ​​in this application represent brightness information.

[0048] The average pixel value is obtained by calculating the channel mean of a uniform image. The average pixel value of a uniform image is the ideal brightness of that uniform image.

[0049] Additionally, calculate the average pixel value of each column of pixels in the uniform image, where the average pixel value is the actual brightness of the corresponding column.

[0050] Calculate the ratio between the average pixel value of each column of pixels in the uniform image and the average pixel value of the uniform image to determine the fixed-pattern noise offset of each column of pixels, and obtain the column coefficients corresponding to the uniform image.

[0051] Specifically, the average pixel value of a uniform image is taken as the image mean, and the average pixel value of a column of pixels is taken as the column mean. The column coefficient is calculated as the image mean divided by the column mean.

[0052] In addition, to facilitate subsequent calculations, all column coefficients can be normalized.

[0053] In another embodiment, since the column coefficients calculated above are coupled with Lens Shading Correction (LSC), they can be decoupled to remove the influence of lens shading when calibrating the noise response function of FPN, so as to obtain a pure noise response function that only reflects the inconsistency between column responses of the sensor itself. Specifically, this includes: calculating the ratio between the average pixel value of each column of pixels in the uniform image and the average pixel value of the uniform image to obtain the first column coefficient; extracting the trend of lens shading variation along the column direction in the uniform image to obtain the second column coefficient; and dividing the first column coefficient by the second column coefficient to obtain the final column coefficient of the uniform image.

[0054] Specifically, the uniform image is downsampled in the column direction to obtain a downsampled image; the downsampled image is then subjected to a strong low-pass filter to obtain the brightness variation trend; the brightness variation trend is upsampled back to the original column number of the uniform image to obtain the second column coefficients.

[0055] By downsampling the image in the column direction to reduce it to at least a few columns, the gradual brightness change trend from the center to the edge of the lens can be preserved while filtering out random differences between columns. Then, the brightness change trend is extracted by performing a strong low-pass filter on the downsampled image. The brightness change trend is then upsampled back to the number of columns of the original image through interpolation to obtain the second column coefficient.

[0056] That is, the first column coefficient = image mean / column mean, and the final column coefficient of the uniform image = first column coefficient / second column coefficient. By dividing the mixed first column coefficient by the influence of LSC, we can obtain the correction coefficients only for FPN. This makes the subsequent FPN function fitting no longer affected by lens vignetting, avoids the mixing of the two types of noise in the calibration stage, and avoids local brightness unevenness.

[0057] Of course, if the LSC effect is very slight, or if the application scenario does not have strict requirements for absolute uniformity, LSC can be decoupled to simplify the calibration process. Additionally, for a few outlier columns that differ significantly from the vast majority of columns, additional, separate segmentation processing can be performed.

[0058] Step S113: Perform linear fitting based on the column coefficients and brightness corresponding to each group of uniform images to obtain the noise response function.

[0059] Based on the column coefficients of each column under uniform images of different brightness, a mapping relationship between different pixel values ​​and fixed pattern noise is obtained through linear fitting, and a noise response function is generated.

[0060] Of course, in addition to fitting the noise response function based on column coefficients as exemplified above, the noise response function can also be fitted based on the ratio or difference between each pixel and the average pixel value of the uniform image. Other methods can also be used to calibrate the noise response function, such as separate calibration of dark and bright fields. This application does not limit this method.

[0061] Alternatively, piecewise fitting or non-piecewise fitting can be performed, and the specific fitting method can be flexibly set according to the actual application scenario.

[0062] Taking piecewise fitting as an example, the noise response function includes a low brightness function and a high brightness function; in step S113, linear fitting is performed based on the column coefficients and brightness corresponding to each group of uniform images to obtain the noise response function, including the following steps S1131 to S1132.

[0063] Step S1131: Based on the relationship between the brightness of each group of uniform images and the preset brightness threshold, divide each group of uniform images into low-brightness images or high-brightness images.

[0064] The preset brightness threshold low_thresh is generally set to the brightness inflection point of the sensor. It can be preset based on prior knowledge of the sensor's characteristics, or it can be calibrated based on multiple sets of uniform images.

[0065] For example, calculate the average column coefficient of all columns in a uniform image to obtain the average column coefficient. Plot a response curve with the average pixel value of the uniform image on the x-axis and the average column coefficient on the y-axis. Identify the inflection points in the response curve and use the average pixel value corresponding to the inflection point as the low_thresh. Then, piecewise fitting can be performed using the set low_thresh, and the fitting residual corresponding to each fitting function can be calculated. If the fitting residuals of both the low-brightness segment and the high-brightness segment are less than the preset residual threshold, and the image correction effect is good, then the low_thresh setting is considered reasonable; otherwise, the low_thresh is adjusted.

[0066] Optionally, to improve the accuracy of low_thresh, after determining the inflection point, a key brightness region of a preset size is divided with the average pixel value corresponding to the inflection point as the center brightness. Within the key brightness region, more dense uniform images are collected with smaller brightness steps. Based on the obtained larger number of uniform images, the response curve is redrawn. The key brightness region of this response curve has more sampling points, so the inflection point detection is re-performed to obtain a more accurate inflection point. The average pixel value corresponding to the re-determined inflection point is used as low_thresh.

[0067] Then, based on the relationship between the brightness of each group of uniform images and the preset brightness threshold, each group of uniform images is divided into low-brightness images or high-brightness images.

[0068] The brightness corresponding to each set of uniform images is the average pixel value of the uniform images.

[0069] If the brightness of a uniform image is lower than a preset brightness threshold, the uniform image is classified as a low-brightness image; if the brightness of a uniform image is not lower than the preset brightness threshold, the uniform image is classified as a high-brightness image.

[0070] Step S1132: Perform linear fitting based on the column coefficients and brightness corresponding to each low-brightness image to obtain the low-brightness function corresponding to each column; and perform linear fitting based on the column coefficients and brightness corresponding to each high-brightness image to obtain the high-brightness function corresponding to each column.

[0071] For example, linear regression algorithms such as least squares can be used for linear fitting.

[0072] The linear fitting formula for the low brightness function can be expressed as the following formula 2: (Formula 2) Where y is the column coefficient and x is the brightness (i.e., the average pixel value of a uniform image). It is the slope of the low brightness function. It is the intercept of the low brightness function.

[0073] The linear fitting formula for the high brightness function can be expressed as the following formula 3: (Formula 3) in, It is the slope of the high brightness function. It is the intercept of the high brightness function.

[0074] By segmenting and fitting the brightness inflection points, the sensor response is accurately modeled, improving the correction effect in low-brightness and high-brightness areas. This allows for fine fitting of low-brightness areas and avoids exacerbating dark area stripes.

[0075] Of course, in addition to the two-segment linear fitting in the example above, more segments of linear fitting can be performed according to the actual application scenario to obtain more noise response functions, and this application does not limit this.

[0076] Based on the above embodiments, in step S120, the pixel value of the current pixel in the image to be corrected is substituted into the noise response function to obtain the fixed pattern noise corresponding to the current pixel, including the following steps S121 to S124.

[0077] Step S121: Based on the relationship between the pixel value of the current pixel and the preset brightness threshold, divide the current pixel into a low brightness pixel or a high brightness pixel.

[0078] The preset brightness threshold is the sensor brightness inflection point low_thresh determined in the aforementioned embodiments.

[0079] Step S122: If the current pixel is a low-brightness pixel, proceed to step S123; if the current pixel is a high-brightness pixel, proceed to step S124.

[0080] Step S123: Substitute the pixel value of the current pixel into the low brightness function corresponding to the column in which the current pixel is located to obtain the fixed pattern noise corresponding to the current pixel.

[0081] Step S124: Substitute the pixel value of the current pixel into the high brightness function corresponding to the column in which the current pixel is located to obtain the fixed pattern noise corresponding to the current pixel.

[0082] For example, please refer to Figure 2 , Figure 2 This is a schematic diagram illustrating image correction in an exemplary embodiment of this application, as shown below. Figure 2 As shown, the pixel value of the current pixel is obtained. If the pixel value of the current pixel is less than or equal to the preset brightness threshold low_thresh, it is considered a low-brightness pixel, and the low-brightness function is used. The formula for calculating the correction value of the current pixel is: If the current pixel is greater than the preset brightness threshold low_thresh, it is considered a high-brightness pixel and the high-brightness function is used. The formula for calculating the correction value of the current pixel is: The correction value of the current pixel is calculated based on the above correction value calculation formula.

[0083] In some implementations, if the LSC is coupled during the calculation of the column coefficients, then when the image to be corrected is corrected, the LSC is fused, and in step S130, the fixed pattern noise and digital gain are combined to obtain the final composite coefficients, including the following steps S131 to S133.

[0084] Step S131: Calculate the lens shading correction coefficient corresponding to the image to be corrected.

[0085] The goal of lens shading correction coefficient is to correct lens shading effects in an image, making the brightness distribution of the image more uniform.

[0086] The specific calculation method for lens shadow correction coefficient can be flexibly selected according to the actual application scenario.

[0087] For example, in the row direction of the image to be corrected, the pixel values ​​of multiple rows of pixels are accumulated and summed, and the accumulated values ​​of multiple rows are output to the LSC module. The LSC module calculates the lens shading correction coefficient LSC corresponding to the image to be corrected based on the input data, and then performs low-pass filtering on the LSC coefficient.

[0088] For example, the image to be corrected is divided into several regions. For each region, the mean brightness is calculated. Based on the ratio between the mean of each region and the mean of the entire image, the lens shading correction coefficient (LSC) is calculated.

[0089] Step S132: Perform a multiplication operation on the lens shadow correction coefficient and the fixed pattern noise to obtain the fusion coefficient.

[0090] Specifically, the lens shading correction factor LSC multiplied by The fusion coefficient is obtained.

[0091] Step S133: Combine the fusion coefficient and digital gain to obtain the final composite coefficient.

[0092] For example, the fusion coefficient is expressed as The correction value of the current pixel is... .

[0093] In some implementations, the method further includes: calculating the product of the pixel value of the current pixel and the digital gain to obtain the increased brightness; dividing the current pixel into dark region pixels or normal pixels based on the relationship between the increased brightness and a preset dark area threshold; if the current pixel belongs to a dark region pixel, performing a multiplication operation on the pixel value of the current pixel based on the digital gain to obtain the corrected value of the current pixel; if the current pixel belongs to a normal pixel, performing a step of calculating the composite coefficient, performing a multiplication operation on the pixel value of the current pixel based on the composite coefficient to obtain the corrected value of the current pixel.

[0094] For example, please refer to Figure 3 , Figure 3 This is a schematic diagram illustrating image correction in another exemplary embodiment of this application, such as... Figure 3 As shown, to obtain the pixel value of the current pixel, first calculate the product of the current pixel value x and the digital gain gain. If the value is less than the preset dark threshold (dark_thresh), then the current pixel is determined to be a pixel in a dark region, and the correction value is calculated using the following formula: The correction value for the current pixel is calculated to perform digital gain only in darker areas, thus avoiding exacerbation of vertical stripes in low-exposure scenes. If If the value is not less than the preset dark threshold (dark_thresh), then FPN correction is performed, i.e., steps S110 to S140 are executed. Finally, a multiplication operation is performed on the current pixel value based on the composite coefficient to obtain the corrected value of the current pixel. Specifically, FPN correction can be performed based on a multi-segment function, using the original pixel value x to determine the use of the low brightness function. Still a high brightness function See details Figure 2 Some details will not be elaborated upon here.

[0095] The above embodiments cover the darkest cases, reducing residual stripes caused by mismatch between calibration maps and actual images.

[0096] In some implementations, the above method uses fixed-point quantization on a field-programmable gate array (FPGA), where k is S0.14, b is S4.8, and gain is U8.16; the intermediate variable after combining k with parameters such as digital gain G is U3.12; the final output is U12.0, supporting ROI flipping, etc.

[0097] Each pixel of the image to be corrected is corrected based on the above embodiment to obtain the corrected image.

[0098] The above embodiments can effectively correct the FPN of industrial cameras in low-exposure, high-digital-gain scenarios, avoiding error amplification, while supporting FPGA fixed-point implementation, LSC statistical fusion, and ROI compatibility.

[0099] Figure 4 This is a block diagram illustrating a fixed-pattern noise correction device according to an exemplary embodiment of this application. Figure 4 As shown, the exemplary fixed-mode noise correction device 400 includes: The data acquisition module 410 is used to acquire the image to be corrected, and to acquire a pre-calibrated noise response function and digital gain; wherein the noise response function is used to describe the mapping relationship between pixel values ​​and fixed-pattern noise; The noise determination module 420 is used to substitute the pixel value of the current pixel in the image to be corrected into the noise response function to obtain the fixed pattern noise corresponding to the current pixel; Combination module 430 is used to combine fixed-mode noise and digital gain to obtain the final composite coefficient; The correction module 440 is used to perform a multiplication operation on the pixel value of the current pixel based on the composite coefficient to obtain the correction value of the current pixel.

[0100] It should be noted that the fixed-mode noise correction device and the fixed-mode noise correction method provided in the above embodiments belong to the same concept. The specific operation methods of each module and unit have been described in detail in the method embodiments and will not be repeated here. In practical applications, the fixed-mode noise correction device provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation here.

[0101] Please see Figure 5 , Figure 5 This is a schematic diagram illustrating the structure of an electronic device in an exemplary embodiment of this application. The electronic device 500 includes a memory 510 and a processor 520. The processor 520 executes program instructions stored in the memory 510 to implement the steps in any of the above-described fixed-mode noise correction method embodiments. In a specific implementation scenario, the electronic device 500 may include, but is not limited to, a microcomputer or a server. Furthermore, the electronic device 500 may also include mobile devices such as laptops and tablets, without limitation.

[0102] Specifically, processor 520 controls itself and memory 510 to implement the steps in any of the fixed-mode noise correction method embodiments described above. Processor 520 may also be referred to as a Central Processing Unit (CPU). Processor 520 may be an integrated circuit chip with signal processing capabilities. Processor 520 may also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor. Furthermore, processor 520 may be implemented using integrated circuit chips.

[0103] Please see Figure 6 , Figure 6 This is a schematic diagram illustrating the structure of a computer-readable storage medium in an exemplary embodiment of this application. The computer-readable storage medium 600 stores program instructions 610 that can be executed by a processor. The program instructions 610 are used to implement the steps in any of the above-described fixed-mode noise correction method embodiments.

[0104] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0105] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.

[0106] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

[0107] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A fixed-pattern noise correction method, characterized in that, The method includes: The image to be corrected is obtained, and a pre-calibrated noise response function and digital gain are obtained; wherein the noise response function is used to describe the mapping relationship between pixel values ​​and fixed-pattern noise; Substitute the pixel value of the current pixel in the image to be corrected into the noise response function to obtain the fixed pattern noise corresponding to the current pixel; The fixed-mode noise and the digital gain are combined to obtain the final composite coefficients; The pixel value of the current pixel is multiplied once based on the composite coefficient to obtain the correction value of the current pixel.

2. The method according to claim 1, characterized in that, The process of obtaining the pre-calibrated noise response function includes: Collect multiple sets of uniform images with different brightness levels under uniform light sources; Calculate the ratio between the average pixel value of each column of pixels in the uniform image and the average pixel value of the uniform image to obtain the column coefficient corresponding to the uniform image; The noise response function is obtained by linearly fitting the column coefficients and brightness corresponding to each set of uniform images.

3. The method according to claim 2, characterized in that, The noise response function includes a low-brightness function and a high-brightness function; the noise response function is obtained by linear fitting based on the column coefficients and brightness corresponding to each group of uniform images, including: Based on the relationship between the brightness of each group of uniform images and a preset brightness threshold, each group of uniform images is divided into low-brightness images or high-brightness images. Linear fitting is performed based on the column coefficients and brightness corresponding to each low-brightness image to obtain the low-brightness function corresponding to each column; and linear fitting is performed based on the column coefficients and brightness corresponding to each high-brightness image to obtain the high-brightness function corresponding to each column.

4. The method according to claim 3, characterized in that, The step of substituting the pixel value of the current pixel in the image to be corrected into the noise response function to obtain the fixed-pattern noise corresponding to the current pixel includes: Based on the relationship between the pixel value of the current pixel and the preset brightness threshold, the current pixel is divided into a low-brightness pixel or a high-brightness pixel. If the current pixel is a low-brightness pixel, then substitute the pixel value of the current pixel into the low-brightness function corresponding to the column in which the current pixel is located to obtain the fixed pattern noise corresponding to the current pixel; If the current pixel is a high-brightness pixel, then the pixel value of the current pixel is substituted into the high-brightness function corresponding to the column in which the current pixel is located to obtain the fixed-mode noise corresponding to the current pixel.

5. The method according to claim 2, characterized in that, The step of calculating the ratio between the average pixel value of each column of pixels in the uniform image and the average pixel value of the uniform image to obtain the column coefficients corresponding to the uniform image includes: Calculate the ratio between the average pixel value of each column of pixels in the uniform image and the average pixel value of the uniform image to obtain the first column coefficient; Extract the trend of lens shadow variation along the column direction in the uniform image to obtain the coefficients of the second column; Divide the first column coefficient by the second column coefficient to obtain the final column coefficients of the uniform image.

6. The method according to claim 5, characterized in that, The process of extracting the trend of lens shadow variation along the column direction in the uniform image to obtain the second column coefficients includes: The uniform image is downsampled along the column direction to obtain a downsampled image; The brightness variation trend is obtained by performing a strong low-pass filter on the downsampled image; The brightness variation trend is upsampled back to the original column number of the uniform image to obtain the second column coefficients.

7. The method according to claim 5, characterized in that, The step of combining the fixed-mode noise and the digital gain to obtain the final composite coefficient includes: Calculate the lens shading correction coefficient corresponding to the image to be corrected; The lens shadow correction coefficient and the fixed pattern noise are multiplied to obtain the fusion coefficient; The fusion coefficient and the digital gain are combined to obtain the final composite coefficient.

8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: Calculate the product of the pixel value of the current pixel and the digital gain to obtain the brightness after gain; Based on the relationship between the post-gain brightness and the preset dark area threshold, the current pixel is divided into dark area pixels or normal pixels. If the current pixel belongs to the dark area, then the pixel value of the current pixel is multiplied once based on the digital gain to obtain the correction value of the current pixel; If the current pixel is a normal pixel, then the step of calculating the composite coefficient is performed, and the pixel value of the current pixel is multiplied once based on the composite coefficient to obtain the correction value of the current pixel.

9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the processor being configured to execute program instructions stored in the memory to implement the steps of the method as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program instructions that can be executed by a processor to implement the steps of the method as described in any one of claims 1-8.