Scene-based non-uniformity correction method

Through difference analysis and key frame selection, combined with a local update algorithm, the problem of high resource consumption in existing technologies is solved, and efficient and accurate image non-uniformity correction is achieved, which is suitable for real-time scene applications.

CN120782686AActive Publication Date: 2025-10-14南京海汇装备科技有限公司

Patent Information

Application Number
CN202510890158.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-10-14
Estimated Expiration
2045-06-30

AI Technical Summary

Technical Problem

Existing scene-based non-uniformity correction methods require a long time for image sequence statistics and calculation when processing image sequences, resulting in large consumption of data storage and computing resources, and fail to effectively handle dynamic scene changes, reducing correction efficiency.

Method used

By analyzing the difference between two adjacent frames, extracting the difference area and evaluating the frame importance, identifying key frames and non-key frames, and performing full-frame storage and online average calculation only on key frames, combined with the local update algorithm of the difference area, the correction parameters are dynamically adjusted and redundant data is deleted.

Benefits of technology

It effectively reduces the number of image frames to be processed, reduces data storage and computing resource consumption, improves processing efficiency and accuracy, adapts to real-time scene application requirements, and provides higher-precision non-uniformity correction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120782686A_ABST
    Figure CN120782686A_ABST
Patent Text Reader

Abstract

The invention discloses a scene-based non-uniformity correction method, and relates to the technical field of image processing. According to the method, the key frame and the non-key frame are identified by analyzing the difference degree of continuous image sequences of the night vision system, extracting the difference region and evaluating the importance score of the frame in combination with the information entropy of the image; for the key frame, carrying out full-frame storage and on-line average calculation to generate an initial non-uniformity correction parameter; non-key frames only reserve difference area data, local updating is carried out based on correction parameters of the key frames, and the correction effect is further optimized through statistical characteristics of difference areas; and the standard deviation convergence condition is dynamically adjusted, the non-uniformity correction precision is optimized, newly added key frames are automatically processed in the real-time image sequence, and redundant data are deleted. According to the method, the image processing efficiency and the correction precision are remarkably improved, the redundancy calculation and storage overhead are reduced, the adaptability is high, correction parameters can be optimized in real time, and the method is particularly suitable for efficient and accurate night vision system image processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a scene-based non-uniformity correction method. Background Art

[0002] With the rapid development of computer vision technology, non-uniformity correction in image processing has become a key technology for improving image quality. In practical applications, image sequences often exhibit inconsistencies in brightness and contrast due to factors such as non-uniform sensor performance, changes in ambient lighting, and object motion, affecting the accuracy of subsequent analysis and applications. Therefore, non-uniformity correction technology is widely used in image processing applications, such as image enhancement in low-light environments and target recognition and tracking in video surveillance.

[0003] Currently, scene-based non-uniformity correction methods primarily analyze and model the non-uniformity within an image sequence by statistically analyzing and modeling a large number of consecutive image frames. These methods estimate and correct errors caused by uneven sensor response by calculating average image characteristics such as brightness and contrast over a period of time. Traditional methods typically rely on statistically averaging over longer image sequences in order to obtain more accurate correction results. However, as the length of image sequences increases, data storage and computing resource consumption increases significantly, severely limiting real-time performance. Furthermore, traditional methods process all frames indiscriminately, failing to account for the changing characteristics of dynamic scenes within the image. In scenes with significant dynamic changes, processing redundant frame data does not effectively improve correction. Instead, it increases the cost of inefficient computation and reduces correction efficiency. Summary of the Invention

[0004] The object of the present invention is to provide a scene-based non-uniformity correction method to solve the problems raised in the above background technology.

[0005] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0006] A scene-based non-uniformity correction method includes the following steps:

[0007] Step S100: Obtain a continuous image sequence from the night vision system, perform difference analysis on two adjacent frames, and extract the difference area; extract the information entropy of each frame, and evaluate the frame importance score based on the area of ​​the difference area;

[0008] Step S200: Identify key frames in the image sequence based on the frame importance score and mark the key frames and non-key frames in the image sequence separately; store the key frames in full, and only retain the pixel coordinates and grayscale values ​​of the difference areas in the non-key frames; and establish an index table to record the mapping relationship between key frames and non-key frames;

[0009] Step S300: Summarize the key frames in the image sequence and generate a key frame set; perform online averaging calculation on all key frames to generate initial non-uniformity correction parameters, and dynamically adjust the averaging termination condition according to the convergence of the standard deviation of the key frames;

[0010] Step S400: Extract the pixel coordinates and grayscale values ​​of the difference area of ​​the non-key frame, and update the local average value of the pixels in the difference area in combination with the initial non-uniformity correction parameters; analyze the statistical characteristics of the difference area, evaluate the impact of the difference area on the correction, and make corresponding optimization adjustments;

