![]() |
ImFusion C++ SDK 4.5.0
|
#include <ImFusion/Base/FrequencyFilter.h>
Apply arbitrary frequency filters to 2D input. More...
Apply arbitrary frequency filters to 2D input.
This class takes a filter response defined by a given lambda function and applies it to 2D float image. Filter response is defined as a spectral density multiplier for the given frequency in units of oscillations per image width/height. 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 | |
| FrequencyFilter2D (const std::function< vec2f(float, float)> &filterResponse=[](float, float) { return vec2f::Ones();}) | |
| void | setFilterFunction (const std::function< vec2f(float, float)> &filterResponse, bool normalize=false) |
| Set the frequency response function. | |
| void | apply (const TypedImage< float > &signalIn, TypedImage< 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.