YaDICs  V04.14.a
Yet another Digital Image Correlation software: platform dedicated to 2/3D Fluid and Solid kinematics field measurements.
 All Classes Files Functions Variables Pages
Ccorrelation_intercor_fft.h
Go to the documentation of this file.
1 /**********************************************************************
2  * Copyright (C) 2012, The YaDICs Project Developers.
3  * See the COPYRIGHT file at the top-level directory of this distribution ./COPYRIGHT.
4  * See ./COPYING file for copying and redistribution conditions.
5  *
6  * This file is part of YaDICs.
7  * YaDICs is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * YaDICs is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with YaDICs. If not, see <http://www.gnu.org/licenses/>.
19  *
20  * Information about how to use the software are provided at http://yadic.univ-lille1.fr/
21  **********************************************************************/
22 
23 
24 #ifndef CCORRELATION_INTERCOR_FFT
25 #define CCORRELATION_INTERCOR_FFT
26 
27 
28 
43 
44 
45 
46 template<typename T,typename Timg>
48 {
49 
50  public:
51 
52 
54  {// constructor
55 
56  this->class_name = "Correlation : Inter-correlation by FFT";
57 
58  }
59 
60  void correl(CImgList<T> &correlogram, CImgList<T> &F, CImgList<T> &G)
61  {// intercorrelation + zeroPadd
62 
63  zeroPadd(correlogram, F, G);
65 
66  }
67 
68  void zeroPadd(CImgList<T> &correlogram, CImgList<T> &F, CImgList<T> &G)
69  {
70 
71  // nearest power of 2
72  int dimX(-100), dimY(-100), dimZ(-100);
73 
74  dimX = cimg::nearest_pow2(correlogram[0].width());
75  if(!correlogram[0].is_sameY(1)){dimY = cimg::nearest_pow2(F[0].height()); };
76  if(!correlogram[0].is_sameZ(1)){dimZ = cimg::nearest_pow2(F[0].depth()); };
77 
78  cimglist_for(F,i)
79  {
80  correlogram[i].resize(dimX,dimY,dimZ,-100, 0, 0, 0.5, 0.5, 0.5, 0);
81  F[i].assign(dimX,dimY,dimZ);
82  G[i].assign(dimX,dimY,dimZ);
83  }
84 
85  }// zeroPadd
86 
87  virtual void interCor(CImgList<T> &correlogram, CImgList<T> &F, CImgList<T> &G)
88  {//inter-correlation
89 
90  Ccorrelation_intercor<T,Timg>::interCor(correlogram, F, G);
91 
92  }
93 
94 };
95 
96 #endif
virtual void correl(CImgList< T > &correlogram, CImgList< T > &F, CImgList< T > &G)
Definition: Ccorrelation_intercor_fftw.h:51
Definition: Ccorrelation_intercor_fftw_phase.h:46
Definition: Ccorrelation_intercor_fft.h:47
this class implement 2 functions:
this class implement 7 functions:
Definition: Ccorrelation_intercor.h:45