[0011] Step S500. Acquire a real-time image sequence. When a new keyframe is added, extract the coverage of the difference area of ​​the old keyframe. If the difference area of ​​the new keyframe completely contains the difference area of ​​the old keyframe, mark the old keyframe as redundant data and delete its associated non-keyframe compressed data.

[0012] Furthermore, step S100 includes:

[0013] S101. Obtain a continuous image sequence of the night vision system, represented as: {I1, I2, ..., I n}, where I1 represents the first frame image in the image sequence, I2 represents the second frame image in the image sequence, and so on. n Represents a frame image in an image sequence, and n represents the number of frames in the image sequence; for two adjacent frame images I in the image sequence t and I t+1 Perform difference analysis to obtain the adjacent frame difference map D t+1 , and D t+1 =|I t+1 -I t |, where D t+1 Represents two adjacent frames of image I t and I t+1 The magnitude of temporal variation of each pixel on ;

[0014] S102. For adjacent frame difference map D t+1 , get the difference value of each pixel |I t+1 (i,j)-I t (i, j)|, compare the size relationship between the difference value of each pixel and the difference threshold T; if |I t+1 (i,j)-I t (i,j)|>T, it means that this pixel belongs to the difference area, marked as D t+1 (i,j)=1; if |I t+1 (i,j)-I t (i,j)|≤T, it means that this pixel belongs to the non-difference area, marked as Dt+1 (i, j) = 0; where i and j represent the pixel positions in the image, D t+1 (i, j) represents the difference mark of the i-th and j-th pixels in the difference image of the t+1 frame; according to the difference area mark, D is summarized t+1 (i, j) = 1 pixels, thus extracting the difference area;

[0015] S103. Calculate the information entropy of each frame of image, and the corresponding information entropy is defined as: Where p(h) represents the image I t The probability of the gray value h in the image is obtained, and L is the gray level of the image; the probability distribution p(h) is obtained by statistically analyzing the gray histogram of the image. The higher the information entropy value, the more uniform the information distribution in the image and the more complex the image; the importance of each frame is evaluated by combining the image difference and information entropy, and the corresponding frame importance score S is calculated. t , and the specific calculation formula is: S t =α×(A diff / A total )+β×[H(I t ) / H max ], where A diff A represents the number of different region labels in the t-th frame image, total Represents the total number of pixels in the t-th frame image; H max represents the maximum information entropy. For example, when the number of grayscale levels of an image is 256, the maximum information entropy is log2256. α and β are weight coefficients, and α + β = 1. Adjust according to the application scenario, for example, α = 0.6 and β = 0.4.

[0016] Furthermore, step S200 includes:

[0017] S201. Calculate the frame importance score of each frame in the image sequence according to the calculation formula of the frame importance score, sort the frame importance scores of each frame in descending order, select the first m frames to mark as key frames, and mark the rest as non-key frames; store the full frame of the key frame and save all the pixel data of the key frame, which is represented by I key ;

[0018] S202. For non-key frames, extract the difference area from the non-key frames, and store the pixel coordinates and grayscale values ​​of the difference area in the non-key frames, expressed as: R non-key , and R non-key There are several data groups in , and each data group is represented as: [(i m ,j m ),I non-key (i m ,j m )], where (im ,j m ) represents the mth pixel coordinate in the difference area, I non-key (i m ,j m ) represents the grayscale value of the mth pixel; based on the time sequence of key frames and non-key frames, an index table is established to record the mapping relationship between key frames and non-key frames.

[0019] Furthermore, based on the time sequence of key frames and non-key frames, an index table is established to record the mapping relationship between key frames and non-key frames. The specific contents include:

[0020] The index table is recorded in chronological order, and includes frame number, frame type, pixel data and difference area data, wherein the frame type is key frame and non-key frame, the pixel data corresponds to the key frame, the difference area data corresponds to the non-key frame, and the difference area data includes the pixel coordinates and grayscale values ​​of the difference area in the non-key frame; wherein the index format corresponding to the key frame is: (N, Z, I key ), the index format corresponding to non-key frames is: (N, Z, R non-key ), where N represents the frame number and Z represents the frame type.

[0021] Furthermore, step S300 includes:

[0022] S301. Based on the frame types in the index table, summarize the key frames in the image sequence to generate a key frame set K, where K = {k1, k2, ..., kv}, where k1 represents the first key frame in the image sequence, k2 represents the second key frame in the image sequence, and so on, kv represents the vth key frame in the image sequence, and v represents the number of key frames in the image sequence;

