DiegoCatalano / Catalano-Framework

Framework
GNU Lesser General Public License v3.0
295 stars 99 forks source link

fft process returns blank image #20

Closed icaliskanoglu closed 9 years ago

icaliskanoglu commented 9 years ago

hi, Catalano, fft process returns blank (full wihite) image. where i m doing wrong? i attached code and input, output images.

FastBitmap fb = new FastBitmap(imagePath);

Grayscale grayscale = new Grayscale();
grayscale.applyInPlace(fb);
fb.saveAsJPG(path + "grayscale_" + FilenameUtils.getBaseName(imagePath) + ".jpg");

FourierTransform ft = new FourierTransform(fb);
ft.Forward();
fb = ft.toFastBitmap();
fb.saveAsJPG(path + "fft_" + FilenameUtils.getBaseName(imagePath) + ".jpg");

FrequencyFilter ff = new FrequencyFilter(0, 60);
ff.ApplyInPlace(ft);
fb = ft.toFastBitmap();
fb.saveAsJPG(path + "freq_" + FilenameUtils.getBaseName(imagePath) + ".jpg");

slippies grayscale_slippies fft_slippies freq_slippies

DiegoCatalano commented 9 years ago

Hello İhsan, You're probably using an old version. This happen because I have update the fourier transform to work with no power of 2.

I need to release the new version, contains several optimizations and fixes, but you can download the master and compile the latest version.

With the same code, I got the results below.

dogs_fourier

dogs_real

icaliskanoglu commented 9 years ago

i solved the problem, thank you. but you can mavenize your project and deploy a repository :D, your libraries will be most usefull.