Page 1 of 1
Variable blur bug in newest version of IM
Posted: 2012-02-27T18:28:02-07:00
by pedery
I was attempting this effect verbatim, even using the same images:
http://www.imagemagick.org/Usage/photos/#tilt_shift
However, the blur function seems to be stuck on a minimum value. So even using variable blur with a completely black image, it still gets blurred. I've banged my head against the wall the entire day trying to figure out why the images had a blur to them no matter what I did.
The solution turned out to be to revert to version 6.5.4. I haven't tested the versions in between, but chose the version that was mentioned on this page:
http://www.imagemagick.org/Usage/mapping/#blur
- Peder -
Re: Variable blur bug in newest version of IM
Posted: 2012-02-27T20:26:10-07:00
by anthony
The minimal aspect of the blur function is broken. (working sigma falls below 1.0) Always has been.
I know the cause but have not been able to fix it. It will get fixed, but their is no ETA.
Their was a angle bug that was fixed in version 6.5.8-8 but that should not have effected the minimum limit problem.
Version 6.5.4 was when variable blur (-compose Blur) was actually implemented. It did not exist before that!
Re: Variable blur bug in newest version of IM
Posted: 2012-02-28T08:54:41-07:00
by pedery
Well, like I said, it works with 6.5.4 and does not work on the newest build (Windows). If I variable-blur with a black image, it still gets blurred similar to a Gaussian blur with radius 2. Maybe it's a setting somewhere. In any case, your cool tilt-shift cannot be reproduced.
- Peder -
Re: Variable blur bug in newest version of IM
Posted: 2012-02-28T19:42:04-07:00
by anthony
Can you give a command line example. Maybe I am mos-interpreting the question.
Re: Variable blur bug in newest version of IM
Posted: 2012-04-21T10:36:16-07:00
by einarjh
I can confirm this bug. I followed the instructions in this example:
http://www.imagemagick.org/Usage/mapping/#blur
And came out with this result:
Compare to expected result:
Using Fedora 16:
Code: Select all
einar@hactar:~$ convert -version
Version: ImageMagick 6.7.0-10 2011-11-03 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP
Re: Variable blur bug in newest version of IM
Posted: 2012-04-21T11:26:54-07:00
by fmw42
Just confirming. I get the same incorrect result also on IM 6.7.6.6 Q16 Mac OSX Snow Leopard.
Re: Variable blur bug in newest version of IM
Posted: 2012-04-21T12:35:48-07:00
by magick
Anthony changed the resampling filter from GaussianFilter@1.0 to CubicFilter@2.0. When we restore the resampling filter, it matches the expected results. Anthony, can you 'splain the change from Gaussian to Cubic? It appears that Gaussian/Mtichell returns the expected results but Cubic blurs the masked pixels.
Re: Variable blur bug in newest version of IM
Posted: 2012-04-22T22:09:54-07:00
by anthony
I'll try and take a look at it tonight. comparing code between versions.
The minimal blur issue is with blurs that get small enough that support size no longer can see neighbouring pixels.
This usually happens at sigma=0.5 which is relativity easy to reach when using variable blur maps.
But teh example shown is just a boolean on/off blur mask rather than a blur map. a sigma issue should not effect that as the blur is either on or not.
The two example images appear to show that it is blurring horizontally but not vertically.
As EWA is used for the blurring that means we are getting elliptical blurs, rather than circular blurs.
UPDATE: Actually it was simply only blurred half as much as it should have been! See next post.
I'll have to check it out and see what internal variables it is using.
Thanks for reporting!
Re: Variable blur bug in newest version of IM
Posted: 2012-04-25T18:22:11-07:00
by anthony
Yesterday I used the ANZAC public holiday (tribute day to Australian and New Zealand war veterans) to trace the bug in Variable Blurring. This discovered that the '
Gaussian' Filter was using a Sigma of about 0.25 (not exact) instead of 0.5.
The cause was some stupid programming faults (the code reads okay, but two if statements always comes out as true!). This stuffed up the 'sigma expert setting', and resulted in an incorrect default value for sigma value used. This was compounded by the verbose filter report summary not showing the fault!
As such Gaussian Filters were not blurry enough, and acted more like a 'hermite', ever since user sigma control was added (Feburary Last year, IM v6.6.7-6)
Now if I can just prevent filter expert settings effecting variable blurs, AND allow it to NOT use a 0.5 blur on image area that should have 'No Blur' according to the variable blur mapping! The later is causes by EWA 'minimal radius' handling, which is needed for resampling but not for blurring. It is what I get for 'abusing' EWA resampling to do per-pixel blurring.