A texture-preserving image denoising and enhancement method based on a generative adversarial network
By combining frequency domain signal decomposition and generative adversarial networks, the problems of texture artifacts and signal loss in industrial inspection are solved, achieving adaptive denoising and enhancement of high-frequency details, and ensuring the physical statistical properties of the signal and the authenticity of the texture.
Patent Information
- Application Number
- CN202511924924.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2045-12-19
AI Technical Summary
Existing image denoising and enhancement techniques are difficult to effectively preserve high-frequency feature details of microscopic surfaces in industrial inspection, and methods based on generative adversarial networks are prone to producing false texture artifacts due to overfitting, lacking constraints from the physical and statistical properties of signals.
By employing steps such as frequency domain signal decomposition, structure flow gradient calculation, cross-band threshold modulation, texture flow statistical gating, and residual orthogonality calibration, a texture-preserving image denoising and enhancement method is constructed using the inherent frequency domain statistical characteristics of the signal. Discrete wavelet transform and generative adversarial networks are used, combined with structural saliency gradient maps and dynamic gating thresholds, to achieve adaptive processing of high-frequency signals.
While denoising, it ensures the deterministic preservation of fine texture structures, adapts to complex lighting environments, prevents information loss caused by excessive smoothing, and achieves improved signal-to-noise ratio and protection of texture features.
Smart Images

