Two Focus Method?

Garry Ziffer

Member
Messages
35
Reaction score
0
Location
Wayland, MA, US
I'm pretty much a newbie at retouching but am wondering if the following has ever been implemented.

I want to select a complicated foreground so I can blur the background or whatever. However I find magnetic lasso, Corel Knockout and Extensis Mask Pro way too tedious. If I take two identical pictures of a scene, but one focused on the foreground and one on the background, shouldn't there be enough information between the two pictures to precisely determine what is in the foreground? (or the background of course)

Ideally it would be nice to have a plugin to do this but if that doesn't exist, perhaps a simple Photoshop procedure. I've searched the forum and Google for this, but with no luck. Am I missing something obvious?
Garry
 
Gary,

Not quite following what you want to do, but I THINK I do. Are you just wanting to blur a background of a photo??? Realizing that you say the foreground is complex, I assume you mean hair, trees, etc. Am I correct??

Try posting the photo, and let us see what you are talking about, and exactly what you want to do. Then we can work from there.
I'm pretty much a newbie at retouching but am wondering if the
following has ever been implemented.
I want to select a complicated foreground so I can blur the
background or whatever. However I find magnetic lasso, Corel
Knockout and Extensis Mask Pro way too tedious. If I take two
identical pictures of a scene, but one focused on the foreground
and one on the background, shouldn't there be enough information
between the two pictures to precisely determine what is in the
foreground? (or the background of course)
Ideally it would be nice to have a plugin to do this but if that
doesn't exist, perhaps a simple Photoshop procedure. I've searched
the forum and Google for this, but with no luck. Am I missing
something obvious?
Garry
--
Brian Randall
 
I'm pretty much a newbie at retouching but am wondering if the
following has ever been implemented.
I want to select a complicated foreground so I can blur the
background or whatever. However I find magnetic lasso, Corel
Knockout and Extensis Mask Pro way too tedious. If I take two
identical pictures of a scene, but one focused on the foreground
and one on the background, shouldn't there be enough information
between the two pictures to precisely determine what is in the
foreground? (or the background of course)
Ideally it would be nice to have a plugin to do this but if that
doesn't exist, perhaps a simple Photoshop procedure. I've searched
the forum and Google for this, but with no luck. Am I missing
something obvious?
Garry
i dont think two photos would help
you still would have the problem of separating the foreground from the back

if you mean aplugin that could "read" the amount of blur and extract on that basis, i think such a thing would be technologically immensively difficult to create, and there is no such plugin that i've heard of

feivel
 
Brian,

You're absolutely right. I want to blur the background when the foreground has hair, trees, flowers, etc.

In the first example below, I would just like to show the flowers on their branches, with the background completely blurred. In the second example, I want to take out the branches or blur them even more than they are.





Garry
Not quite following what you want to do, but I THINK I do. Are you
just wanting to blur a background of a photo??? Realizing that you
say the foreground is complex, I assume you mean hair, trees, etc.
Am I correct??

Try posting the photo, and let us see what you are talking about,
and exactly what you want to do. Then we can work from there.
I'm pretty much a newbie at retouching but am wondering if the
following has ever been implemented.
I want to select a complicated foreground so I can blur the
background or whatever. However I find magnetic lasso, Corel
Knockout and Extensis Mask Pro way too tedious. If I take two
identical pictures of a scene, but one focused on the foreground
and one on the background, shouldn't there be enough information
between the two pictures to precisely determine what is in the
foreground? (or the background of course)
Ideally it would be nice to have a plugin to do this but if that
doesn't exist, perhaps a simple Photoshop procedure. I've searched
the forum and Google for this, but with no luck. Am I missing
something obvious?
Garry
--
Brian Randall
 
O.K. Now were down to it. Lets see what we all can do for you. Some will be better than others, but give me a few hours and I'll see what I can do. At least now we totally understand what you are trying to do.

Be back soon.




Garry
Not quite following what you want to do, but I THINK I do. Are you
just wanting to blur a background of a photo??? Realizing that you
say the foreground is complex, I assume you mean hair, trees, etc.
Am I correct??

Try posting the photo, and let us see what you are talking about,
and exactly what you want to do. Then we can work from there.
I'm pretty much a newbie at retouching but am wondering if the
following has ever been implemented.
I want to select a complicated foreground so I can blur the
background or whatever. However I find magnetic lasso, Corel
Knockout and Extensis Mask Pro way too tedious. If I take two
identical pictures of a scene, but one focused on the foreground
and one on the background, shouldn't there be enough information
between the two pictures to precisely determine what is in the
foreground? (or the background of course)
Ideally it would be nice to have a plugin to do this but if that
doesn't exist, perhaps a simple Photoshop procedure. I've searched
the forum and Google for this, but with no luck. Am I missing
something obvious?
Garry
--
Brian Randall
--
Brian Randall
 
