DPChallenge: A Digital Photography Contest You are not logged in. (log in or register
 

DPChallenge Forums >> Tips, Tricks, and Q&A >> Post Processing Lesson - Selection Techniques
Pages:  
Showing posts 1 - 25 of 42, (reverse)
AuthorThread
07/16/2005 09:14:23 PM · #1
Post Processing Lesson – Selection Techniques
============================================================

NOTE: The marquee selection tools lesson, Select menu lesson and one assignment are finished. The Advanced Selection section is started and two practice assignments have been added.

This lesson covers general selection concepts common to all image editing software with specific instruction given for Photoshop 7. Photoshop is the most commonly used still image editing software in the world so will be immediately useful to many users. Since the basics of selecting things is common to all products you should be able to apply these concepts to the specific product that you use. This lesson assumes you have a general understanding of the Photoshop Image>Adjustments submenu.

It has three major areas: Marquee selection tools, the ‘Select’ menu, and advanced selection techniques used in Photoshop. There will be two assignments to give the student experience applying selection concepts in practical applications.

The starfish image below will be referenced for practice with the various selections tools and used later in a practice homework assignment. Bring up this starfish image, download it to your computer and use it to practice with selection tools as they are discussed:

Smaller version on DPC at:
//www.dpchallenge.com/image.php?IMAGE_ID=205562

Do the same for this image of Monument Valley:

Smaller version on DPC at:
//www.dpchallenge.com/image.php?IMAGE_ID=205564

============================================================
What are selections and why should we care?

A sub-area of a picture you define that you want to use for a specific purpose is called a selection. Selecting areas of a picture that you want to work on is an essential skill to be developed. A firm understanding of selection techniques is fundamental to all image editing.

We’ll let the cat out of the bag right now!
Selections and masks are the same thing!
Gasp! You might be thinking, “what does that mean”? Don’t worry about it right now. Just store that tidbit away for later recall. They are connected. Selections are one aspect of a mask. Everything you learn about selections carries over into making masks easier to understand later on.

Selections are used for many things. Among them are: Image framing, aspecting for standard print output, color corrections, background blurring, background replacements and pulling objects or people from one image for usage in another. They are also used to apply adjustments such as levels, curves, selective color and hue/saturation to selected areas of an image.

============================================================
Selection Concepts

Every selection has two parts, a border and a feathering along the border. Feathering is a transitional width, defined in pixels applied across a selection boarder where an effect is applied. In theory a feather of 10 pixels will be spread from 5 pixels inside the boundary of the selection to 5 pixels outside the boundary. The actual width on screen depends on the pixel density where lower density will be wider. In PS7 feathering can be as small as .2 pixels (Yes, it can be less than one pixel) and as wide as 250 pixels. There are times when feathering is desired and times when it is not. You will want to experiment with feathering to get used to its effects.

The border of a selection is universally displayed as a marquee or what some people call ‘marching ants’. If feathering is applied then the marching ants show where more than 50% of the pixels are selected. Remember, with feathering the selection spills outside the actual displayed marching ants boundary.

If you select using marquee selection tools with zero feather then the marching ants will always enclose ALL of the pixels. If you use the eyedropper tool for a ‘color range’ selection, for example, you will not necessarily enclose all of the pixels. You will select only the pixels within the color range. This means you can make a valid selection where there are NO marching ants displayed at all. Also, note if you increase the feathering of an existing selection then the marching ants display will shrink. If you decrease the feathering it will grow.

There are two types of selections. They are created and used in different ways in PS7. One type is standard pixel selections. Marquee tools make pixel selections. The other type is vector object selections. Vector objects have special properties that allow them to be scaled and manipulated as a unit. The pen tool and free transform are vector object selection tools. Normally, photographs do not use vector objects much, but there are times when they come in very handy.

Both types of selections can be saved and retrieved. If you put a lot of effort into a selection then you will want to save it. As you might expect each type is created and saved in different ways. In PS7 a saved vector selection is called a ‘path’ and paths are found in a different place in PS7 than saved pixel selections.

Students will be introduced to all these things in this lesson.

OK, enough theory, now on to more practical things…

============================================================
Marquee Selection Tools


In PS7, and probably all other editing software, these tools are clustered together in the tools pallet. In PS7 the tools pallet can be displayed or hidden by selecting Window>Tools. The marquee tools are the six at the top of the Tools Pallet. Remember, these are the tools that select all the pixels within the marching ants unless feathering is specified. Note one place where feathering can be specified on the upper left hand side of the above display.

Clicking on their icon in the tools pallet accesses marquee tools. If a marquee tool has a little triangle on its lower right side then it has multiple variations. Clicking and dragging the top icon accesses related marquee tools.

Using the ‘shift’ and ‘alt’ (‘Option;’ on Mac) with selections

The ‘shift’ and ‘alt’ (‘Option’ on the Mac) keys when used in conjunction with the mouse will add or subtract from a selection. This is a near universal concept with many software products. With the Marquee tools if you hold down the shift key a little “+” sign appears on the lower right of the tool and you can add to an existing selection. If you hold down the ‘alt’ key a little “-“ sign appears on the lower right of the tool and you can subtract from an existing selection. Try this when experimenting with all selection tools.

Using ‘alt’ (‘Option’ on Mac) key with the ‘+’ and ‘-‘ keys with selections

In PS7 you can also hold down the ‘alt’ key and press the “+” key to zoom in closer into an image or press the “-“ key to zoom out to make it easier to make fine adjustments to a selection. Practice zooming in and out using these keys while practicing with images.

---------------------------------------------------------------------------------------------------------
Rectangle Tools

The rectangle tool and its variations are used all the time for cropping, framing and sizing images for DPC. Notice on the top bar that a feathering, style, height and width are available options. The rectangle tool will be used most often and the elliptical tool occasionally. The single row and single column tools are rarely used.

The ‘alt’ key has another useful function when used with the rectangle and ellipse tools. It centers the selection outward from the point where the selection is drawn! This is most useful with the elliptical tool.

Try this experiment. Use the ‘alt’ key to create a circular selection centered on the starfish in the sample starfish picture.

Select a centered circle

Open the starfish picture. To do a circle select the ellipse tool by clicking and dragging the rectangle tool to the ellipse tool. Next set the style to “fixed aspect ratio” and the Width and Height to the same value, like 10. Then hold down the ‘alt’ key while dragging the mouse from the center of the starfish and you will select a centered circle. If you don’t hold down the ‘alt’ key the circle will not be drawn centered. Try both ways to see how they are different.

---------------------------------------------------------------------------------------------------------
Lasso Tools

The lassos are a set of tools used to make freehand selections. The lasso lets you use the mouse to click and drag a completely freehand selection. As soon as you let up on the mouse the selection will be completed.

The polygon tool is also a freehand tool except you click the mouse at various points while you move it around to set selection anchor points. When you hit the enter key the selection will be completed. The Pen tool, to be discussed later, works like the polygon tool except it creates a vector selection and its anchor points can be saved for later readjustment. The magnetic lasso tool works like the polygon lasso tool except that it also responds to changes in contrast to magnetically attract the selection to an actual object in an image.

It is common that using the lasso will not quite get a selection right the first time and that you will have to use this tool in conjunction with the ‘shift’ and ‘alt’ keys as explained above to add and subtract to a selection to make it right. Practice selecting just the starfish using the lasso tool. You will have to use the add/subtract/zoom in/zoom out functions described above. Also try using the magnetic lasso to select the starfish.

---------------------------------------------------------------------------------------------------------
Crop Tool

The crop works like the rectangle tool except that after you hit the enter key it automatically trims off and throws away everything outside the selected area. Before hitting the ‘enter’ key you can use the up and down arrow keys to move the selected area around to get it into exactly the right spot before you hit enter.

There are a set of options for the crop tool that control whether the cropped area is deleted or just hidden and how the area outside the crop is displayed on the screen. Practice with the crop tool while changing options at the top.

---------------------------------------------------------------------------------------------------------
Magic Wand Tool


This useful tool lets you select a consistently colored area from a click point without having to trace its outline. You specify the tolerance, or color range, for the tool’s selection. The smaller the tolerance number the closer to the color of the clicked area it must be to be selected. The larger the tolerance number the wider the color selection. Typically you will set tolerance to about 30 then change it up or down to increase or decrease the selected area as needed.

The ‘anti-alias’ checkbox smooths the edges and normally would be checked. The ‘contiguous’ checkbox is important. When checked it will select only continuously connected areas. If it is unchecked then all similar areas of the image will be selected whether they are connected or not.

Experiment with the starfish graphic using this tool. Try to select the starfish using the magic wand. Try clicking on and off the continuous checkbox. Also try it using the ‘alt’ and ‘shift’ keys to add and subtract from the selection. You will find this tool is best suited toward selecting areas of very similar colors like blue sky, but not particularly good for selecting things with a lot of different colors like starfish.

---------------------------------------------------------------------------------------------------------
Slice Tool

This is a little used, highly specialized tool that will not be described here. For the curious a tutorial for it is found here:
//www.arraich.com/ref/aatool_slice6.htm

============================================================
============================================================
The Select Menu



With the exception of Color Range selection the selection menu performs tasks AFTER a selection is made using other selection methods. The select menu here is unique to PS7 but will have some functions that may carry over into other image editing software with similar needs.

The selection menu in PS7 has basically 5 different parts:
1-Selection change choices: All, Deselect, Reselect and Inverse
2-Color Range Selection
3-Selection Boundary choices: Feather, Border, Smooth, Expand, Contract, Grow and Similar
4-Transform Selection
5-Load/Save Selection

---------------------------------------------------------------------------------------------------------
1-Selection change choices: All, Deselect, Reselect and Inverse


These four choices perform global changes to a selection AFTER a selection is made. ‘All’ will select the entire image. ‘Deselect’ will turn off a selection after it is made. ‘Reselect’ will reinstate a selection after it has been deselected.

‘Inverse’ is the most interesting of the 4 choices. It reverses the current selection. Sometimes it is easier to select what you don’t want than it is to select what you do want. In that case select what you don’t want and pick ‘Inverse’ from the Select menu to get what you do want. For example, you have a landscape image that you want to lighten the ground but not the sky. Often it is easier to select the sky than it is the ground.

Here is something you can try for practice using the ‘Inverse’ function. Bring up the Monument Valley image downloaded earlier. Lets say you want to select everything but the sky. That is hard. So try selecting the sky and inversing the selection.


Select all but the sky with ‘Inverse’

Here is one way you can do that with just two clicks and a menu selection. Chose the Magic Wand tool from the tool pallet. Next change Tolerance to 50 and make sure the contiguous box is not checked. Click once near the top of the sky and sky will be selected discontinuously at the top of the image but will not go all the way to the horizon. Next, hold down the ‘shift’ key and take notice that a little “+” sign appears on the lower right of the wand cursor. That means you are in add mode. Then move the wand to the unselected area and click once. The rest of the sky will be selected. That takes care of the two clicks.

Choose Select>Inverse and the selection is reversed and now everything but the sky is selected, just as requested. That is how easy these things can be when you understand how to use the Select menu.

---------------------------------------------------------------------------------------------------------
2-Color Range Selection


This is one of the most powerful and useful selection tools Photoshop has to offer. It is used to make selections based on one color or a range of colors. It is like the magic wand but more powerful.

To access the color range dialog box choose Select>Color Range.

With it you can make color range selections in a wide variety of ways. In a sense it is also like a super ‘selective color’ adjustment tool. It is having a way to build custom color range selections rather than use the limited colors allow in a Selective Color adjustment. And not only that but you can save the custom color range as a selection. Once the selection is defined you can make image adjustments to that range like a selective color adjustment except you can apply ANY of Photoshop’s adjustment tools.

Select:
This is a popup menu circled in blue above that tells Color Range what kind of range to pick. The top selection is ‘Sampled Colors’ which is what is most commonly used. Other selections in the popup exactly match those available when using Image>Adjustment>Selective Color or with Layers>Adjustments>Selective Color. The difference is that this dialog turns yours into a selection and selective color does not. In this lesson we only care about the default “Sampled colors” as shown.

Fuzziness:
This setting is like the tolerance setting used with the magic wand tool. It specifies how wide the range of colors will be. The bigger the number the wider the range. Pick a small number and the amount selected with each click is smaller. A setting of about 22 works in a lot of cases. You can use the slider to increase or decrease the fuzziness of the selection.

Eyedroppers
Only one of the three eyedroppers on the lower right of the dialog box can be selected at a time. The left eyedropper makes a selection based on a single click on the actual picture. The higher the fuzziness setting the more gets selected with that click. The lower the number the less.

Notice that the other two eyedroppers selections have a little “+” or “-“ displayed on the lower right. Just like using the ‘shift’ and ‘alt’ keys with other selections they are used to add or subtract from the color range selection.

The Selection vs. Image radio button choice
Only the selection or image radio button can be selected at one time. They are circled in red above. They can be switched back and forth. The graphic above shows the display when the selection radio button is clicked. The image display is black and white. The white represents what has been selected and the black indicates what has not been selected. Grey indicates areas where part, but not all, of the pixels have been selected. Remember this forever! It is a fundamental concept when you learn all about masks later!

If the image radio button is clicked then the image itself is displayed in the color range dialog box.

When using this tool for making color range selections it is best to leave the ‘selection’ radio button clicked as shown above.

Example: Choose color range over the magic wand!

Select sky with Color Range

In an earlier example we used the magic wand to select the sky with two clicks using the Monument Valley sample image. When selections are simple the magic wand is faster. This time, however, we will select the sky using color range instead of the magic wand. Either way works equally well with this example, but after practice over time you will find that you will choose using ‘color range’ over the magic wand because it is more flexible when the picture is more complicated.

First, choose Select>Color Range. The color range dialog box appears. Next, set the selections in the dialog box similar to the graphic above. Now, position the mouse cursor over any part of the sky in the picture and you will see it turns into the eyedropper. Click once on the sky and you will see that the dialog box selection display has some white appear, but not all of the sky is white. That means the whole sky has not been selected. You will have to add to the selection until all of the sky parts turn pure white.

To add to the selection you can either hold down the ‘shift’ key or click the middle “Add” eyedropper in the dialog box. Then you just drag the mouse across parts of the sky that have not been selected until the entire sky turns pure white. When done click the OK button to complete the selection. The dialog box disappears and the marching ants display will appear on the screen just as if you had selected it with one of the marquee tools. Now you know two common ways to make a simple sky selection.

---------------------------------------------------------------------------------------------------------
3-Selection Boundary choices: Feather, Border, Smooth, Expand, Contract, Grow and Similar


These guys are all similar in that each one makes a change to a selection boundary based on a user entered integer into a simplistic dialog box. They always work on an existing selection. If no selection is made these tools will not be available under the select menu.

Feather


Feathering can be changed after a selection is complete by choosing Select>Feather. Feathering here works the same as it does when specified with a marquee tool only it is applied AFTER the selection is complete. A single number, in pixels, is entered in the dialog that appears. This defines the transitional width as described earlier. Note: Normally the only value of feathering assumed by PS7 is 0 unless something else is entered for a marquee tool. For values other than that they must be specified using this dialog. If you apply feathering twice it will add to any previous feathering you have already applied to a selection. That can be confusing.

Note above how a feathering of 50 pixels affects a selection border display. Before feathering I the above example the border was all the pixels in the sky.

It is often a good idea to make a selection without any feathering, save it and then apply feathering later when the selection is used to modify the image. That allows you to use the selection in more than one way where different values of feathering are needed.

Border


Used to convert a selection into an edge selection. When you choose Select>Modify>Border you get a dialog similar to the feather dialog except you are asked for a ‘selection radius’ in pixels. Edges tend to be areas in selections where additional adjustments may be needed when working on images. ‘Border’ allows you to select just the edges of a selection to make further boundary adjustments.

Smooth

When choosing Select>Modify>Smooth you are presented with a dialog box asking for a sample range in pixels. It is used to add unselected pixels to a selection near the border if most of the pixels inside the sample range are chosen. For example, if you enter 5 then you have a 5 X 5 pixel sampling range that includes 25 pixels in the sample range. If 13 or more of the pixels in that range on a border are picked then the rest will be included when you chose Select>Modify>Smooth. If twelve or less are in the range then they will be excluded from the selection.

Here is a quick way to bring out the color of a dull blue sky with Select>Smooth using the Monument Valley sample image. Choose the magic wand tool and use it to select the sky. Next, choose Select>Feather and set feathering to a nice transitional range value of 50. Next choose Select>Modify>Smooth and set the sample radius to 50 to match the feathering. Lastly, choose Image>Adjustment>Autolevels and the blue of the sky will become a deeper and more beautiful.

Expand/Contract

These two straightforward selections allow you expand or contract an existing selection. When choosing Select>Modify>Expand you are presented a dialog box asking you to enter a number, in pixels, for how much to expand the selection. You can enter a value from 1 to 100 pixels. That’s it. It just adds that many pixels all the way around the selection. ‘Contract’ is the same except it is the number of pixels to shrink the selection. These selections are useful after making a lot of post processing changes and the border gets screwed up with edge effects.

---------------------------------------------------------------------------------------------------------
Grow/Similar


‘Grow’ and ‘Similar’ are used to expand selections in a unique way and they do not have any parameters to enter. They just automatically change the selection. They are best used to expand a small easy selection to fill an irregularly sized but similar area. ‘Grow’ works only with contiguous spaces. ‘Similar’ works like ‘Grow’ except fills out to include non-contiguous areas as well.

The best way to understand their use is with an example using the Monument Valley sample image. Use the rectangle marquee tool to select a chunk of sky from the largest section of sky. You don’t have to worry much about how big or complete the selection is. Just don’t include anything besides sky. Next, choose Select>Grow. Viola, if the rectangle you drew is big enough the selection expands to include all of the sky in that main area. Pretty cool, huh? However, there is still more sky to select. Next, choose Select>Similar and the selection will expand to include all the other areas of sky. In this case we could have started with just the ‘Similar’ selection and the whole sky would have been selected. If there are tiny selections that are not in the sky then choose Select>Smooth and enter a sample range large enough to get rid of them. See, you are learning more and more all the time.

Grow and Similar don’t always work the way you want, but when they do they can save a lot of work.

---------------------------------------------------------------------------------------------------------
4-Transform Selection


This little used capability temporarily converts a selection boundary into a vector boundary so it can be scaled and manipulated like any vector graphic. You can do anything to the selection just like you can do to a vector graphic such as scale, rotate, skew, distort, etc.

It is like choosing Edit>Free Transform with one major exception: When you make changes it does NOT change the image like Free Transform does. It just changes the selection boundary! Every once in a while you might find a reason to use this. For example you could use it to rotate a rectangular selection.

In the example depicted above Transform Selection was used to skew a rectangle selection into the shape of the building wall.

---------------------------------------------------------------------------------------------------------
5-Load Selection/Save Selection


Load and save are used to store and retrieve pixel selections. This is a deceptively powerful capability that has amazing functionality. Unfortunately, the most amazing parts have to do with masks that you may know little or nothing about at this point. (Dang masks!)

One thing that does make sense is if you spend a long time making a complex selection then you probably don’t want to lose it. When you save the selection it becomes a part of the document forever or until you change it. You never know when you will want to use that same selection again.

Rule: Always save your selections!

Save Selection


Choose Select>Save Selection to access the save selection dialog box. The dialog allows you to enter a destination and an operation.

It lets you save a selection with a meaningful name, save the selection to a new document, save the selection as a new channel or replace an existing selection stored as a channel. You have the option to inverse a selection when it is saved. We will talk a bit more about channels in a moment.

The example graphic above depicts the current selection, in this case the sky, being saved using the name ‘sky’.

Normal operation to save a selection is to enter a name next to ‘channel:’ and select Add for an operation and click OK.. The second most common thing to do is make a change to an existing channel. In that case you pull up the name of the channel to be replaced from the channel popup menu and select replace channel for the operation and click OK.

Selections are almost exclusively saved to a channel within the current document. Though you are allowed to do this, you do not often save a selection to another document (photograph). That rarely makes sense.

Operations include new, add to channel, subtract from channel, intersect with channel or replace channel. Those are pretty much self explanatory as long as the word channel does not bother you. In practice you will either type in a new name and create a new channel or select an existing channel by name from the popup menu and replace it if you are revising an existing selection.

What is a channel?


When a pixel selection is saved and given a name it shows up in the channels tab. The items that show up here are called channel masks. Dang! There is that word “mask” again! You will notice other things there and they are all very interesting but that discussion will be saved for another lesson. For purposes of this lesson it suffices to say that pixel selections, as we know them, are stored here and that we can retrieve them any time we want.

You might also notice that you can see the Layer and Path tabs. That is because they are closely related. Just like the channels tab stores named pixel selections, the Path tab stores named vector graphic selections. Vectors are the selections that can be moved and manipulated like an independent object. Both pixel selections and vector selections can be used in layers.

That will all make more sense later as you continue your study of image post processing.

Load Selection


Choose Select>Load Selection to access the load selection dialog box. The dialog allows you to enter a destination to go and retrieve a selection and an operation to perform while you get it.

Normal operation is to load a selection as follows: Select a name from the channel popup and click OK. ‘New selection’ is the only operation allowed.

However, if there is already a selection on the screen you have choices. You can choose to add it as a new selection, add to the existing selection, subtract from the existing selection or intersect with the existing selection. Though there are good reasons to use the other choices, most the time you will chose to bring up the original selection unchanged.

============================================================
============================================================
Advanced Selection Techniques in PS7

This section contains more advanced selection concepts not covered in the marquee tools or the Select menu. These things are spread around throughout PS7.

---------------------------------------------------------------------------------------------------------
Paste/Paste Into


Though copy and paste does not seem like an advanced topic it does work differently in image editing software than it does in other software applications. Therefore it justifies a deeper discussion.

In a traditional word processor if you select text from one part of a document and paste it into another document it is pretty straightforward. In PS7 it is different. When a selection is made and is copied or cut from one image and pasted into another image it is put into a new layer in that image. This can be confusing. This is not a lesson about layers but they open up a whole new world of image editing possibilities. There isn’t anything quite like it in copy/paste operations in other applications. There are a whole range of blending, opacity and masking adjustments that control the interaction of one layer with the others and that is in addition to feathering in the selection. The position of one layer with respect to others also changes how the final image appears. Put it in the wrong place and the pasted item disappears. This can be very confusing when you first start using copy and paste functions.

Thank goodness copy and cut work exactly the same as anything else you may be used to!

Paste


When you do a simple Edit>Paste a previously selected copy is put into the center of the canvas in its own new layer with a transparent background. Bet that ain’t intuitive! The checkerboard display indicates the transparent part of the layer. With a feathered selection there is a feathered transition to the transparent background.

Most of the time the center is not where you want your pasted object to remain so you will have to move the object into position on the image. This is another place where image editing software sometimes gets funky. To move it in PS7 you highlight the paste layer and chose Edit>Free Transform. That temporarily turns the pasted item into a vector graphic then you can drag or use the arrow keys to move it into position. You can also use Free Transform to resize the object as necessary. For a properly scaled resizing of an object you hold down the shift key while dragging a handle. Remember, with Free Transform you always have to hit the enter key to complete the action. Oh, and if you paste something and want it to be visible then its layer must be ABOVE the picture layer.

Paste Into


This is different from Edit>Paste in a couple of very important ways. First, a selection must be made in the destination image prior to choosing Edit>Paste Into. Second, the only part of the pasted image visible will be in the selected area of the destination image. This is because this function automatically adds a layer mask blocking out the other parts of the pasted image. You can see the mask in its own little window to the right of the layer image in the display above. Take note that the black in the mask is where an image is blocked from view and the white is where the image shows through. Remember that. That information is important when you learn about masks.

That makes ‘Edit>Paste Into’ great for sky replacements because you can move the sky around inside the mask to adjust it to your liking.

Again, as with Edit>Paste you choose Edit>Free Transform to move and/or rescale the pasted graphic.

---------------------------------------------------------------------------------------------------------
Extract


This function is used to make a complex selection of an object in an image and throw away the rest of the layer. The net result is a layer with a transparent background much like what Edit>Paste produces. This is good for making selections of objects with fuzzy edges or someone with flyaway hair.

Note: Unlike most, this function throws away pixels. If you don’t want to lose pixels then extract from a copy of a layer.

It can be turned into a selection by holding down the ‘ctrl’ (‘Option’ on Mac) key while clicking the layer. The selection can then be copied and pasted into another image or just have a new background added to it.

Here is how it works. Chose Filter>Extract. (Yes, it is under the Filter menu!) You will get a screen similar to the one shown above. A brush is used to trace the edges of the object to be selected. Make the brush wider in the “fuzzier” areas so that they can be entirely selected. The brush will look green. You center the brush over the border of the object to extract. Switch to the paint bucket and click inside the selected object when totally enclosed. It will turn blue everywhere something is selected. You can preview the selection and go back and make changes with the edges using the brush and the eraser and then use the paint bucket to build another selection. Keep doing this until you get close to what you want.

Your extract won’t be perfect. You will have to touch it up after you complete the extract function. When you are close then click OK and the extraction is complete. The unwanted background is thrown away.

It is a rough and tricky way to make a selection. It has a tendency to include things you do not want and exclude things you do want. After the extract is completed you simply duplicate the layer and combine it several times and the selection magically becomes better. Then you can use the history brush and eraser tools to make final refinements to the selection.

============================================================
============================================================
Practice Assignments

This section contains practice assignments to gain experience learning and using selection techniques.

============================================================
Practice Assignment #1 – Using ‘Edit>Paste Into’ for Simple Sky Replacements

Before: … Replacement Sky:

Finished:

The purpose of this assignment is to give you practice creating and modifying selections using a variety of selection tools in a practical application. This is not legal for DPC submission.

It is common in landscape photography that the one time you have to visit and photograph a place the sky is not the way you would like it. For this assignment we will assume that happened to you with a picture taken at Monument Valley, Arizona USA. Your specific assignment is to replace that sky with a more interesting one.

Btw, the reason this is called a ‘simple’ sky replacement is because there are sharp boundaries between the ground and sky. There are not a lot of trees, branches and leaves which make a much more complicated sky to replace. You have to learn to walk before you can learn to run so we will take one step at a time… one step at a time…

---------------------------------------------------------------------------------------------------------
Sky Replacement Concepts

General sky replacement workflow:
1-Open two images. A landscape and a sky where both have the same orientation – Portrait or landscape.
2-Select the sky in the landscape image
3-Tweak the sky selection to make it just right
4-Save the selection (Always save selections!)
5-Open the image with the replacement sky
6-Select All and copy
7-Switch back to the landscape image
8-Choose Edit>Paste Into
9-Reposition and/or rescale the sky as desired
10-Examine the sky boundary close-up to see if it is right.
11-If the sky is not right then go back and adjust the original selection and repeat steps 4 through 9 until you are satisfied

An alternative to step 10 is to adjust the layer mask created directly. Though not hard, masks are beyond the scope of this particular lesson.

There are probably other workflows used to replace a sky but this is one of the most common.

Generally speaking the landscape and sky replacement images should be in the same orientation (portrait or landscape) with leveled horizons. Usually, after combining, you reposition the sky vertically more than horizontally because the replacement sky is the same width as the landscape. You usually use free transform to do this but the move tool works as well.

Selecting a suitable sky to replace with is not a trivial task. If you are going to do very much of that sort of thing it is best to have a varied collection of unobstructed sky images to choose from. The scale, lighting and lighting orientation of the two images should be as closely matched as possible. After you have replaced the sky you will likely have to make separate adjustments to ground and sky so they are seamlessly matched.

On to the fun….

---------------------------------------------------------------------------------------------------------
Assignment Activity Details:

1-Download Monument Valley and Sky images above to your computer.
2-Open both images in the editor and switch to the landscape one.
3-Select the sky
__A-Use either the Magic Wand or Select>Color Range
__B-After completing the assignment with one tool start over again with the other tool a second time to gain experience with both methods.
4-Use zoom in and zoom out to examine the boundary between sky and ground close up (Up to 300%) looking for defects in the selection boundary

-------------------------------------------------------------

At 200% magnification you see what a typical selection might look like after a magic wand or color range selection
-------------------------------------------------------------

5-Use Select>Smooth to correct some edge effects. Retry with different sample radius to make sure that all parts of the selection that are not in the sky proper disappear. Don’t worry if parts of the sky remain unselected.
6-Use the magic wand while holding down the ‘alt’ key to put it in add mode and select the remaining parts of unselected sky that either were not selected originally and/or were deselected when Select>Smooth was applied.
7-Recheck the sky/ground boundary looking for problem areas and correct then using steps 6 and 7 as needed.

-------------------------------------------------------------

At 200% magnification you see what your selection should look like after tweaking
-------------------------------------------------------------

8-Choose Select>Save Selection to save the selection. Call it ‘Sky’. (Always save your selections)
9-Switch to sky image, choose Select>All, choose Edit>Copy and switch back to landscape image.
10-With the sky selection active choose ‘Edit>Paste Into’ and the sky fills in only in the selected area.
11-Use the move tool or Edit>Free Transform to reposition the sky with drag or arrow keys to suit your taste.
12-Combine, flatten and save.

Share your sky replacement version with the rest of the group in this thread.

Describe any issues or problems you had finishing this assignment and other things you already know or learned that might be of interest to others in the group. Ask questions if you have them. We are here to learn.

Extra Credit: Specific to sky replacements in general there is a glaring error in the finished image shown above. You get extra credit if you can identify what the error is and how to correct it.

============================================================
Practice Assignment #2 – Using ‘Filter>Extract’ to extract objects from their background

Before: … Extract image:

Finished:

The purpose of this assignment is to give you practice using the Filter>Extract function for pulling an object from the background of one image and putting it into another. You will have to resize and move the image to a new position and readjust its lighting effect to match the new background.

We will modify the sky replacement image from the first assignment. Assume that we feel the composition is unbalanced and would look better if there were something interesting on the left side of the picture. Assume we took another picture of a sitting dog in Monument Valley and think it would look be good in our sky replacement image. Sio we will extract te dog from one place and put it in another.

In essence this assignment is nothing more than a glorified cut and paste operation.

---------------------------------------------------------------------------------------------------------
Assignment Activity Details:

1-Download the extract dog picture to your computer.
2-Open your sky replacement image and the extract image in the editor and switch to extract one.
3-Choose Filter>Extract.

-------------------------------------------------------------

Tools and options available with Filter>Extract
-------------------------------------------------------------
A special extract window with a set of selectable tools in the upper left side of the window is displayed. The topmost tool that looks like a pen is called the Edge Highlighter tool. The second one is called the Fill Tool which is used to identify the actual selection.

4-Use the Edge Highlighter tool to trace around the dog. Center it on the boundary. The trace will be colored green. Make the brush thicker where there is a wider edge and narrower where it is not. Don’t be super careful. You will have to do cleanup later no matter what. Use Edge and Eraser tools as needed to make the trace “good”.
5-Use zoom in and zoom out to assist tracing as needed.
6-After trace is complete select the paint bucket Fill tool and click once inside the traced dog. The dog turns blue as shown above.

If the trace is not completely closed the whole image will turn blue. In that case you select the Edge Highlighter tool again and close the loop, then select the Fill Tool and click again make select just the dog.
7-Click Preview to see what your selection will look like. It does not have to be perfect, but if is is way to rough then use the eraser and highlighter tools to refine the selection. You can also try increasing the Smooth setting to make the edges less rough.
8-When done, click OK to complete the extraction. Fixing up the selection will be necessary.
9-Press Ctrl-J and Ctrl-E at least two times. Ctrl-J duplicates the layer and Ctrl-E combines both back together. This will magically improve the selection.
10-Use the history brush to fill in “dropped” areas and the eraser tool to get rid of extra stuff to finish up.
11-Ctrl-Click the extracted image and choose Edit>Copy.
12-Switch to Sky replaced image and choose Edit>Paste to place the dog centered in its own layer in the image.

Now you want to do three things: Resize the dog to fit the scale of the image, reposition it in the image and adjust the lighting for the new background.

13-Choose Edit>Free Transform.
14-While holding down the Ctrl key drag any corner handle inward to shrink the dog to a size that best fits the image. Holding down the Ctrl key constrains the resize operation to keep it properly scaled without distortion.
15-Drag or use the arrow keys to move the dog into a pleasing position on the left side of the image. Resize again as necessary.
16-Choose Filter>Render>Lighting Effects. Drag the handles on the oval to make fine adjustments to the lighting angle to more closely match the angle of the sky lighting.
17-Make other brightness/contrast adjustments as necessary for a natural look.

Extra Credit: Try using different selection tool of your choice to copy the dog image and paste it in the sky replacement image. Identify what tool you used and compare and contrast it against using the Extract function.

Message edited by author 2005-07-21 20:28:03.
07/16/2005 09:51:18 PM · #2
well, here's another thread added to my favorites...excellent contribution, great information. thanks for taking the time to write this up and post it!
07/17/2005 11:58:25 AM · #3
these techniques really can save a ton of time and aggravation. thanks again!
07/17/2005 12:35:48 PM · #4
Great tutorial, Steve! Now I just have to practice practice practice.
Just one quick question: Is "constrained aspect ratio" in PS6 the same as "fixed aspect ratio" in PS7?
Thanks again.
07/18/2005 10:46:39 AM · #5
Originally posted by Olyuzi:

Great tutorial, Steve! Now I just have to practice practice practice.
Just one quick question: Is "constrained aspect ratio" in PS6 the same as "fixed aspect ratio" in PS7?
Thanks again.

Don't know for sure, but I suspect they are.
07/19/2005 06:55:03 PM · #6
Here's my attempt to paste the sky into the landscape image. I found that using Select Color Range was easier with this image. I wasn't able to move the sky after I pasted it into the landscape image. Why is that?



The error of your sample image is that the sun is shining from different directions. Flip the sky horizontally (Image>Rotate Canvas>Flip Canvas Horizontally) before pasting it into the landscape image

07/19/2005 07:18:58 PM · #7
Originally posted by janruss:

Here's my attempt to paste the sky into the landscape image. I found that using Select Color Range was easier with this image. I wasn't able to move the sky after I pasted it into the landscape image. Why is that?



The error of your sample image is that the sun is shining from different directions. Flip the sky horizontally (Image>Rotate Canvas>Flip Canvas Horizontally) before pasting it into the landscape image


Congrats!!!!... ding, ding, ding... you are right... the direction of the light is wrong and reversing the image it is the solution I was looking for.

As for moving the sky, what Edit>Paste Into actually does is create a new layer, creates a layer mask based on the selected sky and pastes your sky into that layer.

Try this... after Edit>Paste Into look on layer to make sure the layer with sky is highlighted. Then choose Edit>Free Transform, you should see a set of handles appear and the the cursor change into a move cursor. At this point you have two choices. One, You can click and drag to move the sky around. The other is to use the up arrow key or shift-up arrow key to move the sky horizontally sky up or the down arrow to move it down.

I downloaded and looked more closely at your solution and can see that there are selection artifacts on the leftmost upright pole and the one sticking strait out. If you were processing a full sized image for printing you would find that it would not print very good. Looks like in your case that you selected part of the wood to be included in sky replacement. You can always go back, readjust the selection and reedo Edit>paste Into

Edge effects are the biggest bugaboo when working with selections. When we are working with smaller 640X480 images you might be able to get away with a few.

Always fully check all the edges of a selection after you make adjustments to it to be sure there are no leftover artifacts.

Message edited by author 2005-07-19 19:46:57.
07/19/2005 08:16:57 PM · #8
Originally posted by Bebe:

Here's mine. I'm grateful that janruss went first - I'm not at all certain that I would have figured it out.



BTW, I changed the size of the sky afterwards, just to be slightly different.

Question: where are we supposed to post? This forum or the one that describes your techniques?


Edge effects are the biggest problem with sky replacements and, well really, all other selection modifications you will ever make. Your replacement has got lots of edge effects so you will want to go back and look at that again. With color range it is better to select a little less than a little too much. I drag the eyedropper in add mode all over the place in the area I want to select.

Be sure to use the zoom in and zoom out features to look closeup at the boundaries to see how good your selection is. Then apply smoothing and fine selections with the magic wand to get close in on it. You can also use the lasso tool in add and subtract mode to make fine changes to your selection.

There is an eyedropper setting that my be affecting you too. To check yours click on the eyedropper tool on the tool pallet. At the top you will see a setting called 'sample size:' this tells PS how wide an area to select colors from. It can be set to single point, 3x3 and 5X5. 3X3 is probably the best setting.

Message edited by author 2005-07-19 20:18:40.
07/19/2005 08:33:36 PM · #9
Here's my attempt. I thought the same as janruss, but I didn't like the test paste sky in any other direction. :)



