Method and apparatus for correcting for squareness mismatch non-uniformities

CN122887745APending Publication Date: 2026-10-09THE 44TH INST OF CHINA ELECTRONICS TECH GROUP CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611051637.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-15
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

对信息单一,均匀的图像有较好的校正效果,但是对于细节丰富,灰度值不均匀的图像,校正会产生明显的带状效应

Benefits of technology

[0018]本发明的矩匹配非均匀性校正方法和装置,至少具有如下有益效果:本发明对图像列进行保序分块,充分利用了图像有效统计信息在空间上的连续性,使同一列块内部的列在统计特征上高度一致,不同列块之间的列在统计特征上显著区分;在此基础上对各列块独立执行矩匹配校正,避免了因全局统计特征无法代表局部区域分布而产生的带状效应,同时由于分块保序的特性,不会破坏图像的场景边缘和细节信息,从根本上解决了传统矩匹配方法在细节丰富图像中产生伪影和边缘模糊的问题;直接利用当前图像的统计特征进行分块与校正,无需预先标定,不受器件工作时间、温度变化等因素影响,校正系数不会漂移,无需反复标定;同时,通过Fisher最优分割自适应确定分块方案,适用于各种场景下的图像非均匀性校正,具有广泛的适用性;通过预设分割段数的取值范围,将Fisher算法的搜索空间限定在合理范围内,避免了无约束全局搜索带来的计算开销,在保证分块效果的同时大幅减少了计算量,能够满足实时图像处理的需求,占用资源较少,便于硬件实现。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122887745A_ABST
    Figure CN122887745A_ABST
Patent Text Reader

Abstract

The application discloses a kind of matrix matching non-uniformity correction method and device, the method includes the following steps: column feature extraction and pre-processing are carried out to the image to be corrected, and the statistical characteristics of each column are obtained;Based on the statistical characteristics, the column of the image is divided into several continuous column blocks;The similarity of the column block obtained by division is merged and optimized;With each column block after merging as an independent processing unit, matrix matching correction is respectively executed, and the corrected column block is reorganized according to the original order to obtain the corrected image.The application can correct the non-uniformity of the image while not destroying the image scene information, avoiding image artifacts, edge blur and banding effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of digital image processing, and in particular to a method and apparatus for correcting non-uniformity of moment matching. Background Technology

[0002] Due to various factors such as manufacturing process, optical system, pixel array, and readout circuit, array image sensors generally suffer from non-uniformity in imaging. That is, the light intensity incident on the detector surface is uniform, but the signals output by each imaging unit of the detector are inconsistent.

[0003] In the digital domain, the correction of image non-uniformity is mainly divided into two categories. One category is the calibration-based correction method. This algorithm fits the output of the device after being illuminated by uniform light of different intensities, thereby achieving the effect of correcting all pixels to approximately the same output under uniform light. This method has low algorithm complexity, but the correction coefficients will drift due to the influence of device operating time, temperature changes, etc., so repeated calibration is required.

[0004] Another type is scene-based correction algorithms, the most commonly used of which is the moment matching method. The basic idea of ​​this algorithm is to select the statistical features of a noise-free image region as reference data. In practice, the statistical features of the entire image are often used as reference data, and all columns of pixels are corrected sequentially. This method has a good correction effect on images with simple, uniform information, but for images with rich details and uneven grayscale values, the correction will produce obvious banding effects. In engineering, an adaptive window approach is often used to solve this problem, narrowing the range of the reference image to a certain grayscale difference. This can effectively solve the banding effect problem, but it can also cause image distortion and blurred edges. Summary of the Invention

[0005] To address the shortcomings of the prior art, the technical problem to be solved by the present invention is to provide a method and apparatus for correcting non-uniformity of moment matching without destroying image scene information and avoiding image artifacts, edge blurring and banding effects.

