gpufilter
GPU-Efficient Recursive Filtering and Summed-Area Tables
CPU Computation functions

Functions

template<class T >
void gpufilter::rcfr (T *inout, const int &w, const int &h, const T &b0, const T &a1, const bool &ff=false)
 Compute first-order recursive filtering on columns forward and reverse.
template<class T >
void gpufilter::rrfr (T *inout, const int &w, const int &h, const T &b0, const T &a1, const bool &ff=false)
 Compute first-order recursive filtering on rows forward and reverse.
template<class T >
void gpufilter::r (T *inout, const int &w, const int &h, const T &b0, const T &a1, const bool &ff=false, const int &extb=0, const initcond &ic=zero)
 Compute first-order recursive filtering.
template<class T >
void gpufilter::rcfr (T *inout, const int &w, const int &h, const T &b0, const T &a1, const T &a2, const bool &ff=false)
 Compute second-order recursive filtering on columns forward and reverse.
template<class T >
void gpufilter::rrfr (T *inout, const int &w, const int &h, const T &b0, const T &a1, const T &a2, const bool &ff=false)
 Compute second-order recursive filtering on rows forward and reverse.
template<class T >
void gpufilter::r (T *inout, const int &w, const int &h, const T &b0, const T &a1, const T &a2, const bool &ff=false, const int &extb=0, const initcond &ic=zero)
 Compute second-order recursive filtering.

Function Documentation

template<class T >
void gpufilter::r ( T *  inout,
const int &  w,
const int &  h,
const T &  b0,
const T &  a1,
const bool &  ff = false,
const int &  extb = 0,
const initcond &  ic = zero 
)

Compute first-order recursive filtering.

Given an input 2D image compute a first-order recursive filtering on its columns and rows with a causal-anticausal filter pair. The filter is computed using a feedforward coefficient, i.e. a weight on the current element, and a feedback coefficient, i.e. a weight on the previous element. The initial condition can be zero, clamp, repeat or mirror. The computation is done sequentially in a naïve single-core CPU fashion.

Parameters:
[in,out]inoutThe 2D image to compute recursive filtering
[in]wWidth of the input image
[in]hHeight of the input image
[in]b0Feedforward coefficient
[in]a1Feedback first-order coefficient
[in]ffForward-only (ignore anticausal filter) flag
[in]extbExtension (in blocks) to consider outside image (default 0)
[in]icInitial condition (for outside access) (default zero)
Template Parameters:
TImage value type
Examples:
example_bspline.cc, example_gauss.cc, example_r2.cc, example_r3.cc, example_r4.cc, example_r5.cc, example_sat2.cc, and example_sat3.cc.
template<class T >
void gpufilter::r ( T *  inout,
const int &  w,
const int &  h,
const T &  b0,
const T &  a1,
const T &  a2,
const bool &  ff = false,
const int &  extb = 0,
const initcond &  ic = zero 
)

Compute second-order recursive filtering.

Given an input 2D image compute a second-order recursive filtering on its columns and rows with a causal-anticausal filter pair. The filter is computed using a feedforward coefficient, i.e. a weight on the current element, and two feedback coefficients, i.e. weights on the previous two elements. The initial condition can be zero, clamp, repeat or mirror. The computation is done sequentially in a naïve single-core CPU fashion.

Parameters:
[in,out]inoutThe 2D image to compute recursive filtering
[in]wWidth of the input image
[in]hHeight of the input image
[in]b0Feedforward coefficient
[in]a1Feedback first-order coefficient
[in]a2Feedback second-order coefficient
[in]ffForward-only (ignore anticausal filter) flag
[in]extbExtension (in blocks) to consider outside image (default 0)
[in]icInitial condition (for outside access) (default zero)
Template Parameters:
TImage value type
template<class T >
void gpufilter::rcfr ( T *  inout,
const int &  w,
const int &  h,
const T &  b0,
const T &  a1,
const bool &  ff = false 
)

Compute first-order recursive filtering on columns forward and reverse.

Given an input 2D image compute a first-order recursive filtering on its columns with a causal-anticausal filter pair. The filter is computed using a feedforward coefficient, i.e. a weight on the current element, and a feedback coefficient, i.e. a weight on the previous element. The initial condition can be zero, clamp, repeat or mirror. The computation is done sequentially in a naïve single-core CPU fashion.

Parameters:
[in,out]inoutThe 2D image to compute recursive filtering
[in]wWidth of the input image
[in]hHeight of the input image
[in]b0Feedforward coefficient
[in]a1Feedback first-order coefficient
[in]ffForward-only (ignore anticausal filter) flag
Template Parameters:
TImage value type
template<class T >
void gpufilter::rcfr ( T *  inout,
const int &  w,
const int &  h,
const T &  b0,
const T &  a1,
const T &  a2,
const bool &  ff = false 
)

Compute second-order recursive filtering on columns forward and reverse.

Given an input 2D image compute a second-order recursive filtering on its columns with a causal-anticausal filter pair. The filter is computed using a feedforward coefficient, i.e. a weight on the current element, and two feedback coefficients, i.e. weights on the previous two elements. The initial condition can be zero, clamp, repeat or mirror. The computation is done sequentially in a naïve single-core CPU fashion.

Parameters:
[in,out]inoutThe 2D image to compute recursive filtering
[in]wWidth of the input image
[in]hHeight of the input image
[in]b0Feedforward coefficient
[in]a1Feedback first-order coefficient
[in]a2Feedback second-order coefficient
[in]ffForward-only (ignore anticausal filter) flag
Template Parameters:
TImage value type
template<class T >
void gpufilter::rrfr ( T *  inout,
const int &  w,
const int &  h,
const T &  b0,
const T &  a1,
const bool &  ff = false 
)

Compute first-order recursive filtering on rows forward and reverse.

Given an input 2D image compute a first-order recursive filtering on its rows with a causal-anticausal filter pair. The filter is computed using a feedforward coefficient, i.e. a weight on the current element, and a feedback coefficient, i.e. a weight on the previous element. The initial condition can be zero, clamp, repeat or mirror. The computation is done sequentially in a naïve single-core CPU fashion.

Parameters:
[in,out]inoutThe 2D image to compute recursive filtering
[in]wWidth of the input image
[in]hHeight of the input image
[in]b0Feedforward coefficient
[in]a1Feedback first-order coefficient
[in]ffForward-only (ignore anticausal filter) flag
Template Parameters:
TImage value type
Examples:
example_r1.cc.
template<class T >
void gpufilter::rrfr ( T *  inout,
const int &  w,
const int &  h,
const T &  b0,
const T &  a1,
const T &  a2,
const bool &  ff = false 
)

Compute second-order recursive filtering on rows forward and reverse.

Given an input 2D image compute a second-order recursive filtering on its rows with a causal-anticausal filter pair. The filter is computed using a feedforward coefficient, i.e. a weight on the current element, and two feedback coefficients, i.e. weights on the previous two elements. The initial condition can be zero, clamp, repeat or mirror. The computation is done sequentially in a naïve single-core CPU fashion.

Parameters:
[in,out]inoutThe 2D image to compute recursive filtering
[in]wWidth of the input image
[in]hHeight of the input image
[in]b0Feedforward coefficient
[in]a1Feedback first-order coefficient
[in]a2Feedback second-order coefficient
[in]ffForward-only (ignore anticausal filter) flag
Template Parameters:
TImage value type