I did a little more tweeking with shadows, curves, and stuff too.

BTW ... thanks alot for this tutorial. The hardest thing for me is selection, and this came at the perfect time! :)
07/19/2005 08:43:42 PM · #10
Originally posted by LadeeM:

Here's my attempt. I thought the same as janruss, but I didn't like the test paste sky in any other direction. :)



I did a little more tweeking with shadows, curves, and stuff too.

Looks like you had a pretty good replacement as well. Under normal conditions you will do other post processing after your replacement is completed in order to make lighting and shadow match. The two images I picked for this lesson were fairly close to begin with.

I liked the cloud positioning better the wrong way myself. You can try "Filter>Render>Lighting Effects" to try to reverse the lighting direction but it does not do as good a job as I'd like..

Message edited by author 2005-07-19 20:44:18.
07/19/2005 10:14:00 PM · #11
OK Steve, this was great. I am a little overwhelmed with everything you presented here but I learned a lot. I need to go back and do it again to start to sink in. I am having a little problem with Smoothing, I either get to much or not enough, Just practice.


I know I have told you before, but thanks for taking so much time to put this together for us.
07/20/2005 03:58:54 AM · #12
Originally posted by jrtodd:

OK Steve, this was great. I am a little overwhelmed with everything you presented here but I learned a lot. I need to go back and do it again to start to sink in. I am having a little problem with Smoothing, I either get to much or not enough, Just practice.