[0006] To solve the above-mentioned technical problems, one technical solution adopted by the present invention is to provide a method for correcting moment matching non-uniformity, comprising the following steps: The image to be corrected is subjected to column feature extraction and preprocessing to obtain the statistical features of each column; Based on the statistical characteristics, the columns of the image are divided into several consecutive column blocks; The resulting column blocks are optimized by similarity merging. Each merged column block is treated as an independent processing unit, and moment matching correction is performed on each block separately. The corrected column blocks are then reassembled in their original order to obtain the corrected image.

[0007] Furthermore, the statistical features include mean and variance. The step of extracting and preprocessing column features from the image to be corrected to obtain the statistical features of each column includes the following sub-steps: Calculate the mean and variance of each column of the image, and construct a mean sequence consisting of the mean of each column and a variance sequence consisting of the variance of each column; Gradient smoothing is performed on the mean sequence.

[0008] Furthermore, the step of performing gradient smoothing on the mean sequence includes the following sub-steps: Calculate the mean gradient of each column, where the mean gradient is the difference between the mean of that column and the mean of the adjacent preceding column; Calculate the average of the global mean gradient based on the mean gradient of each column; Determine whether the difference between the mean gradient of each column and the average of the global mean gradient is greater than a preset threshold; if it is greater than the preset threshold, replace the mean of the column with the average of the means of the two adjacent columns to the left and right of the column; otherwise, leave it unchanged.

[0009] Furthermore, the step of dividing the columns of the image into several consecutive column blocks based on the statistical features includes the following sub-steps: The statistical characteristics of each column are used as the basis for segmentation. The columns are segmented in their original order, and the sum of squared deviations within the same column after segmentation is used as the loss function. Traverse all segmentation schemes, determine the optimal number of segmentation segments, and select the segmentation scheme that minimizes the overall loss function of each column block under the optimal number of segmentation segments as the optimal segmentation scheme, and divide the columns of the image into continuous column blocks.

[0010] Furthermore, the step of determining the optimal number of segments includes the following sub-steps: A preset range of values ​​for the number of segmentation segments is defined, and the minimum value of the overall loss function corresponding to different values ​​of the number of segmentation segments within the preset range is calculated. The optimal number of segments is selected when the overall loss function value changes its downward trend as the number of segments increases.

[0011] Furthermore, the formula for calculating the sum of squared deviations is as follows:

[0012] in, Indicates the first Listed to number The sum of squared deviations of the column, Indicates the first The statistical characteristic vector of the column. Indicates the first Listed to number The mean of the features within a block, wherein the mean of the features within a block is the mean of each statistical feature vector.

[0013] Furthermore, the step of optimizing the similarity merging of the divided column blocks includes the following sub-steps: Calculate the column mean and column variance of each partitioned column block; Column blocks whose absolute difference between the average mean of adjacent columns is less than a preset first threshold and whose absolute difference between the average variance of adjacent columns is less than a preset second threshold are merged to obtain merged column blocks.

[0014] Furthermore, the step of performing moment matching correction on each merged column block as an independent processing unit, and then reassembling the corrected column blocks in their original order to obtain the corrected image, includes the following sub-steps: Record the original column range of each column block after merging; Using all pixels within the current column block as a reference image, calculate the mean and standard deviation of the reference image; The pixels in each column within the column block are corrected based on the correction formula; The corrected column blocks are restored to their original positions according to the original column range recorded, and the corrected image is reconstructed.

[0015] Furthermore, the correction formula is as follows:

[0016] in, Indicates the first Column-corrected pixel values, Indicates the first Pixel values ​​before column correction Indicates the first The mean of the column, Indicates the first The standard deviation of the column, This represents the global mean of all pixels within the current target column block. This represents the global standard deviation of all pixels within the current target column. This represents the reference dataset consisting of all pixels within the target column block to which the column to be corrected belongs.

[0017] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is: to provide a moment matching non-uniformity correction device, comprising: The feature extraction module is used to extract and preprocess column features from the image to be corrected, and obtain the statistical features of each column. The segmentation module is used to divide the columns of the image into several consecutive column blocks based on the statistical features; The merging module is used to perform similarity merging optimization on the divided column blocks; The correction module is used to perform moment matching correction on each merged column block as an independent processing unit, and then reassemble the corrected column blocks in their original order to obtain the corrected image.

