The next task involves another masking and selection tool, the Extract command. This command can make some difficult selectionsin this case, some feathery marsh grasses and a spear of a foxtail plant.The Extract command provides a sophisticated way to isolate a foreground object from its background. Even objects with wispy, intricate, or undefinable edges can be clipped from their backgrounds with a minimum of effort.You''ll start with an image that consists of only one layer. You must be working in a layer to use the Extract command. If your original image has no layers (that is, it has only a Background), you can duplicate the image to a new layer.NoteThe foxtail grass image has the same resolution as the egret image, 72 ppi. To avoid unexpected results when combining elements from multiple files, you must either use files with the same image resolution, or compensate for differing resolutions. For example, if your original image is 72 ppi and you add an element from a 144-ppi image, the additional element will appear twice as large. For information on resolutions, see "Pixel dimensions and image resolution" in Photoshop Help.
Extracting an object from its background
Applying an extraction erases the background area to transparency, leaving just the extracted object. You''ll use the Extract command on a foxtail grass image, which is set against a dark background. This command opens the Extract dialog box, where you''ll highlight the edges of the object, define the object''s interior, and preview the extraction. You can refine and preview the extraction as many times as you wish. 1. Click the Go to Bridge button () to jump to Adobe Bridge, locate the Foxtail.psd image file in the Lessons/Lesson07 folder, and double-click its thumbnail preview to open it in Photoshop.2. Choose Filter > Extract.The Extract dialog box appears with the Edge Highlighter tool () selected in the upper left area of the dialog box.If needed, you can resize the dialog box by dragging its bottom right corner.3. On the right side of the dialog box, locate the Brush Size option, and then type or drag the slider to 20 pixels, if necessary.[View full size image]You can select a brush smaller than 20 pixels, but it''s not necessary. The beauty of the Extract function is that it distinguishes between the light-colored stem and the dark background, so a few extra background pixels won''t affect the results.4. Using the Edge Highlighter tool, do both of the following:Drag to highlight the stem of the foxtail grass and the single leaf. (The highlighting will extend beyond the edges of the stem and leaf.)Drag all the way around the tip of the foxtail, covering the entire area around the fuzzy edges of the grass. Make sure that the outline forms a closed shape around the entire tip area.NoteIt''s OK if the highlight overlaps the edge. The Extract command makes its selection by finding the difference in contrast between pixels. You do not need to highlight areas where the object touches the image boundaries.If you make a mistake and highlight more than desired, select the Eraser tool () in the dialog box and drag over the highlight in the preview.5. Select the Fill tool (), under the Edge Highlighter tool, and click inside the outlined foxtail tip to fill its interior. (You must define the object''s interior before you can preview the extraction.)The default fill color (bright blue) contrasts well with the edge highlight color (green). You can change either color if you need more contrast with the image colors using the Highlight and Fill pop-up menus in the Extract dialog box.6. Click the Preview button to view the extraction, and do one of the following:If you are satisfied with the results, click OK to apply the extraction.If you want to refine the extraction, select Original in the Show menu, and check both the Show Highlight and Show Fill boxes. Continue to work with the tools in the Extract dialog box to add to or erase areas of the selection until you create a satisfactory result. (You may need to preview the results after you adjust the highlighting.) Then click OK.The Extract dialog box closes and the image window displays the extracted area. (This may be difficult to see because the color is pale and does not stand out well against the checkerboard pattern that indicates transparency.)
Refining a selection in the Extract dialog box
To refine your selection, edit the extraction boundaries using these techniques:Switch between the Original and Extracted views using the Show menu.Click a filled area with the Fill tool to remove the fill.Select the Eraser tool () and drag to remove any undesired highlighting.Select the Show Highlight and Show Fill options to view the highlight and fill colors; deselect the options to hide them.Zoom in on your selection using the Zoom tool. Then, use a smaller brush size as you edit, switching between the Edge Highlighter tool and the Eraser tool as needed for more precise work.Toggle quickly between the Edge Highlighter and Eraser tools when one of them is selected by pressing B (Edge Highlighter) or E (Eraser).Switch to a smaller brush by entering a different size in the Brush Size option, and continue to refine the selection border using the Edge Highlighter tool or to erase using the Eraser tool.
Adding the extracted image as a layer
It''s time to add the extracted image to the egret image. 1. With the foxtail image window active, use the Move tool () to drag the image to the right side of the egret image. The foxtail is added as a new layer to the egret image.2. Close Foxtail.psd without saving changes. The 07Start.psd file is now the active file, and the new layer with the foxtail, Layer 1, is selected.3. Zoom out so that the egret image covers only about half of the height of the image window.4. Choose Edit > Transform > Scale. Then, drag a resize corner handle, holding down Shift to constrain the proportions, until the foxtail is about two-thirds its original size. Position the cursor inside the box and drag to move it in the image window, if necessary. Press Enter (Windows) or Return (Mac OS) to apply the scaling.5. With Layer 1 still selected, decrease its Opacity in the Layers palette to 70%.6. Choose File > Save.
Extracting by forcing the foreground
The Force Foreground option lets you make intricate selections when an object lacks a clear interior. 1. Use Adobe Bridge or the File > Open command to locate the Weeds.psd image in the Lessons/Lesson07 folder and open it in Photoshop.2. Choose Filter > Extract.3. On the right side of the dialog box, under Extraction, select the Force Foreground check box.[View full size image]You''ll start by selecting the color on which to base your selection. The Force Foreground technique works best with objects that are monochromatic or fairly uniform in color.4. Select the Eyedropper tool (), and then click a light area of the weeds to sample the color to be treated as the foreground.5. Select the Edge Highlighter tool () and set the brush size to 20 or 30, either by typing or dragging the slider for Brush Size on the right side of the dialog box.6. Drag to highlight the wispy tops of the weeds where they overlap the dark background. When the weeds'' edges are completely highlighted, highlight the top third of the weeds fully. The highlight should be solid.Highlighting weed edgesSelecting top third of weeds7. At the right side of the dialog box, choose Display > Black Matte.A black matte provides good contrast for a light-colored selection. For a dark selection, try the Gray or White Matte option. None previews a selection against a transparent background.8. Click the Preview button to preview the extracted weeds.[View full size image]9. Refine the extraction if necessary using the techniques described on page 207, and preview the results using the Show pop-up menu and the Show Highlight and Show Fill options.10. When you are satisfied with the selection, click OK to apply the extraction. All pixels on the layer outside the extracted object are erased to transparency.Once you''ve extracted an image, you can also use the Background Eraser and History Brush tools to clean up any stray edges in the image.An alternative method for making intricate selections is to select areas by color. To do so, choose Select > Color Range. Then, use the eyedropper tools from the Color Range dialog box to sample the colors for your selection. You can sample from your image window or from the preview window.
Adding the forced-foreground extraction as another layer
You can now add the extracted weeds to the egret image. 1. With the Weeds.psd file active, use the Move tool () to drag the extracted selection to the egret image. Position the weeds so that they fill the bottom third of the egret image.The selection is added to the egret image as a new layer.2. In the Layers palette, decrease the opacity of the new layer to 70%.3. Choose File > Save.4. Close the Weeds.psd file without saving changes.