Correcting an Archival Photo with a Photoshop Edge Mask

Beloved elfin inhabitants of santaDeke’s workshop, you guys have been so patient with us during the rift in the space-time-blog continuum that was caused by Photoshop Channels and Masks One-on-One (the book is that powerful). Although the book won’t be here in time to fill your holiday wishes, I thought I’d give you an early treat. One that might even help you make treats for others on your gift-giving list. There’s a great exercise in the new book about using an edge mask to sharpen an old photograph. Here’s a restored version of an old photograph of my grandparents out for a drive in a borrowed car in Vicksburg, Mississippi circa 1932. (Isn’t it awesome they wore their “riding clothes” to go for a ride in the car?) 

If you think it makes my swarthy, outdoor-loving (and incredibly cool, seriously) forebears look this good, wait ‘till you see how awesome it works for Deke’s pasty, indoor, serious, studio-lit kinfolk in the following tutorial.

Photographs from the pre-digital age, especially those fifty years or older, tend to contain grain, dust, and scratches. In this example, we’ll work on a 90-year-old photograph that features not only Deke’s maternal grandmother, but a lot of weathering from its 90-year existence that make standard Unsharp Masking out of the question. An edge mask helps you identify the true edges of objects in the image, ruling out the garbage. Creating an edge mask always follows the same basic pattern of steps, which are outlined here for this particular example, but can be altered for your family heirlooms as well.

Step zero: Scan the image if necessary.

Should you scan old photos in grayscale or color? These older photos are usually black-and-white, with maybe just a little sepia thrown in, so the question arises, is there any reason to scan them as RGB? The answer is yes. If you go with a color scan, you may find that the individual channels yield useful information for the restoration process.

Step one: Open an image.

Open Plains dwellers.psd, which is downloadable below if you want to follow along. As I mentioned, this is a family photo that Deke scanned from an old print. Our goal is to enhance the good detail without emphasizing the bad. The woman on the far right (the only one smiling, interestingly enough) is Deke’s maternal grandmother. The years have caused some damage, including dust and scratches—all of which is especially noticeable (and distracting) on the faces of the Dekian ancestors.

Step two: Duplicate the best channel.

We need to identify which channel is the best for our edge mask, and then duplicate that channel:

  • Go to the Channels palette.
  • Click the thumbnail for the Red, Green, and Blue channels in turn, and identify which one has the best edge detail.
  • Because the source is a monochrome image, there isn’t much difference, so we’ll use the “when in doubt” channel, Green. (By the way, for my sepia toned, outside lighting shot at the beginning of this post, the Blue channel worked much better.)
  • Drag the thumbnail for the Green channel to the icon at the bottom of the Channels palette to make a copy.
  • Double-click the name of the Green Copy channel, type “Edge Mask,” and press Enter or Return.

Step three: Increase the contrast in the Edge Mask channel.

This channel has dust spots and other clutter, so we’ll perform a basic cleanup by increasing the contrast with a Levels adjustment, which is generally speaking always your first step when creating an edge mask:

  • Press Ctrl+L (-L) to bring up the Levels dialog box.
  • For Input Levels, move the white slider triangle under the histogram to the left to 170.
  • This gets rid of much of the pockmark effect in the skin areas.
  • Set the black slider triangle to the right to 60.

Click OK to close the dialog box. As you can see, the contrast has been enhanced considerably, helping to clean up some of the garbage in the image.

Step four: Apply the Find Edges filter.

Our next step is to find the edges of the image. Choose Filter > Stylize > Find Edges. That’s it, there’s no dialog box. Photoshop just jumps right in and defines the edges in your image. The alpha channel now clearly defines the edges in the photo, complete with soft edge transitions. But also, as you can see, complete with five-o’clock shadows on everyone, including the children.

Step five: Invert the mask.

We need our edge mask to define the edges, but all the edges are currently black. Press Ctrl+I (Cloverleaf-I) to invert the Edge Mask channel, leaving white where the edges are, thus allowing them to be adjusted without affecting the rest of the image.

Step six: Apply the Maximum filter.

Next we’ll expand the edges in our mask so they cover a larger area along the edge borders in the photo. Choose Filter > Other > Maximum, set the Radius to 2 pixels, and click OK. The filter thickens the edges, as you can see here.

(By the way, if you want to extrapolate this technique to your own family heirlooms, you need to decide the setting for the Maximum filter on a case-by-case basis. After this step, however, the instructions I give you are directly related to the setting you entered here for any similar project.)

Step seven: Apply the Median filter.

The edges, being determined by square pixels after all, are a bit blocky. We can mitigate that square appearance with the Median filter. The Median filter takes neighboring pixels, averages their luminance levels, and—when all is said and done—rounds off sharp corners. Choose Filter > Noise > Median to bring up the Median dialog box. We need to apply the same setting for Median that we did for Maximum, so set the Radius to 2 and click OK.

Step eight: Blur the edges slightly.

The edges of our mask have some transition, but they need more. Choose Filter > Blur > Gaussian Blur (or if you’ve loaded dekeKeys shortcuts, you can press Shift+F7) to bring up the Gaussian Blur dialog box, shown here.

You always want the Gaussian Blur Radius to be 2 times the number of pixels you set during the Maximum/Median stages, so change the Radius to 4 pixels and click OK to apply the blur.

Step nine: Return to the Layers palette.

Now that we’ve built our edge mask, we can sharpen the image with the mask in place to constrain the effects. Press Ctrl+2 (Cloverleaf-2) to return to the RGB composite and switch to the Layers palette.

Step ten: Duplicate the Background layer.

We’re going to use the same sharpening technique we used in the density mask exercise earlier in this lesson. Click the thumbnail for the Background layer to make it active. Then press Ctrl+Alt+J (Cloverleaf-Option-J) to bring up the New Layer dialog box, name the layer “High Pass” (because that’s the filter we’ll apply), and click OK to create a copy of the Background layer. 

Step eleven: Apply High Pass sharpening.

Choose Filter > Other > High Pass (or dekeKeys shortcut Shift+F10) to bring up the High Pass dialog box. Set the Radius to 3 pixels and click OK. In the Layers palette, change the blend mode for the High Pass layer to Overlay using the pop-up menu. You can see that at this point the effect is not particularly strong.

Step twelve: Enhance the sharpening effect with Levels.

We’ll enhance the sharpening effect by increasing the contrast with an adjustment layer:

  • Alt-click (Option-click) the Levels icon in the Adjustments palette (second from the left in the top row.) If you’re working in CS3, hold down the Alt (Option) key and press the black/white icon at the bottom of the Layers palette, then choose Levels from the pop-up menu.
  • In the New Layer dialog box, name the layer “Amount” (because we’re going to adjust the amount of sharpening).
  • Turn on the Use Previous Layer to Create Clipping Mask check box so this adjustment layer will affect only the layer directly below (the High Pass layer). Click OK to create the new Levels adjustment layer.
  • In the Levels panel, move the black triangle below the histogram to 100 and the white triangle to 155. As you can see we have considerably enhanced the sharpening effect.

Step thirteen: Desaturate the sharpening effect.

The sharpening effect is actually enhancing some of the unwanted color variations in the image, so we need to desaturate the effect:

  • Click the thumbnail for the High Pass layer in the Layers palette to make it active.
  • Alt-click (Option-click) the Hue/Saturation icon in the Adjustments palette (second from the left in the second row). If you’re working in CS3, hold down the Alt (Option) key and press the black/white icon at the bottom of the Layers palette, then choose Levels from the pop-up menu.
  • Set the layer name in the New Layer dialog box to “Desaturate,” and click OK.
  • In the Adjustments palette, reduce the Saturation setting to –100 to completely desaturate our High Pass layer. Notice here a faint pinkish glow along the right sides of the subject faces (among other places) is now gone.

Step fourteen: Load the edge mask as a selection.

Now that we’ve created it, we can load the edge mask as a selection. Go to the Channels palette, and Ctrl-click (cloverleaf-click) the thumbnail for the Edge Mask channel to load it as a selection.

Step fifteen: Add a layer mask.

We can now use this selection to constrain the sharpening effect. In the Layers palette, click the thumbnail for the High Pass layer to make it active. Then click the Mask icon at the bottom of the layers palette to add a layer mask to the High Pass layer based on the active selection.

Step sixteen: Make the edge mask active.

Fine-tuning the sharpening effect calls for adjusting our edge mask. Click the layer mask thumbnail (not the image thumbnail) associated with the High Pass layer in the Layers palette to make it active. Hey, at this point, if you’re curious, turn on the USM 35/3/25 layer and see just how much better the edge mask technique worked compared to unsharp mask. Just promise to turn it off again quickly. Shiver.

Step seventeen: Fine-tune the sharpening.

Fine-tune the sharpening effect with a Levels adjustment applied directly to the edge mask:

  • Press Ctrl+L (Cloverleaf-L) to bring up the Levels dialog box.
  • To minimize the edges included in the edge mask (so fewer areas are sharpened), drag the black triangle under the histogram to the right to about 70.
  • To maximize the edges included in the edge mask (so more areas are sharpened), drag the white triangle under the histogram to the left to about 190.
  • Click OK to apply your changes and close the Levels dialog box.

