Page 1 of 1

Possible Bug in -average in IM 6.3.7.1

Posted: 2007-11-27T12:47:17-07:00
by fmw42
Hello,

After upgrading to IM 6.3.7.1 (special Mac OS 10.4 Tiger build without X11), I am finding that one of my scripts to perform NASA's retinex processing no longer produces the same good results as it did in IM 6.3.6.4.

Here is the original image
http://www.fmwconcepts.com/misc_tests/r ... zelda2.jpg

Here is the IM 6.3.6.4 good result
http://www.fmwconcepts.com/misc_tests/r ... rgb_f0.jpg

Here is the IM 6.3.7.1 bad result
http://www.fmwconcepts.com/misc_tests/r ... rgb_f0.jpg


My retinex script does basically the following:

# create reflectance images at each resolution size
convert $infile \( +clone -blur 0x5 \) -fx "log((u/max(v,.000001))+1)" $tmp1
convert $infile \( +clone -blur 0x20 \) -fx "log((u/max(v,.000001))+1)" $tmp2
convert $infile \( +clone -blur 0x240 \) -fx "log((u/max(v,.000001))+1)" $tmp3

# average results (normalize as log reduces range of values)
convert $tmp1 $tmp2 $tmp3 -average $tmp0
convert $tmp0 -normalize $outfile

I have looked at the first 3 $tmp files between IM 6.3.6.4 and IM 6.3.7.1 and they are identical according to compare -metric rmse

The first place that any difference occurs is after the -average.

So I have taken the three $tmp files and performed standalone averages in both IM releases. Here are the images and results:

Here are the 3 tmp files (the same from both releases):
http://www.fmwconcepts.com/misc_tests/r ... _1_211.png
http://www.fmwconcepts.com/misc_tests/r ... _2_211.png
http://www.fmwconcepts.com/misc_tests/r ... _3_211.png

Here is the -average done using IM 6.3.6.4
http://www.fmwconcepts.com/misc_tests/r ... 36_ave.png

Here is the same done using IM 6.3.7.1
http://www.fmwconcepts.com/misc_tests/r ... 37_ave.png

At first I thought it might be due to the special Tiger release. But I had Anthony Thyssen run my retinex on his version of IM 6.3.7.1 and he gets the same bad results that I did.

Hope this helps you get to the bottom of the issue.

Thanks for looking into it.

Re: Possible Bug in -average in IM 6.3.7.1

Posted: 2007-11-27T13:27:48-07:00
by magick
The problem you reported is fixed in ImageMagick 6.3.7-2 Beta scheduled for release within a week or two. Thanks for alerting us to the problem.