You may be overwhelmed, but you did a perfect sky replacement. It is very nice.
07/20/2005 08:07:19 AM · #13
Originally posted by stdavidson:

Originally posted by Bebe:

Here's mine. I'm grateful that janruss went first - I'm not at all certain that I would have figured it out.



BTW, I changed the size of the sky afterwards, just to be slightly different.

Question: where are we supposed to post? This forum or the one that describes your techniques?


Edge effects are the biggest problem with sky replacements and, well really, all other selection modifications you will ever make. Your replacement has got lots of edge effects so you will want to go back and look at that again. With color range it is better to select a little less than a little too much. I drag the eyedropper in add mode all over the place in the area I want to select.

Be sure to use the zoom in and zoom out features to look closeup at the boundaries to see how good your selection is. Then apply smoothing and fine selections with the magic wand to get close in on it. You can also use the lasso tool in add and subtract mode to make fine changes to your selection.

There is an eyedropper setting that my be affecting you too. To check yours click on the eyedropper tool on the tool pallet. At the top you will see a setting called 'sample size:' this tells PS how wide an area to select colors from. It can be set to single point, 3x3 and 5X5. 3X3 is probably the best setting.


Oh! You're so right! I think this is a better replacement:



BUT what happened to the sharpness of the photo? I really don't know what is going on here. Here's what I did:

