Page 1 of 1
possible bug convert to pfm IM 6.8.0.3
Posted: 2012-10-30T20:26:10-07:00
by fmw42
IM 6.8.0.3 with or without HDRI Mac OSX Snow Leopard.
When using FFT (-fft without HDRI or +fft with HDRI), the center pixel of the magnitude or the real components should be the same as the mean of the original image.
convert cameraman.jpg -format "%[fx:mean]" info:
0.622039
With or Without HDRI:
convert cameraman.jpg -fft -delete 1 -format "%[fx:u.p{128,128}]" info:
0.622034
convert cameraman.jpg -fft -delete 1 MIFF:- | convert - -format "%[fx:u.p{128,128}]" info:
0.622034
convert cameraman.jpg -fft -delete 1 PFM:- | convert - -format "%[fx:u.p{128,128}]" info:
0.344869
The same happens with +fft in HDRI.
imh convert cameraman.jpg -fft -delete 1 -format "%[fx:u.p{128,128}]" info:
0.622039
imh convert cameraman.jpg -fft -delete 1 -define quantum:format=floating-point MIFF:- | imh convert - -format "%[fx:u.p{128,128}]" info:
0.622039
imh convert cameraman.jpg -fft -delete 1 PFM:- | imh convert - -format "%[fx:u.p{128,128}]" info:
0.344879
Is this a bug or am I misunderstanding something about PFM?
Re: possible bug convert to pfm IM 6.8.0.3
Posted: 2012-10-31T04:41:57-07:00
by magick
We can reproduce the problem you posted and have a patch in ImageMagick 6.8.0-4 Beta available by sometime tomorrow. Thanks.
Re: possible bug convert to pfm IM 6.8.0.3
Posted: 2012-11-01T11:32:35-07:00
by fmw42
magick wrote:We can reproduce the problem you posted and have a patch in ImageMagick 6.8.0-4 Beta available by sometime tomorrow. Thanks.
I am still seeing the same result in IM 6.8.0.4 HDRI downloaded today.
imh convert -version
Version: ImageMagick 6.8.0-4 2012-11-01 Q16
http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: HDRI
imh convert cameraman.jpg -fft -delete 1 PFM:- | convert - -format "%[fx:u.p{128,128}]" info:
0.344869
This should have a result as given by
imh convert cameraman.jpg -fft -delete 1 -format "%[fx:u.p{128,128}]" info:
0.622039
Do I misunderstand? Is there some oddity with PFM colorspace conversion going on in relation to MIFF or MPC?
Other than this issue, using PFM format to save FFT images does not seem to be different from MPC or miff.
It seems odd that I have to do this to get it to work. Is PFM linear like PGM?
imh convert cameraman.jpg -fft -delete 1
-colorspace sRGB PFM:- | convert - -format "%[fx:u.p{128,128}]" info:
0.622034
Correct me if I am wrong, but I thought the result of fft was still sRGB and not linear? Has that changed?
Re: possible bug convert to pfm IM 6.8.0.3
Posted: 2012-11-01T16:18:30-07:00
by magick
PFM can be color of grayscale. If its grayscale its linear, if color, sRGB. Your command,
- convert cameraman.jpg -fft -delete 1 PFM:- | convert - -format "%[fx:u.p{128,128}]" info:
returns 0.622022 for us, we're using ImageMagick 6.8.0-4.
Re: possible bug convert to pfm IM 6.8.0.3
Posted: 2012-11-01T18:08:00-07:00
by fmw42
magick wrote:PFM can be color of grayscale. If its grayscale its linear, if color, sRGB. Your command,
- convert cameraman.jpg -fft -delete 1 PFM:- | convert - -format "%[fx:u.p{128,128}]" info:
returns 0.622022 for us, we're using ImageMagick 6.8.0-4.
It does not work for me in HDRI mode., though it does work in non-HDRI mode
imh convert -version
Version: ImageMagick
6.8.0-4 2012-11-01 Q16
http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: HDRI
imh convert cameraman.jpg -fft -delete 1 PFM:- | convert - -format "%[fx:u.p{128,128}]" info:
0.344869
convert -version
Version: ImageMagick
6.8.0-4 2012-11-01 Q16
http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features:
convert cameraman.jpg -fft -delete 1 PFM:- | convert - -format "%[fx:u.p{128,128}]" info:
0.622034
Re: possible bug convert to pfm IM 6.8.0.3
Posted: 2012-11-01T18:48:00-07:00
by magick
We have HDRI enabled. Not sure why its failing for you.
Re: possible bug convert to pfm IM 6.8.0.3
Posted: 2012-11-01T20:07:36-07:00
by fmw42
magick wrote:We have HDRI enabled. Not sure why its failing for you.
Very strange! I just re-installed IM 6.8.0.4 HDRI and now it works fine.
I cannot explain it. It did not work previously as shown above. Any way, sorry about the false alarm.