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#pragma once
20
21// dependencites
22#include "cuArrays.h"
23
24namespace isce3::matchtemplate::pycuampcor {
25
27{
28 private:
29 static const int i_sincwindow = 2;
31 static const int i_weight = 1;
32 const float r_pedestal = 0.0f;
33 const float r_beta = 0.75f;
34 const float r_relfiltlen = 6.0f;
35
36 static const int i_decfactor = 4096;
37
38 int i_covs;
39 int i_intplength;
40 int i_filtercoef; //< length of the sinc kernel i_intplength*i_decfactor+1
41
42 float * r_filter; // sinc kernel with size i_filtercoef
43
44 public:
45 // constructor
46 cuSincOverSamplerR2R(const int i_covs_);
47 // set up sinc interpolation coefficients
48 void cuSetupSincKernel();
49 // execute interface
50 void execute(cuArrays<float> *imagesIn, cuArrays<float> *imagesOut, cuArrays<int2> *center, int oversamplingFactor);
51 // destructor
53};
54
55} // namespace
void execute(cuArrays< float > *imagesIn, cuArrays< float > *imagesOut, cuArrays< int2 > *center, int oversamplingFactor)
Execute sinc interpolation.
Definition cuSincOverSampler.cpp:158
cuSincOverSamplerR2R(const int i_covs_)
cuSincOverSamplerR2R constructor
Definition cuSincOverSampler.cpp:20
~cuSincOverSamplerR2R()
destructor
Definition cuSincOverSampler.cpp:30
void cuSetupSincKernel()
Set up the sinc interpolation kernel (coefficient)
Definition cuSincOverSampler.cpp:62
Header file for cuArrays class.

Generated for ISCE3.0 by doxygen 1.13.2.