Discontinuous Galerkin Library
#include "dg/algorithm.h"
|
Switching median filter. More...
Public Member Functions | |
CSRSWMFilter (real_type alpha) | |
DG_DEVICE void | operator() (unsigned i, const int *row_offsets, const int *column_indices, const real_type *values, const real_type *x, real_type *y) |
Switching median filter.
\[ y_i = \begin{cases} \text{Median}( x) \text{ if } |x_i - \text{Median}(x)| > \alpha \sigma\\ x_i \text{ else} \end{cases} \]
with
\[ \sigma = \text{Median}(|x-\text{Median}(x)|) \]
the median absolute deviation and \( \alpha\) a constant. The Median is taken over all points contained in the stencil given by the row and column indices. The matrix values are ignored.
|
inline |
|
inline |