gpufilter
GPU-Efficient Recursive Filtering and Summed-Area Tables
|
Modules | |
CPU Computation functions | |
Functions | |
template<class T > | |
void | gpufilter::extend_image (T *&ext_img, int &ext_w, int &ext_h, const T *img, const int &w, const int &h, const int &extb, const initcond &ic) |
Extend an image to consider initial condition outside. | |
template<class T > | |
void | gpufilter::extract_image (T *img, const int &w, const int &h, T *&ext_img, const int &ext_w, const int &extb) |
Extract an image from an extended image. | |
template<class T > | |
void | gpufilter::sat_cpu (T *in, const int &w, const int &h) |
Compute the Summed-area Table of an image in the CPU. | |
template<class T > | |
void | gpufilter::gaussian_cpu (T **in, const int &w, const int &h, const int &depth, const T &s, const int &extb=1, const initcond &ic=clamp) |
Gaussian blur an image in the CPU. | |
template<class T > | |
void | gpufilter::gaussian_cpu (T *in, const int &w, const int &h, const T &s, const int &extb=1, const initcond &ic=clamp) |
Gaussian blur a single-channel image in the CPU. | |
template<class T > | |
void | gpufilter::bspline3i_cpu (T **in, const int &w, const int &h, const int &depth, const int &extb=1, const initcond &ic=mirror) |
Compute the Bicubic B-Spline interpolation of an image in the CPU. | |
template<class T > | |
void | gpufilter::bspline3i_cpu (T *in, const int &w, const int &h, const int &extb=1, const initcond &ic=mirror) |
Compute the Bicubic B-Spline interpolation of a single-channel image in the CPU. |
void gpufilter::bspline3i_cpu | ( | T ** | in, |
const int & | w, | ||
const int & | h, | ||
const int & | depth, | ||
const int & | extb = 1 , |
||
const initcond & | ic = mirror |
||
) |
Compute the Bicubic B-Spline interpolation of an image in the CPU.
Given an input 2D image compute the Bicubic B-Spline interpolation of it by applying a first-order recursive filter using clamp-to-border initial conditions.
[in,out] | in | The 2D image to compute the Bicubic B-Spline interpolation |
[in] | w | Width of the input image |
[in] | h | Height of the input image |
[in] | depth | Depth of the input image (color channels) |
[in] | extb | Extension (in blocks) to consider outside image (default 1) |
[in] | ic | Initial condition (for outside access) (default mirror) |
T | Image value type |
void gpufilter::bspline3i_cpu | ( | T * | in, |
const int & | w, | ||
const int & | h, | ||
const int & | extb = 1 , |
||
const initcond & | ic = mirror |
||
) |
Compute the Bicubic B-Spline interpolation of a single-channel image in the CPU.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in,out] | in | The single-channel 2D image to compute the Bicubic B-Spline interpolation |
[in] | w | Width of the input image |
[in] | h | Height of the input image |
[in] | extb | Extension (in blocks) to consider outside image (default 1) |
[in] | ic | Initial condition (for outside access) (default mirror) |
T | Image value type |
void gpufilter::extend_image | ( | T *& | ext_img, |
int & | ext_w, | ||
int & | ext_h, | ||
const T * | img, | ||
const int & | w, | ||
const int & | h, | ||
const int & | extb, | ||
const initcond & | ic | ||
) |
Extend an image to consider initial condition outside.
Given an input 2D image extend it including a given initial condition for outside access.
[out] | ext_img | The extended 2D image (to be allocated) |
[out] | ext_w | Width of the extended image |
[out] | ext_h | Height of the extended image |
[in] | img | The 2D image to extend |
[in] | w | Width of the input image |
[in] | h | Height of the input image |
[in] | extb | Extension (in blocks) to consider outside image |
[in] | ic | Initial condition (for outside access) |
T | Image value type |
void gpufilter::extract_image | ( | T * | img, |
const int & | w, | ||
const int & | h, | ||
T *& | ext_img, | ||
const int & | ext_w, | ||
const int & | extb | ||
) |
Extract an image from an extended image.
Given an input 2D extended image (with initial conditions) extract the original image in the middle.
[out] | img | The 2D image to extract |
[in] | w | Width of the extracted image |
[in] | h | Height of the extracted image |
[in,out] | ext_img | The extended 2D image (to be deallocated) |
[in] | ext_w | Width of the extended image |
[in] | extb | Extension (in blocks) considered in extended image |
T | Image value type |
void gpufilter::gaussian_cpu | ( | T ** | in, |
const int & | w, | ||
const int & | h, | ||
const int & | depth, | ||
const T & | s, | ||
const int & | extb = 1 , |
||
const initcond & | ic = clamp |
||
) |
Gaussian blur an image in the CPU.
Given an input 2D image compute the Gaussian blur of it by applying a sequence of recursive filters using clamp-to-border initial conditions.
[in,out] | in | The 2D image to compute Gaussian blur |
[in] | w | Width of the input image |
[in] | h | Height of the input image |
[in] | depth | Depth of the input image (color channels) |
[in] | s | Sigma support of Gaussian blur computation |
[in] | extb | Extension (in blocks) to consider outside image (default 1) |
[in] | ic | Initial condition (for outside access) (default clamp) |
T | Image value type |
void gpufilter::gaussian_cpu | ( | T * | in, |
const int & | w, | ||
const int & | h, | ||
const T & | s, | ||
const int & | extb = 1 , |
||
const initcond & | ic = clamp |
||
) |
Gaussian blur a single-channel image in the CPU.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in,out] | in | The single-channel 2D image to compute Gaussian blur |
[in] | w | Width of the input image |
[in] | h | Height of the input image |
[in] | s | Sigma support of Gaussian blur computation |
[in] | extb | Extension (in blocks) to consider outside image (default 1) |
[in] | ic | Initial condition (for outside access) (default clamp) |
T | Image value type |
void gpufilter::sat_cpu | ( | T * | in, |
const int & | w, | ||
const int & | h | ||
) |
Compute the Summed-area Table of an image in the CPU.
Given an input 2D image compute its Summed-Area Table (SAT) by applying a first-order recursive filters forward using zero-border initial conditions.
[in,out] | in | The 2D image to compute the SAT |
[in] | w | Width of the input image |
[in] | h | Height of the input image |
T | Image value type |