From: Wheeler, Fred (Research) <wheeler@cr...>  20021004 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 size restriction. 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. Fred Wheeler Original Message From: Wouter Roux [mailto:wouterroux@...] Sent: Friday, October 04, 2002 9:50 AM To: vxlusers@... Subject: [Vxlusers] fft_2d Hi, Question 1 typedef vcl_complex<double> Complx; vil_image img = vil_load(filename); vil_memory_image_of<Complx> buf(img); int r=buf.rows(); int c=buf.cols(); vnl_matrix<Complx> A(buf,r,c); vnl_fft_2d<double> fft2d(r,c); < assertion failure ERROR: ../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. Question 2 Where can I find more example code (other than the VXL book)? Thank you wouter 