[0023] S302. For the first key frame k1 in the key frame set K, the pixel data I of the key frame k1 is key1 As the initial average image A1, for each subsequent key frame kf, and f takes 2 to v; use the update formula to calculate the corresponding average image A f , and A f =[(f-1)·A f-1 +I keyf ] / f, where A f represents the average image up to the f-th key frame, A f-1 represents the average image of the previous key frame, I keyfRepresents the pixel data of the current f-th key frame; the corresponding update process is: each time the pixel data of the new key frame is added to the current average image, the function of the formula is to calculate the new average image based on the image data of the current key frame and the weighted value of the previous average image; as the number of key frames f increases, the average image gradually integrates the information of all previous key frames; this online update method does not need to save all key frame data, but gradually generates a comprehensive average image, which is suitable for processing real-time data streams or large-scale data. Through this online average calculation, an average image representing the comprehensive performance of all key frames will be obtained. This process can effectively extract the overall features of the key frame set without processing all key frames at once. Calculate the difference image Δf between each key frame and the corresponding average image, and Δf=I keyf -A f ; According to the difference image of each key frame, calculate the corresponding difference standard deviation σf, and summarize the average value of the difference standard deviation of all key frames as the initial correction parameter C init ;

[0024] S303. Obtain the difference standard deviation sequence of key frames and determine whether the difference standard deviation sequence has converged. The convergence judgment condition is: |σf-σ(f-1)|<∈, where ∈ represents the preset convergence threshold, indicating that when the difference between two standard deviation changes is less than this value, the difference standard deviation sequence is considered to have converged; dynamically adjust the average termination condition according to the convergence of the difference standard deviation sequence of key frames. When the standard deviation change of all key frames is less than ∈, the average calculation is considered to have converged and can be terminated; otherwise, continue the online average calculation until the convergence condition is met; whenever the standard deviation converges, update the non-uniformity correction parameter C according to the new standard deviation value final .

[0025] By gradually updating the average image rather than calculating the average image for all keyframes at once, memory overhead is reduced and real-time processing efficiency is improved. By determining whether the standard deviation sequence has converged and dynamically adjusting the termination criteria, the calculation is stopped at the appropriate time, avoiding unnecessary computational overhead and improving computational efficiency and accuracy. As the standard deviation converges, the non-uniformity correction parameters are updated promptly, further improving image quality and making the processing results more accurate and stable.

[0026] Furthermore, step S400 includes:

[0027] S401. Based on the frame type in the index table, obtain the pixel coordinates and grayscale values ​​of the difference area of ​​the non-key frame in the image sequence, combined with the initial non-uniformity correction parameter C init , the local average value of each pixel in the difference area of ​​the non-key frame is updated, and the corresponding calculation formula is:

[0028] I update (i m ,j m )=γ·I non-key (i m ,j m )+(1-γ)·(1 / N neighbor )Σ (ir,jr)∈N(im,jm) I non-key (i r ,j r );

[0029] Among them, I update (i m ,j m ) represents the updated grayscale value of the difference area pixel, I non-key (i m ,j m ) represents the grayscale value of the pixel in the difference area of ​​the current non-key frame, N(i m ,j m ) represents the pixel (i m ,j m )’s neighborhood pixel set, N neighbor Represents the number of pixels in the neighborhood, and γ represents the weighting coefficient, which controls the balance between the current pixel value and the average value of the neighborhood pixels;

[0030] S402. When updating each difference region pixel, analyze the statistical characteristics of the difference region, including the local mean μ_local and the local standard deviation σ_local of each difference region; based on the local mean μ_local and the local standard deviation σ_local of each difference region, calculate the corresponding impact factor, and the calculation formula of the impact factor is:

[0031] g=1+λ·(q_local-q_target);

[0032] Where g represents the influencing factor of the local mean or local standard deviation, λ represents a constant, q_local represents the local mean or local standard deviation of the difference area, and q_target represents the desired target mean or target standard deviation. For each difference area, the influencing factors of the corresponding local mean and local standard deviation are obtained, expressed as: g_μ and g_σ, respectively, and the comprehensive correction factor γ is calculated. adjusted , and γ adjusted =g_μ×g_σ; according to the comprehensive correction factor γ adjusted , the pixel grayscale value of the difference area is optimized and adjusted accordingly, and the adjusted pixel value is expressed as I corrected (i m ,j m ), and the corresponding calculation formula is: I corrected (im ,j m )=I update (i m ,j m )×γ adjusted .

[0033] Furthermore, step S500 includes:

[0034] Acquire a real-time image sequence, analyze the real-time image sequence with reference to the contents of step S100 and step S200, thereby identifying a new key frame, extracting a difference area in the new key frame, extracting the difference area coverage of the old key frame closest to the corresponding time point of the new key frame from the index table, and judging whether the difference area of ​​the new key frame completely contains the difference area of ​​the old key frame; if the difference area of ​​the new key frame completely contains the difference area of ​​the old key frame, mark the old key frame as redundant data; otherwise, merge the pixel data of the new key frame into the index table; based on the redundant mark, identify all non-key frame data associated with the old key frame, and delete all non-key frame data associated with the old key frame.