Garry...Perhaps I don't understand you challenge, but one simple method is to take your photo, make a duplicate layer and either add a gaussian blur of your choice to either the background or the duplicate layer. Should you add the blurr to the background, then add a mask to the top dup layer (click the square with a circle in it to apply a mask to that layer). The foreground color should automatically be black and the background color should be white. Pick a soft edge brush and paint in the amount of blur wherever you would like it. If you miss, switch the foreground color to white and paint backin the detail. If it is the reverse, blur the top layer, add the mask and paint in the detail. It will take some time, magnification, and select brush sizes but this is a very direct simple way to accomplish what you may want....Dave
http://www.pbase.com/davidjaseck/photographs
I'm pretty much a newbie at retouching but am wondering if the
following has ever been implemented.
I want to select a complicated foreground so I can blur the
background or whatever. However I find magnetic lasso, Corel
Knockout and Extensis Mask Pro way too tedious. If I take two
identical pictures of a scene, but one focused on the foreground
and one on the background, shouldn't there be enough information
between the two pictures to precisely determine what is in the
foreground? (or the background of course)
Ideally it would be nice to have a plugin to do this but if that
doesn't exist, perhaps a simple Photoshop procedure. I've searched
the forum and Google for this, but with no luck. Am I missing
something obvious?
Garry
 
O.K. I'm no dummy, so I picked the easiest one first. Here is my attempt at the pinecones. See if this is what you are after.
Before:



After:



I will try the more difficult one tonight at home, when I have time to play.
I'm pretty much a newbie at retouching but am wondering if the
following has ever been implemented.
I want to select a complicated foreground so I can blur the
background or whatever. However I find magnetic lasso, Corel
Knockout and Extensis Mask Pro way too tedious. If I take two
identical pictures of a scene, but one focused on the foreground
and one on the background, shouldn't there be enough information
between the two pictures to precisely determine what is in the
foreground? (or the background of course)
Ideally it would be nice to have a plugin to do this but if that
doesn't exist, perhaps a simple Photoshop procedure. I've searched
the forum and Google for this, but with no luck. Am I missing
something obvious?
Garry
--
Brian Randall
 
i dont think two photos would help
you still would have the problem of separating the foreground from
the back
if you mean aplugin that could "read" the amount of blur and
extract on that basis, i think such a thing would be
technologically immensively difficult to create, and there is no
such plugin that i've heard of

feivel
--
chas... PBase supporter... Minolta D7Hi, Sony DSC P71, Sony DSC S70
 
Yeah, that's perfect, but I really wasn't trying to give you guys a challenge. It just occurred to me that even with masks, there's an awful lot of diddling involved. I was wondering whether it was mathematically possible to take two images focused at different distances and by subtracting one from the other (or some other operation) let the computer determine the boundary between one plane of focus and the other.
Garry
O.K. I'm no dummy, so I picked the easiest one first. Here is my
attempt at the pinecones. See if this is what you are after.
 
This would involve a Java Application, and a bit of programing, a dSLR, lenses with shallow DOF, and patience.

Here's how that would be done: A camera, mounted on a tripod, with a shallow depth of focus, would be set to expose 10 or more sequenced shots. I guess this would be called a focus-bracketed set. Focuses would vary from very close to infinity, in logical steps, all with the same effective brightness.

The subject would need to be fairly stable. If done outside, there should be little to no wind. The subject would also need to be fairly static - no rapid movement of people, etc.

The resulting shots would be all be loaded sequentially into the viewer. Using a slider, each view would then appear. The user could vary the effective focus, and choose which focus depth shot to view. Presumably, two shots could be gradually blended to achieve an almost infinite variability of apparent focus.

The programmed engine for this would need only to be a bit more sophisticated than a slide show viewer, but be aware of some blending algorithms as in photoshop.

If cameras, in the near future, could fire off focus bracketed shots fast enough (say, 10 within 1/30th second), then conceivably, a 3D type alterable focus effect could be attained with a 1-lens system. Speed and storage needs to be advanced 10x to 20x for this. Give it a few years.
  • David
Garry Ziffer wrote:
Yeah, that's perfect, but I really wasn't trying to give you guys a
challenge. It just occurred to me that even with masks, there's an
awful lot of diddling involved. I was wondering whether it was
mathematically possible to take two images focused at different
distances and by subtracting one from the other (or some other
operation) let the computer determine the boundary between one
plane of focus and the other.
Garry
O.K. I'm no dummy, so I picked the easiest one first. Here is my
attempt at the pinecones. See if this is what you are after.
 
Hi Garry.

I like your idea. Good thinking!

I made some progress I think...

This is what I tried:

1. Open up your pine-picture in Gimp.
2. Used Edge-detect (laplace) and desaturate.

This gives me a grayscaled image with thin lines where the detail is sharp and clear (i.e. where the image is in focus).
3. Used levels to increase the "whiteness" of the edges
4. Blurred (radius something like 40??)
5. Invert image
6. Levels again