1) I took the psd file that I had used to create the image above, which had 2 layers
2) I added a third layer to the sky, which increased the previous one a little bit. I feathered that selection, so I did expect the horizon to become a little smoother (and perhaps slightly blurrier).
3) I triple checked (after noticing fuzziness) to ensure that the 2nd & 3rd layers didn't extend anywhere near say, the bottom third of the picture.
4) I flattened the layers, sharpened. It looks okay in the photoshop window.
5) I find it impossible to "save for web" with anything like the sharpness that I would expect.

Any clues what I'm doing wrong?

Message edited by author 2005-07-20 08:16:42.
07/20/2005 08:36:19 AM · #14


Okay - I just figured out that I don't have to save to only 150, which gives me a lot more detail in my final. However, I still can't figure out wny it shouldn't work to go back down to 150.
07/20/2005 09:14:55 AM · #15
Originally posted by Bebe:



Okay - I just figured out that I don't have to save to only 150, which gives me a lot more detail in my final. However, I still can't figure out wny it shouldn't work to go back down to 150.

This one looks MUCH improved but the feathered edge makes it look out of focus on the selection boundaries. I don't know why the earlier one version was so far out of focus. It almost looks like it had gaussian blur applied. :)

To use or not to use feathered boundaries is a case by case decision. I did not use any in this exercise because the boundaries are all well defined but I would in images with boundaries that were not so well defined and "fuzzier". I also cheated a little bit and slightly airbrushed the mask a little bit to remove a bit of haloing that cropped up when it was resized and sharpened for the web.

This exercise has taught me a lot too.
07/20/2005 09:25:01 AM · #16
Originally posted by stdavidson:


This one looks MUCH improved but the feathered edge makes it look out of focus on the selection boundaries. I don't know why the earlier one version was so far out of focus. It almost looks like it had gaussian blur applied. :)

To use or not to use feathered boundaries is a case by case decision. I did not use any in this exercise because the boundaries are all well defined but I would in images with boundaries that were not so well defined and "fuzzier". I also cheated a little bit and slightly airbrushed the mask a little bit to remove a bit of haloing that cropped up when it was resized and sharpened for the web.

This exercise has taught me a lot too.


I agree with all you said. I only feathered to 1 pixel - I know it looks soft, but I'm surprised that 1 pixel made that much difference.

I'm also still curious about the "gaussian blur" one. I promise that I didn't apply any blur at all, and the pic looks fine when in photoshop; it's only at "save to web" that it goes all weird. I've had this happen before & can't figure out what it is that's happening. If anyone has a clue ...
07/20/2005 09:48:28 AM · #17
Originally posted by Bebe:



I agree with all you said. I only feathered to 1 pixel - I know it looks soft, but I'm surprised that 1 pixel made that much difference.

I'm also still curious about the "gaussian blur" one. I promise that I didn't apply any blur at all, and the pic looks fine when in photoshop; it's only at "save to web" that it goes all weird. I've had this happen before & can't figure out what it is that's happening. If anyone has a clue ...

