SDDSlib
|
Core MEX routine implementing a fast version of the classical 1D running median filter of size W, where W is odd. More...
#include "mdb.h"
Go to the source code of this file.
Macros | |
#define | SWAP(a, b) |
Functions | |
double | quickSelect (double *arr, int n) |
void | median_filter (double *x, double *m, long n, long W) |
Applies a median filter to an input signal. | |
Core MEX routine implementing a fast version of the classical 1D running median filter of size W, where W is odd.
Definition in file medianfilter.c.
#define SWAP | ( | a, | |
b ) |
Definition at line 78 of file medianfilter.c.
void median_filter | ( | double * | x, |
double * | m, | ||
long | n, | ||
long | W ) |
Applies a median filter to an input signal.
This function processes the input signal using a sliding window approach to compute the median value for each position. It handles boundary conditions by replicating the edge values to maintain the window size.
x | Input signal array. |
m | Output signal buffer array where the median filtered signal will be stored. |
n | Size of the input signal. |
W | Size of the sliding window (must be an odd number, W = 2*W2 + 1). |
Definition at line 157 of file medianfilter.c.
double quickSelect | ( | double * | arr, |
int | n ) |
Definition at line 85 of file medianfilter.c.