[0035] Compared with the existing technology, the present invention has the following advantages: through frame importance scoring and keyframe selection mechanisms, it can effectively reduce the number of image frames that need to be processed; by processing only important keyframes and extracting only difference area data from non-keyframes, it greatly reduces data storage and computing resource consumption, thereby improving processing efficiency and adapting to the needs of real-time scene applications. By dynamically identifying and deleting redundant keyframe data, the present invention avoids the redundant computing and storage overhead caused by the traditional method of indiscriminately processing all image frames; by deleting redundant keyframe data containing completely covered difference areas, it saves storage space and computing resources. The present invention combines image difference analysis, information entropy calculation, and a local update algorithm to more accurately correct errors caused by sensor non-uniformity. During the local update process of non-keyframes, the statistical characteristics of each difference area (such as local mean and local standard deviation) are considered, and the correction effect is optimized by adjusting the influencing factors, thereby providing higher-precision non-uniformity correction. The present invention adopts an online averaging method instead of storing the image data of all keyframes at once. Only the pixel data of the keyframe is retained each time, and the average image is gradually updated, effectively reducing memory usage and reducing the time delay of data storage and processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0037] Figure 1 It is a schematic diagram of the steps of a scene-based non-uniformity correction method of the present invention. DETAILED DESCRIPTION

[0038] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0039] See also Figure 1 , the present invention provides a technical solution:

[0040] A scene-based non-uniformity correction method includes the following steps:

[0041] Step S100: Obtain a continuous image sequence from the night vision system, perform difference analysis on two adjacent frames, and extract the difference area; extract the information entropy of each frame, and evaluate the frame importance score based on the area of ​​the difference area;

[0042] Step S200: Identify key frames in the image sequence based on the frame importance score and mark the key frames and non-key frames in the image sequence separately; store the key frames in full, and only retain the pixel coordinates and grayscale values ​​of the difference areas in the non-key frames; and establish an index table to record the mapping relationship between key frames and non-key frames;

[0043] Step S300: Summarize the key frames in the image sequence and generate a key frame set; perform online averaging calculation on all key frames to generate initial non-uniformity correction parameters, and dynamically adjust the averaging termination condition according to the convergence of the standard deviation of the key frames;

[0044] Step S400: Extract the pixel coordinates and grayscale values ​​of the difference area of ​​the non-key frame, and update the local average value of the pixels in the difference area in combination with the initial non-uniformity correction parameters; analyze the statistical characteristics of the difference area, evaluate the impact of the difference area on the correction, and make corresponding optimization adjustments;

[0045] Step S500. Acquire a real-time image sequence. When a new keyframe is added, extract the coverage of the difference area of ​​the old keyframe. If the difference area of ​​the new keyframe completely contains the difference area of ​​the old keyframe, mark the old keyframe as redundant data and delete its associated non-keyframe compressed data.

[0046] Step S100 includes:

[0047] S101. Obtain a continuous image sequence of the night vision system, represented as: {I1, I2, ..., I n}, where I1 represents the first frame image in the image sequence, I2 represents the second frame image in the image sequence, and so on.n Represents a frame image in an image sequence, and n represents the number of frames in the image sequence; for two adjacent frame images I in the image sequence t and I t+1 Perform difference analysis to obtain the adjacent frame difference map D t+1 , and D t+1 =|I t+1 -I t |, where D t+1 Represents two adjacent frames of image I t and I t+1 The magnitude of temporal variation of each pixel on ;

[0048] S102. For adjacent frame difference map D t+1 , get the difference value of each pixel |I t+1 (i,j)-I t (i, j)|, compare the size relationship between the difference value of each pixel and the difference threshold T; if |I t+1 (i,j)-I t (i,j)|>T, it means that this pixel belongs to the difference area, marked as D t+1 (i,j)=1; if |I t+1 (i,j)-I t (i,j)|≤T, it means that this pixel belongs to the non-difference area, marked as D t+1 (i, j) = 0; where i and j represent the pixel positions in the image, D t+1 (i, j) represents the difference mark of the i-th and j-th pixels in the difference image of the t+1 frame; according to the difference area mark, D is summarized t+1 (i, j) = 1 pixels, thus extracting the difference area;

