isce3 0.25.0
Loading...
Searching...
No Matches
cuAmpcorChunk.h
1/*
2 * @file cuAmpcorChunk.h
3 * @brief Ampcor processor for a batch of windows
4 *
5 *
6 */
7
8#ifndef __CUAMPCORCHUNK_H
9#define __CUAMPCORCHUNK_H
10
11#include "GDALImage.h"
12#include "cuArrays.h"
13#include "cuAmpcorParameter.h"
14#include "cuOverSampler.h"
15#include "cuSincOverSampler.h"
16#include "cuCorrFrequency.h"
17#include "cuCorrNormalizer.h"
18
19
20namespace isce3::matchtemplate::pycuampcor {
21
26private:
27 int idxChunkDown;
28 int idxChunkAcross;
29 int idxChunk;
30 int nWindowsDown;
31 int nWindowsAcross;
32
33 int devId;
34
35 GDALImage *referenceImage;
36 GDALImage *secondaryImage;
37 cuAmpcorParameter *param;
38 cuArrays<float2> *offsetImage;
39 cuArrays<float> *snrImage;
40 cuArrays<float3> *covImage;
41 cuArrays<float> *corrImage;
42
43 // local variables and workers
44 // gpu buffer to load images from file
45 cuArrays<float2> * c_referenceChunkRaw, * c_secondaryChunkRaw;
46 cuArrays<float> * r_referenceChunkRaw, * r_secondaryChunkRaw;
47
48 // windows raw (not oversampled) data, complex and real
49 cuArrays<float2> * c_referenceBatchRaw, * c_secondaryBatchRaw, * c_secondaryBatchZoomIn;
50 cuArrays<float> * r_referenceBatchRaw, * r_secondaryBatchRaw;
51
52 // windows oversampled data
53 cuArrays<float2> * c_referenceBatchOverSampled, * c_secondaryBatchOverSampled;
54 cuArrays<float> * r_referenceBatchOverSampled, * r_secondaryBatchOverSampled;
55 cuArrays<float> * r_corrBatchRaw, * r_corrBatchZoomIn, * r_corrBatchZoomInOverSampled, * r_corrBatchZoomInAdjust;
56
57 // offset data
58 cuArrays<int> *ChunkOffsetDown, *ChunkOffsetAcross;
59
60 // oversampling processors for complex images
61 cuOverSamplerC2C *referenceBatchOverSampler, *secondaryBatchOverSampler;
62
63 // oversampling processor for correlation surface
64 cuOverSamplerR2R *corrOverSampler;
65 cuSincOverSamplerR2R *corrSincOverSampler;
66
67 // cross-correlation processor with frequency domain algorithm
68 cuFreqCorrelator *cuCorrFreqDomain, *cuCorrFreqDomain_OverSampled;
69
70 // correlation surface normalizer
71 cuNormalizer *corrNormalizerRaw;
72 cuNormalizer *corrNormalizerOverSampled;
73
74 // save offset results in different stages
75 cuArrays<int2> *offsetInit;
76 cuArrays<int2> *offsetZoomIn;
77 cuArrays<float2> *offsetFinal;
78 cuArrays<int2> *maxLocShift; // record the maxloc from the extract center
79 cuArrays<float> *corrMaxValue;
80 cuArrays<int2> *i_maxloc;
81 cuArrays<float> *r_maxval;
82
83 // SNR estimation
84 cuArrays<float> *r_corrBatchRawZoomIn;
85 cuArrays<float> *r_corrBatchSum;
86 cuArrays<int> *i_corrBatchZoomInValid, *i_corrBatchValidCount;
87 cuArrays<float> *r_snrValue;
88
89 // Variance estimation
90 cuArrays<float3> *r_covValue;
91
92public:
93 // constructor
95 GDALImage *reference_, GDALImage *secondary_,
96 cuArrays<float2> *offsetImage_, cuArrays<float> *snrImage_,
97 cuArrays<float3> *covImage_, cuArrays<float>* corrImage_);
98 // destructor
100
101 // local methods
102 void setIndex(int idxDown_, int idxAcross_);
103 void loadReferenceChunk();
104 void loadSecondaryChunk();
105 void getRelativeOffset(int *rStartPixel, const int *oStartPixel, int diff);
106 // run the given chunk
107 void run(int, int);
108};
109
110} // namespace
111
112#endif
void getRelativeOffset(int *rStartPixel, const int *oStartPixel, int diff)
obtain the starting pixels for each chip
Definition cuAmpcorChunk.cpp:250
void run(int, int)
Run ampcor process for a batch of images (a chunk)
Definition cuAmpcorChunk.cpp:12
cuAmpcorChunk(cuAmpcorParameter *param_, GDALImage *reference_, GDALImage *secondary_, cuArrays< float2 > *offsetImage_, cuArrays< float > *snrImage_, cuArrays< float3 > *covImage_, cuArrays< float > *corrImage_)
constructor
Definition cuAmpcorChunk.cpp:355
void setIndex(int idxDown_, int idxAcross_)
set chunk index
Definition cuAmpcorChunk.cpp:226
Class container for all parameters.
Definition cuAmpcorParameter.h:35
Definition cuCorrNormalizer.h:32
Implementations of GDALImage class.
A class holds cuAmpcor process parameters.
Header file for cuArrays class.

Generated for ISCE3.0 by doxygen 1.13.2.