#include #include "complex.h" #ifndef FALSE #define FALSE (0) #endif #ifndef TRUE #define TRUE (1) #endif static inline double rad_to_degree (double theta) { return theta * (360.0 / (2 * M_PI)); } void fft (complex_t *buffer, int n); void ifft (complex_t *buffer, int n); /* Fourier transform an n x n array */ void fft_2d (complex_t *buffer, int n); void ifft_2d (complex_t *buffer, int n); /* Shifts the zero component to the center of the array */ void shift (complex_t *buffer, int n); void shift_2d (complex_t *buffer, int n); void fft_shift_2d (complex_t *buffer, int n); void ifft_shift_2d (complex_t *buffer, int n); void show_image (const char *name, complex_t *image, int n);