[0049] S103. Calculate the information entropy of each frame of image, and the corresponding information entropy is defined as: Where p(h) represents the image I t The probability of the gray value h in the image is obtained, and L is the gray level of the image; the probability distribution p(h) is obtained by statistically analyzing the gray histogram of the image. The higher the information entropy value, the more uniform the information distribution in the image and the more complex the image; the importance of each frame is evaluated by combining the image difference and information entropy, and the corresponding frame importance score S is calculated. t , and the specific calculation formula is: S t =α×(A diff / A total )+β×[H(I t ) / H max ], where A diff A represents the number of different region labels in the t-th frame image, totalRepresents the total number of pixels in the t-th frame image; H max Represents the maximum information entropy. For example, when the image grayscale level is 256, the maximum information entropy is log2256. α and β are weight coefficients, and α + β = 1. Adjust according to the application scenario, for example, α = 0.6, β = 0.4;

[0050] In this embodiment, it is assumed that there are two images I t and I t+1 , their size is 3×3, that is, M=N=3, the image grayscale is 0 to 255, the difference threshold T=10, and the weight coefficients α=0.6, β=0.4.

[0051] Assume that the number of pixels in the difference area is A diff =1, total number of pixels A total =9, assuming the probability distribution of grayscale values ​​is:

[0052] p(100)=1 / 9, p(110)=1 / 9, p(120)=1 / 9, p(130)=1 / 9, p(140)=1 / 9, p(150)=1 / 9, p(160)=1 / 9, p(170)=1 / 9, p(180)=1 / 9;

[0053] Information entropy is calculated as: Maximum information entropy H max =log2256=8;

[0054] Calculate the frame importance score S according to the formula t :

[0055] S t =0.6×(1 / 9)+0.4×log29≈0.2252.

[0056] Step S200 includes:

[0057] S201. Calculate the frame importance score of each frame in the image sequence according to the calculation formula of the frame importance score, sort the frame importance scores of each frame in descending order, select the first m frames to mark as key frames, and mark the rest as non-key frames; store the full frame of the key frame and save all the pixel data of the key frame, which is represented by I key ;

[0058] S202. For non-key frames, extract the difference area from the non-key frames, and store the pixel coordinates and grayscale values ​​of the difference area in the non-key frames, expressed as: R non-key , and R non-key There are several data groups in , and each data group is represented as: [(i m ,j m ),Inon-key (i m ,j m )], where (i m ,j m ) represents the mth pixel coordinate in the difference area, I non-key (i m ,j m ) represents the grayscale value of the mth pixel; based on the time sequence of key frames and non-key frames, an index table is established to record the mapping relationship between key frames and non-key frames.

[0059] Based on the time sequence of key frames and non-key frames, an index table is established to record the mapping relationship between key frames and non-key frames. The specific contents include:

[0060] The index table is recorded in chronological order, and includes frame number, frame type, pixel data and difference area data, wherein the frame type is key frame and non-key frame, the pixel data corresponds to the key frame, the difference area data corresponds to the non-key frame, and the difference area data includes the pixel coordinates and grayscale values ​​of the difference area in the non-key frame; wherein the index format corresponding to the key frame is: (N, Z, I key ), the index format corresponding to non-key frames is: (N, Z, R non-key ), where N represents the frame number and Z represents the frame type.

[0061] Step S300 includes:

[0062] S301. Based on the frame types in the index table, summarize the key frames in the image sequence to generate a key frame set K, where K = {k1, k2, ..., kv}, where k1 represents the first key frame in the image sequence, k2 represents the second key frame in the image sequence, and so on, kv represents the vth key frame in the image sequence, and v represents the number of key frames in the image sequence;

[0063] S302. For the first key frame k1 in the key frame set K, the pixel data I of the key frame k1 is key1 As the initial average image A1, for each subsequent key frame kf, and f takes 2 to v; use the update formula to calculate the corresponding average image A f , and A f =[(f-1)·A f-1 +I keyf ] / f, where A f represents the average image up to the f-th key frame, A f-1 represents the average image of the previous key frame, I keyfRepresents the pixel data of the current f-th key frame; the corresponding update process is: each time the pixel data of the new key frame is added to the current average image, the function of the formula is to calculate the new average image based on the image data of the current key frame and the weighted value of the previous average image; as the number of key frames f increases, the average image gradually integrates the information of all previous key frames; this online update method does not need to save all key frame data, but gradually generates a comprehensive average image, which is suitable for processing real-time data streams or large-scale data. Through this online average calculation, an average image representing the comprehensive performance of all key frames will be obtained. This process can effectively extract the overall features of the key frame set without processing all key frames at once. Calculate the difference image Δf between each key frame and the corresponding average image, and Δf=I keyf -A f ; According to the difference image of each key frame, calculate the corresponding difference standard deviation σf, and summarize the average value of the difference standard deviation of all key frames as the initial correction parameter C init ;

