ImFusion C++ SDK 4.5.0
ImFusion::FrequencyFilter1D Class Reference

#include <ImFusion/Base/FrequencyFilter.h>

Apply arbitrary frequency filters to 1D input. More...

Detailed Description

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.

Member Function Documentation

◆ setFilterFunction()

void ImFusion::FrequencyFilter1D::setFilterFunction ( const std::function< float(float)> & filterResponse,
bool normalize = false )
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.


The documentation for this class was generated from the following file:
  • ImFusion/Base/FrequencyFilter.h
Search Tab / S to search, Esc to close