![]() |
ImFusion C++ SDK 4.5.0
|
#include <ImFusion/Base/FrequencyFilter.h>
Apply arbitrary frequency filters to 1D input. More...
Apply arbitrary frequency filters to 1D input.
This class takes a filter response defined by a given lambda function and applies it to 1D time series. Filter response is defined as a spectral density multiplier for the given frequency in units of oscillations per signal duration. This function is sampled according to the resolution of the forward FFT of the input signal. The required Fourier transformations to and from frequency space are handled internally using the CpuFFT class.
Public Member Functions | |
| FrequencyFilter1D (const std::function< float(float)> &filterResponse=[](float) { return 1.0f;}) | |
| void | setFilterFunction (const std::function< float(float)> &filterResponse, bool normalize=false) |
| Set the frequency response function. | |
| void | apply (const std::vector< float > &signalIn, std::vector< float > &signalOut) const |
| Apply the current frequency response function to the given time domain signal. | |
|
inline |
Set the frequency response function.
If normalize is set to true, the frequencies given to the response function will be normalized w.r.t. the frequency range of the FFT result.