Discontinuous Galerkin Library
#include "dg/algorithm.h"
dg::CSRSWMFilter< real_type > Struct Template Reference

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)
 

Detailed Description

template<class real_type>
struct dg::CSRSWMFilter< real_type >

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.

Note
Adaptive Switching Median Filter from Akkoul "A New Adaptive Switching Median Filter" IEEE Signal processing letters (2010)
See also
dg::blas2::stencil dg::create::window_stencil

Constructor & Destructor Documentation

◆ CSRSWMFilter()

template<class real_type >
dg::CSRSWMFilter< real_type >::CSRSWMFilter ( real_type  alpha)
inline

Member Function Documentation

◆ operator()()

template<class real_type >
DG_DEVICE void dg::CSRSWMFilter< real_type >::operator() ( unsigned  i,
const int *  row_offsets,
const int *  column_indices,
const real_type *  values,
const real_type *  x,
real_type *  y 
)
inline

The documentation for this struct was generated from the following file: