Image Processing

Warning: Historical Page

I started my digital photography career with PaintShop Pro 7, because as I say below, it is almost as good as PhotoShop and a whole lot cheaper. Sometime after I had purchased by 2nd digital camera, my Nikon Coolpix, I decided to step up to PhotoShop. The reasons were similar to why I moved from FrontPage to Dreamweaver for my HTML editor. PhotoShop is the market leader. It does more, but equally if not more importantly, there is a lot more in the way of resources to help me leverage it.

I've kept this page for those who want to see how to do it in PaintShop Pro, which is still a fine program for a lot less money than Photoshop. It also does a lot of things more easily than PhotoShop, such as redeye removal, although I haven't compared it to Elements. While I don't use it any more, I will remember it fondly. It was my roots in the photo processing world.

If you want to read about how to do this stuff in PhotoShop, check out my brief article on it.


For my image processing needs I use PaintShop Pro 7, mostly because it is almost as powerful and much cheaper than Adobe's Photoshop. I've yet to find something I can't do with it, though the downside is that there is far more information, not to mention useful add-on software, that works with PhotoShop. Maybe someday I'll switch.

My Standard Routine

I follow a pretty fixed routine when processing my photos. PhotoShop users are fond of calling these routines a "workflow". Mine goes something like this:

Download the photos from the camera. I have a compact flash reader called Zio! that I prefer to connecting a USB cable to my computer. In fact, I actually wore out the cable before I got a Zio!, and then found I liked it a lot better.

Save them in my archival photo folders. I keep original, unretouched photos in my archive, which is basically the "My Pictures" section of the "My Documents" folder.

Select which ones I want for the web site, and copy them to the appropriate web site folders. I select which photos I want to put on my web site, and copy them to the appropriate folders for my site. This way, when I modify them in PaintShop Pro, I still have the original in the archives.

Load them up in PaintShop Pro 7.

A raw image (except for resizing--it was MUCH bigger from the camera!)

Rotate. I can't tell what the heck is going on if a photo is on its side, so I get this out of the way right up front.

Crop. The first step is cropping. I find that I don't automatically compose my pictures well, and cropping really helps my composition. Generally, when looking through the viewfinder, I allow too much unneccesary background into the picture. A little cropping fixes this right up.

Cropped to just what's interesting--the kids...

Histogram. This is what the PhotoShop crowd calls "Levels". Basically, the histogram is a way to adjust the overall brightness and make sure the image uses as much of the full range of brightness levels as possible. Setting the histogram involves dragging the three triangular pointers below the graph. Typically, I drag the left one to the right to the first "bump" in levels, and the right one to the left until I find the first "bump" in levels. Next, I adjust the middle, making full use of the preview feature. My goal is to bring out as much of the detail hiding in shadows as possible without making the brightest parts of the picture wash out.

Not much adjustment needed--right (white) triangle set to first levels moving left, left (black) triangle was okay, now dial in middle (gray) until you can see some shadown detail...

Adjusted with histogram...

Adjust color balance. Next, I look at the color balance. On some days and in some conditions, the photos can look a little too blue. On rarer occasions, they'll be too warm. PaintShop's automatic tool for this makes fixing the problem easy.

Adjust saturation. I like to play with saturation. It makes everything pop in the picture, and to me it helps take away the flat 2-dimensional effect that photos often seem to have. Consequently, I punch it up as much as I can before it starts looking unnatural.

More saturation puts life into the skin tones...

Resize. We're almost done. I resize, usually so that all the photos on the page will have the same width, so I'm usually sizing to a particular number of pixels in width. If not that, then often I'll resize based on percentage, for example to create a thumbnail.

Sharpen. Last step. I'm told by many photo tutorials that you always save the sharpening until the end. I use the Unsharp Mask version, which has the most flexibility. Typical settings would be radius 1.5, strenth 150, and clipping 1.

I probably over-sharpen, but I love to see the details pop...



Special Recipes

Lightening Shadowed Images

Before: A great picture of the family and a big grouper at Atlantis in the Bahamas--but you can't see them!

I loaded the image and tried my normal Histogram tuning. Adjusting Gamma helped a bit, but it wasn't enough to finish the job, so I did this instead:

1. Effects | Enhance Photo | Automatic Contrast Adjustment, settings Lighter, Normal, and Flat.

2. Effects | Enhance Photo | Clarify, strength 5.

3. Effects | Enhance Photo | Manual Color, select Kathy's nose area, and try Caucasian Normal.

4. Effects | Unsharp Mask, settings 2, 50, 10. This removes some of the noise the other steps introduce.

5. I cranked up the color saturation a bit to inject a little more life and got this much improved result:

After: Cropping and a little magic and now we can see everyone very well...

Low Light Noise: Simple Fix

I seem to take a lot of distance shots in low light. My flash won't carry that far, so I just turn it off. The problem is, low light pictures are often very noisy. It looks like "grain" on the image. To combat this, I will often apply a little bit of Gaussian Blur before I downsize the image to its desired size. I then sharpen again with unsharp mask after resizing. Seems to work wonders on the noise problem.

Low Light Noise: More Effective Fix

My friend Steve Kahn pointed out a good refinement to my blurring technique. It turns out that a lot of the noise in digicams is concentrated in the blue channel. We can use PaintShop's (or PhotoShop if you prefer) Split Channels function to get black and white images for red, green, and blue. You can then tailor the blurring to knock out noise in just the channels you're interested in. I tried this, and while I still had to blur the red and green, it was much less blurring. You can recombine the channels, resize, and sharpen, and I think the end result is better (albeit more labor intensive) than with the generic blurring. Here's a sample:

All channels blurred...

Blurring individually tweaked on each channel, with most done on blue channel...

JPEG Artifacts and Optimization

If you're reading this, you know most of my photos wind up on the web rather than being printed on paper. Almost all the images are jpeg, which means they undergo lossy compression. I've noticed that given my image processing preferences, I can wind up with really nasty jpeg artifacts. Consider this image:

Bad jpeg artifacting in top right corner of blue sky: looks like grain...

It's a real drag to take a pretty picture and get those grain effects marring the pretty blue skies of Maui. At first I thought it was just over compression. The photos come off the camera in jpeg with a 4:1 compression ratio (the "fine" setting on my Nikon Coolpix 5700), and show no such artifacts. Saving in my image editor produces this effect after I get done processing. I verified with a friend that Adobe PhotoShop will also produce this effect. I also verified that lowering my compression to 4:1 did not make it go away, though it did make the image a lot larger!

Why does this happen? First, the CCD is producing some noise in that featureless blue sky. I love to boost color saturation, and this makes the problem worse. If you Google on "jpeg artifact sky saturation" Sharpening will also make it more painful. Let's take a look at the same image resized and saved with the same defaults but with no sharpening or saturation:

Resize only with no saturation or sharpening = no artifacts!

So what's the deal? Do we have to forgo the saturation and sharpening to get rid of the artifacts? Turns out not. All jpegs are not created equal. There is such a thing as jpeg image optimization that tweaks the results to reduce artifacting. The really complex optimizers can apply different settings to different areas of the image for maximum quality at minimum file size. JASC Paint Shop Pro 8 adds more options in its jpeg optimizer that let me finally overcome the problem. The secret is a new option called "Chroma subsampling". There are a ton of options and I have no clue which is best without trying them. Using "YCbCr 2x2 2x1 2x1" got this relatively artifact-free result with 4:1 compression:

Much better!

As an interesting aside, I read a lot of web articles. One in particular claimed PhotoShop's default on this, 1x1, is really a bad choice for increasing artifacts and recommends fiddling with it. Supposedly most other programs, including PaintShopPro default to 2x2, which is better, but I still had to fiddle to get happy.

Instant Water Color Effect

1. Load the image into PaintShop Pro.

2. Do a Layers | Duplicate.

3. On the Layers palette, right click the copied layer. Set its Blend Mode to Darken.

4. Apply a "Gaussian Blur" to the copied layer using a strength between 5 and 10.

Voilá, instant water color:

Make any photo into a water color cartoon!

Pen and Ink Art

Convert a photo to look like pen and ink art.

1. Effects | Noise | Edge Preserving Smooth, strength about 25.

2. Unsharp Mask: 1.5, 150, 1.

3. Window | Duplicate

4. On the duplicate: Effects | Noise | Edge Preserving Smooth, strength about 25. Effects | Sharpen | Sharpen More. Effects | Edge | Enhance. Effects | Edge | Trace Contour. Colors | Grayscale. Now we have a line mask in the duplicate.

A line mask for our pen and ink exercise...

5. Go back to the original image. Layers | Duplicate. Use the Layers palette to make the Background layer the active layer.

6. Select Flood Fill tool, and set background color to black. In the Tool Options palette set Blend to Normal, Match to None, and Opacity to 100. Click the image. This creates a flood fill of black, which you won't see immediately, but which will be useful with the mask we created.

7. Make the "Copy of Background" Layer the active one. Bring up the Masks | New | From Image... dialog, and select for parameters the line mask image, Source Luminance, and uncheck the Invert Mask box.

8. Do one or two Edge | Enhance operations and you're done!

How about having a family portrait made?


Back to Digital Photo Home...

All material 2001-2006, Robert W. Warfield.