Where to find the writing of Harley and Diane Pebley

Showing posts with label PhotoEditing. Show all posts
Showing posts with label PhotoEditing. Show all posts

Monday, May 19, 2008

How to fake a miniature in Corel's Paint Shop Pro Photo XI

I first saw fake miniatures (aka tilt-shift effect) on my friend Rich Legg's blog last year. Since then I've had it in the back of my mind to try it out. At a recent Photowalking Utah event I saw the perfect shot and took it. (Apparently I wasn't alone in my assessment.)

When I finally got around to doing the post-processing, I couldn't find a good, complete tutorial for Paint Shop Pro XI, so I decided to write up what I did. None of this technique is really original to me, but I did have to do some searching and adapt what I found elsewhere in a couple places. Hopefully, having this consolidated will help someone else.

First, a brief overview. The idea is to trick the brain's perception of the image to think it's looking at something smaller than it actually is. This is done by changing the queues the brain uses to gauge size. To start, this technique works best where the perspective is from above, looking down on the main scene. Secondly, we emulate a narrow depth of field, typical of macro shots. Finally, we boost the color saturation and decrease some detail, typical of models.

And a couple house keeping notes:

  • Click on any image to see a larger view.
  • The specific adjustment values given in this tutorial work well for this image. They may need to be adjusted for differently sized or exposed images.


We'll start with this original.
1 Original
As already stated, we want something where we're looking down on a scene that's fairly well exposed. This was taken from the 12th level of a parking structure looking down on a large construction project.

The first adjustment will be to make it appear to have a limited depth of field. To do this, select the rectangular selection tool and set the feathering to a large value. For this image, I used 150 pixels.
2 Rectangle select setup

Then select the area of the image that should be in focus plus extra for the feathering. The area needs to be large enough that the feathering does not come into the area that should be sharp.
3 Initial selection

Next invert the selection by pressing Ctrl-Shift-I or selecting Invert from the Selections menu.
4 Inverted selection

Now we're going to blur the selection by selecting Gaussian Blur from the Adjust menu's Blur options. We want a number large enough to give a good blur but not enough to make all the details go away completely. For this image, I used a radius of 13.
5 Gaussian blur option 5a Gaussian blur result

We're done with the selection, so press Ctrl-D or select Select none from the Selections menu. Now select Edge preserving smooth from the Adjust menu's Add/Remove Noise options. The idea here is to get rid of some of the details inside objects without losing the edges. For this image, I used a smoothing about of 12.
6 Edge preserving smooth option 6a Edge preserving smooth result

Next we're going to boost the saturation a fair bit. Select Hue/Saturation/Lightness from the Adjust menu's Hue and Saturation options. We don't need to change the Hue or Lightness values, so they can be set to 0. The Saturation value for this image I set to 30.
7 HueSatLight options 7a Saturation result

Finally, we adjust the contrast some by selecting Curves from the Adjust menu's Brightness and Contrast options and set two control points to give a standard contrast increasing S-curve.
8 Curve options

All this results in this final image.
9 Final

Saturday, March 1, 2008

Save my son: The miracle of selective image adjustments

One of my regular haunts for photographic hints, tips and information is Digital Photography School (aka DPS). Recently in their forums, one of the members asked for us to Save my son. He had a photo of his son with a common problem: a bright, overexposed background and a dark, underexposed foreground. In this article, I'll show one technique for dealing with this problem. The screen shots and textual descriptions are based on Corel's Paint Shop Pro (referred to later as PSP), but the basic workflow should work with any image editor software that supports multiple layers.

In general, what I'm going to introduce here is the idea of selective adjustments. This is a powerful technique that can be used to produce many effects. (My friend Ann Torrence is a master at using selective adjustments to get very creative images as can be seen here, here , here and here.) In this case we won't get as creative as Ann does, but rather use selective adjustments to get an image where the main subject is better balanced with the background.

First, here's the original image. (Click on any image to see a larger view.)
1 Original

The first thing I do with any image is to make sure the histogram is adjusted correctly.[1] For the most part, I like the histogram to stretch from the left to the right. As can be seen below, this image has a small empty spot on the right side, so I've adjusted the white slider down. When this is applied, the brightness values in the image will be expanded such that what is now between the dark and light sliders will take up the entire histogram instead of part of it. Since only the light slider is moved down, the brightness values for the entire image will be shifted towards the right, making the entire image a bit brighter.
2 Histogram adjustment

Here's what the image looks like after this adjustment.
3 After histogram

There's only a subtle change but it makes the image use the entire dynamic range of the color space rather than just part. This is a better starting point for the rest of the edits.

The next step is to make the foreground lighter. In the case of this image, the goal is to improve the exposure of the boy. For now, I'm going to ignore the background. In the process of making the boy brighter, the background will be blown out even more than it is. I'll deal with improving this in subsequent steps.

To accomplish this lightening, my choice is to use a curve adjustment layer. It could be done with a brightness adjustment layer, but that would adjust everything equally. Using curves provides greater control, allowing some parts of the image to be brightened more than others.

In PSP, this is done by right clicking the layers window and selecting New adjustment layer and then Curves. This pops up a dialog box where the curve can be specified. I set the value like this:
4 Foreground curves

The curve above results in this image:
5 After curve adjustments

We can now see the boy's face and expression. The problem is the background is mostly blown out and is over-powering the boy. While we can see him, the image is still out of balance. This is because the adjustment was on the entire image. What is needed is for the background to be adjusted independently of the boy. This is where the selective adjustment comes in.

If you look at the adjustment layer in the layers window, there is a white block. This is the mask for this layer. Whatever is white has the adjustment applied completely. Whatever is black has no adjustment done. Various levels of grey can be used to partially apply the adjustment if desired.

The masking is done by first making sure the adjustment layer is selected and then using the paintbrush tool to paint in black on the image where the mask should not be applied.[2] I used a fairly large brush with a really soft edge to paint on the background. Then I made the brush smaller to paint around the details. Usually I use a pretty soft brush so there's a gradual transition from where the effect is applied to where it isn't. The harder the brush, the faster the transition. Fast transitions tend to be more obvious to the eye and less natural.

Here's what the mask looked like when I was done:
6 Curve masking

And here's what the image looked like:
7 After curve masking

The boy still has the same exposure as before, but now the background is the same as after the adjusted histogram. This is better than the original, but I think the background is still too intense.

To adjust just the background, right click on the adjustment layer in the layers menu and select Duplicate. This causes the same adjustments to be applied again, making the image way too bright. This is just temporary. Next, making sure the new adjustment layer is selected, on the Selections menu select Select all (or press Ctrl-A). Now on the Image menu select Negative image. This causes everything that was black on our mask to become white and everything that was white to become black. In essence selecting just the background.

Now the curves need to be edited so instead of brightening they darken. This is done by right clicking on the new layer and selecting Properties from the pop-up menu. This will cause the curves dialog we saw earlier be displayed.

Before the image was brightened by adjusting the curve up and to the left. Now it'll be darkened by adjusting the curve down and to the right as shown here.
8 Background curves

As expected the background got darker. Some halos showed up at the transition between the two masks. This was fixed with a bit of touch-up using the paintbrush tool, resulting in this final image:
9 Final

This technique can be used on just about any effect to selectively change parts of an image. If your photo editing tool supports layers but not adjustment layers, the same technique can be used by duplicating the image layer, applying the effect to it and then using the erasure tool to eliminate the areas which should not have the effect.

Here are a couple of my own images that I've recently used similar techniques on to improve them over the originals (click on them for a larger view):
80k volt electron microscopeCoffee shop venueFarmington Bay


1. The histogram is a chart showing the various brightness levels of an image. The horizontal axis along the bottom is read left to right and represents the various brightness values possible. The very left side represents black and the very right side represents white with all the levels of grey in between. Bars exist at each location along the horizontal axis and their height indicates how much of the image is at that brightness level.

2. If the adjustment layer should only be applied to a small area of the image, the bucket tool can be used to paint a black mask and then the paintbrush tool can be used to paint in white only on those parts that should be adjusted.