#include <cmath>
#include <complex>
#include <iostream>
#include <Halide.h>
Go to the source code of this file.
|
std::vector< float > | overlap_feedback_coeff (std::vector< float > a, std::vector< float > b) |
| Compute the coefficients of a higher order filter that is equivalent to two cascaded lower order filters of given coefficients. More...
|
|
std::vector< float > | integral_image_coeff (int iterations) |
| Feed forward and feedback coefficients for computing n integrals of image, single intergal is summed area table and multiple integrals are multiple applications of summed area table. More...
|
|
std::vector< float > | gaussian_weights (float sigma, int order) |
| Wrapper to compute third order recursive filter weights for Gaussian blur. More...
|
|
int | gaussian_box_filter (int iterations, float sigma) |
| Compute the size of a box filter that approximates a Gaussian. More...
|
|
template<typename T > |
Halide::Image< T > | reference_gaussian (Halide::Image< T > in, T sigma) |
| Apply Gaussian filter on an input image. More...
|
|
|
- Parameters
-
[in] | x | input (float or Halide::Expr) |
[in] | mu | mean of the Gaussian function |
[in] | sigma | sigma support of the true Gaussian filter |
|
float | gaussian (float x, float mu, float sigma) |
|
float | gaussDerivative (float x, float mu, float sigma) |
|
float | gaussIntegral (float x, float mu, float sigma) |
|
Halide::Expr | gaussian (Halide::Expr x, float mu, float sigma) |
|
Halide::Expr | gaussDerivative (Halide::Expr x, float mu, float sigma) |
|
Halide::Expr | gaussIntegral (Halide::Expr x, float mu, float sigma) |
|
std::vector<float> overlap_feedback_coeff |
( |
std::vector< float > |
a, |
|
|
std::vector< float > |
b |
|
) |
| |
Compute the coefficients of a higher order filter that is equivalent to two cascaded lower order filters of given coefficients.
- Todo:
- This function is only partially tested and may be unstable
- Parameters
-
[in] | a | coefficients of first lower order filter |
[in] | b | coefficients of second lower order filter |
- Returns
- coefficients of higher order filter
std::vector<float> integral_image_coeff |
( |
int |
iterations | ) |
|
Feed forward and feedback coefficients for computing n integrals of image, single intergal is summed area table and multiple integrals are multiple applications of summed area table.
- Parameters
-
[in] | iterations | number of integrals |
- Returns
- coeff of IIR filter that computes multiple integrals
float gaussian |
( |
float |
x, |
|
|
float |
mu, |
|
|
float |
sigma |
|
) |
| |
float gaussDerivative |
( |
float |
x, |
|
|
float |
mu, |
|
|
float |
sigma |
|
) |
| |
float gaussIntegral |
( |
float |
x, |
|
|
float |
mu, |
|
|
float |
sigma |
|
) |
| |
Halide::Expr gaussian |
( |
Halide::Expr |
x, |
|
|
float |
mu, |
|
|
float |
sigma |
|
) |
| |
Halide::Expr gaussDerivative |
( |
Halide::Expr |
x, |
|
|
float |
mu, |
|
|
float |
sigma |
|
) |
| |
Halide::Expr gaussIntegral |
( |
Halide::Expr |
x, |
|
|
float |
mu, |
|
|
float |
sigma |
|
) |
| |
std::vector<float> gaussian_weights |
( |
float |
sigma, |
|
|
int |
order |
|
) |
| |
Wrapper to compute third order recursive filter weights for Gaussian blur.
Third order filter can be approximated by cascaded first and second order filters
- Parameters
-
[in] | order | order of recursive filter for approximation |
[in] | sigma | sigma of Gaussian filter |
- Returns
- vector with feedforward coeff as first element and rest feedback coeff
int gaussian_box_filter |
( |
int |
iterations, |
|
|
float |
sigma |
|
) |
| |
Compute the size of a box filter that approximates a Gaussian.
Source: "Efficient Approximation of Gaussian Filters" Rau and McClellan, IEEE Trans. on Signal Processing 1997 http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=554310
- Parameters
-
[in] | iterations | number of repeated applications of box filter |
[in] | sigma | sigma support of the true Gaussian filter |
- Returns
- box filter width
template<typename T >
Halide::Image<T> reference_gaussian |
( |
Halide::Image< T > |
in, |
|
|
T |
sigma |
|
) |
| |
Apply Gaussian filter on an input image.
- Parameters
-
[in] | in | input single channel image |
[in] | sigma | sigma support of the true Gaussian filter |
- Returns
- filtered image
Definition at line 80 of file iir_coeff.h.
References gaussian().