An Advanced Selection Technique Using Apply Image
Jul 19th, 2007 by Leo A. Geis
Consider the screen capture below (click image to enlarge):
A short explanation of the situation:
- This image of McCall, Idaho and Payette Lake was shot in July, 2007, during fire season. The smoke and haze are painfully obvious, even after my standard image preparations (Adjustment Layers: Levels/Global Contrast, Curves/Screen, and Curves/Hard Light Layers).
- The image is a 16-bit 12.8MP aRGB capture.
- There are two iterations of the Image Layer-something I do as a matter of prudence in certain situations. The pink Fill Layer at the bottom aids in setting transparency in the upper Layers-turn off Layer 0 by clicking on the eye icon and any transparency introduced into Layer 1 will be biased pink.
- There is insufficient Contrast in any of the Channels for a standard selection technique to quickly and/or accurately isolate the sky or the mountains.
The nature of the haze problem is easily criticized in the Local Histogram:
My standard repair for haze (which will be developed at length in subsequent posts) is to Paint the Gray/Soft Light Layer with black (or dark amber when compensating for a blue haze) using a Brush and relatively low opacity (e.g. 20%), applying additional Brush strokes to compound the effect as desired. Gaussian Blur is used to soften and blend the effect as desired.
While this all sounds very complicated and tedious, it is actually very rapid. I use Actions (Button Mode) to set up my image process Layers in a single click, my Brush at 100% Hardness to obviate the processor load produced by Softening the Brush during the Painting, and apply Gaussian Blur of approximately 30% of the Brush size to the entire Layer when complete. The entire process to this point, including the opening of the image, typically runs less than 20 seconds.
In this particular image, my intent is to use a more sophisticated resolution for the haze, which will require that I select portions of the image based upon aggregate luminance-that is, the total luminance of R, G, and B per pixel, and avoid a per-Channel selection technique.
The fundamental steps in this technique are to apply a Layer Mask by selecting the Image Layer and clicking the Apply Layer Mask icon at the bottom of the Layers Palette, then the image itself is then applied to the Layer Mask by selecting the Layer Mask (Alt-Click on the Layer Mask and it will be displayed in the Document Window) and navigating Image> Show All Menu Items (in CS3)>Apply Image. At this point (after clicking OK in the Apply Image Dialogue Box) you have a Layer Mask as shown below:
Consider that the Layer Mask allows any area Masked by white to show through, while any areas Masked by black are blocked. Any areas masked by intermediate shades of gray will be blocked proportionally. By clicking on the image icon in Layer 1, you’ll return to a presentation of the actual image in the Document Window, and by clicking on the eye icon in Layer 2 you’ll see pink in various proportions where the Image Layer is Masked:
The real power in Apply Image used to build a Layer Mask is in the wide latitude you are provided to customize the Layer Mask. These options begin in the Apply Image Dialogue Box:
By checking the Invert box, your Layer Mask will block the highlights and allow the areas of lower luminance through-exactly the opposite of our initial application. This is a very powerful capability that can be used to coarsely mimic HDR image preparation using varied exposures. It is also possible to apply a discreet Channel in order to account for or introduce a luminance bias into the Layer Mask. Various Blending Modes can be invoked to provide positive control over the conversion-the opportunities are almost limitless and quickly elevate into very advanced ChOps (Channel Operations).
Ctl-Click on a Layer Mask and it will appear in the Document Window, allowing a wide range of manipulations including:
- The use of Threshold (Image>Adjustments>Threshold) to produce effective Selections above or below a particular luminance level.
- The use of Curves to specify a range of luminance selections:
In this case-using Curves-I have specified that the Mask allow only aggregate luminance pixels between ~60 and ~128 to be unmasked. This can also be accomplished using a Gradient Map orĀ the Levels Dialogue box: You’ll need to Apply Image to the Layer Mask, set your Luminance range, expert the Layer Mask as a new Document, Convert it to 2 bit, then re-Apply Image it to a new Layer Mask. A bit tedious, but accurate to the pixel.
- Drawing or Painting shapes, Blurring those shapes, and the use of various Filters (particularly Minimum and Maximum) on the Layer Mask.
- Apply Image may be employed over existing modifications in a Layer Mask. For example, if you have Masked an element using Threshold so the Layer Mask is binary (either black or white Pixels), you may still Apply Image over it to produce a gradiated Mask on other image elements.
Obviously, using Apply Image to build Masks is an extremely powerful tool-what you have been exposed to here is barely scratching the surface. Consider that Alpha Channels may be Masked, Masks may be reconstructed into RGB Image Layers, and that Blending Modes may be applied during Apply Image.
L



