How do I get "-selective-blur" to work faster?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
dev.alex89
Posts: 12
Joined: 2011-07-03T04:02:30-07:00
Authentication code: 8675308

How do I get "-selective-blur" to work faster?

Post by dev.alex89 »

How do I get "-selective-blur" and "gaussian-blur" to work faster? May by configure imagemagick, some options ?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How do I get "-selective-blur" to work faster?

Post by fmw42 »

Only possibility is to compile IM in Q8 format so that less memory is needed, but I am not sure that will help. There may be some other memory options that might help, but I am not an expert on those.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: How do I get "-selective-blur" to work faster?

Post by anthony »

gaussian-blue is a single pass 2-dimention convolution, as such it it quite slow. A faster way is to just use -blur which is a 2-pass 1-dimentional blur.

For detailed low level examples of this see.. Gaussian vs Blur Kernels
http://www.imagemagick.org/Usage/convol ... an_vs_blur

For VERY VERY large gaussian blurs or convolution with non-gaussian shapes, you can switch to using a multiple of images in a Frequency Space (using Fast Fourier Transforms or FFT) see...
http://www.imagemagick.org/Usage/fourie ... /#multiply

Multiple of the double FFT images this is not built into ImageMagick

FUTURE: eventually we may get someone who will be able to add -fourier multiply of FFT images or even a more direct -blur-fourier of normal image as built in operators.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
dev.alex89
Posts: 12
Joined: 2011-07-03T04:02:30-07:00
Authentication code: 8675308

Re: How do I get "-selective-blur" to work faster?

Post by dev.alex89 »

anthony thanks will try

fmw42 yes I known about Q8 but there is no effect on the speed
Post Reply