Skip to contents

Log -> rFFT high-pass at cutoff Hz -> exp. Reduces multiplicative baseline drift in non-negative envelopes.

Usage

morie_dsp_homomorphic(x, cutoff = 0.1, fs = 1)

Arguments

x

Numeric vector.

cutoff

Cutoff frequency (Hz). Default 0.1.

fs

Sampling frequency (Hz). Default 1.

Value

Numeric vector, length(x).

References

Rangayyan & Krishnan (2015), Ch. 4, sec. 4.9; Oppenheim & Schafer (2010).

Examples

set.seed(1)
x <- abs(sin(2 * pi * 0.02 * (1:400))) + rnorm(400, 0, 0.05)
str(morie_dsp_homomorphic(x, cutoff = 0.1, fs = 100), max.level = 1)
#>  num [1:400] 0.186 0.51 0.646 1.111 1.196 ...