Page 1 of 1

bugs with FFT PNG and TIFF IM 6.6.7.2

Posted: 2011-01-25T11:21:07-07:00
by fmw42
IM 6.6.7.2 Q16 HDRI Mac OSX Tiger

Glenn and/or Magick,

Can you confirm these issues with FFT and PNG, FFT and TIFF

1) Baseline working fine with PFM


time convert logo: -fft logo_fft.pfm

real 0m2.523s
user 0m1.459s
sys 0m0.337s

the above produces two frames (one magnitude and one phase)


time convert logo_fft.pfm[0] logo_fft.pfm[1] -ift logo_rt3.pfm

real 0m1.905s
user 0m0.963s
sys 0m0.364s



2) TIFF produces two phase images and no magnitude image

time convert logo: -fft logo_fft.tiff

real 0m3.110s
user 0m1.781s
sys 0m0.384s

The above produces two frames but both are the phase.


time convert logo: -fft logo_fft_%d.tiff

real 0m2.784s
user 0m1.777s
sys 0m0.376s

The above produces two files but both are the phase.




3) PNG takes excessive time to process especially with IFT

time convert logo: -fft logo_fft_%d.png

real 0m25.188s
user 0m22.121s
sys 0m0.744s

The above produces two images - one magnitude and one phase


time convert logo_fft_0.png logo_fft_1.png -ift logo_rt.png

The above cancelled after 6+ minutes

real 6m44.251s
user 6m6.444s
sys 0m3.074s


Fred

Re: bugs with FFT PNG and TIFF IM 6.6.7.2

Posted: 2011-01-25T13:07:17-07:00
by magick
Glenn just checked-in a patch for the PNG performance problem. It will be available as ImageMagick 6.6.7-3 Beta in about an hour.

We get a magnitude and phase when we convert to TIFF (e.g. convert logo: -fft logo_fft.tiff).

Re: bugs with FFT PNG and TIFF IM 6.6.7.2

Posted: 2011-01-25T14:11:50-07:00
by fmw42
Magick wrote:We get a magnitude and phase when we convert to TIFF (e.g. convert logo: -fft logo_fft.tiff).
Do both images looks similar (like colored noise) or is the first image (magnitude) basically all black? If the former, then it is not correct. If the latter, then that is different from what I am getting in IM 6.6.7.2 Q16 (HDRI). Compare results from output in Tiff with output in PNG and output in PFM and see if they are comparable! My PNG and PFM results are fine. It is just the TIFF that is behaving strangely.

Re: bugs with FFT PNG and TIFF IM 6.6.7.2

Posted: 2011-01-25T18:21:24-07:00
by magick
The first image is mostly black with a white point in the center. The second image is noisy as expected. The command is 'convert logo: -fft logo_fft.tiff'.

For PFM and PNG, we get the same exact results as TIFF.

Re: bugs with FFT PNG and TIFF IM 6.6.7.2

Posted: 2011-01-25T19:19:22-07:00
by fmw42
magick wrote:The first image is mostly black with a white point in the center. The second image is noisy as expected. The command is 'convert logo: -fft logo_fft.tiff'.

For PFM and PNG, we get the same exact results as TIFF.
For tiff, I am getting two images that look like noise, but each is different. For PNG, PFM, I get the expected dark first image. And this is now after I updated all my MacPort ports. Though FFTW and libtiff were not updated as they were apparently up-to-date.

Something strange is going on on my system????

Re: bugs with FFT PNG and TIFF IM 6.6.7.2

Posted: 2011-01-26T14:06:40-07:00
by fmw42
IM 6.6.7.3 Q16 (hdri) Mac OSX Tiger

PNG timings are now reasonable. Thanks Glenn

But I am still getting strange results for results of -fft with TIFF output -- either two phase-like images or the first image like the phase and the second image like the magnitude (i.e. reversed order). This only happens with Tiff.

Also the phase image from square31.png still appears to have overshoots.

I have updated all my delegates from MacPorts. I will try uninstalling FFTW and libtiff and see what happens when they are taken from /usr rather than /opt. Or reinstall them both again from MacPorts.