[0064] S303. Obtain the difference standard deviation sequence of key frames and determine whether the difference standard deviation sequence has converged. The convergence judgment condition is: |σf-σ(f-1)|<∈, where ∈ represents the preset convergence threshold, indicating that when the difference between two standard deviation changes is less than this value, the difference standard deviation sequence is considered to have converged; dynamically adjust the average termination condition according to the convergence of the difference standard deviation sequence of key frames. When the standard deviation change of all key frames is less than ∈, the average calculation is considered to have converged and can be terminated; otherwise, continue the online average calculation until the convergence condition is met; whenever the standard deviation converges, update the non-uniformity correction parameter C according to the new standard deviation value final .

[0065] By gradually updating the average image rather than calculating the average image for all keyframes at once, memory overhead is reduced and real-time processing efficiency is improved. By determining whether the standard deviation sequence has converged and dynamically adjusting the termination criteria, the calculation is stopped at the appropriate time, avoiding unnecessary computational overhead and improving computational efficiency and accuracy. As the standard deviation converges, the non-uniformity correction parameters are updated promptly, further improving image quality and making the processing results more accurate and stable.

[0066] Step S400 includes:

[0067] S401. Based on the frame type in the index table, obtain the pixel coordinates and grayscale values ​​of the difference area of ​​the non-key frame in the image sequence, combined with the initial non-uniformity correction parameter C init , the local average value of each pixel in the difference area of ​​the non-key frame is updated, and the corresponding calculation formula is:

[0068] I update (i m ,j m )=γ·I non-key (i m ,j m )+(1-γ)·(1 / N neighbor )Σ (ir,jr)∈N(im,jm) I non-key (i r ,j r );

[0069] Among them, I update (i m ,j m ) represents the updated grayscale value of the difference area pixel, I non-key (i m ,j m ) represents the grayscale value of the pixel in the difference area of ​​the current non-key frame, N(i m ,j m ) represents the pixel (i m ,j m )’s neighborhood pixel set, N neighbor Represents the number of pixels in the neighborhood, and γ represents the weighting coefficient, which controls the balance between the current pixel value and the average value of the neighborhood pixels;

[0070] S402. When updating each difference region pixel, analyze the statistical characteristics of the difference region, including the local mean μ_local and the local standard deviation σ_local of each difference region; based on the local mean μ_local and the local standard deviation σ_local of each difference region, calculate the corresponding impact factor, and the calculation formula of the impact factor is:

[0071] g=1+λ·(q_local-q_target);

[0072] Where g represents the influencing factor of the local mean or local standard deviation, λ represents a constant, q_local represents the local mean or local standard deviation of the difference area, and q_target represents the desired target mean or target standard deviation. For each difference area, the influencing factors of the corresponding local mean and local standard deviation are obtained, expressed as: g_μ and g_σ, respectively, and the comprehensive correction factor γ is calculated. adjusted , and γ adjusted =g_μ×g_σ; according to the comprehensive correction factor γ adjusted , the pixel grayscale value of the difference area is optimized and adjusted accordingly, and the adjusted pixel value is expressed as I corrected (i m ,j m ), and the corresponding calculation formula is: I corrected (im ,j m )=I update (i m ,j m )×γ adjusted .

[0073] Step S500 includes:

[0074] Acquire a real-time image sequence, analyze the real-time image sequence with reference to the contents of step S100 and step S200, thereby identifying a new key frame, extracting a difference area in the new key frame, extracting the difference area coverage of the old key frame closest to the corresponding time point of the new key frame from the index table, and judging whether the difference area of ​​the new key frame completely contains the difference area of ​​the old key frame; if the difference area of ​​the new key frame completely contains the difference area of ​​the old key frame, mark the old key frame as redundant data; otherwise, merge the pixel data of the new key frame into the index table; based on the redundant mark, identify all non-key frame data associated with the old key frame, and delete all non-key frame data associated with the old key frame.

[0075] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.

[0076] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art will be able to modify the technical solutions described in the aforementioned embodiments or substitute equivalents for some of the technical features. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.

Claims

1. A scene-based non-uniformity correction method, characterized by: The method comprises the following steps: Step S100: Obtain a continuous image sequence from the night vision system, perform difference analysis on two adjacent frames, and extract the difference area; extract the information entropy of each frame, and evaluate the frame importance score based on the area of ​​the difference area; Step S200: Identify key frames in the image sequence based on the frame importance score and mark the key frames and non-key frames in the image sequence separately; store the key frames in full, and only retain the pixel coordinates and grayscale values ​​of the difference areas in the non-key frames; and establish an index table to record the mapping relationship between key frames and non-key frames; Step S300: Summarize the key frames in the image sequence and generate a key frame set; perform online averaging calculation on all key frames to generate initial non-uniformity correction parameters, and dynamically adjust the averaging termination condition according to the convergence of the standard deviation of the key frames; Step S400: Extract the pixel coordinates and grayscale values ​​of the difference area of ​​the non-key frame, and update the local average value of the pixels in the difference area in combination with the initial non-uniformity correction parameters; analyze the statistical characteristics of the difference area, evaluate the impact of the difference area on the correction, and make corresponding optimization adjustments; Step S500. Acquire a real-time image sequence. When a new keyframe is added, extract the coverage of the difference area of ​​the old keyframe. If the difference area of ​​the new keyframe completely contains the difference area of ​​the old keyframe, mark the old keyframe as redundant data and delete its associated non-keyframe compressed data.

