Page 1 of 1

Variable motion blur mapping?

Posted: 2018-12-24T15:22:11-07:00
by josephs
Hi All,

I have read this example for the ImageMagick example pages:

convert -size 75x75 gradient:black-white blur_map_gradient.gif
convert koala.gif blur_map_gradient.gif \
-compose blur -define compose:args=3 -composite \
blur_koala_gradient.gif

...as explained in example pages, this will make the image progressively more blurry from top of image to bottom of image.

I am curious to know if this same idea be applied using motion blur, for example using '-morphology Convolve Blur:0x4'? In other words the motion blur is progressively applied?

I am tinkering with a cool effect to make objects in the foreground move faster across the page then objects in the background.

As always any help is appreciated.

Re: Variable motion blur mapping?

Posted: 2018-12-24T16:11:49-07:00
by fmw42
No, I do not believe it can be used with motion blur. The point of using variable blur is that it can make something like motion blur. I think you can localize the variable blur by masking your gradient to the shape of the region you want to blur.

Re: Variable motion blur mapping?

Posted: 2018-12-24T16:46:28-07:00
by snibgo
"-morphology Convolve Blur" can't use a second image as a mask to determine the blur sigma.

For "-compose Blur", the "args" parameter can take separate numbers for x-sigma and y-sigma, and the angle. The angle can be modulated by the blue channel of the mask. For example (Windows BAT syntax):

Code: Select all

%IMG7%magick ^
  toes.png ^
  ( +clone ^
    -sparse-color bilinear 0,0,#000,0,%%[fx:h-1],#fff ^
  ) ^
  -compose blur -define compose:args=10x0-20-20 -composite ^
  motblur_m.jpg
Image

See also Selective blur

Re: Variable motion blur mapping?

Posted: 2018-12-25T10:31:40-07:00
by josephs
Thank you! Brilliant. Much appreciated.