Page 1 of 1
Using a tilt shift effect that turns out to be very slow
Posted: 2013-01-21T21:07:19-07:00
by lovelf
Code: Select all
convert ( image -gamma 0.75 -modulate 100,130 -contrast )
( +clone -sparse-color Barycentric '0,0 black 0,%h white' -function polynomial 4,-4,1 -level 0,50% )
-compose blur -set option:compose:args 5 -composite
image
It is slooow, what is making it so slow, is it the function polynomial, how can I speed it up or achieve a similar tilt shift effect that is not so slow / resource consuming.
Thank you
Re: Using a tilt shift effect that turns out to be very slow
Posted: 2013-01-22T12:31:44-07:00
by snibgo
The slowness is probably in the compose blur. This is potentially very useful, but I find it far too slow for real-world images. (My record so far is five days to process an image!)
Instead, I make two or more images at different conventional blurs, and blend them as required.
Re: Using a tilt shift effect that turns out to be very slow
Posted: 2013-01-22T19:25:44-07:00
by anthony
I am not certain why it is so slow you must be using some very very large blur sigmas. However two variable blurs (one using just height, the other using just width) should be a lot faster. It is actually how 'blur' works, as opposed to 'gaussian blur'
See
http://www.imagemagick.org/Usage/convol ... an_vs_blur
Fred also has a script that merges multiple (16 or so) blurs of an image, to generate a variable blur. It was written before variable blur became available.
http://www.fmwconcepts.com/imagemagick/ ... /index.php
Re: Using a tilt shift effect that turns out to be very slow
Posted: 2013-01-22T20:40:40-07:00
by fmw42
I just uploaded a new unix bash script, tiltshift, to my web site. It uses a mask to generate a varying blur and to keep the center unblurred. It does not use -compose blur, but a simple -blur and composites the original and blurred image using a gradient mask. See the link below. I have no idea if it will be faster or slower than Anthony's method using -compose blur.