Skip to content

Choosing Sides Part 1: Using Luminosity Masks to Fix Halos

August 26, 2012

Luminosity masks serve as a way to select specific tones in an image for adjustment, usually in an effort to help develop an image in the photographer’s personal style. Beyond the artistic applications of tonal adjustments and exposure blending, luminosity masks can have more practical uses as well. Fixing edges is an example. There are several pixel manipulation activities that can alter edges within an image to the point that they look unnatural. Sharpening is perhaps the best example. While there are several ways to control the sharpening process, unintended halos or unnatural “crispness” can still occur. Halos can also sometimes happen when blending exposures for high dynamic range (HDR) scenes using automated processes. The algorithms for these programs sometimes select pixels from the wrong exposure in areas of fine detail. This can result in halos that can be either subtle or obvious depending on the chosen settings for the program.

The usefulness of luminosity masks to remove halos generated by automatic HDR-blending programs was brought to my attention by Bruce Leander. One of his blended images is shown below and is used with his permission. A properly exposed foreground that includes the tree and the grass would overexpose the sky, so a second exposure that properly exposes the sky but underexposes the foreground has been blended in so that now both the sky and the foreground have proper color and detail. However, there is also now some subtle haloing between and around the fine branches and leaves of the tree. The automated blending program retained texture well in the branches and the leaves, but also apparently chose the nearby lighter pixels of the foreground exposure for the areas between the branches (instead of choosing the properly exposed sky pixels) thus causing overexposure in these areas. The result is a noticeable lightness in amongst the branches and surrounding the tree—a halo.

Bruce Leander's original image

Halos of this nature are easily handled with luminosity masks. Since there is excellent tonal separation at these haloed edges, it’s simply a matter of selecting the light side of the edge and darkening it.

The first step is to make all the Lights-series luminosity masks on the Channels panel, click them successively, and see which one is white or gray in the haloed areas while being black in the tree parts. Either the Light Lights or Bright Lights mask looks like it would work. I usually prefer using the more restrictive mask (the one that has the fewer selected pixels when loaded as a selection) when there there is more than one to choose from, which would be Bright Lights in this case. This luminosity mask is shown below.

Bright Lights mask

The next step is to make an adjustment layer (Curves or Levels works) and set the layer’s blending mode to Multiply. This darkens the entire image way too much (image below). In doing so, however, the haloed area has been darkened to a level that would be nearly appropriate for original image.

Multiply blending mode

Now invert the white Reveal All mask on the adjustment layer to make it black instead of white (Windows: Ctrl+I / Mac: Command+I). It is now a Conceal All mask as shown in the layer stack below. The normal haloed image returns.

Layers with Conceal All mask

Load the Bright Lights mask as a selection (Windows: Ctrl+click on it in the Channels panel / Mac: Command+Click) and hide the marching ants.

Click on the Conceal All layer mask to make it the painting surface. Choose the Brush tool. Set the foreground color to white and the opacity to something around 75 to 100 percent.

Now paint over the haloed parts of the image. The brush strokes add white paint through the Bright Lights selection to the layer mask revealing the darker pixels of the Multiply blending mode adjustment layer. Continue painting the halo until it pretty much disappears. Multiple brush strokes are necessary to create the proper reveal.

Below is what the painted mask looks like. As a reminder, painting through the Bright Lights selection, even with a relatively large brush, protects the leaves and branches from receiving paint and therefore from being darkened by the adjustment layer. Since the branches and leaves are completely black in the mask, no white paint lands on them when painting through a selection of the mask. The sky between the branches, however, is non-black in the mask and the selection does allow these non-black areas to receive paint creating white in the painted mask. This reveals the Multiply blending mode of the adjustment layer and darkens the sky between the branches accordingly.

Painted mask

Below is the image after the painted mask reveals the Multiply blending mode of the adjustment layer. Rolling the mouse over the image shows how it originally looked with the halo. (It may take a few seconds for the rollover image to appear.) The halo has been significantly and appropriately darkened and the leaves and branches have maintained their tone and texture. The adjustment looks completely natural as it blends in perfectly to the rest of the image.


While this method removes much of the halo, some areas between the branches still remain too bright. Bruce’s method for dealing with halos is to paint black onto a new layer at low opacity, which works nicely to gray-down these still too-bright areas so they are less obvious. The painting, of course, is done through a luminosity mask (the same Bright Lights mask works) to make sure the paint lands on just the bright areas of sky without darkening the tree limbs or leaves.

An even more elegant solution for darkening these remaining bright areas of sky is to paint with a sampled color that matches what is desired in these areas instead of using black paint. With the Brush tool active, simply choose a color from an appropriate part of the sky (Windows: Alt+click on the desired color / Mac: Option+click) and then paint with it in the bright areas through the Bright Lights selection. This provides both the correct color and correct darkening to the remaining areas that are too light. The image below includes this final touch-up. The rollover shows the previous version with just the painted mask.


Below is how the layer stack looks for this image once the halo reduction is complete.

Final layer stack

Bruce Leander as agreed to allow the use of the jpeg of the original image for those who would like to practice this technique. It can be downloaded here. Right click the image that shows up in the web browser, save it, and then open it in Photoshop. Many thanks to Bruce for sharing his expertise and image with a larger audience.

Finally, just a quick note on an update to the tutorials on my website. I recently added a video on how to install and use a new custom Photoshop panel to run the various actions. The video can be found at the bottom of this page.

7 Comments leave one →
  1. John Paquette permalink
    August 26, 2012 9:49 pm

    Tony, a very good article and I plan to make very good use of the process. John.

    Like

  2. Charles Gervais permalink
    August 27, 2012 3:56 am

    Thanks. A particularly excellent tip, Tony. Makes it well worth the evangelizing I’ve been doing on your behalf for your actions 🙂

    Cheers!

    Charles

    Like

  3. August 27, 2012 8:01 am

    Great article as always! Well done!

    Vangelis

    Like

  4. Irfan permalink
    August 27, 2012 5:21 pm

    thanks Tony

    Like

  5. Arturo S. Ramirez permalink
    August 27, 2012 11:41 pm

    Thanks so much for this very helpful article.

    Like

  6. Güner permalink
    September 2, 2012 3:04 am

    Excellent explanation Tony.

    Like

  7. September 2, 2012 9:30 am

    I have definitely bookmarked this one Tony. Thanks. I hate halos!

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: