1IM_FWFFT(3) Library Functions Manual IM_FWFFT(3)
2
3
4
6 im_fwfft, im_invfft, im_invfftr - forward and inverse fft on an image
7
9 #include <vips/vips.h>
10
11 int im_fwfft(in, out)
12 IMAGE *in, *out;
13
14 int im_invfft(in, out)
15 IMAGE *in, *out;
16
17 int im_invfftr(in, out)
18 IMAGE *in, *out;
19
20
22 im_fwfft() performs a forward fast Fourier Transform on the image held
23 by the image descriptor in and writes the result to the image descrip‐
24 tor out. The image can be in any format and have any number of bands.
25 The output is always complex.
26
27 If VIPS has been built with support for libfftw, a high-speed FFT
28 library, then fftwnd_one() is used to compute the transform. This pro‐
29 duces a double precision complex result. The first transformation at a
30 particular image size will be very slow as libfftw optimises itself for
31 your machine, but subsequent transforms of images of that size are
32 extremely fast. Unfortunately, libfftw does not have good out-of-mem‐
33 ory behaviour. If you try to transform a very large image, your program
34 will exit abruptly.
35
36 If VIPS has not been built with libfftw support, VIPS uses its own fft
37 routines. These are rather slow, are single precision only, and can
38 only transform images whose sides are a power of two.
39
40 im_invfft() performs the reverse transform. The input image must be
41 complex, the output is always complex. The image may have any number of
42 bands.
43
44 Again, if libfftw was present when VIPS was compiled, that library is
45 used to calculate the transform.
46
47 im_invfftr() performs the reverse transform. The input image must be
48 complex, the output is always real. The image may have any number of
49 bands. It is about 2 x faster than im_invfft().
50
51 Again, if libfftw was present when VIPS was compiled, that library is
52 used to calculate the transform.
53
54
56 The function returns 0 on success and -1 on error.
57
59 im_rotquad(3), im_c2ps(3), im_scaleps(3), im_disp_ps(3).
60
62 1995, National Gallery and Birkbeck College
63
64
65
66 14 May 1991 IM_FWFFT(3)