A Survey of Gaussian Convolution Algorithms
gaussian_conv_dct.h
Go to the documentation of this file.
1 
61 #ifndef _GAUSSIAN_CONV_DCT_H_
62 #define _GAUSSIAN_CONV_DCT_H_
63 
64 #include <fftw3.h>
65 #include "num.h"
66 
68 typedef struct dct_coeffs_
69 {
70  FFT(plan) forward_plan;
71  FFT(plan) inverse_plan;
72  num *dest;
73  const num *src;
75  enum
76  {
77  DCT_GAUSSIAN_1D,
78  DCT_GAUSSIAN_IMAGE
79  } conv_type;
80  union
81  {
82  struct
83  {
85  long N;
86  long stride;
87  } one;
88  struct
89  {
92  int width;
93  int height;
95  } image;
96  } dims;
97 } dct_coeffs;
98 
99 int dct_precomp(dct_coeffs *c, num *dest, const num *src,
100  long N, long stride, double sigma);
101 int dct_precomp_image(dct_coeffs *c, num *dest, const num *src,
102  int width, int height, int num_channels, double sigma);
103 void dct_free(dct_coeffs *c);
105 
107 #endif /* _GAUSSIAN_CONV_DCT_H_ */