I can't speak to the fuzziness factor of that earlier image, but I did notice that in the later one looked about the same as mine after accounting for the 1 pixel feather.

The net effect of a feather depends on the pixel density of the image in the first place. Ours is a special case because we are working with a 640X480, low pixel density image in the first place so that 1 pixel makes a considerable difference. If you were working with a regular sized out-of-camera image which essentially has a much larger effective pixel density then a 1 pixel feather would have a much smaller effect.
07/20/2005 12:50:11 PM · #18
Steve, I just finished reading the two parts (posted so far) of this wonderful tutorial and will do the exercises this evening when I get back. I've got most of the concepts down except maybe for smoothing. Will have to work on that one.
07/20/2005 12:58:08 PM · #19
Originally posted by Olyuzi:

Steve, I just finished reading the two parts (posted so far) of this wonderful tutorial and will do the exercises this evening when I get back. I've got most of the concepts down except maybe for smoothing. Will have to work on that one.

The smoothing part reads more difficult than it really is. When you try it out in the assignment you will see how it works.
07/20/2005 01:04:07 PM · #20
Wanted to check in from work and note that everyone is doing really well with the selection homework. This can be a difficult skill to pick up (and we have even more advanced stuff coming), but it's REALLY important to your Photoshop skills to get selection down pat.