Now the image is a grayscaled blurred mask with black areas where the image is sharp.
7. Open the original image again and duplicate layer.

8. Use the "mask" as a layer mask and blur the top layer with any amount of blur you want for the background.

This is what I got:



It's more like a One focus method, but using two pictures, it should be able to increase the sensitivity of the region to be blurred.

If you want, you could post two example images as you have described then we could give it a try.

BR,
Lars
I'm pretty much a newbie at retouching but am wondering if the
following has ever been implemented.
I want to select a complicated foreground so I can blur the
background or whatever. However I find magnetic lasso, Corel
Knockout and Extensis Mask Pro way too tedious. If I take two
identical pictures of a scene, but one focused on the foreground
and one on the background, shouldn't there be enough information
between the two pictures to precisely determine what is in the
foreground? (or the background of course)
Ideally it would be nice to have a plugin to do this but if that
doesn't exist, perhaps a simple Photoshop procedure. I've searched
the forum and Google for this, but with no luck. Am I missing
something obvious?
Garry
 
thanks Chas for pointing it out
it wasnt a typo
i thought immensively WAS a word (it's not)

now, you have to pay the price

do you know or can you guess the difference between the words propitious and auspicious?

you can phone a friend or ask the studio audience, but no other online or offline reference tools may be used

feivel
 
Hi Lars,

Thanks for your reply.As I said, I'm a novice at retouching, so I'm not a good judge, but it sounds like your technique may avoid detailed painting and erasing of masks. Have you tried this on the pink flowers picture, it's a lot tougher than the pine cones.

Unfortunately I haven't taken any pictures at two focus settings yet since I didn't know if the idea had any merit. That's why I posted here to see what the experts had to say. Hopefully they'll see your posting as well.

By the way, your picture doesn't show up in your posting. However when I reply, I can see the URL for it. Strange.
Garry
I like your idea. Good thinking!

I made some progress I think...

This is what I tried:

1. Open up your pine-picture in Gimp.
2. Used Edge-detect (laplace) and desaturate.
This gives me a grayscaled image with thin lines where the detail
is sharp and clear (i.e. where the image is in focus).
3. Used levels to increase the "whiteness" of the edges
4. Blurred (radius something like 40??)
5. Invert image
6. Levels again
Now the image is a grayscaled blurred mask with black areas where
the image is sharp.
7. Open the original image again and duplicate layer.
8. Use the "mask" as a layer mask and blur the top layer with any
amount of blur you want for the background.

This is what I got:



It's more like a One focus method, but using two pictures, it
should be able to increase the sensitivity of the region to be
blurred.
If you want, you could post two example images as you have
described then we could give it a try.

BR,
Lars
I'm pretty much a newbie at retouching but am wondering if the
following has ever been implemented.
I want to select a complicated foreground so I can blur the
background or whatever. However I find magnetic lasso, Corel
Knockout and Extensis Mask Pro way too tedious. If I take two
identical pictures of a scene, but one focused on the foreground
and one on the background, shouldn't there be enough information
between the two pictures to precisely determine what is in the
foreground? (or the background of course)
Ideally it would be nice to have a plugin to do this but if that
doesn't exist, perhaps a simple Photoshop procedure. I've searched
the forum and Google for this, but with no luck. Am I missing
something obvious?
Garry
 
Garry...Perhaps I don't understand you challenge, but one simple
method is to take your photo, make a duplicate layer and either add
a gaussian blur of your choice to either the background or the
duplicate layer. Should you add the blurr to the background, then
add a mask to the top dup layer (click the square with a circle in
it to apply a mask to that layer). The foreground color should
automatically be black and the background color should be white.
Pick a soft edge brush and paint in the amount of blur wherever you
would like it. If you miss, switch the foreground color to white
and paint backin the detail. If it is the reverse, blur the top
layer, add the mask and paint in the detail. It will take some
time, magnification, and select brush sizes but this is a very
direct simple way to accomplish what you may want....Dave
http://www.pbase.com/davidjaseck/photographs
I use this same method and it has always worked well.

You can also vary the amount of blur on several different duplicate layers for a more realistic effect.

To switch quickly from foreground to background color when painting or erasing the mask, use the X key. Vary the opacity and create a very soft brush when working around edges. It's best to "sneak up on" the edges between blurred and sharp areas of the image by using a very low opacity with lots of strokes to give yourself more control.

Some images will be such that a halo will develop if there is a lot of tonal contrast between the sharp and blurred areas. In this case, it's better to do a rough selection first, cut out, and put the sharp foreground subject on it's own layer.

After you make your selection, hit command (mac) control (PC) J to cut and paste the foreground to a seperate layer, then, after blurring, invert the selection, and hit Command/control J again to cut out the background on it's own layer. This should solve the halo problem. Now do the mask.

--
Brad Oaks
Pbase supporter
 

Keyboard shortcuts

Back
Top