|
All photographs and articles on this web site are
Copyright © Eric R. Jeschke
(contact info
Site designed for screen resolutions of 1024x768 or greater. You may wish to maximize your browser for best viewing. |
|
GIMP Resources for Photographers
Home | Tutorials | Ask the guru | Mailing list | Flickr Forum Support | Translations | Fan Mail | Download | FAQ Adjust gamma |
| Before | After |
|---|---|
|
|
|
Since I don't actually own a "real" chroma key background, I
used my house as a substitute. A real chroma key background
should work even better than this.
|
|
||||
|
Might as well get the bad news out up front. I know of no
perfectly simple, repeatable technique for one-click selection
of complex subjects (like a person) in a photograph. There
may be products (like Knock-out for Photoshop) that make easier
work of things, but even under the most controlled contitions
this is usually a multi-step affair. That said, the GIMP
provides some decent tools for getting the job done, and with a
little practice you should be able to get this part down to a
few minute exercise. I've done precious little of this kind of
selection and it only took me a few minutes, so take heart.
The key to doing this with a near constant color background that is different from the subject is to make good use of the fuzzy selection (aka "magic wand") tool, followed by judicious use of quick mask to touch up the selection.
Double-click on the magic wand ( |
|
||||
| Now begin an iterative process of adding to the selection. What you want to do is hold down the SHIFT key and click again on an area of the background that didn't get selected, but should have been. The SHIFT tells the GIMP to add the new selection to the previous one. In the previous step you can see that there are a couple of areas under each arm and by the neck where the boy's shadow caused the color to deviate enough that the first fuzzy select didn't pick it up. Clicking once on the neck shadowed area while holding down the SHIFT key results in the selection is shown at right. It's pretty darn good. There are areas of the boy selected that shouldn't be, but I'll clean those up next. In this case, one additional selection was enough; you may need to repeat for additional areas. |
|
||||
|
Now to manually touch up the selection. For this the Quick Mask
tool is the ticket. Convert the selection into a quick mask by
clicking on the little red square in the bottom left corner of
the image window. You should see something similar to that
shown at right.
Think of a quick mask as just another way to view/manipulate a selection. The parts that are not selected are shown in a red tint. To change the selection, just paint onto the image with black or white: black for no selection, white for selection. You will see that instead of painting actual black or white, you get red-tinted or not. (Side note for the curious: selections, channels and masks are all really just 8-bit grayscale images! The difference is that normally you don't see them that way. Knowing that, however, lets you understand how to manipulate them using the ordinary GIMP toolset.)
Looking at this quick mask I can see that I've got a pretty
great selection and just need to remove some parts of the boy
that were selected. I pick a largish, fuzzy brush from the
Brushes dialog (Shift+Ctrl+B), click on the Paint tool
( With just a little practice you can fix up a selection like this in a few minutes. When you are done it should look something like that shown at lower right. |
|
||||
|
Now convert the quick mask back to a selection by clicking on
the little selection button just to the left of the quick mask
button in the lower left corner of the image frame. You should
see the image switch back to the "marching ants" selection
outline.
Now invert the selection (Ctrl+Ior Selection/Invert). This makes the selection the subject rather than the background. At this point you can feather the selection if you wish. I did not do so here. Finally, copy the selection (Ctrl+C). |
|
||||
|
If you don't need to resize or do any other work on the image
being pasted, proceed to the next step.
Otherwise, do a New (Ctrl+N) and go with the defaults, except choose "Transparent" as the fill type. In the new image, Paste (Ctrl+V) and Anchor the image in the Layers dialog. Now manipulate the image as necessary (e.g. Image/Scale), then Select All (Ctrl+A) and Copy (Ctrl+C). In this case I didn't need to do anything special to the pasted image. |
|
||||
|
Open the new background image (Ctrl+O).
Open the Layers dialog (Ctrl+L) and make sure that the new
(background) image is listed in the drop-down box. Right-click
on the Background layer and select New Layer (there is also a
button for this in the bottom button bar of the Layers dialog
( Here I named the new layer "Subject". Choose "Transparent" for the fill. |
|
||||
|
Go to the new image window containing your desired background
and Paste (Ctrl+V).
Choose the Move tool
( Voila! Finished image. |
|
For this kind of fine paint work, a pen tablet like this Wacom
one is very useful. For photo retouching you don't need
any bigger than a 4x5 model.
Last modified: Fri Dec 19 00:10:34 HST 2003
|
|