From: Wheeler, Fred (Research) <wheeler@cr...> - 2002-10-04 14:02:45
The FFT algorithm puts restrictions on the size of the data in each dimension. Many FFT
implementations require the data length to be 2^p, for some integer p (i.e. the data length must be
1,2,4,8,16,32,...). The FFT algorithm being used by VXL is a bit more generous with its 2^p 3^q 5^r
You'll have to set r and c in your code to meet this restriction. You can either make them smaller
that 158, and crop your image, or make them larger and pad your image. 128x128 or 256x256 will work.
Other sizes closer to 158 are also possible with the 2^p 3^q 5^r size restriction.
Keep in mind that a vil image gets indexed as column,row and a vnl matrix gets indexed as row,column.
From: Wouter Roux [mailto:wouterroux@...]
Sent: Friday, October 04, 2002 9:50 AM
Subject: [Vxl-users] fft_2d
typedef vcl_complex<double> Complx;
vil_image img = vil_load(filename);
vnl_fft_2d<double> fft2d(r,c); <-- assertion failure
../vnl_fft_prime_factors.txx:25 assertion failure
'! "you probably gave a signal size not of the form 2^p 3^q 5^r
My image is a .png (158x158) grayscale chessboard image.
Where can I find more example code (other than the VXL book)?