Median filter along the structural direction with a variable window length

When the data is not flattened well, e.g., when the local slope of the waveform profile is not estimated accurately due to the strong spike-like noise (e.g., using the plane-wave destruction algorithm (Fomel, 2002)), the traditional median filter with a constant filter length will still cause some damages. Figures 3b and 3e show two estimated slope sections from the clean data and noisy data respectively. It is obvious that the two local slope maps have distinct differences. The color indicates the slope value. Warm (red) color indicates high positive slope and cool (blue) color indicates high negative slope. Positive slope and negative slope mean opposite dipping directions. Figures 3c and 3f show the flattened data using true and estimated local slopes. For a better comparison, we select three flattened gathers for different space locations from Figures 3c and 3f, respectively, and show them in Figure 4. When using the true local slope, we can clearly observe that the data are exactly flattened and events in the prediction dimension are exactly horizontal. However, when we use the inaccurate local slope that is estimated from the observed noisy data, the prediction based flattening operator cannot obtain a perfect performance. The events in the prediction dimension are not exactly horizontal, but are more or less curved. Note that in Figures 4c and 4f, the first blank trace is caused by the boundary trace prediction. For example, if a seismic section contains 98 traces, then the predicted 90th trace from its 9th right neighbor trace is a zero trace.

The space-varying median filter can be used in such case where the events are not perfectly flattened. For space-varying median filter, $L$ becomes $L_{i,j}$, varying with respect to location $x_{i,j}$. The new filtering expression is,

$\displaystyle \min_{v_{m}\in U_{i,j} }\sum_{l=1}^{L_{i,j}} \Arrowvert v_{m} -v_l \Arrowvert_1.$ (4)

The solution $\hat{v}_{i,j}$ is the output value for location $x_{i,j}$ after applying a space-varying median filter, $U_{i,j}=\{v_1,v_2,\cdots,v_{L_{i,j}}\}$ denotes the local filtering window in the case of space-varying median filter. The filter length $L_{i,j}$ can be adaptively chosen according to the signal reliability $s^L_{i,j}$ (Chen, 2015). Signal reliability is a local attribute to indicate how reliable a data point is considered as a signal point. The signal reliability can be defined as the local similarity (Fomel, 2007b) between the initially filtered data $u^L_{i,j}$ with a window length $L$ and the original data $u_{i,j}$,

$\displaystyle s^L_{i,j} = S (u^L_{i,j}, u_{i,j}).$ (5)

Here, $S(\mathbf{x},\mathbf{y})$ denotes the local similarity between $\mathbf{x}$ and $\mathbf{y}$. Here, the operator $S$ denotes the process of calculating the local similarity between two data sets: $u^L_{i,j}$ and $u_{i,j}$. The selection of the initial filter length requires some human experience and trials. The initially filtered data means the filtered data using a conventional median filtering method. Later, we will illustrate how the signal reliability/local similarity looks like. The criterion for defining the filter length is expressed as follows:

$\displaystyle L_{i,j}=\left\{\begin{array}{ll}
L+l_1,\quad 0\quad \le \vert s^L...
... s_4\\
L-l_4,\quad s_4 \le\vert s^L_{i,j}\vert \le s_{max}
\end{array}\right.,$ (6)

where $l_1$, $l_2$, $l_3$, and $l_4$ are predefined parameters corresponding to the increments or decrements of the length of filter window and are generally chosen as 4, 2, 2, and 4 in default, respectively. $s_1$, $s_2$, $s_3$, and $s_4$ are four thresholds, and are empirically chosen as $s_1=0.15s_{max}$, $s_2=0.25s_{max}$, $s_3=0.75s_{max}$, and $s_4=0.85s_{max}$. $s_{max}$ denotes the maximum value of the similarity map. The appendix provides a brief review of the calculation of local similarity.

To facilitate an easier understanding of the space-varying median filtering, more specifically the relation among initially filtered data, local similarity, variable filter length, we draw an illustrative picture shown in Figure 5. Figure 5(a) denotes the noisy data. Figure 5(b) shows the map of constant filter length. Figures 5(a) and 5(b) are used to generate the initially filtered data shown in 5(c). Using equation 5, from the original data and the initially filtered data, we can calculate the local similarity map. Utilizing equation 6, we can calculated the map of variable filter length. With the map of variable filter length, we can obtain the finally filtered data shown in Figure 5(f). From this illustration, it is clear that the local similarity clearly detect the main distribution of the useful reflection energy. Those areas with better signal preservation after the initial median filtering are revealed by higher local similarity. The map of variable filter length clearly shows that those noise areas are dealt with very longer filter length while those signal areas correspond to relatively shorter (safer) filter length.

Applying the space-varying median filter in the imperfectly flattened gathers, we can preserve much useful energy that remains curved. Figure 6 shows a comparison between median filter and space-varying median filter in attenuating the spike-like noise when applied to the flattened gathers as shown in Figure 4 from (d) to (f). It is obvious that space-varying median filter helps preserve the energy much better than the median filter. To further confirm this conclusion, we also plot the removed noise sections in Figure 7. It is more salient that the median filter damages more useful energy than the space-varying median filter.

synth dip synths-cube synth-n dip-n synths-cuben
Figure 3.
(a) Clean data. (b) Slope estimated from (a). (c) Flattened domain of (a). (d) Noisy data. (e) Slope estimated from (d). (f) Flattened domain of (d).
[pdf] [pdf] [pdf] [pdf] [pdf] [pdf] [png] [png] [png] [png] [png] [png] [scons]

flat1 flat2 flat3 flat1-n flat2-n flat3-n
Figure 4.
A comparison of “flattened" local windows (predicted dimension) for different space locations. (a)-(c) Flattened gathers for traces 9, 50, 90, using the accurate slope. (d)-(f) “Flattened" gathers for traces 9, 50, 90, using the estimated slope.
[pdf] [pdf] [pdf] [pdf] [pdf] [pdf] [png] [png] [png] [png] [png] [png] [scons]

Figure 5.
An illustration of the space-varying median filter. (a) Raw noisy data. (b) A map of constant filter length. (c) Initially filtered data using the constant filter length shown in (b). (d) Calculated local similarity map from (a) and (c) using equation 5. (e) Calculated map of variable filter length using equation 6. (f) Filtered data using the variable filter length shown in (e).
[pdf] [png]

flat1-n-mf flat2-n-mf flat3-n-mf flat1-n-svmf flat2-n-svmf flat3-n-svmf
Figure 6.
A denoising comparison of “flattened" local windows (predicted dimension) using estimated slope for different space locations. (a)-(c) Denoised gathers for traces 9, 50, 90, using the median filter. (d)-(f) Denoised gathers for traces 9, 50, 90, using the space-varying median filter. Note that although (c) is cleaner, the curving signals are serious damaged.
[pdf] [pdf] [pdf] [pdf] [pdf] [pdf] [png] [png] [png] [png] [png] [png] [scons]

flat1-n-mf-dif flat2-n-mf-dif flat3-n-mf-dif flat1-n-svmf-dif flat2-n-svmf-dif flat3-n-svmf-dif
Figure 7.
A comparison of removed noise. (a)-(c) Removed noise for traces 9, 50, 90, using the median filter. (d)-(f) Removed noise for traces 9, 50, 90, using the space-varying median filter. Note that the median filter removes more coherent energy.
[pdf] [pdf] [pdf] [pdf] [pdf] [pdf] [png] [png] [png] [png] [png] [png] [scons]