Sharper subject, blurrier background

A forum to ask questions, post setups, and generally discuss anything having to do with photomacrography and photomicroscopy.

Moderators: ChrisR, Chris S., Pau, rjlittlefield

rjlittlefield
Site Admin
Posts: 20987
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Sharper subject, blurrier background

Post by rjlittlefield »

In responding to a question by Stanley about sharpening, I mentioned that when working with compact cameras I often end up sharpening the subject, blurring the background, and controlling the transition between the two with a layer mask. This post is to illustrate how that goes.

The final version of the picture I'm working with in this post is shown full-frame HERE, image #3. It's a female black widow spider at the top of a piece of grass, with a distant landscape in the background.

Full-frame straight from the camera, except for resizing and a bit of level adjustment, this is what it looks like:

Image

This image has an interesting composition, to me anyway, but the subject is not as crisp as I remembered, and it doesn't separate very well from the background.

The solution is layers and masks. Here is the Photoshop layer pallette:

Image

The sharpened layer, with its mask shown in purple, looks like this:

Image

Here is a 200% crop, alternating between the original version and the sharpened & blurred version. (This is an animated GIF that's supposed to be switching between one and the other every 1.5 seconds.)

Image

Note that the sharpening and blurring are not dramatic effects, and they're not intended to be.

Actually there's supposed to be nothing that would make you think the picture had been altered.

But the result, again to my eyes, is that the spider pops out a lot better from the background, while at the same time the background retains enough detail to be recognizable.

Here again is the final version, full-frame:

Image

To alternate between the original and final versions as full frame, I suggest to open two tab panes in your browser, both viewing this same post. Scroll one pane to original version, the other pane to the final version, then click between the tabs.

Hope this helps.

--Rik

Stanley
Posts: 83
Joined: Sun Aug 02, 2009 2:34 pm

Post by Stanley »

Rik,

This is fantastic. I think that you have outdone even yourself. Very helpful and instructive.

Honestly, the entire photographic community owes you a debt of gratitude for your contribution to the state of knowledge in this field.

Stanley

Cyclops
Posts: 2979
Joined: Sat Aug 05, 2006 5:18 pm
Location: North East of England
Contact:

Post by Cyclops »

Good stuff Rik!
So do you carefully select around the edge of the spider and grass stem then cut and paste that into a new layer?
Canon 30D | Canon IXUS 265HS | Cosina 100mm f3.5 macro | EF 75-300 f4.5-5.6 USM III | EF 50 f1.8 II | Slik 88 tripod | Apex Practicioner monocular microscope

ChrisR
Site Admin
Posts: 8557
Joined: Sat Mar 14, 2009 3:58 am
Location: Near London, UK

Post by ChrisR »

That one's come up pretty well imho, Rik. I've done it a lot, and it isn't always easy to get the balance right. Often a second opinion, or another look a day later, is valuable.
What you've shown is how to get a really good effect without making it look obvious or artificial.
On a 14" screen, it looks fine.

A note*of caution to those dashing into photoshop to have a go, though.
It isn't easy to DO.
I'm using a 30" screen, which is rather unforgiving.
"Making Selections in Photosop", could fill a book. It's quite time-consuming, and difficult, to get what you need. Stanley and others, do Google for tutorials on how to do it, as there are many ways. To keep the tutorials short though, they all tend to adopt one technique, and you'll need more. I'd recommend mastering the pen tool, often starting off with the magnetic lasso tool to get roughly what you need. Convert it to a path and you can alter it with the pen tools, then convert back to a selection.
(There are many additional techniques, such as graduating the blur up the frame, so more distant objects appear further oof.)

Even then the transition, eg between dark spider leg and beigy background will cover a number of pixels, so deciding where to put the division isn't trivial. Having done that, the selection area usually has to be feathered. If you underdo or overdo that step, you're going to see some sort of halo around or within the part you've selected, in the result. This is one of the difficulties. It's one of those areas where, once you've experimented, you start to see artifacts more, in more of other people's (as well as your own)work.
"In the spirit of mutual improvement", as Rik might say, look at the leg of the spider which is furthest upper left in the picture. There's a light halo- line to the left. Check the animated gif and you'll see it isn't there in the original.
That appears to be a lightness/darkness sharpening effect.
Another sort of overlap you can get is where the mask didn't quite fit. Look at the leg furthest lower right, and you'll see a bit of dark background on the animated gif which has got sharpened, which shouldn't have done.
Actually look harder at the very end of that leg and you'll see a light halo, with a dark halo beyond it, along the side of the leg.
The final pic is slightly different.

Inevitably the forground shape - spider here, will vary slightly in outline sharpness, so the degree of feathering in the selection will need to vary too. There's no automatic way to do that, so you'll have to go round the edges of the final picture with the blur and sharpening tools, and possibly a paintbrush and clone tool as well. The only way I've found it works for sure is to do the editing at several times the magnification you need the print to be.

* was it Mark Twain who wrote, "I'm sorry this is a long letter, I didn't have time to write a short one"?!

rjlittlefield
Site Admin
Posts: 20987
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

Cyclops wrote:So do you carefully select around the edge of the spider and grass stem then cut and paste that into a new layer?
No, each layer always contains the whole image. The mask selects what shows. I construct the mask with a combination of select-and-fill, and painting with a brush.
ChrisR wrote:look at the leg of the spider which is furthest upper left in the picture. There's a light halo- line to the left. Check the animated gif and you'll see it isn't there in the original.
That appears to be a lightness/darkness sharpening effect.
Another sort of overlap you can get is where the mask didn't quite fit. Look at the leg furthest lower right, and you'll see a bit of dark background on the animated gif which has got sharpened, which shouldn't have done.
Actually look harder at the very end of that leg and you'll see a light halo, with a dark halo beyond it, along the side of the leg.
The final pic is slightly different.
Excellent analysis, and completely correct -- good eyes, Chris!

The light halo-line is due to sharpening an edge that was already quite strong -- black spider against light tan grass. (Is there a Photoshop filter now that sharpens without creating such halos?) I look for such things, and if I find any that bother me, I'll do something to get rid of them. A bit of cloning with a tiny soft brush at high magnification does wonders, but it's tedious. In this case, I wasn't bothered, so I left it.

The sharpened background that shows when it shouldn't is of course due to the mask not being precisely fit to the subject. It's easy to see that this is the case by looking at the purple mask. There are "large" areas of background between the leg and the silk strand that are not masked at all. This is a matter of how much time I was willing to take. For a souvenir photo, I decided to not take more time tuning up the mask.

The light halo with a dark halo beyond it may be due to what is often the most troublesome problem with this technique. The problem is that in the blurred image, regions near the subject are not pure background but rather incorporate some colors and tones from the subject. The blurring filter doesn't know what's what, of course, so it just mixes everything together. What this means is that if the mask fits too closely to the subject, then you get another form of halo. So it's a bit of dilemma: fit the mask too close and you get this halo, fit it too loosely and you see sharpened background. To attack this problem, it is possible to "paint out" the subject on the layer to be blurred, before doing the blur. Someplace in the forum archives is a posting by someone else who describes this technique. I've never cared enough to take the time to do it.

"The final pic is slightly different." Yes -- great eyes! Because I was originally preparing only a souvenir photo, I was even sloppier than you see in the presentation above. When I cropped and enlarged the image for presentation in this thread, I saw some problems that were so blatant as to be distracting. (There was, for example, a large hole in the mask, right over a dark area of the spider's abdomen.) So I fixed those problems. The fixes are incorporated into the illustrations of the mask and the animation, but not into the "final" image, which is actually re-displayed from several weeks ago at the bottom of the posting. I thought about replacing that image with a current final, but since it was very late at night, I opted not to. I'm glad now that I did not -- it makes a nice point for discussion.

--Rik

"I have made this letter longer than usual, because I lack the time to make it short (Je n'ai fait celle-ci plus longue parceque je n'ai pas eu le loisir de la faire plus courte)" ~Blaise Pascal, Lettres Provinciales (1656-1657), no. 16. The discussion at quoteland was interesting to me.

AndrewC
Posts: 1436
Joined: Thu Feb 14, 2008 10:05 am
Location: Belgium
Contact:

Post by AndrewC »

Tim Grey's DVDs are good instructional material for selecting and working with layer masks. Just wish I was patient enough to use all the techniques.

Andrew

Post Reply Previous topicNext topic