[0018] The moment matching non-uniformity correction method and apparatus of the present invention have at least the following beneficial effects: The present invention performs order-preserving block division of image columns, making full use of the spatial continuity of effective statistical information of the image, so that columns within the same block are highly consistent in statistical features, and columns between different blocks are significantly distinguishable in statistical features; on this basis, moment matching correction is performed independently on each block, avoiding the banding effect caused by the inability of global statistical features to represent the local distribution. At the same time, due to the block-preserving order characteristic, the scene edge and detail information of the image are not destroyed, fundamentally solving the problem of artifacts and edge blurring in images with rich details produced by traditional moment matching methods; It directly utilizes the statistical features of the current image for segmentation and correction, without the need for pre-calibration, and is unaffected by factors such as device operating time and temperature changes. The correction coefficients do not drift, and repeated calibration is unnecessary. At the same time, it adaptively determines the segmentation scheme through Fisher's optimal segmentation, making it suitable for image non-uniformity correction in various scenarios and possessing wide applicability. By pre-setting the range of segmentation segment values, the search space of the Fisher algorithm is limited to a reasonable range, avoiding the computational overhead caused by unconstrained global search. While ensuring the segmentation effect, it significantly reduces the amount of computation, meets the needs of real-time image processing, consumes fewer resources, and is easy to implement in hardware. Attached Figure Description

[0019] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a flowchart of one embodiment of the moment matching non-uniformity correction method of the present invention.

[0020] Figure 2 for Figure 1 Flowchart of step S100.

[0021] Figure 3 for Figure 2 Flowchart of step S120.

[0022] Figure 4 for Figure 1 Flowchart of step S200.

[0023] Figure 5 A flowchart for determining the optimal number of segments.

[0024] Figure 6 for Figure 1 Flowchart of step S300.

[0025] Figure 7 for Figure 1 Flowchart of step S400.

[0026] Figure 8 This is a structural block diagram of one embodiment of the moment matching non-uniformity correction device of the present invention. Detailed Implementation The following disclosure provides various different embodiments or examples for implementing different features of the invention. Specific examples will be described below to simplify the invention. Of course, these are merely examples and are not intended to limit the invention. Although the numerical ranges and parameter settings that present a broad scope of the invention are approximate, the numerical settings in specific examples are reported as precisely as possible. Any numerical value, however, inherently contains certain inevitable errors arising from the standard deviation found in the respective test measurements. Similarly, as used herein, the term "about" generally refers to within 10%, 5%, 1%, or 0.5% of a given value or range. Alternatively, the term "about" means within an acceptable average standard error that can be conceived by one of ordinary skill in the art. Except in operational / working examples, or unless expressly stated otherwise, all numerical ranges, totals, values, and percentages, such as those for material quantities, durations, temperatures, operating conditions, amounts, and other similarities disclosed herein, should be understood to be modified by the term "about" in all cases. Therefore, unless otherwise stated, the numerical parameter settings recited in the invention and the appended claims are approximate values ​​that can be changed as required. At a minimum, each numerical parameter should be interpreted based on the number of significant digits reported, and common rounding techniques should be applied. Ranges here may be expressed from one endpoint to another or between two endpoints. All ranges disclosed herein include endpoints unless otherwise stated.

[0027] Furthermore, the technical parts described in this invention and the appended claims are primarily the improved technical parts of this invention, and do not limit the object protected by this invention to only having these technical parts. Other known essential components (structures and / or methods) and / or non-essential components of the object protected, besides the technical parts described in this invention and the appended claims, are not included in this invention and the appended claims because they do not fall within the scope of improvements of this invention; however, this does not mean that the object protected by this invention does not possess these known components.

[0028] Please see Figure 1 This is a flowchart of one embodiment of the moment matching non-uniformity correction method of the present invention. This embodiment includes the following steps: S100. Perform column feature extraction and preprocessing on the image to be corrected to obtain the statistical features of each column.

