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

#include <ImFusion/Base/FrequencyFilter.h>

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

Detailed Description

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.

Member Function Documentation

◆ setFilterFunction()

void ImFusion::FrequencyFilter2D::setFilterFunction ( const std::function< vec2f(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