Code: Seismic random noise suppression by structure-oriented BM3D
This is the code for the article "Seismic random noise suppression by structure-oriented BM3D".
This repository contains two folders:
- "data"
- "code"
"data" contains the data used in the article, divided into three subfolders:
- "field": Data used for the field examples in the article.
- "synthetic": Data used for the synthetic examples in the article.
- "flatten_test": Data used for the demonstration of flattening and restoring the events in the article.
"code" contains the code needed in the article. Below is a brief explanation of these code files:
main script files:
- main_BM3D: BM3D denoising.
- main_Structural_filtering: Structural filtering denoising.
- main_SBM3D: Structure-oriented BM3D denoising.
- flatten_test: The test of flattening and restoring events corresponds to Figure 5 in the article.
- line_chart: Line chart code for Figures 18 and 19 in the article.
Function files:
(a) BM3D code:
- BM3D: This function implements the two main steps of the BM3D algorithm.
- getTransfMatrix: This function generates and returns the forward transformation matrix and the corresponding inverse transformation matrix of the specified size and type for image block transformation and inverse transformation operations.
- HardThresholding: This function implements the first step of BM3D algorithm.
- Wiener: This function implements the second step of BM3D algorithm.
- Distance:Calculate the similarity between the reference block and the selected block.
- BM3D_weight: This function implements the weighted average processing in the BM3D algorithm.
(b) PWD for local slope code:
-
str_dip2d: This function implements the 2D data dip estimation based on shaping regularized PWD algorithm.
-
str_conv_allpass: This function is a convolution operator implemented by an all-pass filter.
-
str_divne: This function implements the N-dimensional smooth division rat=num/den.
-
str_pwsmooth_lop2d: This function uses a two-dimensional plane wave smoothing algorithm to smooth the input noisy data.
-
str_pwspray_lop2d: This function implements the 2D plane-wave spray operator.
(c) Structure-oriented BM3D code:
-
SBM3D: This function implements the structure-oriented BM3D denoising.
-
pw_flatten: The function implements flattening of seismic events.
-
pwd_weit: The function is used to calculate weight coefficient.
-
seismic: This is the colormap for seismic images.
-
get_SNR: The function is used to calculate SNR.
Note: This file "parameters.txt" is the parameters used in the article.