MCPcopy Create free account
hub / github.com/cpvrlab/ImagePlay / FFT

Method FFT

IPL/src/IPLComplexImage.cpp:220–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218}
219
220bool IPLComplexImage::FFT()
221{
222 if(_width != _height) return false;
223 int size = IPLComplexImage::nextPowerOf2(_width);
224 if(size != _width) return false;
225
226 Complex* twiddle = new Complex [size/2];
227 Twiddle( twiddle, size/2 );
228 for( int y=0; y<size; y++ )
229 {
230 lineFFT(_plane[y], twiddle, size);
231 }
232/* for( int y=1; y<size; y++ )
233 for( int x=0; x<size; x++ )
234 p(x,0) += p(x,y);
235 for( int y=1; y<size; y++ )
236 for( int x=0; x<size; x++ )
237 p(x,y) = p(x,0); */
238 flip();
239 for( int y=0; y<size; y++ )
240 {
241 lineFFT(_plane[y], twiddle, size);
242 }
243 delete [] twiddle;
244 return true;
245}
246
247bool IPLComplexImage::IFFT()
248{

Callers 1

processInputDataMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected