isce3 0.25.0
Loading...
Searching...
No Matches
cuSincOverSampler.h
1/*
2 * @file cuSincOverSampler.h
3 * @brief A class performs sinc interpolation/oversampling
4 *
5 * Oversample a given 2d signal by i_covs factor.
6 * Only signals within(-i_sincwindow, i_sincwindow) are oversampled
7 * The interpolation zone may also be shifted, if the max location is not at the center.
8 *
9 * The sinc interpolation is based on the formula
10 * $$x(t) = \sum_{n=-\infty}^{\infty} x_n f( \Omega_c t-n )$$
11 * with $f(x) = \text{sinc}(x)$, or a complex filter
12 * such as the sinc(x) convoluted with Hamming Window used here.
13 * In practice, a finite length of n (i_intplength) is used for interpolation.
14 *
15 * @note most parameters are currently hardwired; you need to change
16 * the source code below if you need to adjust the parameters.
17 */
18
19// code guard
20#ifndef __CUSINCOVERSAMPLER_H
21#define __CUSINCOVERSAMPLER_H
22
23// dependencites
24#include "cuArrays.h"
25#include "cudaUtil.h"
26
27#ifndef PI
28#define PI 3.14159265359f
29#endif
30
32{
33 private:
34 static const int i_sincwindow = 2;
36 static const int i_weight = 1;
37 const float r_pedestal = 0.0f;
38 const float r_beta = 0.75f;
39 const float r_relfiltlen = 6.0f;
40
41 static const int i_decfactor = 4096;
42
43 int i_covs;
44 int i_intplength;
45 int i_filtercoef; //< length of the sinc kernel i_intplength*i_decfactor+1
46
47 float * r_filter; // sinc kernel with size i_filtercoef
48
49 cudaStream_t stream;
50
51 public:
52 // constructor
53 cuSincOverSamplerR2R(const int i_covs_, cudaStream_t stream_);
54 // set up sinc interpolation coefficients
55 void cuSetupSincKernel();
56 // execute interface
57 void execute(cuArrays<float> *imagesIn, cuArrays<float> *imagesOut, cuArrays<int2> *center, int oversamplingFactor);
58 // destructor
60};
61
62#endif // _CUSINCOVERSAMPLER_H
63// end of file
Definition cuArrays.h:25
void execute(cuArrays< float > *imagesIn, cuArrays< float > *imagesOut, cuArrays< int2 > *center, int oversamplingFactor)
Execute sinc interpolation.
Definition cuSincOverSampler.cu:168
cuSincOverSamplerR2R(const int i_covs_, cudaStream_t stream_)
cuSincOverSamplerR2R constructor
Definition cuSincOverSampler.cu:21
~cuSincOverSamplerR2R()
destructor
Definition cuSincOverSampler.cu:32
void cuSetupSincKernel()
Set up the sinc interpolation kernel (coefficient)
Definition cuSincOverSampler.cu:65
Header file for cuArrays class.
Various cuda related parameters and utilities.

Generated for ISCE3.0 by doxygen 1.13.2.