- convert rgbrender.jpg \( \( rgbrender.jpg -blur 10x5 \) depthchannel.jpg -compose copyopacity \) -compose over focus-blur.png
Please help me with Focal Blur
You can simulate focus blur with ImageMagick 6.0.0 or later with this command:
Last edited by magick on 2004-06-01T06:36:45-07:00, edited 1 time in total.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
focal-blur
It would be a lot easier for this case to generate the ball images
seperately, blur them appropriately, then overlay them.
For a simplistic solution, you can extract the parts of the image, based
on the depth, and blur the individual parts appropriately before
overlaying them again.
The basic problems which be at the boundaries of the mask, such as
the two balls on the right. You want the blur to blur into parts which
are the same or lighter in color, BUT you don't want the lighter
depth parts of the image bluring into the darker (foreground) parts.
EG: with a single ball you want the ball to blur into the white
background, but not the white background into the ball (at least not as
much).
seperately, blur them appropriately, then overlay them.
For a simplistic solution, you can extract the parts of the image, based
on the depth, and blur the individual parts appropriately before
overlaying them again.
The basic problems which be at the boundaries of the mask, such as
the two balls on the right. You want the blur to blur into parts which
are the same or lighter in color, BUT you don't want the lighter
depth parts of the image bluring into the darker (foreground) parts.
EG: with a single ball you want the ball to blur into the white
background, but not the white background into the ball (at least not as
much).
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/