2. The scene-based non-uniformity correction method according to claim 1, characterized in that: The specific process of extracting the difference area in step S100 is as follows: Obtain a continuous image sequence of the night vision system, represented as: {I1,I2,...,I n }, where I1 represents the first frame image in the image sequence, I2 represents the second frame image in the image sequence, and so on. n Represents a frame image in an image sequence, and n represents the number of frames in the image sequence; for two adjacent frame images I in the image sequence t and I t+1 Perform difference analysis to obtain the adjacent frame difference map D t+1 , and D t+1 =|I t+1 -I t |, where D t+1 Represents two adjacent frames of image I t and I t+1 The magnitude of temporal variation of each pixel on ; For adjacent frame difference map D t+1 , get the difference value of each pixel |I t+1 (i,j)-I t (i, j)|, compare the size relationship between the difference value of each pixel and the difference threshold T; if |I t+1 (i,j)-I t (i,j)|>T, it means that this pixel belongs to the difference area, marked as D t+1 (i,j)=1; if |I t+1 (i,j)-I t (i,j)|≤T, it means that this pixel belongs to the non-difference area, marked as D t+1 (i, j) = 0; where i and j represent the pixel positions in the image, D t+1 (i, j) represents the difference mark of the i-th and j-th pixels in the difference image of the t+1-th frame; According to the difference area mark, summarize D t+1 (i, j) = 1, thereby extracting the difference area.

3. The scene-based non-uniformity correction method according to claim 1, wherein: The information entropy of each frame image is extracted in step S100, and the frame importance score is evaluated in combination with the area of ​​the difference region. The specific content is as follows: The information entropy is calculated for each frame of image, and the corresponding information entropy is defined as: Where p(h) represents the image I t The probability of the gray value h in the image, L is the gray level of the image; the importance of each frame is evaluated by combining the image difference and information entropy, and the corresponding frame importance score S is calculated t , and the specific calculation formula is: S t =α×(A diff / A total )+β×[H(I t ) / H max ], where A diff A represents the number of different region labels in the t-th frame image, total Represents the total number of pixels in the t-th frame image; H max represents the maximum information entropy; α and β are weight coefficients, and α+β=1.

4. The scene-based non-uniformity correction method according to claim 3, characterized in that: The step S200 includes: According to the calculation formula of frame importance score, the frame importance score of each frame in the image sequence is calculated, and the frame importance score of each frame is arranged in descending order. The first m frames are marked as key frames, and the rest are marked as non-key frames. The key frames are fully stored and all pixel data of the key frames are saved, which is expressed as I key ; For non-key frames, the difference area is extracted from the non-key frames, and the pixel coordinates and grayscale values ​​of the difference area in the non-key frames are stored, which is expressed as: R non-key , and R non-key There are several data groups in , and each data group is represented as: [(i m ,j m ),I non-key (i m ,j m )], where (i m ,j m ) represents the mth pixel coordinate in the difference area, I non-key (i m ,j m ) represents the grayscale value of the mth pixel; based on the time sequence of key frames and non-key frames, an index table is established to record the mapping relationship between key frames and non-key frames.

5. The scene-based non-uniformity correction method according to claim 4, characterized in that: In step S200, an index table is established to record the mapping relationship between key frames and non-key frames based on the time sequence of key frames and non-key frames. The specific contents include: The index table is recorded in chronological order, and includes frame number, frame type, pixel data and difference area data, wherein the frame type is key frame and non-key frame, the pixel data corresponds to the key frame, the difference area data corresponds to the non-key frame, and the difference area data includes the pixel coordinates and grayscale values ​​of the difference area in the non-key frame; wherein the index format corresponding to the key frame is: (N, Z, I key ), the index format corresponding to non-key frames is: (N, Z, R non-key ), where N represents the frame number and Z represents the frame type.

