Linear Methods for Image Interpolation
conv.h
Go to the documentation of this file.
00001 
00016 #ifndef _CONV_H_
00017 #define _CONV_H_
00018 
00019 #include "basic.h"
00020 
00021 
00023 typedef struct
00024 {
00026     float *Coeff;
00028     int Delay;
00030     int Length;
00031 } filter;
00032 
00034 typedef float (*boundaryext)(const float*, int, int, int);
00035 
00036 
00037 void SampledConv1D(float *Dest, int DestStride, const float *Src,
00038     int SrcStride, filter Filter, boundaryext Boundary, int N,
00039     int nStart, int nStep, int nEnd);
00040 
00041 void SeparableConv2D(float *Dest, float *Buffer, const float *Src,
00042     filter FilterX, filter FilterY, boundaryext Boundary,
00043     int Width, int Height, int NumChannels);
00044 
00045 filter MakeFilter(float *Coeff, int Delay, int Length);
00046 
00047 filter AllocFilter(int Delay, int Length);
00048 
00049 int IsNullFilter(filter Filter);
00050 
00051 filter GaussianFilter(double Sigma, int R);
00052 
00053 boundaryext GetBoundaryExt(const char *Boundary);
00054 
00055 
00056 /* Macro definitions */
00057 
00059 #define FreeFilter(Filter)  (Free((Filter).Coeff))
00060 
00072 #define Conv1D(Dest, DestStride, Src, SrcStride, Filter, Boundary, N) \
00073     (SampledConv1D(Dest, DestStride, Src, SrcStride, Filter, Boundary, N, \
00074     0, 1, N - 1))
00075 
00076 
00077 extern const filter NullFilter;
00078 
00079 #endif /* _CONV_H_ */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines