C++ Implementation of Fast Fourier Transform on an image