Great job, Steve, for your fabulous tutorial, thus far. I wonder if you can get DPC to publish this one - it's really well done, and the example images help a great deal.
07/21/2005 03:39:21 AM · #21
Hi Steve...Ok, came home from work tonight and tackled the exercise. Here's my results:


A couple of issues for me...first, smoothing. I didn't use it because no matter what setting I used it at, I wasn't able to get rid of one of the beams of the structure in my selection. So I just used magic wand at a very low tolerance until all of the sky was selected and then did the copy & paste of the new sky.

Secondly, when using the free transform tool to resize/reposition the new sky I extended all for sides out to the receiving images dimensions in order to fit it in. In your version, your clouds appear higher in the sky than in mine. Why is that? Did you do your adjustment differently?

Anyway, great tutorial! I learned a hellavu lot and am very grateful to be in this mentoring group.
Oly

btw...I was able to figure out what was not right with your rendition, but cheated and looked ahead to Janruss's answer as to how to correct it. It's nearly 4 in the morning here...lol
07/21/2005 09:24:00 PM · #22
OK, I was a little behind in the lesson, but got caught up. please take a look and let me know what you think about my attempt. I took a lot of time erasing the edges on the dog using a very fine brush. Just wondering if there is a better way to clean up an image or if this is it.

Any advice regarding my picture would be much appreciated.




