1 #ifndef _IIR_FILTER_COEFFICIENTS_H_
2 #define _IIR_FILTER_COEFFICIENTS_H_
39 float gaussian (
float x,
float mu,
float sigma);
43 Halide::Expr
gaussian (Halide::Expr x,
float mu,
float sigma);
45 Halide::Expr
gaussIntegral (Halide::Expr x,
float mu,
float sigma);
81 int width = in.width();
82 int height= in.height();
83 Halide::Image<T> ref(width,height);
84 for (
int y=0; y<height; y++) {
85 for (
int x=0; x<width; x++) {
88 for (
int j=0; j<height; j++) {
89 for (
int i=0; i<width; i++) {
90 float d = (x-i)*(x-i) + (y-j)*(y-j);
91 float g =
gaussian(std::sqrt(d), 0.0, sigma);
102 #endif // _IIR_FILTER_COEFFICIENTS_H_
std::vector< float > gaussian_weights(float sigma, int order)
Wrapper to compute third order recursive filter weights for Gaussian blur.
int gaussian_box_filter(int iterations, float sigma)
Compute the size of a box filter that approximates a Gaussian.
float gaussian(float x, float mu, float sigma)
float gaussIntegral(float x, float mu, float sigma)
Halide::Image< T > reference_gaussian(Halide::Image< T > in, T sigma)
Apply Gaussian filter on an input image.
std::vector< float > integral_image_coeff(int iterations)
Feed forward and feedback coefficients for computing n integrals of image, single intergal is summed ...
float gaussDerivative(float 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 filt...