[0029] Due to factors such as manufacturing process, pixel array, and readout circuit, array image sensors generally suffer from non-uniformity in imaging, manifesting as fixed column-oriented stripe noise in the image. The purpose of step S100 is to extract the column statistical features of the image and preprocess the abnormal features to provide an accurate data basis for subsequent block processing.

[0030] Specifically, the statistical characteristics include mean and variance; please refer to [link / reference]. Figure 2 This step S100 includes the following sub-steps: S110. Construct the mean sequence and variance sequence. Calculate the mean and variance of each column of the image, and construct a mean sequence consisting of the mean of each column and a variance sequence consisting of the variance of each column.

[0031] For an input image matrix with resolution w×l, the matrix elements are... This indicates that i = 1, 2, ..., w represents the row index, and j = 1, 2, ..., l represents the column index. This represents the pixel value in the i-th row and j-th column. The formula for calculating the mean of the j-th column is:

[0032] The formula for calculating the variance of column j is:

[0033] Using the above formulas, the mean and variance of each column are calculated to obtain a mean sequence composed of the means of each column. , , ..., ], and the variance sequence composed of the variances of each column [ , , ..., Since the moment matching correction method uses second-order matching of mean and variance, the mean and variance of each column are used as the basis for subsequent image segmentation algorithms.

[0034] S120. Perform gradient smoothing on the mean sequence.

[0035] Because images may contain local aberrations caused by sensor pixel anomalies, the mean of these aberrations will deviate significantly from that of their adjacent columns. If left untreated, this will affect the accuracy of subsequent block segmentation. Therefore, this step performs gradient smoothing on the mean sequence to remove aberration features caused by local aberrations.

[0036] Please see Figure 3This step S120 includes the following sub-steps: S121. Calculate the mean gradient of each column, where the mean gradient is the difference between the mean of the column and the mean of the adjacent previous column.

[0037] Specifically, for the j-th column (j≥2), the mean gradient is: For column 1, since there is no preceding column, .

[0038] S122. Calculate the average value of the global mean gradient based on the mean gradient of each column.

[0039] Specifically, the formula for calculating the average value of the global mean gradient is:

[0040] S123. Gradient anomaly detection and mean correction. Determine whether the difference between the mean gradient of each column and the average of the global mean gradient is greater than a preset threshold; if it is greater than the preset threshold, replace the mean of that column with the average of the means of the two adjacent columns to the left and right of that column; otherwise, leave it unchanged.

[0041] In this embodiment, the preset threshold is preferably half of the average value of the global mean gradient, that is... After the gradient smoothing process described above, the corrected mean and variance sequences are finally obtained, which serve as input data for subsequent image segmentation.

[0042] S200. Based on the statistical characteristics, the columns of the image are divided into several consecutive column blocks.

[0043] After the column features are extracted and preprocessed in step S100, the columns of the image need to be divided into several consecutive column blocks so that the columns within the same column block are as similar as possible in terms of statistical features, and the columns between different column blocks are as different as possible in terms of statistical features.

[0044] Since the effective information in an image is often spatially continuous, while stripe noise is dispersed, an order-preserving segmentation method is required. This means that the images can only be segmented according to their original column order, without rearranging or recombining them. Fisher's optimal segmentation algorithm is precisely such an order-preserving clustering algorithm; it can group columns with similar statistical characteristics and spatial continuity into the same column block. Therefore, in this implementation, Fisher's optimal segmentation algorithm is used to achieve order-preserving column block division.

[0045] Please see Figure 4 This step S200 includes the following sub-steps: S210. Set the segmentation criteria and loss function. Use the statistical characteristics of each column as the segmentation criteria, segment each column in its original order, and use the sum of squared deviations within the same column block after segmentation as the loss function.

[0046] For any candidate column block, i.e., from the first... Listed to number List( ≤ This continuous column uses the sum of squared deviations to measure the degree to which the statistical characteristics of each column within this block deviate from the average of the block. The smaller the sum of squared deviations, the more similar and consistent the columns within the block are.

[0047] The formula for calculating the sum of squared deviations is as follows:

[0048] in, Indicates the first Listed to number The sum of squared deviations of the column, Indicates the first The statistical characteristic vector of a column, that is, a two-dimensional vector composed of the mean and variance. Indicates the first Listed to number The mean of the features within a block, wherein the mean of the features within a block is the mean of each statistical feature vector.

[0049] After dividing all columns of the entire image into several segments in sequence, the sum of the squared deviations within each segment is the overall loss function. The optimization goal is to minimize the overall loss function.

[0050] S220. Determine the optimal segmentation scheme. Traverse all segmentation schemes, determine the optimal number of segmentation segments, and select the segmentation scheme that minimizes the overall loss function of each column block under the optimal number of segmentation segments as the optimal segmentation scheme, dividing the image columns into continuous column blocks.

[0051] To find the optimal partitioning scheme, dynamic programming is used for recursive calculation. Let P(n,k) be the minimum sum of squared deviations of the first n columns divided into k segments, i.e., the minimum overall loss. Then the dynamic programming recursive formula is:

[0052] The recursive formula means that the optimal partitioning of the first n columns into k segments can be obtained by finding the optimal partitioning of the first m columns into k-1 segments and combining it with columns (m+1) to n as the last segment. Iterate through all possible values ​​of m (where m ranges from k-1 to n-1), and select the partitioning scheme that minimizes P(n,k) as the optimal partitioning. Through the above dynamic programming recursion, the optimal partitioning scheme and its corresponding minimum overall loss value can be obtained for a given number of segments k.

[0053] Please see Figure 5 The step of determining the optimal number of segments includes the following sub-steps: S221. Calculate the minimum loss for different numbers of segmentation segments. A preset range of segmentation segment numbers is defined, and the minimum value of the overall loss function corresponding to different numbers of segmentation segments within that range is calculated.

[0054] Since the required number of segments for most images varies little, a preset range for the value of k is established, which has a maximum and a minimum value. For example, the preset range for k can be greater than or equal to 8 and less than or equal to 12. This avoids both excessively large k values ​​leading to overly fine segmentation and artifacts, and excessively small k values ​​preventing the identification of effective information. It also significantly reduces computational load, saves substantial computing resources, and facilitates hardware implementation.

[0055] For each value of k within the range, the corresponding minimum overall loss value P(n,k) is calculated using the dynamic programming method described above.

[0056] S222. Determine the optimal number of segments. Select the segment number that corresponds to the change in the decreasing trend of the overall loss function value as the number of segments increases as the optimal number of segments is selected.

[0057] The change in the downward trend means that as the number of segments k gradually increases, the overall loss function value gradually decreases; when the value of k is small, the overall loss function value decreases significantly as the value of k increases, that is, the decrease is large; when the value of k increases to a certain value, the decrease in the loss function value as the value of k increases significantly decreases. This is the change in the downward trend. The k value corresponding to the turning point where the decrease becomes smaller is the optimal number of segments.

[0058] In addition to the methods described above, other adaptive methods for determining the optimal number of segments can also be used, such as methods based on information criteria or methods based on contour coefficients. These alternative methods can also achieve the function of determining the optimal number of segments, and therefore also fall within the protection scope of this invention.

[0059] After determining the optimal number of segments k, the optimal segmentation scheme is obtained by recursively solving the corresponding optimal segmentation scheme through dynamic programming, using k as input, and dividing the image columns into k consecutive column blocks.

[0060] S300. Perform similarity merging optimization on the divided column blocks.

[0061] After image segmentation in step S200, although an optimal segmentation scheme is obtained, the relatively large range of preset k values ​​may lead to overly fragmented segmentation results. This means that some adjacent column blocks with similar statistical characteristics are unnecessarily separated. Excessively fragmented segmentation results in insufficient sample size within each column block during subsequent moment matching correction, easily leading to correction distortion and artifacts. Therefore, this step optimizes the segmentation of the column blocks obtained in step S200 by similarity merging.

[0062] Please see Figure 6 This step S300 includes the following sub-steps: S310. Calculate the column mean and column variance of each partitioned column block.

[0063] Specifically, for each column block obtained in step S200, the average of the mean values ​​of all columns in that column block is calculated, i.e., the column mean, and the average of the variances of all columns in that column block is calculated, i.e., the column variance.

[0064] S320. Merge adjacent similar column blocks based on threshold judgment. Merge column blocks in which the absolute value of the difference between the column averages is less than a preset first threshold and the absolute value of the difference between the column average variances is less than a preset second threshold to obtain merged column blocks.

[0065] For any two adjacent column blocks, calculate the absolute value of the difference between their column mean and the absolute value of the difference between their column variance. If both the absolute values ​​of the difference between their column mean and the absolute values ​​of their variance are less than the corresponding preset thresholds, then the two adjacent column blocks are determined to be highly similar in statistical characteristics, and they are merged into one column block. The first threshold and the second threshold can be preset according to the statistical characteristic distribution range of the image. In this embodiment, the value of the first threshold is approximately 1 / 2 of the global mean standard deviation, and the value of the second threshold is approximately 1 / 2 of the global variance standard deviation.

[0066] After completing one merge, update the column block set, recalculate the column mean and column variance of the newly merged column blocks, and repeat the above comparison and merge steps until no adjacent column blocks meet the merge conditions, thus obtaining the final block matrix and the corresponding column blocks.

[0067] When optimizing the similarity merging of the divided column blocks, in addition to using thresholds for column mean and column variance, other statistical hypothesis testing methods, such as the F-test, can be used to determine whether adjacent column blocks have statistically significant differences. These alternative judgment methods can all achieve the effect of merging similar column blocks, and therefore also fall within the protection scope of this invention.

[0068] S400. Each merged column block is treated as an independent processing unit, and moment matching correction is performed separately. The corrected column blocks are then reassembled in their original order to obtain the corrected image.

[0069] It should be noted that the moment matching correction method described in step S400 matches the mean and variance of each column. In the specific calculation of the correction formula, to maintain dimensional consistency, the standard deviation, i.e., the square root of the variance, is used in the calculation. Since the standard deviation and variance are mathematically equivalent, using either the standard deviation or the variance for correction is essentially the same.

[0070] After the merging and optimization in step S300, the final block scheme is obtained. This step uses each column block as an independent processing window and performs moment matching correction separately, so that the columns within each column block are statistically aligned with the global standard of that column block, thereby eliminating stripe noise between columns.

[0071] Please see Figure 7 This step S400 includes the following sub-steps: S410, Record the original column range of each column block after merging.

[0072] Before performing block correction, record the original column range corresponding to each column block, i.e., which columns the column block contains. For example, block 1 contains columns 1 to 20, block 2 contains columns 21 to 50, etc. These records will be used for data restoration after correction.

[0073] S420. Using all pixels in the current column block as a reference image, calculate the mean and standard deviation of the reference image.

[0074] Specifically, for the current column block to be processed, the dataset consisting of all pixels in the column block is used as a reference image, and the global mean and global standard deviation of all pixels in the reference image are calculated.

[0075] S430. Correct the pixels of each column in the column block based on the correction formula.

[0076] Specifically, the core idea of ​​moment matching correction is to match the mean and standard deviation of each column to the mean and standard deviation of the reference image. The correction formula is as follows:

[0077] in, Indicates the first Column-corrected pixel values, Indicates the first Pixel values ​​before column correction Indicates the first The mean of the column, Indicates the first The standard deviation of the column, This represents the global mean of all pixels within the current target column block. This represents the global standard deviation of all pixels within the current target column. This represents the reference dataset consisting of all pixels within the target column block to which the column to be corrected belongs.

[0078] S440. Restore each corrected column block to its original position according to the original column range recorded, and reconstruct the corrected image.

[0079] After performing moment matching correction on all column blocks, the corrected data of each column block is restored to its corresponding column position according to the original column range recorded in step S410. For example, the corrected data of block 1 is placed back into columns 1-20, the corrected data of block 2 is placed back into columns 21-50, and so on. The column blocks are then stitched and reassembled in their original order to output the corrected complete image.

[0080] Please see Figure 8 The present invention also discloses a moment matching non-uniformity correction device for implementing the moment matching non-uniformity correction method described in the above embodiments. Specifically, the moment matching non-uniformity correction device of this embodiment includes a feature extraction module 100, a segmentation module 200, a merging module 300, and a correction module 400. Wherein: The feature extraction module 100 is used to extract and preprocess column features of the image to be corrected, and obtain the statistical features of each column. The feature extraction module 100 can extract and preprocess column features according to the above steps S100, providing an accurate data foundation for subsequent block processing.

[0081] The segmentation module 200 is used to divide the columns of the image into several continuous column blocks based on the statistical features. The segmentation module 200 uses the mean and standard deviation of each column output by the feature extraction module 100 as the segmentation basis, employs the Fisher optimal segmentation algorithm, uses the sum of squared deviations within each column block as the loss function, and solves for the optimal segmentation point that minimizes the overall loss function through dynamic programming to divide the image columns into continuous column blocks. The segmentation module 200 can achieve order-preserving block division of image columns according to the above steps S200.

[0082] The merging module 300 is used to perform similarity merging optimization on the segmented column blocks. The merging module 300 acquires each column block output by the segmentation module 200, calculates the column mean and column variance of each column block, and merges the column blocks based on these values. The merging module 300 can achieve similar column block merging optimization according to the above steps S300, avoiding correction distortion and artifacts caused by over-segmentation.

[0083] The correction module 400 is used to perform moment matching correction on each merged column block as an independent processing unit, and then reassembles the corrected column blocks in their original order to obtain the corrected image. The correction module 400 can realize block moment matching correction and image reconstruction according to the above steps S400.

[0084] This invention performs ordered segmentation of image columns, fully utilizing the spatial continuity of effective statistical information in the image. This ensures that columns within the same block are highly consistent in statistical characteristics, while columns between different blocks are significantly distinguishable in statistical characteristics. Based on this, moment matching correction is performed independently on each block, avoiding banding effects caused by the inability of global statistical features to represent local regional distributions. Furthermore, due to the ordered segmentation characteristic, scene edges and detail information are not destroyed, fundamentally solving the problem of artifacts and edge blurring in detail-rich images using traditional moment matching methods. This invention directly utilizes the statistical characteristics of the current image for segmentation and correction, requiring no pre-calibration and unaffected by factors such as device operating time and temperature changes. The correction coefficients do not drift, eliminating the need for repeated calibration. Simultaneously, by adaptively determining the segmentation scheme through Fisher's optimal segmentation, it is applicable to image non-uniformity correction in various scenarios, exhibiting broad applicability. This invention limits the search space of the Fisher algorithm to a reasonable range by pre-setting the range of values ​​for the number of segments, avoiding the computational overhead caused by unconstrained global search. While ensuring the block segmentation effect, it greatly reduces the amount of computation, meets the needs of real-time image processing, occupies fewer resources, and is easy to implement in hardware.

Claims

1. A method for correcting non-uniformity in moment matching, characterized in that, Includes the following steps: The image to be corrected is subjected to column feature extraction and preprocessing to obtain the statistical features of each column; Based on the statistical characteristics, the columns of the image are divided into several consecutive column blocks; The resulting column blocks are optimized by similarity merging. Each merged column block is treated as an independent processing unit, and moment matching correction is performed on each block separately. The corrected column blocks are then reassembled in their original order to obtain the corrected image.

2. The moment matching non-uniformity correction method as described in claim 1, characterized in that, The statistical features include the mean and variance. The step of extracting and preprocessing column features from the image to be corrected to obtain the statistical features of each column includes the following sub-steps: Calculate the mean and variance of each column of the image, and construct a mean sequence consisting of the mean of each column and a variance sequence consisting of the variance of each column; Gradient smoothing is performed on the mean sequence.

3. The moment matching non-uniformity correction method as described in claim 2, characterized in that, The step of performing gradient smoothing on the mean sequence includes the following sub-steps: Calculate the mean gradient of each column, where the mean gradient is the difference between the mean of that column and the mean of the adjacent preceding column; Calculate the average of the global mean gradient based on the mean gradient of each column; Determine whether the difference between the mean gradient of each column and the average of the global mean gradient is greater than a preset threshold; if it is greater than the preset threshold, replace the mean of the column with the average of the means of the two adjacent columns to the left and right of the column; otherwise, leave it unchanged.

4. The moment matching non-uniformity correction method as described in claim 1, characterized in that, The step of dividing the columns of the image into several consecutive column blocks based on the statistical features includes the following sub-steps: The statistical characteristics of each column are used as the basis for segmentation. The columns are segmented in their original order, and the sum of squared deviations within the same column after segmentation is used as the loss function. Traverse all segmentation schemes, determine the optimal number of segmentation segments, and select the segmentation scheme that minimizes the overall loss function of each column block under the optimal number of segmentation segments as the optimal segmentation scheme, and divide the columns of the image into continuous column blocks.

5. The moment matching non-uniformity correction method as described in claim 4, characterized in that, The step of determining the optimal number of segments includes the following sub-steps: A preset range of values ​​for the number of segmentation segments is defined, and the minimum value of the overall loss function corresponding to different values ​​of the number of segmentation segments within the preset range is calculated. The optimal number of segments is selected when the overall loss function value changes its downward trend as the number of segments increases.

6. The moment matching non-uniformity correction method as described in claim 5, characterized in that, The formula for calculating the sum of squared deviations is as follows: in, Indicates the first Listed to number The sum of squared deviations of the column, Indicates the first The statistical characteristic vector of the column. Indicates the first Listed to number The mean of the features within a block, wherein the mean of the features within a block is the mean of each statistical feature vector.

7. The moment matching non-uniformity correction method as described in claim 2, characterized in that, The step of optimizing the similarity merging of the partitioned column blocks includes the following sub-steps: Calculate the column mean and column variance of each partitioned column block; Column blocks whose absolute difference between the average mean of adjacent columns is less than a preset first threshold and whose absolute difference between the average variance of adjacent columns is less than a preset second threshold are merged to obtain merged column blocks.

8. The moment matching non-uniformity correction method as described in claim 7, characterized in that, The step of performing moment matching correction on each merged column block as an independent processing unit, and then reassembling the corrected column blocks in their original order to obtain the corrected image, includes the following sub-steps: Record the original column range of each column block after merging; Using all pixels within the current column block as a reference image, calculate the mean and standard deviation of the reference image; The pixels in each column within the column block are corrected based on the correction formula; The corrected column blocks are restored to their original positions according to the original column range recorded, and the corrected image is reconstructed.

9. The moment matching non-uniformity correction method as described in claim 8, characterized in that, The correction formula is as follows: in, Indicates the first Column-corrected pixel values, Indicates the first Pixel values ​​before column correction Indicates the first The mean of the column, Indicates the first The standard deviation of the column, This represents the global mean of all pixels within the current target column block. This represents the global standard deviation of all pixels within the current target column. This represents the reference dataset consisting of all pixels within the target column block to which the column to be corrected belongs.

10. A moment matching non-uniformity correction device, characterized in that, include: The feature extraction module is used to extract and preprocess column features from the image to be corrected, and obtain the statistical features of each column. The segmentation module is used to divide the columns of the image into several consecutive column blocks based on the statistical features; The merging module is used to perform similarity merging optimization on the divided column blocks; The correction module is used to perform moment matching correction on each merged column block as an independent processing unit, and then reassemble the corrected column blocks in their original order to obtain the corrected image.