ps. I really think that these lessons are great and I cannot begin to thank you for taking the time to share your knowledge with us. Hopefully we can all repay you eventually.
07/22/2005 12:10:23 PM · #23
Originally posted by Olyuzi:

Hi Steve...Ok, came home from work tonight and tackled the exercise. Here's my results:


A couple of issues for me...first, smoothing. I didn't use it because no matter what setting I used it at, I wasn't able to get rid of one of the beams of the structure in my selection. So I just used magic wand at a very low tolerance until all of the sky was selected and then did the copy & paste of the new sky.

Secondly, when using the free transform tool to resize/reposition the new sky I extended all for sides out to the receiving images dimensions in order to fit it in. In your version, your clouds appear higher in the sky than in mine. Why is that? Did you do your adjustment differently?

Decent first try on your sky replacment exercise. I downloaded and looked closely and you still have a few minor edge effects along the mountains. Not to worry... do this kind of thing very much and you will be battling edge effects pretty much the rest of your life, I think. LOL.

Be advised the second practice assigment has been posted to the lesson. Now you get to add a dog to the image. :)

I think I know what caused your problems. I think you used 'Edit>Paste' instead of 'Edit>Paste Into' to insert the sky into your landscape. They are very different. I added a description of the differences between the two in the new additions to the lesson I put in yesterday. You will want to review that. Using 'Paste Into' is what allowed me to drag and reposition the sky around within the selection. That is main reason for using 'Paste Into' for sky replacments.

If you used a straight 'Edit>Paste' function that might explain your difficulties with smoothing. The use of any tool is individual situation dependent.

Smoothing is a handy tool depending on the selection. If you make a selection and clearly see that you have selected some spots that are clearly not in the sky then smoothing can help before you do a copy. That was the case for me with my selection in this exercise. What it does is examine the pixels on edges of selections for a defined pixel radius. If more that 50% of the pixels match the surroundings then it changes the pixels to match the surroundings, rather they be sky or non-sky. I noticed in this exercise what it did with a 5 pixel was remove the ground selection, but lost a bit of sky selection. So using the magic wand to add that back in worked well.

It is always a good idea to zoom in to about 200% and closely examine you selection boundary and make minor tweaks as needed. When close I use the magic wand and/or the laso tool for fine adjustments.

You might want to try running through that first practice assignment again if you did not use 'Paste Into'
07/22/2005 12:43:10 PM · #24
Originally posted by JayWalk:

OK, I was a little behind in the lesson, but got caught up. please take a look and let me know what you think about my attempt. I took a lot of time erasing the edges on the dog using a very fine brush. Just wondering if there is a better way to clean up an image or if this is it.

Any advice regarding my picture would be much appreciated.


ps. I really think that these lessons are great and I cannot begin to thank you for taking the time to share your knowledge with us. Hopefully we can all repay you eventually.

Good job selecting, pasting, resizing and positioning the dog.

t looks to me that you still need to adjust the contrast to better match the landscape. The dog is a little too light for the surroundings. You can see the dog shadow is lighter than the other ones. Try working with Filter>Render>Lighting Effects a little more. That tools works well for that type of adjustment. Also, brightness/contrast and or selective color adjustments (with only black) might work well in this situation.

I did touchup work like you did with my selection after it was completed. 'Edit>Extract' is ideal for extracting objects with complex edges, like people and their hair. By its nature it has a tendency to select some things you don't want and drop things you do want. That is why there is a "fixit" part that is always necessary. There is an artform to making an extract selection.

There is another way to work with these things. It does not save you any work, but supports "non-destructive" editing. That is what aboutimage validly suggested and is the best way to do things. In this case you would create a mask on your pasted extract layer and adjust it instead of the extracted image itself.

The big advantage, as with all "non-destructive" editing, is that you can go back later and fix things easier should you discover you made a mistake. "Non-destructive" editing is also very advantageous should you decide to reprocess the image in a vastly different way but retain features you already worked on.

Message edited by author 2005-07-22 13:49:48.
07/24/2005 04:35:16 AM · #25
Hi Steve, hope you're having a nice weekend. I redid the first exercise making sure I did "paste into," and think I finally got the hang of this exercise using "magic wand" at very low tolerances (about 5). I then proceeded to "extract" the dog and paste into, resize and reposition it in this new image. Only problem is that I couldn't find the "lighting effects" filter to change the lighting of the dog. I looked under filters>render but there's nothing there. Looked for it under all menus but seems to be non-existent in my version (6.0). Went to the help section and they list it under the filters menu, but I can't understand where it's at...any ideas?

Anyway, here's my new image with the dog.
Pages:  
Current Server Time: 04/19/2024 06:38:32 PM

Please log in or register to post to the forums.


Home - Challenges - Community - League - Photos - Cameras - Lenses - Learn - Prints! - Help - Terms of Use - Privacy - Top ^
DPChallenge, and website content and design, Copyright © 2001-2024 Challenging Technologies, LLC.
All digital photo copyrights belong to the photographers and may not be used without permission.
Current Server Time: 04/19/2024 06:38:32 PM EDT.