Page 1 of 1

possible bug in -adaptive-blur IM 6.5.0-2 Q16

Posted: 2009-03-19T15:27:19-07:00
by fmw42
IM 6.5.0-2 Q16 Mac OSX Tiger

I was playing with -adaptive-blur for the first time with respect to the comments made at viewtopic.php?f=1&t=13365

Here is the definition from the options page:
-adaptive-blur radius[xsigma]

Adaptively blur pixels, with decreasing effect near edges.
A Gaussian operator of the given radius and standard deviation (sigma) is used. If sigma is not given it defaults to 1.
It seems to me that it is really more of an adaptive-sharpening than an adaptive-blur. Here are my test results.

original image
Image

convert lena.jpg -adaptive-blur 0,1 lena_ablur_0x1.jpg
Image

convert lena.jpg -adaptive-blur 0,3 lena_ablur_0x3.jpg
Image


Looking at her hair and hat band, it seem that the detail is being sharpened closer one gets to the edges and I see not blurring away from the edges.

Is this a bug or is the description and name of the function in error?

Look forward to your new selective-blur.

Re: possible bug in -adaptive-blur IM 6.5.0-2 Q16

Posted: 2009-03-20T16:54:03-07:00
by magick
We can reproduce the problem and have a fix in the latest ImageMagick release, 6.5.0-3.

Re: possible bug in -adaptive-blur IM 6.5.0-2 Q16

Posted: 2009-03-21T09:56:11-07:00
by fmw42
The fix in IM 6.5.0-3 has changed from sharpening to blurring, BUT does not seem to do anything much more than a global blur. It is not preserving the edges very well. This is not to say it is not correct, only that it appears not to be very effective at least for this image.

Here are the new tests:

original
Image

convert lena.jpg -adaptive-blur 0x1 lena_ablurnew_0x1.jpg
Image

convert lena.jpg -adaptive-blur 0x3 lena_ablurnew_0x3.jpg
Image


Here are simple gaussian blurs for comparison.

convert lena.jpg -blur 0x1 lena_blur_0x1.jpg
Image

convert lena.jpg -blur 0x3 lena_blur_0x3.jpg
Image


There seems to be very little preservation of the edges in the adaptive-blur.