PDA

View Full Version : Secrets for making perfect selections in CS2


Photogurl10
17th of May 2007 (Thu), 09:34
I always have trouble making perfect selections in cs2 - especially on trees or hair and other objects that don't have very defined edges. Can you all share your techniques? Thanks!

tim
17th of May 2007 (Thu), 10:21
My technique is to take the photo properly to start with, selections involving hair are near impossible.

Photogurl10
17th of May 2007 (Thu), 10:22
My technique is to take the photo properly to start with, selections involving hair are near impossible.

I make every attempt to get photos as close to perfect at first capture but unfortunately it doesn't always come out the way I'd like. Thanks for your insight...

simply amazing
17th of May 2007 (Thu), 10:22
quick mask mode

René Damkot
17th of May 2007 (Thu), 11:39
Have a look at Russel Browns (www.russellbrown.com/tips_tech.html)tutorial called "Advanced Background Extraction".

Photogurl10
17th of May 2007 (Thu), 13:06
thanks - i really appreciate your help!

PacAce
17th of May 2007 (Thu), 14:45
Learn to use the Pen tool and it'll take you a long way to being able to fine tune your selections. It's not an easy tool to learn to use but once you've mastered it, you'll find it to be a very versatile tool.

simply amazing
17th of May 2007 (Thu), 14:59
Learn to use the Pen tool and it'll take you a long way to being able to fine tune your selections. It's not an easy tool to learn to use but once you've mastered it, you'll find it to be a very versatile tool.
the pen tool is probably THE most annoying tool to learn. but like Pac said, once you learn how to use it, it'll help you out a lot

René Damkot
17th of May 2007 (Thu), 15:46
Hahaha, guess you guys haven't watched that video?
It uses a combination of a path and the extract tool ;)

theflyingkiwi
17th of May 2007 (Thu), 18:43
and if you don't already have one, get a pen. Something like this (http://www.wacom.com/productinfo/)can help even more so,

goatee
18th of May 2007 (Fri), 05:16
Otherwise, get software like Vertus Fluid Mask, or mask pro - both are designed to help knock out backgrounds, but work in quite different ways.

Photogurl10
18th of May 2007 (Fri), 11:34
and if you don't already have one, get a pen. Something like this (http://www.wacom.com/productinfo/)can help even more so,

thanks all - I have a graphire 4

I've used the extract filter several times but find that I often must erase parts of the selection at the edges

I was just wondering if there was some trick to make it easier...

brandicm
18th of May 2007 (Fri), 13:58
I just checked out the Russell Brown website suggested in an earlier post and was wondering if his scripts work in RAW files or do they have to be jpeg? They look interesting.....

René Damkot
18th of May 2007 (Fri), 14:16
The scripts work in PS, not ACR. So tif, psd or jpg, or a lot of other formats. Not CR2.

Titus213
18th of May 2007 (Fri), 21:12
http://av.adobe.com/russellbrown/AdvancedMasking.mov

DrPablo
18th of May 2007 (Fri), 21:41
Using channels to make perfect masks is my trick. There are some other tricks as well. This is a tutorial I wrote for lightcafe.net.

(Part 1)

The ability to make complex and precise selections is required if one wants to differentially edit one's images. For example, if you have a photo of someone in the shade of a tree, but in front of a bright, sunlit landscape, the color cast on your subject will be quite different than that of the background. Making a global color adjustment could benefit one part of the image but hurt another.

Furthermore, making very precise selections allows you to combine differently edited versions of the same RAW image, or to combine a series of exposures that were bracketed for complex or high contrast lighting conditions.

Many have you have watched hours of your life trickling away as you struggled with the lasso, magnetic lasso, magic wand, and other selection tools. But can you really use these to select individual hairs or leaves?

Fortunately, for many images, the selection has already been made for you. It is merely incumbent upon you to extract them!

The principal we will employ in this tutorial is that of exploiting differences between different regions of a photo. This tutorial is geared towards those who use Adobe Photoshop, but it will certainly work in other programs. For those who use Photoshop Elements, I will provide some pointers that will allow you to perform similar techniques.