Step eighteen: Reduce the sharpening effect.

Reduce the effect by pressing the 7 key to reduce the Opacity setting for the High Pass layer to 70 percent. Here’s the final restored family treasure.

Photoshop Channels and Masks One-on-One should be in stock in early January, just in time for your resolution to become awesomely educated about the intricacies and power of Photoshop masking.

Next entry:Macworld: No Steve but You Can Still Have Your Deke

Previous entry:The First-Ever Custom CS4 Palette

  • Sharpening Series

    Ah, I remember this from the Lynda.com Sharpening series Deke put out. Very powerful and not as tricky as it sounds. This is a hands on professional quality approach that photo companies charge a ton for. And it shows you the tricks that the auto features mess up. Sometimes the automated USM and SS can over look certain subtle results that pictures need and over sharpens them. Great lession that photoshopers need to learn.

  • The edge mask technique

    is brilliant! I saw Deke do it over 2 episodes at PSTV, and used it on an old photo of my great grandfather as a boy (c.1905), much to the delight of the family. :-D

  • Great stuff

    First i must say that you amazed me the first time i watched your Lynda.com tutorials. It’s funa to watch and you always explain bacground of the application.. this is why i like your tutorials.. i hate watching click here-get that-click here-get this…. so boring and so little you remember. I watched your Channels and mask from Lynda.com and almost everything i remembered in a first watch, simply amazing presenting skills. I just preordered your book on Amazon.com, too bad it’s not before Christmas but still can’t wait. I’m also doing effects and animations in after effects and your tutorials helps me alot to prepare my layers for compositing. Thanks and have a wonderful holidays. Regards.

  • Way to go, Col!

    This must have taken some time to do, screen captures and everything. Great job!

    Might I suggest not to blur the edge mask though; but blur the mask parametrically in the masking palet… er, panel. That way you can change your mind later if the mask is too soft.

    Fantastic tutorial. I have always been partial to using sharpening filters, especially since smart filters came out. But given that you and Deke seem to like the high pass technique so much, I think I just might give it another chance.

    -iVan


    __________________________________________________

    Who is General Failure and why is he reading my hard drive?

  • So simple!

    I have always loved high pass sharpening. But always feel like i’m the only one using it! Thanks for making me feel less crazy, now i’m off to howl at the moon!

  • Cool

    Ok.Study it and Try to be BEST!

    that’s real fantasy

  • I sense a contest, Deke

    Not sure how I missed it last time I looked at this post, but it just hit me that one of Deke’s ancestors in non other than Scott Glenn:


    Perhaps in a freak accident during shooting the “silence of the lambs”, a flux-capacitor from a different movie accidentally ended up being placed inside the inconspicuous-looking prop. :-) And poor and unsuspecting Scott Glenn found himself back in the early 1900’s, having to place himself in a photo shoot. A shoot that would reveal the tragic mistake and send us a message (as a result of a scrutiny only denizens of Deke.com would extend to an old photo like this). And hopefully someone from the good ol’ 21 Century could then extract him from this evil time and bring him back.

    This almost looks like a contest, doesn’t it Deke? Who could place your ancestral Scott Glenn back into the “future” image and make him belong.

    EDIT: actually, that would be 20th century when silence was filmed.

    __________________________________________________


    Who is General Failure and why is he reading my hard drive?

  • Enhancement to Planes Dwellers technique

    Excellent as this procedure is, I stumbled upon the following that makes the Planes Dwellers look even better.

    1.  Created a new Hue/Saturation layer with an inverse of the Edge Mask


    2.  Checked colorize & set Saturation to zero without adjusting Hue or Lightness
    3.  Changed the layer blend mode to Overlay
    4.  Adjusted opacity to taste (60% for me)

    5.  Moved this layer to the top of the stack

    The result was darker, less sepia-like color and reduced the spots in the faces, shirts, etc. even more

  • From a Mississipp Fan

    Deke, I’m happy to know there’s a little of Mississippi in you.
    I have enjoyed many hours of Deke training over the past few years.
    You have helped hone my skills in Photoshop beginning with CS up to CS4
    and Illustrator 8 up to CS4. It’s great to learn from the best!
    What’s so great is you laugh during your training making learning more fun! Again you’ve taken me to a new level of understanding with ...Correcting an Archival Photo with a Photoshop Edge Mask.
    Thanks from a Mississippi fan. Or to spell it like we say it…Miss’ippi.
    Bob Hamblin

    Jackson, MS

Be the first to drop some wisdom...