Page 1 of 1
Re: Is it possible to modify (blur)a polyline-area of a picture?
Posted: 2007-12-13T18:44:08-07:00
by fmw42
You can blur the whole picture. Then draw the polyline on the original. Then make a binary mask from the polyline area. Then use -composite to overlay the one with the other using the mask to control which area shows from the original and which area shows from the blurred image.
see:
http://www.imagemagick.org/Usage/compose/#compose
http://www.imagemagick.org/Usage/compose/#mask
Re: Is it possible to modify (blur)a polyline-area of a picture?
Posted: 2007-12-16T21:07:39-07:00
by anthony
As mentioned by
fmw42, create a blured picture. But also generate a plotline mask to select between the original picture and the blurred picture.
Code: Select all
convert original.jpg \( +clone -blur 0x5 \) \( -size 640x480 xc:black -fill white -draw 'polyline 255,390 220,420 290,420' \) -composite blurred_window.jpg
You may however like to blur (feather) the mask slightly to make it a more gradual change.
Code: Select all
convert original.jpg \( +clone -blur 0x5 \) \( -size 640x480 xc:black -fill white -draw 'polyline 255,390 220,420 290,420' -blur 0x2 \) -composite blurred_window2.jpg
At the moment however there is no method to adjust the blur amount according to some mask. Such a method would be useful for generating shadows that get more blurry the further they extend from some object.