Now, we recognize an 'object' in a photo because it contrasts with its surroundings -- its color and lighting differ sufficiently from its surroundings that we recognize its shape. In order to select this object, we need to maximize these contrast relationships.

Here is a photo that I've recently taken of a baobab tree in Senegal. The tree is too dark, but if I adjust the curves or levels the sky becomes too bright. So I would like to perfectly select the tree so that I can modify the tree and the sky independently of one another. But believe me, there isn't time in my life to select the tree, complete with twigs and leaves, yet avoid selecting the little bits of sky, using Photoshop's selection tools.

http://www.pbase.com/drpablo74/image/61614598.jpg

To select the tree most easily and precisely, we need look at the Channels. In RGB images, there are three channels: Red, Green, and Blue. All are grayscale images, which, when combined, constitute a color image in the RGB color space. In the Red channel, objects that are very red appear light, objects very cyan (red's opposite) appear dark. In the Green channel green appears light and magenta appears dark. In the Blue channel blue appears light and yellow appears dark. Thus it is often predictable which channel will display the most contrast. Nonetheless, it is easy to go to the channels in Photoshop and see which one in which your subject is the most prominent.

There are other color spaces in Photoshop besides RGB. Lab color, for instance, uses three channels: Lightness, which contains all the tonal (light-dark) information in the picture, and two color channels. The a channel is a spectrum from green (negative) to magenta (positive), and the b channel is a spectrum from blue (negative) to yellow (positive). Neutral tones (shades of white and gray) occupy the midline of the a and b channel.

The CMYK channel is often used for printing, as it mimics the inks used on many printers: cyan, magenta, yellow, and black. It is a small color space, and generally not a good space to use for image editing. It can, however, be a good source of grayscale versions of your photo.

Below you can see all the various grayscale images that exist in the Photoshop color spaces. Once a useful channel is identified, you can make a duplicate of it and then play with curves and levels to increase its contrast, as illustrated in the b channel below.

http://www.pbase.com/drpablo74/image/61614599.jpg

Now, it appears that the Blue channel in RGB is the best choice for us to use in selecting the tree. This makes sense! In the blue channel the blue sky will be lightest, and the tree, which has some yellow and red elements, will be darkest. So we go to the channels, duplicate the blue channel, then use the curves as illustrated to drive the light areas to white and the dark areas to black. We then can take the paintbrush to paint away stray light pixels in the dark area and vice versa.

http://www.pbase.com/drpablo74/image/61614600.jpg

Amazing -- 2 minutes of work and I have a perfect mask of the tree. And I didn't need to touch the lasso or magic wand.

Another way to do this (attention Elements users) is with the Channel Mixer. This and curves are available as free plug-ins for Elements. Make a duplicate of your background layer. Then open the Channel Mixer and hit 'monochrome'. Play with the different channels until you get a grayscale image that best illustrates the difference between your desired selection and its background. Then use curves or levels to drive it to a black and white selection.

Now what if I want to separate the tree from the grass? For instance, I want to take the trunk of the tree and paste it onto my neck (not illustrated). There is indeed a difference between the tree and the ground as well. We find it in the Black channel in CMYK. By duplicating the channel and steepening the curves we get a nice image that separates the tree from the ground.

http://www.pbase.com/drpablo74/image/61614601.jpg

I now copy this modified channel, go back to RGB, create a new channel, and paste it in. Important note: One can convert freely between RGB and Lab without loss of image quality. CMYK, however, is a much smaller color space, and you can throw away color information by switching to this color space. To avoid this, it may be useful to open a second copy of your image. Alternatively, use the Convert to Profile option instead if Image>Mode>CMYK or RGB, to best preserve the appearance of your original image.

In order to combine the nice tree selection with the new channel, separating it from the ground, I paste them on top of the image as new layers. I then lower the opacity of the blue layer to 50%, allowing me to see where the channels differ from one another. I then simply erase. There are other ways to do this using the calculations function, but this is beyond our scope today.

http://www.pbase.com/drpablo74/image/61614602.jpg

Let's now go back to our first mask (the modified Blue channel), which will allow us to separate the tree and ground from the sky. I copy this channel to the clipboard. I then create two new curves adjustment layers. Adjustment layers (which can be used for curves, levels, hue/saturation, or several other functions) appear with a white box next to them, in which you can mask away the function from part of the image. Alt-clicking on the layer mask (this may be command-click on the Mac) opens up the layer mask, into which we can paste the mask of the tree. I paste it into both adjustment layers, and invert it on one of them. What I've done is create one layer that blocks out the sky (the sky is black and everything else white) and another that blocks out everything else.

To smooth the transition between the different adjustment layers, I run a soft Gaussian blur on each of the masks. Because there is considerable fine detail, I run the blur at only 0.7 pixels. This nicely merges the transition between the adjustments and avoids unnatural appearing transitions. I can now modify the tree at will without fear of affecting the sky. When that's done I can fine tune the sky.

http://www.pbase.com/drpablo74/image/61614603.jpg

You can see that the final image looks natural and took mere minutes to complete!

http://upload.pbase.com/image/68562000.jpg

DrPablo
18th of May 2007 (Fri), 21:42
(Part 2)

Here is another trick to make selections when there is a complex background. This is a picture of some boys in Senegal. The background, of course, is quite complex. To make a mask, I choose the blue channel, then run the high pass filter (under Filters>Other>High Pass). This filter highlights the edges in the image and turns everything else gray. I ran it at a radius of 2.5 pixels, but each image should require a different amount. I then open levels and scrunch the sliders together to magnify the contrast. Because the edges are so prominent I can now easily erase the background to white and the selection to black.

http://www.pbase.com/drpablo74/image/61614605.jpg

Once the selection is completely black, I go back to the original image, make a new layer, and paint it an unrealistic color (this mint green). By applying the mask to it, I can now easily see where the borders of the boys are well done and where they are not. For instance, I can see that in making my mask I forgot to include the space beneath the right arm of the boy on the left. I use the brush to clean it up and make a perfect mask. A very soft Gaussian blur will slightly soften the border.

This green background can very easily be selected and deleted (select color, or the magic wand using a low tolerance, like 4). I can also use the cleaned up mask to selectively edit the boys or change their background.

http://www.pbase.com/drpablo74/image/61614604.jpg

Now this tutorial was billed for making selections, but everything I've written about thus far has been instruction in making a mask. Lucky for us they're the exact same thing. Every time you make a selection, using the lasso, for instance, Photoshop automatically creates a mask that perfectly corresponds to your selection. If the lasso is feathered (softening the edge pixels), then Photoshop's mask will have completely opaque pixels in the middle and partially opacified pixels on the outside. If you create a mask as described above, just go to the channels palette, select the mask, then hit the button "load as selection" (it looks like a dashed circle) -- the mask will then appear as a selection over your image, which you can copy or cut to your heart's content.

Masks like this have innumerable uses. You can use them to transfer yourself to a new background, for instance. Have a photo with a bland sky? Create a mask in which your sky is white and the rest of the photo black. Then paste an image with a dynamic sky on top, using the mask to allow only the new sky to show through. The mask will also allow you to adjust the lighting and color cast of the new sky so that it is consistent with the image to which it is being added.

Trying to select individual hairs with a lasso might drive you to pull your own hair out. Experiment with these techniques and discover how effectively and efficiently you can make precise selections.

theflyingkiwi
18th of May 2007 (Fri), 21:52
http://av.adobe.com/russellbrown/AdvancedMasking.mov

amazing but true :)

nice link and I even learned something new today.

thanks

Titus213
18th of May 2007 (Fri), 22:43
amazing but true :)

nice link and I even learned something new today.

thanks

:lol:

Polekat
18th of May 2007 (Fri), 22:55
Drpablo, thanks for those instructions. I'll definitely give them a try.

Tsmith
19th of May 2007 (Sat), 00:41
The selection tool in CS3 is a vast improvement over previous versions.