Figure CN121353120B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a texture-preserving image denoising and enhancement method based on generative adversarial networks, belonging to the field of image data processing technology. Background Technology
[0002] In current precision industrial manufacturing and automated optical inspection, acquiring high-fidelity surface image data is the foundation for defect analysis and quality control. High-speed dynamic imaging is limited by production cycle time, and the acquisition equipment needs to operate under extremely short exposure time and high gain settings. The original image signal contains high-intensity shot noise and readout noise. This type of random noise manifests as a broadband high-frequency signal, and its energy distribution overlaps with the frequency domain of the object's surface micro-texture, fine scratches, and key high-frequency structural information of the material lattice.
[0003] Existing image denoising and enhancement techniques mainly include traditional filtering based on mathematical transformations or deep neural network learning paths. Traditional filtering methods, such as block matching 3D collaborative filtering or wavelet transform soft thresholding, primarily rely on signal transformation domain energy amplitude differences or spatial domain local self-similarity smoothing. Their inherent logic tends to treat high-frequency abrupt changes as noise interference, suppressing background noise while irreversibly erasing fine texture structures, resulting in detail loss and edge blurring. Although generative adversarial network (GAN)-based denoising schemes are gaining popularity, their applicability to industrial metrology scenarios is limited. For example, Chinese invention patent CN110473154B discloses an image denoising method based on GANs, constructing a joint loss function including adversarial loss, pixel loss, and smoothing loss, using a game between the generator and discriminator to improve image quality. However, this... General-purpose algorithms for processing industrial micro-surfaces have inherent flaws: while introducing smoothing loss reduces differences between adjacent pixels and lowers the checkerboard effect in natural images, it also causes high-frequency features such as micro-cracks to be treated as noise smoothing in industrial inspection; relying on feature extraction networks trained on general natural image datasets lacks constraints on the physical and statistical properties of specific industrial materials, making them prone to producing false texture artifacts due to overfitting; although the generated images are visually clean, they lose the fidelity of the measurement basis signal. Processing methods based on convolutional neural networks or standard generative adversarial networks use large-scale data training to establish a mapping relationship between noisy images and clear images. The core mechanism relies on the probability prediction of image semantic content and texture synthesis, lacking rigid constraints on the physical and statistical properties of the signal. When processing industrial micro-surfaces lacking semantic features, they are prone to producing false texture artifacts that do not conform to the real physical surface due to overfitting or uncontrolled generator degrees of freedom.
[0004] Therefore, the technical problem to be solved by this invention is how to construct a deterministic noise texture decoupling mechanism by utilizing the inherent frequency domain statistical physical characteristics of the signal without relying on external semantic annotation, and how to introduce signal integrity protection logic with closed-loop verification capability in the denoising and enhancement process. Summary of the Invention
[0005] To address the problems mentioned in the background art, the technical solution of the present invention is as follows: A texture-preserving image denoising and enhancement method based on generative adversarial networks, comprising the following steps:
[0006] The frequency domain signal decomposition step involves acquiring the original image signal and calculating the low-frequency subband data and high-frequency subband data of the original image signal through a discrete wavelet transform unit. The low-frequency subband data represents the low-frequency illumination and main structure information of the image, while the high-frequency subband data represents the high-frequency texture details and random noise information of the image.
[0007] The structure flow gradient calculation step involves inputting low-frequency subband data into the structure repair network to generate a denoised structure feature map; simultaneously, it calculates the gradient magnitude of the low-frequency subband data to generate a structure saliency gradient map that characterizes the local structural intensity of the image.
[0008] The cross-band threshold modulation step establishes dynamic constraint rules for high-frequency signals based on the structural saliency gradient map, calculates the threshold bias coefficient corresponding to the spatial location through the inverse mapping relationship, where the gradient magnitude in the structural saliency gradient map is negatively correlated with the threshold bias coefficient; and uses the threshold bias coefficient to weight the preset distribution threshold in the statistical gating unit point by point to generate a spatially adaptive dynamic gating threshold.
[0009] The texture flow statistical gating step involves inputting high-frequency subband data into the texture generation network and calling the statistical gating unit to calculate the kurtosis statistics of the high-frequency subband data within a local window; in response to the kurtosis statistics being greater than the dynamic gating threshold, a high-pass gain coefficient is generated; in response to the kurtosis statistics being less than or equal to the dynamic gating threshold, a low-pass suppression coefficient is generated.
[0010] In the signal reconstruction step, the high-frequency subband data is weighted and filtered using high-pass gain coefficients and low-pass suppression coefficients to generate texture feature maps. The structure feature maps and texture feature maps are then input into the inverse discrete wavelet transform unit to synthesize the target output image.
[0011] Preferably, in the cross-band threshold modulation step, the reverse mapping relationship is specifically as follows: obtain a preset reference value related to the global noise level of the high-frequency subband data, calculate the ratio of the preset reference value to the gradient magnitude of the corresponding pixel in the structural saliency gradient map, obtain the threshold bias coefficient, and reduce the dynamic gating threshold in the high gradient region of the structural saliency gradient map.
[0012] Preferably, the method further includes a residual orthogonality calibration step: in the texture flow statistical gating step, the residual signal data suppressed by the statistical gating unit is separated; the cross-covariance value of the texture feature map and the residual signal data within the local window is calculated. The calculation formula is as follows: ,in, This represents the total number of pixels within the local window. The pixel values of the texture feature map within the local window. This represents the mean of the texture feature map within a local window. The pixel values of the residual signal data within the local window. The mean of the residual signal data within a local window; responding to the cross-covariance value. If the absolute value exceeds the preset orthogonality tolerance, negative feedback adjustment is performed, and the preset distribution threshold in the statistical gating unit is lowered by a preset step size until the cross-covariance value is reached. The absolute value is less than or equal to the orthogonality tolerance to maintain the statistical independence of the texture feature map and the residual signal data.
[0013] Preferably, the statistical gating unit does not contain learnable weight parameters, and it only performs statistical calculations and threshold comparison operations based on the pixel values of the input data; the kurtosis statistic is the sample kurtosis, which is used to characterize the tail features of the probability density distribution curve of the high-frequency subband data within the local window, wherein the long-tailed distribution corresponds to the generation conditions of the high-pass gain coefficient.
[0014] Preferably, the structure repair network adopts an encoder-decoder architecture, which includes a downsampling layer to filter out shot noise in the low-frequency subband data; the texture generation network adopts a full-resolution residual dense connection architecture, which does not include a downsampling layer to maintain the spatial resolution of the high-frequency subband data.
[0015] Preferably, the discrete wavelet transform unit uses a fixed Haar wavelet basis or Daubechies wavelet basis to perform single-level decomposition. The low-frequency subband data and the high-frequency subband data are orthogonal in the frequency domain, and the high-frequency subband data contains high-frequency components in three directions: horizontal, vertical and diagonal. The texture flow statistical gating step independently performs kurtosis statistics calculation and gating operation on the high-frequency components in the three directions.
[0016] Preferably, the method further includes a spectral consistency constraint step during the training phase: performing Fast Fourier Transform on the texture feature map output by the texture generation network and the high-frequency components of the target clear image in the training dataset respectively, mapping them to the frequency domain space; calculating the distance between the two in the frequency domain amplitude spectrum and phase spectrum to generate a spectral loss value; and using the spectral loss value to update the convolution kernel parameters of the texture generation network to constrain the frequency domain energy distribution of the generated signal to conform to the statistical laws of the real physical surface.
[0017] Preferably, the process of generating the structural saliency gradient map includes: performing convolution operations on the low-frequency subband data using the Sobel operator or the Laplace operator, calculating the horizontal gradient component and the vertical gradient component, and determining the gradient magnitude based on the square root of the sum of the squares of the horizontal gradient component and the vertical gradient component.
[0018] Preferably, the signal reconstruction step further includes a high-frequency artifact suppression step: monitoring the local variance of the target output image in a local region, and in response to the local variance being higher than a preset smoothness threshold and the gradient magnitude of the corresponding structural saliency gradient map being lower than a preset structural threshold, determining that there are high-frequency artifacts in the local region, and performing local Gaussian smoothing on the local region.
[0019] Preferably, the original image signal is high-gain, short-exposure grayscale image data acquired in an industrial automated optical inspection environment. The method uses cascaded processing of discrete wavelet transform unit and statistical gating unit to filter out unstructured random noise in the grayscale image data and restore structured micro-texture signal.
[0020] Compared with the prior art, the beneficial effects of the present invention are:
[0021] 1. In texture-preserving images using adversarial networks, the image signal is decomposed into orthogonal structure stream and texture stream subbands through discrete wavelet transform. Utilizing the physical difference in kurtosis statistics between the long-tail distribution characteristics of natural texture signals and the Gaussian distribution characteristics of random noise, a non-learning statistical difference gating logic is constructed. The processing does not rely on neural network semantic prediction; instead, signal filtering is performed directly based on the statistical kurtosis values within the local window of the high-frequency subband. Only signals with specific long-tail characteristics are allowed to pass and participate in image reconstruction. This hard-constraint processing method based on the inherent statistical properties of the signal avoids the false texture artifacts generated by traditional end-to-end generative networks due to data fitting characteristics. This ensures that the high-frequency detail level of the final output image conforms to the statistical laws of real physical surface signals, achieving the suppression of high-intensity noise while deterministically preserving the fine texture structure.
[0022] 2. A dynamic bias loop for cross-band sensitivity is established, which transmits information from the low-frequency structural sub-band to the high-frequency texture sub-band. The illumination gradient amplitude information of the low-frequency sub-band is extracted, and the threshold of the high-frequency statistical gating unit is adjusted in real time based on the gradient information. The physical modulation relationship between illumination intensity and micro-texture contrast is reconstructed within the system. The high-frequency signal processing dynamically adjusts the denoising intensity according to the structural characteristics of the area: the gating threshold is automatically reduced in flat or shadowy areas with small illumination gradients to improve the sensitivity of weak texture capture, and the threshold is increased in structural edge areas to suppress high-intensity noise. This solves the problem of dark texture loss under non-uniform illumination caused by neglecting the inter-band coupling effect in traditional frequency domain denoising methods, enabling the system to adaptively process image signal reconstruction under complex lighting conditions.
[0023] 3. A self-calibration mechanism based on the orthogonality of residuals and cross-covariance analysis is introduced into the texture stream processing path. This transforms the traditional open-loop filtering process into a closed-loop control process with real-time auditing capabilities. The signal filtering process simultaneously calculates the local cross-covariance between the retained texture feature signal and the suppressed residual discarded signal. The principle of statistical uncorrelated orthogonality between structured signals and random noise signals is used as the criterion. The cross-covariance is monitored to prevent deviation from the zero tolerance. The distribution threshold of the statistical gating unit is automatically corrected through a negative feedback loop until statistical orthogonality is restored. The objective safety boundary of image denoising is defined from a mathematical perspective to prevent the leakage of structured information to the residual signal due to excessive smoothing. This ensures that the final image achieves a signal-to-noise ratio improvement, and the filtered components only contain unstructured random noise signals. Attached Figure Description
[0024] Figure 1 This is a schematic diagram of the algorithm flow of the present invention, which includes cross-band modulation and residual calibration;
[0025] Figure 2 This is a comparison diagram of the denoising performance and structural similarity of the weak texture in the shadow area of the present invention;
[0026] Figure 3 This is a system deployment architecture diagram for the present invention that integrates optical acquisition and neural network computing. Detailed Implementation
[0027] The present invention will be described in detail below with reference to specific embodiments. The following embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention.
[0028] This embodiment provides a texture-preserving image denoising and enhancement method based on generative adversarial networks, including frequency domain signal decomposition, structure flow gradient calculation, cross-band threshold modulation, texture flow statistical gating, residual orthogonality calibration, and signal reconstruction processing. The system acquires the original image signal, which is defined as a two-dimensional grayscale matrix. The original image signal is input to the discrete wavelet transform unit. To ensure the time-frequency positioning accuracy and phase linearity of the signal decomposition, the discrete wavelet transform unit adopts a non-decimation discrete wavelet transform and selects either the Haar wavelet basis or the Daubechies wavelet basis to perform a single-stage decomposition. This step deterministically maps the original image signal into four orthogonal frequency domain subbands: low-frequency subband data... This is used to characterize the low-frequency illumination distribution and contour structure of the image; and high-frequency subband data in three directions. The system represents high-frequency texture details and random noise components in the vertical, horizontal, and diagonal directions, respectively. After obtaining the frequency domain data, the system performs structure flow processing and gradient field construction in parallel, and low-frequency subband data... The input is fed into a structure repair network, which uses convolutional layers to smooth low-frequency components and outputs a denoised structure feature map. For unprocessed low-frequency subband data Perform gradient calculations to generate a structural saliency gradient map. The system calls the Sobel operator to calculate the horizontal gradient components of the low-frequency subband data. gradient components in the vertical direction And according to the formula Calculate spatial coordinates The gradient magnitude at the location, the saliency gradient plot of this structure The structural intensity of local areas in an image is quantified, where high-amplitude regions correspond to edges or transitions in the image, and low-amplitude regions correspond to flat backgrounds.
[0029] Based on the generated structural saliency gradient map The system performs a cross-band threshold modulation step, dynamically adjusting the sensitivity of high-frequency denoising using low-frequency structural information, and acquires a preset reference value related to the current imaging sensor. This value characterizes the sensor's noise floor level. The system calculates the threshold bias coefficient corresponding to the spatial location based on the inverse mapping relationship. This calculation follows inverse proportional logic, that is... ,in To prevent extremely small constants with a denominator of zero, this coefficient is used to set a preset distribution threshold in the statistical gating unit. Perform point-by-point weighting to generate a spatially adaptive dynamic gating threshold. The calculation formula is Under this logic, high gradient regions in the structural saliency gradient map correspond to lower dynamic gating thresholds, thereby reducing the threshold for intercepting high-frequency signals and protecting the subtle textures attached to the structure; conversely, flat regions correspond to higher dynamic gating thresholds to enhance the suppression of random noise.
[0030] and high-frequency subband data The data is input to the texture generation network and filtered by a statistical gating unit during the feature extraction stage. The texture generation network adopts a full-resolution residual dense connection architecture without downsampling layers to maintain the spatial resolution of high-frequency details. When constructing a texture-preserving generative adversarial network, a discriminator based on the PatchGAN architecture is introduced during the training stage to establish an adversarial game mechanism. The discriminator takes the reconstructed high-frequency subband data from the texture generation network output and the corresponding original high-frequency subband data from the real image as input pairs, and calculates the real / fake discrimination probability matrix within the local receptive field. The network training uses a composite loss function consisting of a pixel-level content loss term based on the L1 norm and an adversarial loss term based on least squares. The adversarial loss term drives the update of the convolutional kernel parameters of the texture generation network through backpropagation. The output texture features statistically approximate the high-frequency texture distribution of the real physical surface, rather than just approximating pixel values in the sense of mean square error. The statistical gating unit calculates the kurtosis statistic for the high-frequency subband data within a local window. This statistic is used to characterize the tailing degree of the signal probability density distribution. The system will calculate the kurtosis statistic. Dynamic gating threshold at the corresponding position Comparison, in response Greater than The system determines that the signal in this area has a long-tailed distribution characteristic and belongs to valid texture, and generates a high-pass gain coefficient as follows: To address the gradient blocking issue during backpropagation training of statistical gating units, a high-gain sigmoid approximation function is used to replace the step function in the inference phase during training. The difference between the sample kurtosis and the dynamic gating threshold is calculated during training and input into the sigmoid function with a slope coefficient set above 10 to generate continuously differentiable soft-gating coefficients. This ensures that gradient information passes through the gating nodes to the front-end feature extraction layer. During model deployment and inference, the gating logic automatically switches to hard threshold comparison logic, directly outputting a discrete gain coefficient of 0 or 1 based on the relationship between kurtosis and the threshold. This eliminates the computational latency caused by floating-point exponentiation without sacrificing accuracy, responding to... Less than or equal to The system determines that the signal in this area conforms to a Gaussian distribution and belongs to random noise, and generates a low-pass suppression coefficient (e.g., The generated coefficients are used to weight and filter the high-frequency subband data, and the resulting texture feature map is output. .
[0031] To prevent excessive denoising from causing the loss of useful information, the system performs a residual orthogonality calibration step during texture stream processing, separating the residual signal data suppressed by the statistical gating unit. And calculate texture feature map With residual signal data Cross-covariance within a local window The calculation formula is as follows: ,in, This represents the total number of pixels within the local window. The pixel values of the texture feature map within the local window. This represents the mean of the texture feature map within a local window. The pixel values of the residual signal data within the local window. The system sets an orthogonality tolerance for the mean of the residual signal data within a local window. When the cross-covariance value When the absolute value exceeds the orthogonality tolerance, it indicates that structured information related to texture is leaked in the residual. At this time, the system triggers negative feedback adjustment, lowering the preset distribution threshold in the statistical gating unit by a preset step size. until the mutual variance value Converging to within the orthogonality tolerance, thus maintaining the statistical independence of the retained and discarded signals; the residual orthogonality calibration step sets the orthogonality tolerance. By establishing a zero-input response calibration procedure for a specific imaging sensor, N frames (e.g., 50 or more) of high-gain dark-field images are continuously acquired in a completely darkened environment. The cross-covariance between the high-frequency subband and the residual signal in each frame is calculated to construct a background noise correlation distribution histogram. The mean and standard deviation are then calculated based on the histogram. orthogonal tolerance Anchored as the sum of the distribution mean and three standard deviations. The confidence upper limit and calibration procedure ensure that a negative feedback adjustment mechanism is triggered when the correlation between the texture feature map and the residual signal statistically deviates from the background correlation of pure random noise; the structural feature map after the above processing With texture feature map The data is input to the inverse discrete wavelet transform unit, which performs the inverse transform operation to synthesize the separated frequency band data into a full-band target output image. For the output image, the system can further monitor the local variance. If high-frequency fluctuations are detected in the low gradient region, local Gaussian smoothing is performed to suppress residual artifacts.
[0032] Example 1: This example is applied to online optical automatic inspection of precision machined metal surfaces. The imaging system operates at an exposure time of less than [time missing]. And the ISO gain setting exceeds The high-speed dynamic acquisition mode, thereby acquiring the original grayscale image signal. The mixed high-intensity photon shot noise and readout noise have spectral characteristics that overlap with the micro-textures characterizing shallow scratches or grinding marks. Furthermore, due to the non-uniform illumination effect caused by the workpiece surface curvature, the amplitude of weak texture signals in shadow areas drops below the global noise baseline. This presents a signal processing challenge where it is difficult to separate unstructured noise and structured micro-textures using conventional linear filtering. The system inputs the original image signal to a discrete wavelet transform unit and configures it to perform a single-stage non-decimation discrete wavelet transform. Using the Haar wavelet basis, the spatial domain signal is deterministically decoupled into low-frequency subband data characterizing low-frequency illumination distribution and geometric structure. and high-frequency subband data characterizing high-frequency texture details and random noise. The system synchronously calls the Sobel operator to calculate the gradient components of the low-frequency subband data in the horizontal and vertical directions, generating a structural saliency gradient map of the local illumination change rate and structural intensity of the quantized image. .
[0033] To address the issue of effective texture in shadow areas being easily misjudged as noise, the system performs cross-band threshold modulation and utilizes low-frequency structural saliency gradient maps. As a high-frequency processing logic for reconstructing prior information, the system uses an inverse mapping relationship. The threshold bias coefficient corresponding to the spatial location is calculated, and the statistical gating unit is driven to generate a spatially adaptive dynamic gating threshold. In flat or shaded regions with low gradients, the system lowers the threshold for judging the kurtosis of high-frequency signals, utilizes low-frequency structure flow information to improve the detection sensitivity of high-frequency texture flow in weak signal regions, and uses statistical gating units to calculate the sample kurtosis of high-frequency subband data within a local window. and with dynamic gating threshold Point-by-point comparison: if the sample kurtosis is higher than a threshold, the system determines that the signal has long-tailed distribution characteristics and generates a high-pass gain coefficient; if the sample kurtosis is lower than or equal to the threshold, the system determines that the signal conforms to Gaussian distribution characteristics and generates a low-pass suppression coefficient; to ensure that the denoising process conforms to the principle of information entropy conservation, the system performs residual orthogonality calibration, and the system monitors the retained texture feature map in real time. With suppressed residual signal data cross-covariance between In response to the absolute value of the cross-covariance exceeding the preset orthogonality tolerance The system triggers a negative feedback loop to lower the preset distribution threshold. Until statistical independence is restored, the structural feature map processed by the structural repair network and the texture feature map that has been statistically filtered and calibrated are synthesized in the inverse discrete wavelet transform unit to achieve full-band synthesis, outputting the target image. While reducing unstructured noise interference, it preserves micron-level surface texture details with industrial inspection value in localized areas with insufficient lighting.
[0034] Example 2: This example aims to verify the signal restoration capability and stability boundary of the texture-preserving image denoising and enhancement method based on generative adversarial networks under non-uniform illumination and strong noise interference conditions. The experimental platform is built on an industrial simulation imaging system equipped with a high-sensitivity CMOS image sensor. physical resolution and To simulate the extreme signal environment of a real industrial site, the experiment used a controlled light source system to construct an imaging scene of a metal surface with a brightness gradient. Photon shot noise following a Poisson distribution and readout noise following a Gaussian distribution were actively superimposed on the original acquired image data, causing the local signal-to-noise ratio (SNR) in the dark areas of the image to degrade to a certain level. to The interval serves as the benchmark input signal for verifying the effectiveness of the technical solution; and the orthogonal tolerance is a key control parameter in the experiment. The setting follows the following engineering decision-making logic: the determination of this parameter depends on the number of samples within the local window. The constraint relationship between the confidence interval of the statistical estimate and the statistical estimate, if Setting the value too wide will introduce non-orthogonal noise components into the texture stream, compromising denoising purity; setting it too tight will cause oscillations in the negative feedback adjustment loop, increasing computational latency. Based on the value selected in this embodiment... Pixel local window Based on the asymptotic distribution law of sample covariance in statistics, Set as This value is to ensure that the iteration converges to... The minimum statistical correlation limit that can be achieved within a given period.
[0035] The experiment was designed with three parallel processing groups for multi-dimensional comparative verification. Comparison group A used a traditional fixed-threshold wavelet soft-threshold denoising algorithm, representing the current technological level. Comparison group B adopted the architecture of this invention but removed the cross-band threshold modulation mechanism, using only a globally uniform kurtosis threshold to isolate and verify the independent contribution of the cross-band mechanism. The present invention's sample group performed a complete two-stream decoupling and closed-loop calibration process. The experiment was conducted in the image shadow region (where the local illumination intensity is only a fraction of the full range). The micron-level scratches were used as the observation object. The scratches were manifested as weak high-frequency signals in the frequency domain. Table 1 records the key intermediate state data and final output indicators when processing the signals in this specific region.
[0036] Table 1: Comparison of Data on Weak Texture Signal Processing in Shaded Areas
[0037]
[0038] Data shows that in comparison group A and comparison group B, due to the preset threshold ( and The sample kurtosis of the input signal is higher than that of the input signal. This results in effective micro-texture signals being judged as noise and suppressed, ultimately leading to a lower SSIM score in the output. and Visually, this manifests as a loss of scratch details, while in the sample of this invention, the cross-band modulation mechanism responds to extremely low local gradient amplitudes ( ), automatically adjust the dynamic gating threshold Downgraded to This adjustment caused the previously submerged sample kurtosis to ( This allows the gated screening to pass, while the residual orthogonality calibration mechanism will adjust the cross-covariance. Controlled (smaller than the set value) This demonstrates that the preserved texture and the filtered noise remain statistically highly independent, ultimately achieving the intended implementation of the present invention's sample group. While maintaining a high signal-to-noise ratio The high structural similarity confirms the effectiveness of the strategy combining threshold reduction and auditing in weak signal extraction; to further verify the rationality of the parameter boundaries, an orthogonal tolerance test is conducted. exist to The nonlinear response characteristics within the range, the results show that, when Relaxed to At the above point, the peak signal-to-noise ratio (PSNR) of the output image reaches an inflection point and drops sharply, with a decrease exceeding [a certain percentage]. This indicates that a large amount of noise was incorrectly preserved; when Tighten to When the following occurs, the system's average processing time increases exponentially, and the SSIM metric no longer improves (the growth rate is less than 1%). ), entering the performance saturation zone.
[0039] Example 3: This example combines Figures 1 to 3 This paper describes a texture-preserving image denoising and enhancement method based on generative adversarial networks, as follows: Figure 1As shown, the system acquires raw image signals containing high-gain or short-exposure grayscale data and inputs them into a discrete wavelet transform unit for non-decimation SWT decomposition, thereby separating low-frequency subband data and high-frequency subband data. The low-frequency subband data is transmitted to a structure restoration network to generate a structure feature map, and simultaneously enters a structure saliency gradient map generation module to calculate the gradient magnitude. The subsequent cross-band threshold modulation module generates threshold bias coefficients and dynamic gating thresholds based on the gradient magnitude. At the same time, the high-frequency subband data is input to a texture generation network and a statistical gating unit, where kurtosis statistics are filtered and coefficient weighting is performed based on the dynamic gating threshold. The system is also configured with a residual orthogonality calibration module, which receives residual signal data and performs cross-covariance negative feedback adjustment to correct and adjust the distribution threshold. Finally, the processed texture feature map and structure feature map are merged into an inverse discrete wavelet transform unit for full-band signal synthesis, thereby generating a target output image with high signal-to-noise ratio and texture preservation.
[0040] like Figure 2 As shown, in the data comparison analysis of the weak texture signal processing process in the shadow area, the horizontal axis lists three independent experimental objects: comparison sample group A, comparison sample group B, and the sample group of this invention. The vertical axis uniformly displays the local signal-to-noise ratio (SNR) value in dB. The graph uses horizontally striped bars to represent the local SNR in dB and diagonally striped bars to represent the texture structure similarity (SSIM) index. Figure 3 As shown, the overall architecture of the system consists of a front-end optical acquisition outpost, a core neural network computing center, and a back-end detection workstation connected in sequence. The optical acquisition outpost is equipped with a high-gain image sensor and a stroboscopic control light source, which is responsible for generating the original grayscale stream and transmitting it to the neural network computing center. It has a frequency domain decoupling unit deployed inside to provide wavelet transform services, which are then split into the structure perception engine in the low-frequency processing channel and the texture generation engine in the high-frequency processing channel. At the same time, it is supplemented by a dynamic threshold modulation module and an orthogonality audit module that performs residual closed-loop control for collaborative calculation. Finally, the enhanced image stream output is transmitted to the detection workstation for defect analysis and visualization processing.
[0041] Example 4: In industrial applications for optical defect detection on high-speed precision machined surfaces, the degree of aliasing between micro-texture signals and random noise signals in the frequency domain, as well as the spatial non-uniformity of illumination conditions, constitute key technical bottlenecks restricting detection performance. To solve this problem, this example constructs a texture-preserving image processing system based on generative adversarial networks (GANs), and elaborates in detail the calibration procedures and logical closed loops of the core algorithm parameters to eliminate uncertainties in the implementation process. Regarding the separation accuracy problem between low-frequency and high-frequency subbands in the frequency domain decoupling stage, the system adopts a non-decimation discrete wavelet transform architecture. The key lies in the selection of wavelet basis functions, which determines the time-frequency characteristics of signal decomposition. This example confirms this through comparative experiments. The optimal wavelet basis was determined by selecting a set of candidate wavelet bases including Haar, Daubechies, Symlets, and Biorthogonal. The peak signal-to-noise ratio and structural similarity index of the reconstructed images were calculated on a standard test image set. Experimental results showed that although the Haar wavelet base has the shortest support length and zero phase distortion when processing step signals, it is prone to producing block artifacts when processing continuous textures. The Daubechies2 wavelet base provides better smoothness and texture detail preservation while maintaining high computational efficiency. Therefore, the system finally selected the Daubechies2 wavelet base as the default configuration to achieve an engineering balance between transient response and frequency selectivity.
[0042] In the cross-band threshold modulation stage, the structural saliency gradient map The quality of the generated gradient directly affects the adaptability of subsequent high-frequency gating. In gradient calculation, the kernel size of the Sobel operator needs to be matched to the optical resolution of the imaging system and the texture scale of the measured surface. If the kernel size is too small, the gradient map is easily affected by single-pixel noise; if it is too large, it will lead to blurred structural edges and reduced spatial positioning accuracy. In this embodiment, the optimal kernel size is determined through gradient magnitude histogram analysis. That is, a set of sample images is acquired under typical working conditions, and gradient maps are calculated using Sobel kernels of different sizes. The distribution characteristics of the gradient magnitude are statistically analyzed, and the kernel size that makes the gradient magnitude histogram exhibit the most bimodal distribution is selected. For the micrometer-level texture detection application in this embodiment, experiments determine… The kernel size is optimally chosen, effectively capturing subtle structural changes while suppressing the impact of high-frequency noise on gradient calculation. This is specifically addressed for the dynamic gating threshold in the texture flow statistical gating unit. The core of its generation logic lies in establishing a quantitative mapping relationship between low-frequency structural information and high-frequency noise levels, with a preset reference value. The calibration is the starting point of this logic; the system continuously collects data in a completely dark room environment. For a frame of dark-field image, calculate the standard deviation of the grayscale values of all pixels, and define it as the sensor's noise floor level. ,set up Equal to empirical coefficient and The product of, where The value is usually taken from to Between these points, a confidence interval is used to cover noise fluctuations. In this embodiment, different [measures are taken]. False alarm rate and false negative rate at the specified values, determine Values This will minimize the sum of the two.
[0043] The residual orthogonality self-calibration mechanism is the key to the closed-loop control of the system, and the orthogonality tolerance is crucial. The setting is not arbitrary, but based on the principle of statistical significance testing, for a local window size of... Given a sample set, assuming that the texture signal and the noise signal both follow independent and identically distributed distributions, then their sample cross-covariance... Under the null hypothesis, the system follows a specific statistical distribution. A confidence level is set, and the corresponding critical value is calculated as... The initial value, in actual operation, the system monitors The frequency of triggering feedback adjustment should be considered. If the triggering frequency is too high, it indicates that the initial settings are too stringent, causing frequent system oscillations. In this case, the settings should be appropriately relaxed. If the trigger frequency is too low, it indicates that the settings are too lenient and fail to effectively block related leaks. In this case, tighten the settings. Through this dynamic adjustment strategy, the system can maintain optimal calibration sensitivity under different signal-to-noise ratio conditions. Finally, in the signal reconstruction stage, to suppress the Gibbs effect or high-frequency artifacts caused by frequency domain processing, the system introduces a post-processing step based on local variance. The smoothness threshold is determined based on the texture complexity of flat areas in the image. The system selects known smooth background areas in the image and calculates the mean of their local variance. with standard deviation The smoothness threshold is set to the sum of the mean and three times the standard deviation. When the local variance of a certain region of the reconstructed image exceeds the smoothness threshold and the corresponding structural gradient magnitude is low, it is determined to be an artifact and local Gaussian smoothing is performed.
[0044] Example 5: To address the issue of inconsistent background noise characteristics among different industrial imaging sensors due to variations in manufacturing processes, this example constructs an offline noise characteristic calibration and parameter initialization procedure. The system initiates a dark field calibration process, controlling the image sensor under completely dark conditions with a preset gradient exposure time, for example from... to Step length Multiple sets of dark-field image sequences are acquired. For each sequence, the temporal variance distribution of pixel grayscale values is calculated, and a sensor-specific noise-exposure response curve is fitted. The system establishes a lookup table containing background noise parameters under different gain settings. During actual operation, the current exposure time and gain parameters are read, and the corresponding background noise variance is indexed from the lookup table. And it is used as a reference value input to the cross-band threshold modulation module.
[0045] To address the drift in lighting environment caused by light source aging or batch variations in workpiece materials in actual production lines, this embodiment introduces an adaptive calibration procedure for on-site lighting baseline. Upon initial system deployment or when an lighting anomaly is detected, a whiteboard calibration operation is performed. The system acquires a grayscale image of a standard diffuse whiteboard under the current light source and calculates the average brightness of the entire image. With brightness uniformity index These two metrics are stored as illumination baseline parameters. In each subsequent frame detection cycle, the system calculates the average brightness of the background region in the current frame. And calculate the illumination drift coefficient. This coefficient is used as the weight in the calculation of the structural saliency gradient map in real time, i.e., in the case of illumination attenuation ( When the illumination is enhanced, appropriately increase the gain of gradient calculation. Reduce gain when ).
[0046] Example 6: Sample kurtosis in texture stream statistical gating unit Calculation window size To address the non-monotonic impact of noise suppression performance on texture detail preservation, this embodiment establishes a standardized procedure for window size optimization and parameter solidification. The aim is to determine the optimal window parameters that balance statistical stability and spatial resolution. The experimental design selects typical texture samples containing different frequency characteristics, such as finely frosted surfaces, rough cast surfaces, and regular machined textures, and superimposes them onto a standard noise model (Gaussian white noise). Under the condition of window size For a single variable, in to The system performs traversal tests within the range of odd-numbered sequences. For each window size setting, the system calculates two key performance indicators of the processed image: structural similarity of texture regions (SSIM) and noise variance reduction rate (VRR) of flat regions.
[0047] Experimental data shows that when the window size Set as At that time, due to the small sample size ( The large variance in the kurtosis statistic leads to high-frequency jitter in the gating decision, manifesting as salt-and-pepper residual noise in the output image. The VRR is only [missing value]. As the window size increases to The stability of the statistics has been improved, and the VRR has been increased to And the SSIM metric reached its peak. This indicates that noise is effectively suppressed while local texture structure is well preserved; when the window size is further increased to At and above, although the VRR improves slightly (reaching) However, the SSIM index began to decline (down to 100%). This is because an excessively large statistical window leads to a smoothing effect on local texture features, causing subtle edge information to be obscured. Based on the aforementioned inverted U-shaped performance curve and engineering trade-offs, this embodiment ultimately determines to fix the calculation window size of the statistical gating unit to be [size to be specified]. This parameter selection was not based on empirical randomness, but rather was verified through systematic experiments, ensuring a sufficient statistical sample size. This is sufficient to support the optimal solution obtained between kurtosis estimation and maintaining local spatial resolution.
[0048] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0049] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A texture-preserving image denoising and enhancement method based on generative adversarial networks, characterized in that, Includes the following steps: The frequency domain signal decomposition step involves acquiring the original image signal and calculating the low-frequency subband data and high-frequency subband data of the original image signal through a discrete wavelet transform unit. The low-frequency subband data represents the low-frequency illumination and main structure information of the image, while the high-frequency subband data represents the high-frequency texture details and random noise information of the image. The structure flow gradient calculation step involves inputting low-frequency subband data into the structure repair network to generate a denoised structure feature map; simultaneously, it calculates the gradient magnitude of the low-frequency subband data to generate a structure saliency gradient map that characterizes the local structural intensity of the image. The cross-band threshold modulation step establishes dynamic constraint rules for high-frequency signals based on the structural saliency gradient map, calculates the threshold bias coefficient corresponding to the spatial location through the inverse mapping relationship, where the gradient magnitude in the structural saliency gradient map is negatively correlated with the threshold bias coefficient; and uses the threshold bias coefficient to weight the preset distribution threshold in the statistical gating unit point by point to generate a spatially adaptive dynamic gating threshold. The texture flow statistical gating step involves inputting high-frequency subband data into the texture generation network and calling the statistical gating unit to calculate the kurtosis statistics of the high-frequency subband data within a local window; in response to the kurtosis statistics being greater than the dynamic gating threshold, a high-pass gain coefficient is generated; in response to the kurtosis statistics being less than or equal to the dynamic gating threshold, a low-pass suppression coefficient is generated. In the signal reconstruction step, the high-frequency subband data is weighted and filtered using high-pass gain coefficients and low-pass suppression coefficients to generate texture feature maps. The structure feature maps and texture feature maps are then input into the inverse discrete wavelet transform unit to synthesize the target output image.
2. The texture-preserving image denoising and enhancement method based on generative adversarial networks according to claim 1, characterized in that, In the cross-band threshold modulation step, the reverse mapping relationship is as follows: obtain a preset reference value related to the global noise level of the high-frequency subband data, calculate the ratio of the preset reference value to the gradient magnitude of the corresponding pixel in the structural saliency gradient map, obtain the threshold bias coefficient, and reduce the dynamic gating threshold in the high gradient region of the structural saliency gradient map.
3. The texture-preserving image denoising and enhancement method based on generative adversarial networks according to claim 1, characterized in that, The method also includes a residual orthogonality calibration step: in the texture flow statistical gating step, the residual signal data suppressed by the statistical gating unit is separated; the cross-covariance value of the texture feature map and the residual signal data within the local window is calculated. The calculation formula is as follows: ,in, This represents the total number of pixels within the local window. The pixel values of the texture feature map within the local window. This represents the mean of the texture feature map within a local window. The pixel values of the residual signal data within the local window. The mean of the residual signal data within a local window; responding to the cross-covariance value. If the absolute value exceeds the preset orthogonality tolerance, negative feedback adjustment is performed, and the preset distribution threshold in the statistical gating unit is lowered by a preset step size until the cross-covariance value is reached. The absolute value is less than or equal to the orthogonal tolerance.
4. The texture-preserving image denoising and enhancement method based on generative adversarial networks according to claim 1, characterized in that, The statistical gating unit does not contain learnable weight parameters; it only performs statistical calculations and threshold comparisons based on the pixel values of the input data. The kurtosis statistic is the sample kurtosis, which is used to characterize the tail features of the probability density distribution curve of the high-frequency subband data within the local window. The long-tailed distribution corresponds to the generation conditions of the high-pass gain coefficient.
5. The texture-preserving image denoising and enhancement method based on generative adversarial networks according to claim 1, characterized in that, The structure repair network adopts an encoder-decoder architecture, which includes a downsampling layer to filter out shot noise in low-frequency subband data; the texture generation network adopts a full-resolution residual dense connection architecture, which does not include a downsampling layer.
6. The texture-preserving image denoising and enhancement method based on generative adversarial networks according to claim 1, characterized in that, The discrete wavelet transform unit performs single-level decomposition using a fixed Haar wavelet basis or Daubechies wavelet basis. The low-frequency subband data and the high-frequency subband data are orthogonal in the frequency domain, and the high-frequency subband data contains high-frequency components in three directions: horizontal, vertical, and diagonal. The texture flow statistical gating step independently performs kurtosis statistics calculation and gating operations on the high-frequency components in the three directions.
7. The texture-preserving image denoising and enhancement method based on generative adversarial networks according to claim 1, characterized in that, The method also includes a spectral consistency constraint step during the training phase: performing fast Fourier transforms on the texture feature map output by the texture generation network and the high-frequency components of the target clear image in the training dataset, respectively, to map them to the frequency domain space. The distance between the two in the frequency domain amplitude spectrum and phase spectrum is calculated to generate a spectral loss value. The convolution kernel parameters of the texture generation network are updated using the spectral loss value to constrain the frequency domain energy distribution of the generated signal to conform to the statistical laws of the real physical surface.
8. The texture-preserving image denoising and enhancement method based on generative adversarial networks according to claim 1, characterized in that, The process of generating the structural saliency gradient map includes: performing convolution operations on the low-frequency subband data using the Sobel operator or the Laplace operator, calculating the horizontal and vertical gradient components, and determining the gradient magnitude based on the square root of the sum of the squares of the horizontal and vertical gradient components.
9. A texture-preserving image denoising and enhancement method based on generative adversarial networks according to claim 1, characterized in that, The signal reconstruction step is followed by a high-frequency artifact suppression step: monitoring the local variance of the target output image in a local region, and determining that high-frequency artifacts exist in the local region when the local variance is higher than a preset smoothness threshold and the gradient magnitude of the corresponding structural saliency gradient map is lower than a preset structural threshold, and performing local Gaussian smoothing on the local region.
10. A texture-preserving image denoising and enhancement method based on generative adversarial networks according to claim 1, characterized in that, The original image signal is high-gain, short-exposure grayscale image data acquired in an industrial automated optical inspection environment. The method uses cascaded processing of discrete wavelet transform unit and statistical gating unit to filter out unstructured random noise in grayscale image data and restore structured micro-texture signal.
Citation Information
Patent Citations
An image denoising method based on generative adversarial networks
CN110473154B
Super-resolution image enhancement system and method based on variational mode decomposition algorithm
CN120598777A
Communication image filtering and denoising method
CN120931521A