Please help me with Focal Blur

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

When you read this topic, what happened?

You knew what to do and helped me
0
No votes
You didn't know what to do and helped me anyway
0
No votes
You knew what to do but didn't care about me
0
No votes
You didn't know what to do and decidedly hate me for it
0
No votes
You couldn't care less about this poll
1
100%
 
Total votes: 1

User avatar
magick
Site Admin
Posts: 10691
Joined: 2003-05-31T11:32:55-07:00

Post by magick » 2004-05-31T19:08:26-07:00

You can simulate focus blur with ImageMagick 6.0.0 or later with this command:
  • convert rgbrender.jpg \( \( rgbrender.jpg -blur 10x5 \) depthchannel.jpg -compose copyopacity \) -compose over focus-blur.png
Just use parenthesis under Windows, no backslash is necessary.
Last edited by magick on 2004-06-01T06:36:45-07:00, edited 1 time in total.

User avatar
anthony
Posts: 8870
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

focal-blur

Post by anthony » 2004-05-31T19:29:39-07:00

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).
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
http://www.imagemagick.org/Usage/

Post Reply