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