A method for denoising a stripe image by partition filtering
By constructing a partition matrix in the annular grayscale space and performing multi-channel grayscale offset filtering, the problems of blurring and partition fragmentation at the grayscale surround of striped images are solved, achieving efficient noise suppression and stripe structure protection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIHANG UNIV
- Filing Date
- 2026-05-13
- Publication Date
- 2026-07-10
AI Technical Summary
Existing stripe image denoising methods do not fully utilize the periodicity of gray levels, resulting in blurred stripe boundaries at gray level swathes, and partitioning processing easily leads to fragmentation and splicing marks.
A partition matrix is constructed in a circular grayscale space. Filtering is performed through multi-channel grayscale cyclic offset and inverse offset, combined with spatial smoothing processing, to achieve differentiated noise reduction.
It effectively suppresses noise, maintains the continuity of the stripe structure and phase information, reduces stripe breaks and partition boundary artifacts at grayscale surrounds, and improves the stability of the noise reduction process.
Smart Images

Figure CN122367792A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital image processing technology, and in particular to a method for partitioned filtering and noise reduction of striped images.
[0002] This invention is preferably applicable to noise reduction processing of ESPI (Electronic Speckle Pattern Interferometry) electronic speckle interference fringe patterns (wrapped phase patterns), and can also be extended to other images with fringe structures and phase periodicity. Background Technology
[0003] Fringe patterns are widely used in optical measurement, interferometry, and phase-shifting profile measurement. For example, in the ESPI electronic speckle interferometry system, the object under test is illuminated by coherent light and the speckle interferometry image is recorded. After phase calculation, a wrapped phase fringe pattern can be obtained. The density and shape of the fringes reflect the displacement field or strain field information of the surface of the object under test.
[0004] In actual data acquisition, due to various factors such as light source noise, detector noise, environmental vibration, mechanical instability, and surface roughness, the obtained fringe images often exhibit significant speckle noise and isolated noise points. These noises and distortions significantly reduce fringe contrast and continuity, thereby affecting the accuracy of fringe extraction, phase unwrapping, and displacement field reconstruction.
[0005] Existing fringe pattern denoising methods mainly include mean filtering, median filtering, Gaussian filtering, anisotropic diffusion filtering, bandpass filtering in the frequency domain, and threshold denoising in the wavelet domain. Most of these methods use uniform filtering parameters and filter types to perform global processing on the entire image, ignoring the fact that there are differences in the fringe structure and noise characteristics in different regions.
[0006] For wrapped phase fringe patterns, discrete gray levels are often used to represent phase information. For example, in an 8-bit case, the gray value range is 0–255, and the phase value is usually mapped to... Range, grayscale in the model In a sense, it exhibits a periodic ring structure, in which This represents the number of gray levels. It's important to note that while gray level 0 and the maximum gray level may be adjacent in phase, their difference is greatest in the linear gray-level space. Traditional linear filtering methods directly smooth the gray-level space, often introducing fringe boundary blurring at gray-level "encirclement" points (such as 0 / maximum gray level).
[0007] In addition, different grayscale ranges often correspond to different stripe brightness and darkness bands, local contrast and noise levels. A single global filtering intensity may be insufficient in some areas, while it may cause excessive smoothing in other areas, making it difficult to balance noise suppression and stripe detail protection.
[0008] Therefore, it is necessary to propose a stripe image partitioning filtering denoising method that can partition the stripe image in the annular gray space, spatially smooth the partition matrix, and achieve differentiated denoising through multi-channel gray-level cyclic offset and spatial filtering, so as to maintain the continuity of the stripe structure and the reliability of phase information as much as possible while suppressing noise. Summary of the Invention
[0009] The purpose of this invention is to overcome the shortcomings of existing technologies and propose a partitioned filtering noise reduction method for striped images, which solves at least the following technical problems:
[0010] 1. Existing methods do not fully utilize the grayscale of the fringe pattern in the model. Periodic features in the sense of the image, especially in the wrapped phase map, show blurred stripe boundaries at gray-level surrounds (such as 0 / maximum gray level);
[0011] 2. Although the partitioning idea can distinguish different regions in space, if the partition matrix is not spatially smoothed, it will lead to partition fragmentation, which will then produce splicing traces in the combined result.
[0012] The present invention aims to achieve partitioned filtering noise reduction of stripe images by constructing a partition matrix in a ring gray space, performing spatial smoothing on the partition matrix, and performing spatial filtering in the gray-level cyclic offset domain corresponding to each partition, thereby suppressing speckle noise while preserving stripe structure and phase information as much as possible.
[0013] To achieve the above objectives, the present invention provides a partitioned filtering noise reduction method for striped images, applicable to digital striped images with discrete gray levels. The method includes the following steps S1 to S6:
[0014] S1: Initial stripe pattern acquisition and grayscale preprocessing. The stripe image to be processed undergoes format conversion and validity checks to obtain the input image in discrete grayscale representation and record the number of grayscale levels. ;
[0015] S2: Partition and filter parameter settings; setting the number of partitions. Center gray value and filtering methods;
[0016] S3: Partition matrix construction, in the model Multiple grayscale partitions are constructed in the annular grayscale space, and a partition matrix is generated by assigning a partition number to each pixel.
[0017] S4: Spatial smoothing of the partition matrix: The partition matrix is subjected to mode filtering to obtain a smoothed partition matrix;
[0018] S5: Multi-channel grayscale offset and filtering. Generate grayscale cyclic offset based on the number of partitions. Perform "grayscale cyclic offset - spatial filtering - grayscale cyclic inverse offset" on the input image to obtain a set of multi-channel inverse offset grayscale matrices corresponding to the partition number.
[0019] S6: Output the image by combining the partition matrix. Select the corresponding pixels from the multi-channel inverse offset grayscale matrix according to the smooth partition matrix and output the partition filtering and noise reduction result.
[0020] Step S1 is used to acquire the striped image and convert it into a uniform discrete grayscale representation. Step S1 includes sub-steps S11 to S13:
[0021] S11 Initial fringe pattern acquisition: Acquire the initial fringe image to be processed from the fringe measurement system, image acquisition device, or image processing software;
[0022] S12 Grayscale Format Conversion and Validity Check: Convert the initial striped image into a single-channel discrete grayscale image to obtain the initial grayscale matrix. Each pixel's grayscale value belongs to a finite set of integers. ;
[0023] S13 Gray Level Count Record: Records the number of discrete gray levels. Used as a mold in subsequent steps Looping operations.
[0024] Step S2 is used to set the parameters for the annular grayscale partition and the filtering-related parameters. Step S2 includes sub-steps S21 to S23:
[0025] S21 Partition Quantity Setting: Set the number of partitions ,in An integer greater than 1, used to determine how many grayscale partitions the circular grayscale axis is divided into;
[0026] S22 Center Gray Scale Setting: Sets the target center gray scale value ,in It is a value in the set of integer gray levels, serving as the reference center on the circular gray level axis;
[0027] S23 Filtering mode setting: Select the filtering mode to apply filtering to the offset image.
[0028] Preferably, the filtering methods include, but are not limited to, median filtering, mean filtering, and Gaussian filtering with different window sizes.
[0029] Step S3 is used in the mold Multiple gray-level partitions are constructed within the annular gray-level space, and a partition matrix corresponding to the stripe image is generated. For example... Figure 4As shown, step S3 includes sub-steps S31 to S34:
[0030] S31 Circular Gray Axis Modeling: Modeling the gray level set Modeling as a model A circular grayscale axis is used for grayscale addition and subtraction operations. Modular operation representation to reflect the periodic relationship between grayscale and phase;
[0031] S32 grayscale partition boundary calculation:
[0032] For the first grayscale partitions ( ), calculate the theoretical boundary lower bound (lower) and upper bound (upper):
[0033]
[0034] In the formula, round means rounding to the nearest integer, and mod is the modulo operator;
[0035] The word in this article Both "" represent modular arithmetic in a mathematical sense. For any integer... and positive integers ,definition:
[0036] therefore The result of the modulo operation is always non-negative and falls within the range of grayscale values.
[0037] 1. When At that time, if Then the pixel is assigned to the first... Partitioning;
[0038] 2. When At that time, if or Then the pixel is assigned to the first... Partition.
[0039] S34 Partition Matrix Generation: Based on the determination in sub-step S33, the partition number corresponding to each pixel is written into an integer matrix with the same size as the grayscale image to form the initial partition matrix.
[0040] Step S4 is used to spatially smooth the initial partition matrix to reduce the partition discontinuity caused by local noise or fragmented partition boundaries, and obtain a smoothed partition matrix.
[0041] Perform mode-based window filtering on the initial partition matrix. For each pixel position, count the occurrence of each partition number within a window of 3×3, 5×5, 7×7 or other sizes. If there is a unique partition number with the highest occurrence within the preset window, replace the partition number of the current pixel with that partition number; otherwise, keep the original partition number unchanged.
[0042] Step S5 is used based on the number of partitions. Determine the grayscale offset for each partition, and construct a multi-channel inverse offset filtered image set through forward offset, filtering, and inverse offset. Step S5 includes sub-steps S51 to S54:
[0043] S51 offset step size and offset calculation:
[0044] Calculate grayscale offset step size :
[0045] Calculate the offset of a total of n offset grayscale matrices. , Image index number, :
[0046] S52 full-image grayscale cycle offset:
[0047] For each pixel gray value in the initial grayscale matrix Execution Module The grayscale cyclic offset operation yields a total of n offset grayscale matrices. The grayscale value of each pixel in the offset grayscale matrix is denoted as the offset grayscale value. Image index number :
[0048] S53 Offset Gray Matrix Filtering: The n offset gray matrices are filtered according to the filtering method selected in S23 to obtain the filtered offset gray matrix, where the gray value of each pixel is denoted as the filtered gray value. ;
[0049] S54 Gray-level Inverse Offset: The gray-level value of each pixel in the n filtered offset gray-level matrices. Execution Module Gray-scale inverse offset operation:
[0050] We obtain n inverse-offset grayscale matrices, where the grayscale value of each pixel is denoted as the inverse-offset grayscale value. .
[0051] Step S6 is used to combine pixels between the multi-channel inverse offset grayscale matrices according to the smoothing partition matrix to generate the final denoised image. Step S6 includes sub-steps S61 to S63:
[0052] S61 Output Image Initialization: Construct a blank output image with the same size as the initial grayscale matrix. ;
[0053] S62 selects channel output by partition: iterates through each pixel position. Read the partition number at that location from the smooth partition matrix. From the index Extracting pixels from the inverse offset grayscale matrix Write the grayscale value into a blank output image. The output image is obtained;
[0054] S63 Result Saving: Saves the output image as the result of this partitioned filtering and noise reduction for display and subsequent processing.
[0055] The beneficial effects of this application are as follows:
[0056] 1. By fully utilizing the periodicity of grayscale, this invention constructs partitions in the annular grayscale space of modulus L, and employs grayscale cyclic offset and inverse offset operations of modulus L. This invention can naturally handle the adjacency relationship between 0 and the maximum grayscale in the wrapped phase fringe pattern, avoiding the fringe breakage and phase distortion introduced by traditional linear grayscale filtering at the grayscale wrapping.
[0057] 2. Spatial smoothing of the partition matrix improves robustness. By applying mode filtering to the partition matrix, this invention effectively eliminates isolated partition points and fragmented partition blocks, making grayscale partitions more spatially coherent, thereby reducing splicing marks and artifacts at partition boundaries and improving the stability and robustness of the overall noise reduction process.
[0058] 3. Simple to implement and easy to integrate into engineering. The main operations involved in this invention include integer grayscale operation, modulo operation, window statistics and conventional spatial filtering. They are easy to implement using existing image processing libraries and easy to integrate into ESPI measurement software and other stripe image processing systems. The engineering implementation cost is low. Attached Figure Description
[0059] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the embodiments of the present invention are briefly described below:
[0060] Figure 1 This is a schematic diagram of the overall process of the striped image partitioning filtering and noise reduction method of the present invention;
[0061] Figure 2 This is the original stripe image in an embodiment of the present invention;
[0062] Figure 3 This is a schematic diagram of the annular grayscale axis and grayscale partitions in an embodiment of the present invention;
[0063] Figure 4 This is a schematic diagram illustrating the process of calculating the initial partition matrix in an embodiment of the present invention;
[0064] Figure 5 This is a schematic diagram illustrating the calculation process from the initial partition matrix to the smoothed partition matrix in an embodiment of the present invention;
[0065] Figure 6 This is a schematic diagram of the multi-channel grayscale cyclic offset and filtering process in an embodiment of the present invention;
[0066] Figure 7 This is a schematic diagram of the pixel combination process of the multi-channel inverse offset grayscale matrix in an embodiment of the present invention;
[0067] Figure 8 This is a schematic diagram comparing the processing results of the partitioned filtering method with other commonly used methods in this embodiment of the invention. Detailed Implementation
[0068] To make the technical solutions and advantages of the present invention clearer, the present invention and its beneficial effects will be further described in detail below with reference to specific embodiments and accompanying drawings. The described embodiments are only some embodiments of the present invention, and not all embodiments.
[0069] S1: Initial stripe pattern acquisition and grayscale preprocessing. The stripe image to be processed undergoes format conversion and validity checks to obtain the input image in discrete grayscale representation and record the number of grayscale levels. :
[0070] S11 Stripe Image Acquisition: Acquire the initial stripe pattern, with an image size of approximately 1280×1024 pixels. Figure 2 As shown, the original striped image contains obvious speckle noise.
[0071] S12 Grayscale Format Conversion and Validity Check: Convert the input striped image into a single-channel discrete grayscale image to obtain the initial grayscale matrix. Each pixel's grayscale value belongs to a finite set of integers. .
[0072] S13 Gray Level Count Record: Records the number of discrete gray levels. Used as a mold in subsequent steps Looping operations.
[0073] S2: Partition and filtering parameter settings, including setting the number of partitions n, the center gray value center, and the spatial filtering method:
[0074] S21 Partition Quantity Setting: Set the number of partitions .
[0075] S22 Center Gray Scale Setting: Sets the target center gray scale value , serving as the reference center on the circular grayscale axis.
[0076] The S23 filtering method is set to 3×3 median filtering.
[0077] S3: Partition matrix construction, in the model Multiple grayscale partitions are constructed within the annular grayscale space, and a partition matrix is generated by assigning a partition number to each pixel:
[0078] S31 Circular Gray Axis Modeling: Modeling the gray level set Modeling as a model A circular grayscale axis is used for grayscale addition and subtraction operations. Modular operation is used to represent the periodic relationship between grayscale and phase.
[0079] S32 grayscale partition boundary calculation, circular grayscale axis and grayscale partition as follows: Figure 3 As shown:
[0080] For the Grayscale partitions:
[0081] For the Grayscale partitions:
[0082] S33 pixel partition assignment determination: Traverse the initial grayscale matrix Each pixel position Read grayscale values And determine its partition according to the following rules. The initial partition matrix calculation process is as follows: Figure 4 As shown:
[0083] 1. If Then the pixel is assigned to the first... Partitioning;
[0084] 2 If or Then the pixel is assigned to the first... Partition.
[0085] S34 Partition Matrix Generation: Based on the determination in sub-step S33, the partition number corresponding to each pixel is written into an integer matrix with the same size as the grayscale image to form the initial partition matrix.
[0086] S4: Spatial smoothing of the partition matrix. A mode filter is applied to the partition matrix to obtain a smoothed partition matrix. The calculation process from the initial partition matrix to the smoothed partition matrix is as follows: Figure 5 As shown:
[0087] A mode-based window filter is applied to the initial partition matrix. The frequency of each partition number is counted within a 3×3 window for each pixel position. When there is a unique partition number with the highest frequency within the preset window, the partition number of the current pixel is replaced with that partition number; otherwise, the original partition number is kept unchanged. In this embodiment, the number of partitions is 2 and the number of pixels in the window is 9, so the unique mode condition always holds true.
[0088] S5: Multi-channel grayscale offset and filtering. A grayscale cyclic offset is generated based on the number of partitions. The input image is then subjected to "grayscale cyclic offset—spatial filtering—grayscale cyclic inverse offset" to obtain a set of multi-channel inverse offset grayscale matrices corresponding to the partition numbers. The multi-channel grayscale cyclic offset and filtering process is as follows: Figure 6 As shown:
[0089] S51 offset step size and offset calculation:
[0090] Calculate grayscale offset step size :
[0091] Calculate the offset of a total of n grayscale offset images. , Image index number, :
[0092] S52 full-image grayscale cycle offset:
[0093] For each pixel gray value in the initial grayscale matrix Execution Module The grayscale cyclic offset operation yields two offset grayscale matrices. The grayscale value of each pixel in the offset grayscale matrix is denoted as the offset grayscale value. Image index number :
[0094] S53 Offset Image Spatial Filtering: The two offset grayscale matrices are filtered using the 3×3 median filter selected in S23 to obtain the filtered offset grayscale matrix, where the grayscale value of each pixel is recorded as the filtered grayscale value. .
[0095] S54 Gray-level Inverse Offset: This involves adjusting the gray-level value of each pixel in the two filtered offset gray-level matrices. Execution Module Gray-scale inverse offset operation:
[0096] We obtain two inverse-offset grayscale matrices, where the grayscale value of each pixel is denoted as the inverse-offset grayscale value. .
[0097] S6: Output the image by combining the partition matrix. Based on the smoothing partition matrix, select corresponding pixels from the multi-channel inverse-shift grayscale matrix and combine them for output. Output the partitioned filtering and noise reduction result. The pixel combination process of the multi-channel inverse-shift grayscale matrix is as follows: Figure 7 As shown:
[0098] S61 Output Image Initialization: Construct a blank output image with the same size as the initial input grayscale matrix. .
[0099] S62 selects channel output by partition: iterates through each pixel position. Read the partition number at that location from the smooth partition matrix. From the index Extracting pixels from the inverse offset grayscale matrix Write the grayscale value into a blank output image. This yields the output image.
[0100] S63 Result Saving: Saves the output image as the result of this partitioned filtering and noise reduction for display and subsequent processing.
[0101] Compared with the results of median filtering, Gaussian filtering, mean filtering, bilateral filtering, and the BM3D method, the partitioned filtering denoising results obtained in this embodiment show significantly better performance in suppressing speckle noise, especially in the region close to the 0 / 255 grayscale jump. Figure 8 As shown, the stripe contrast in the transition area is clear, and the noise reduction effect is obvious.
Claims
1. A method for denoising striped images by partitioning filtering, characterized in that, Includes the following steps: S1: Initial stripe pattern acquisition and grayscale preprocessing. The stripe image to be processed undergoes format conversion and validity checks to obtain the input image in discrete grayscale representation and record the number of grayscale levels. ; S2: Partition and filter parameter settings; setting the number of partitions. Center gray value and filtering methods; S3: Partition matrix construction, in the model Multiple grayscale partitions are constructed in the annular grayscale space, and a partition matrix is generated by assigning a partition number to each pixel. S4: Spatial smoothing of the partition matrix: The partition matrix is subjected to mode filtering to obtain a smoothed partition matrix; S5: Multi-channel grayscale offset and filtering. Generate grayscale cyclic offset based on the number of partitions. Perform "grayscale cyclic offset - spatial filtering - grayscale cyclic inverse offset" on the input image to obtain a set of multi-channel inverse offset grayscale matrices corresponding to the partition number. S6: Output the image by combining the partition matrix. Select the corresponding pixels from the multi-channel inverse offset grayscale matrix according to the smooth partition matrix and output the partition filtering and noise reduction result.
2. The method for partitioned filtering and noise reduction of striped images according to claim 1, characterized in that, Step S1, the initial fringe pattern acquisition and grayscale preprocessing steps include: S11 Initial fringe pattern acquisition: Acquire the initial fringe image to be processed from the fringe measurement system, image acquisition device, or image processing software; S12 Grayscale Format Conversion and Validity Check: Convert the initial striped image into a single-channel discrete grayscale image to obtain the initial grayscale matrix I(x,y), where the grayscale value of each pixel belongs to the finite set of integers {0,1,…,L-1}; S13 Gray Level Count Record: Records the number L of discrete gray levels, which is used for modulo L loop calculations in subsequent steps.
3. The method for partitioned filtering and noise reduction of striped images according to claim 1, characterized in that, Step S2, the steps for setting the partition parameters and filter parameters include: S21 Partition Quantity Setting: Set the number of partitions n, where n is an integer greater than 1, which determines how many grayscale partitions the circular grayscale axis is divided into; S22 Center Gray Scale Setting: Set the target center gray scale value center, where center is a value in the set of integer gray scales, which serves as the reference center on the circular gray scale axis; S23 Filtering mode setting: Select the filtering mode to apply filtering to the offset image.
4. The method for partitioned filtering and noise reduction of striped images according to claim 1, characterized in that, Step S3, the steps for constructing the partition matrix include: S31 Circular Gray Axis Modeling: Modeling the gray level set Modeling as a model A circular grayscale axis is used for grayscale addition and subtraction operations. Modular operation representation to reflect the periodic relationship between grayscale and phase; S32 Gray-Level Partition Boundary Calculation: For the first... grayscale partitions ( ), calculate the theoretical boundary lower bound (lower) and upper bound (upper): In the formula, round is for rounding to the nearest integer, and mod is the modulo operator. " is a modular operation in the mathematical sense; S33 pixel partition assignment determination: Traverse the initial grayscale matrix Read the grayscale value at each pixel position. And determine its partition according to the following rules: when At that time, if Then the pixel is assigned to the first... Partitioning; when At that time, if or Then the pixel is assigned to the first... Partition. S34 Partition Matrix Generation: Based on the determination in sub-step S33, the partition number corresponding to each pixel is written into an integer matrix with the same size as the grayscale image to form the initial partition matrix.
5. The method for partitioned filtering and noise reduction of striped images according to claim 1, characterized in that, In step S4, a mode-based window filter is performed on the initial partition matrix. The occurrence frequency of each partition number is counted within a window of 3×3, 5×5, 7×7 or other sizes for each pixel position. When there is a unique partition number with the highest occurrence frequency within the preset window, the partition number of the current pixel is replaced with that partition number; otherwise, the original partition number remains unchanged.
6. The method for partitioned filtering and noise reduction of striped images according to claim 1, characterized in that, Step S5, the multi-channel grayscale shifting and filtering steps include: S51 offset step size and offset calculation: Calculate grayscale offset step size : Calculate the offset of a total of n offset grayscale matrices. , Image index number, : S52 full-image grayscale cycle offset: For each pixel gray value in the initial grayscale matrix Execution Module The grayscale cyclic offset operation yields a total of n offset grayscale matrices. The grayscale value of each pixel in the offset grayscale matrix is denoted as the offset grayscale value. Image index number : S53 Offset Gray Matrix Filtering: The n offset gray matrices are filtered according to the filtering method selected in S23 to obtain the filtered offset gray matrix, where the gray value of each pixel is denoted as the filtered gray value. ; S54 Gray-level Inverse Offset: The gray-level value of each pixel in the n filtered offset gray-level matrices. Execution Module Gray-scale inverse offset operation: We obtain n inverse-offset grayscale matrices, where the grayscale value of each pixel is denoted as the inverse-offset grayscale value. .
7. The method for partitioned filtering and noise reduction of striped images according to claim 1, characterized in that, Step S6, the step of combining and outputting the image according to the partition matrix, includes: S61 Output Image Initialization: Construct a blank output image with the same size as the initial grayscale matrix. ; S62 selects channel output by partition: iterates through each pixel position. Read the partition number at that location from the smooth partition matrix. From the index Extracting pixels from the inverse offset grayscale matrix Write the grayscale value into a blank output image. The output image is obtained; S63 Result Saving: Saves the output image as the result of this partitioned filtering and noise reduction for display and subsequent processing.