6. The scene-based non-uniformity correction method according to claim 1, characterized in that: Summarizing the key frames in the image sequence in step S300 and generating a key frame set; Perform online averaging calculation on all key frames to generate initial non-uniformity correction parameters, including: Based on the frame types in the index table, the key frames in the image sequence are summarized to generate a key frame set K, where K = {k1, k2, ..., kv}, where k1 represents the first key frame in the image sequence, k2 represents the second key frame in the image sequence, and so on, kv represents the vth key frame in the image sequence, and v represents the number of key frames in the image sequence; For the first key frame k1 in the key frame set K, the pixel data I of key frame k1 is key1 As the initial average image A1, for each subsequent key frame kf, and f takes 2 to v; use the update formula to calculate the corresponding average image A f , and A f =[(f-1)·A f-1 +I keyf ] / f, where A f represents the average image up to the f-th key frame, A f-1 represents the average image of the previous key frame, I keyf Represents the pixel data of the current f-th key frame; Calculate the difference image Δf between each key frame and the corresponding average image, and Δf=I keyf -A f ; According to the difference image of each key frame, calculate the corresponding difference standard deviation σf, and summarize the average value of the difference standard deviation of all key frames as the initial correction parameter C init。 7. The scene-based non-uniformity correction method according to claim 6, characterized in that: The step S300 of dynamically adjusting the average termination condition according to the convergence of the standard deviation of the key frames specifically includes: Obtain the difference standard deviation sequence of key frames and judge whether the difference standard deviation sequence converges. The convergence judgment condition is: |σf-σ(f-1)|<∈, where ∈ represents the preset convergence threshold. Dynamically adjust the average termination condition according to the convergence of the difference standard deviation sequence of key frames. When the standard deviation change of all key frames is less than ∈, the average calculation is considered to have converged and can be terminated. Otherwise, continue the online average calculation until the convergence condition is reached. Whenever the standard deviation converges, update the non-uniformity correction parameter C according to the new standard deviation value. final .

8. The scene-based non-uniformity correction method according to claim 6, characterized in that: The step S400 includes: Based on the frame type in the index table, the pixel coordinates and grayscale values ​​of the difference area of ​​the non-key frames in the image sequence are obtained, and the initial non-uniformity correction parameter C is used. init , the local average value of each pixel in the difference area of ​​the non-key frame is updated, and the corresponding calculation formula is: I update (i m ,j m )=γ·I non-key (i m ,j m )+(1-γ)·(1 / N neighbor )Σ (ir,jr)∈N(im,jm) I non-key (i r ,j r ); Among them, I update (i m ,j m ) represents the updated grayscale value of the difference area pixel, I non-key (i m ,j m ) represents the grayscale value of the pixel in the difference area of ​​the current non-key frame, N(i m ,j m ) represents the pixel (i m ,j m )’s neighborhood pixel set, N neighbor represents the number of pixels in the neighborhood, and γ represents the weighting coefficient; When updating each difference region pixel, the statistical characteristics of the difference region are analyzed, including the local mean μ_local and the local standard deviation σ_local of each difference region. Based on the local mean μ_local and the local standard deviation σ_local of each difference region, the corresponding influence factors are calculated respectively, and the calculation formula of the influence factors is: g=1+λ·(q_local-q_target); Where g represents the influencing factor of the local mean or local standard deviation, λ represents a constant, q_local represents the local mean or local standard deviation of the difference area, and q_target represents the desired target mean or target standard deviation. For each difference area, the influencing factors of the corresponding local mean and local standard deviation are obtained, expressed as: g_μ and g_σ, respectively, and the comprehensive correction factor γ is calculated. adjusted , and γ adjusted =g_μ×g_σ; according to the comprehensive correction factor γ adjusted , the pixel grayscale value of the difference area is optimized and adjusted accordingly, and the adjusted pixel value is expressed as I corrected (i m ,j m ), and the corresponding calculation formula is: I corrected (i m ,j m )=I update (i m ,j m )×γ adjusted .

9. The scene-based non-uniformity correction method according to claim 1, characterized in that: The step S500 includes: Acquire a real-time image sequence, analyze the real-time image sequence with reference to the contents of step S100 and step S200, thereby identifying a new key frame, extracting a difference area in the new key frame, extracting the difference area coverage of the old key frame closest to the corresponding time point of the new key frame from the index table, and judging whether the difference area of ​​the new key frame completely contains the difference area of ​​the old key frame; if the difference area of ​​the new key frame completely contains the difference area of ​​the old key frame, mark the old key frame as redundant data; otherwise, merge the pixel data of the new key frame into the index table; based on the redundant mark, identify all non-key frame data associated with the old key frame, and delete all non-key frame data associated with the old key frame.

Citation Information

Patent Citations

  • Nonuniform sparse sampling video super resolution method

    CN106097251A

  • Non-uniformity correction method based on scene inter-frame registration and adaptive to learning rate

    CN110363714A

  • Real-time image video compression method for dynamic frame screening

    CN119182910A

  • Animation real-time capturing and repairing method and system

    CN119863549A

  • Stripe non-uniformity correction method based on time-space domain adaptive one-dimensional filtering

    CN119991450A

Cited By

  • Video transmission method, system and device based on narrowband condition and medium

    CN122027611A