24 #ifndef CCORRELATION_INTERCOR_FFTW_PHASE
25 #define CCORRELATION_INTERCOR_FFTW_PHASE
45 template<
typename T,
typename Timg>
56 this->class_name =
"Correlation : Inter-correlation by FFTW-Phase";
60 virtual void init(CParameterNetCDF &fp)
69 std::string attribute_name =
"phase_threshold";
70 int error = fp.loadAttribute(attribute_name,m_factor);
71 printf(
"\t\t phase signal threshold -> %i\n", m_factor);
75 virtual void interCor(CImgList<T> &correlogram, CImgList<T> &F, CImgList<T> &G)
78 cimg_forXYZ(F[0],x,y,z)
80 correlogram(0,x,y,z) = std::sqrt( std::pow(F(0,x,y,z),2) + std::pow(F(1,x,y,z),2) );
81 correlogram(1,x,y,z) = std::sqrt( std::pow(G(0,x,y,z),2) + std::pow(G(1,x,y,z),2) );
84 normalized(correlogram, F, G);
90 void normalized(CImgList<T> &correlogram, CImgList<T> &F, CImgList<T> &G)
93 float maxF(correlogram[0].max());
97 cimg_forXYZ(F[L],x,y,z)
100 if (correlogram(0,x,y,z)<maxF*m_factor/100 or correlogram(1,x,y,z)<maxF*m_factor/100)
107 F(L,x,y,z) = F(L,x,y,z)/correlogram(0,x,y,z);
108 G(L,x,y,z) = G(L,x,y,z)/correlogram(1,x,y,z);
virtual void init(CParameterNetCDF &fp)
Definition: Ccorrelation_intercor_fftw_phase.h:60
this branch doesn't requires image size equal to a power of 2 since it uses FFtw which already implem...
Definition: Ccorrelation_intercor_fftw_phase.h:46
Definition: Ccorrelation_intercor_fftw.h:39
virtual void init(CParameterNetCDF &fp)
Definition: Ccorrelation_intercor.h:61
this class implement 7 functions:
Definition: Ccorrelation_intercor.h:45