Page 1 of 1

A faster variable blur?

Posted: 2010-12-08T16:30:15-07:00
by b3and1p
I did a couple tests on doing a variable blur like they show in this example:
http://www.imagemagick.org/Usage/mapping/#blur

I was doing this on a 2kx2k image with a circular gradient for a mask. I had to do a amount of at least 30 before I really started to see any effect. The problem is that is was SLOOW sometime taking 5 minutes just to finish the effect. Is there any faster way of doing this effect? Maybe a not so precise filter? I realize I could just do a overall blur and then mask that image over another, but that doesn't really give the same effect.

Re: A faster variable blur?

Posted: 2010-12-08T17:52:58-07:00
by anthony
With large blurs no, not really.

The only other technique is to use something like Fred Weinhaus's variable blur script.

It however works by generating multiple blurred versions of the image, then merging
them according to the blur mapping. The more blurs the better the result.

One FAST way of producing a whole stack of progressivally blury images is to resize the image (using a gaussian filter) and the enlarging them again. This technique is used to good effect as a alternative 'shepards sparse color fill' that works on the image in-total, rather than calculating pixel by pixel.. See the last two examples (one using blur, the other resize) in
http://www.imagemagick.org/Usage/canvas/#sparse_blur

I don't think fred's script uses that technique, but I haven't looked either.

Re: A faster variable blur?

Posted: 2010-12-08T19:02:33-07:00
by fmw42
My script loops over various -resizes and -blurs and combines them. I don't know if it would be any faster than Anthony's function. One can only experiment to see.