CImg icon indicating copy to clipboard operation
CImg copied to clipboard

How to get FFT values of an 2d image?

Open SijinJohn opened this issue 3 years ago • 0 comments

Hi , i would like to get fft values from the image.

#include "CImg.h" using namespace cimg_library;

int main(int argc, char * argv[]) {

const char * input_file = "Lenna";

CImg<unsigned char> * input = new CImg<unsigned char>(input_file);

CImgList<unsigned char> fft = input->get_FFT();
CImg<unsigned char>::FFT(fft[0], fft[1], false);
fft[0].save("fft.jpg");

return 1;

}

Could someone guide on how to get FFT values from this

SijinJohn avatar Mar 12 '21 10:03 SijinJohn