How to separate the background from the human figure in a photograph. How to separate an object from the background using a quick mask - Photoshop tutorial

How to select an object in Photoshop and separate it from the background in simple and quick ways, what tools to use, I will tell you in this article.

Do you want to know how to consistently earn money online from 500 rubles a day?
Download my free book
=>>

In my work, there are often situations in which it is necessary to transfer an object from one image to another. That is, separate part of the image from the background and then insert another background or insert the selected object onto another image.

For me, it is most convenient to do these actions in the program. This is a wonderful program for working with images, it has a lot of functionality. It is simple and intuitive to use.

Since I am often asked not only about how to highlight, but also about how to separate it from the background and into another picture.

And since you can’t tell about this in a nutshell, I decided to describe these actions in this article.

In the first part of the lesson, I will tell you about ways to select an object, and there are not so few of them, rather a lot.

Pay attention to the left toolbar in the program. The topmost tool, which resembles an arrow, is the move tool. We will need it in the case when we need to move the image or part of it.

Below, one by one, are three groups of selection tools.

The first group includes tools:

  • Rectangular area;
  • Oval area;
  • Horizontal line;
  • Vertical line.

Second group:

  • Lasso;
  • Straight-line lasso;
  • Magnetic lasso.

Third group:

  • Quick selection;
  • Wand.

In addition to these tools, you can select objects using a pen, color range, channels, mask, eraser, and so on. There are a lot of ways to highlight an object, and you can’t describe everything in one article; you can release a full-fledged video course on this topic, which will contain at least 10 lessons.

Today we will talk about the simplest, easiest ways. If you need to select a geometric object, such as an oval, circle, rectangle or square, then it is easiest to use the first group of tools.

Setting up tools

When choosing any tool, pay attention to the top panel, settings for the selected tool will appear there.

For example, for the oval tool, you can specify:

  • Normal selection;
  • Add to the selected area;
  • Subtract from the selected area;
  • Intersection of selected areas;
  • Shading size;
  • Smoothing;
  • Specify the exact selection size, width and height.

And this way you can customize all available tools.

Use the tooltips that appear when you hover your mouse over any instrument or its setting.

Selecting a circular area

For example, I need to highlight the disc from the cover of Chelpachenko’s course. To make a selection, I'll take the oval tool. Then you can simply select the object by holding down the Shift+Alt keys to create an even circle, and using the mouse to stretch the tool on the image.

Or you can measure the diameter of the disk, indicate the dimensions on the top panel and click on the picture with the mouse, a circle of the specified dimensions will immediately appear.

Set the selection strictly along the contours of the disk. Right-click in the center of the selection and select Copy to New Layer.

As a result, our disk appeared on a new layer, without a background. Now you can remove the main layer and trim the extra, empty part of the picture using trimming. To do this, open the image tab and select trimming from the list.

Selecting complex objects using a lasso group

Using the principle described above, you can select and free any objects from the background. For each image, you should select a tool that will allow you to make a selection quickly and efficiently.

For example, the rectangular lasso is useful for selecting shapes with straight sides that have many angles, such as a polygon, star, trapezoid, and so on. You can practice with this picture.

The magnetic lasso will fit well on any figure if there is a contrasting background. If the figure merges with the background, then it will be difficult for the magnetic lasso to determine the boundary along which to draw the section.

I cut out this figurine of a gymnast using a magnetic lasso in three minutes, so you can practice it too.

Quick selection

When your object is located on a plain background, it is quite easy to remove it using the quick selection tools. To remove the background from an image, remove the lock from the background layer and create a copy of the layer just in case.

Click on the background with the magic wand and press the “Delete” button. Save the object in PNG format. Example of selection.

How to select an object in Photoshop and separate it from the background, summary

I tried to tell you in detail how to select an object in Photoshop and separate it from the background. However, this is such a broad topic that several articles could be written about it. I understand that I might have missed something during the description process, and what I understand can be difficult for a beginner to understand.

So don't hesitate to ask questions in the comments. If you need advice, don’t be afraid to ask, I will answer everyone.

P.S. I am attaching a screenshot of my earnings in affiliate programs. And I remind you that anyone can earn money this way, even a beginner! The main thing is to do it correctly, which means learning from those who are already making money, that is, from Internet business professionals.

In this article you will learn how to select complex objects in Photoshop. Such objects include: hair, feathers, wood, and anything else that has fleecy and shaggy surfaces. High-quality selection of such objects cannot be done using a regular Lasso or Pen. This article encourages you to use channels to easily mask out complex objects while still leaving cleanly highlighted edges. This technique will save you a lot of time. At this point the goal of the tutorial is to remove the pink background from the left side of the girl. As you may have noticed, somewhere between the feathers there are pink spots showing through here and there, we should remove them too.

Step 1.

Duplicate the original image and then work with the copy. Hide the background layer - click on the eye next to it. Go to the menu Select-Color Range. When the window appears, select the first eyedropper on the left and click it on the pink background in the image.

You will notice that the selected color has turned white in the dialog box. Increase the parameter value Fuzziness until the image is completely black and the selected area is pure white.

Note: To add color to the selection, click on the image with the eyedropper with the “+” sign or hold down Shift.

In some cases (for example, isolating trees from the sky), these operations are sufficient. You click OK in the dialog box and Delete on the main document to remove the background. But here the case is more complicated.

Step 2.

After clicking the OK button, a selection will appear in the document. Switch to the Channels palette. Click the button at the bottom of the palette (Save selected area on a new channel) - a new channel “Alpha 1” will appear. Press Ctrl+D to deselect. Next, click on the Alpha channel - a black and white view of the channel will be displayed in the main document. The advantage of using channels is the ability to edit the selection without affecting the original image.

The black colors are the areas we want to keep and the white ones are the ones we want to remove.

Step 3.

You may have noticed that the channel also shows gray areas. What to do with them? We need to turn them either black or white, there is no other option. How to do this? There is a quick solution!

Go to the menu Image-Adjustments-Levels.. (Image - Correction - Levels). In the dialog box you will see a histogram with three sliders - move the outermost sliders a little closer to the middle. After these steps, the gray areas should disappear.

Step 4.

Do you remember that our goal is to remove only the pink background? Great! In the channel, as you can see, the lips and feathers on the right also stand out. We need to remove them from the pink highlight!

Take a black brush with hard edges. Paint it on those parts that do not need to be removed - here are the lips and feathers on the right. If, on the contrary, you need to remove something, switch to a white brush.

Step 5.

Sometimes it can be difficult to know which parts to remove and which to leave. Click on the eye next to the RGB channel. The original photo will now be visible under the transparent mask.

Turn off the eye if you want to return to black and white.

Step 6.

Hold Ctrl and click on the Alpha channel - a selection will appear. Click on RGB to see a color image. Go to the layers palette. Select the working layer and press the Delete key.

The pink background will be safely removed without damaging a single feather.

Open the desired image by clicking the “File” button. Select the "Open" option and specify the path to the image.

The first thing you need to pay attention to is the arrangement of the flowers. If you have a white square on top, click on the black one. You can also change the location of the color using the arrows located next to the squares.

Under these squares there is a “Mask” button. It looks like a camera. Click on it. Now, if you move your mouse over it, the button will turn red.

Now click on the Brush tool

Did you click? Open the brush button at the top. I selected it with a rectangular area.
In the window that opens, you need to pay attention to the diameter of the brush (make it larger, I set it to 90) and hardness. Use the slider to increase the hardness to 100.

Now go to the Opacity and Pressure windows. They are to the right, I have highlighted them with a red line. Also bring the values ​​in these windows to 100. (see picture above)

Now we have completed the preparations, now we move on to the main work.

Let's start working directly with the image. We draw over the object that we are going to cut with a brush. If the diameter does not suit you, you can easily change it by right-clicking the mouse. The diameter will have to be changed several times during painting.

Here's what I got:

As you can see, there are some flaws, and I didn’t try to make everything perfect in order to show you another technique.

Remember how we translated the colors so that there was black on top? Now you need to perform the reverse operation and set the white color on top. And then we erase the selection that seems unnecessary to us.

Here, now it's better. Don't forget to change the brush diameter.

We switch to normal mode. To do this, click on the “Mask” button again.
In order to select only the shape we need, press the key combination Shift Ctrl I.

We have everything ready. Open the image onto which we want to drag the shape.
You should see two images. To do this, the images need to be torn apart.

How to separate an object from the background using a quick mask - Photoshop tutorial

Another way to work with a quick mask.

We will cut out the bird in this picture

First, let's duplicate the layer on which we will create the cutout. We will extinguish the bottom layer. Then go to the command Edit in Quick Mask Mode (Q)

Then select the Line Tool command.

Then in the top field in the Weight column you should select the line width, for example 3 px. This line should be used to outline the boundaries of the cut object.

To draw a line, you need to left-click on the first point and hold it down until you reach the second point, and so on.

Draw such lines around the entire contour and close it. It is very important that the contour is closed, without breaks.

Then use the Paint Bucket Tool (G) to fill the area inside the outline.

Coming out of the mask

Click Delete. And thereby we separate the cut out object from the background.

After cutting, the outline of the picture remains sharp and if it is superimposed on another background, then most likely clear boundaries of the transition from the picture to the background will be visible. So here it is. In order to fix this, you can do the following:

To begin with, you can remove the remnants of the background from the picture. Select > Modify > Expand and in the window that appears, set the value of the selection indent from the edge inward. (for example 2 px)>Ok.

Then click Delete. This way we trim the edges a little. We do not remove the selection.

And in order to slightly blur the edges of the cut out picture, you can use the Blur Toll tool. And use this tool to walk along the border of the picture, creating a slight blur of the edges. But you can use, as it seems to me, a simpler method. Using the Border command, which is located in the Select > Modify > Border menu, you can set a double selection. In the Border command window that appears, you need to set the width of the double selection, for example 3 px. Or any other at your discretion. Ok.

The result was milk allocation. This way we defined the boundaries for blurring the contour.

Then go: Filter > Blur > Gaussian Blur. And select the blur degree from 1 px to 2 px. Ok. In this case, the Gaussian Blur filter used will only affect the selected area

Press Ctrl + D (deselect).

Result after blurring the edges:

Before blurring the edges:

And we overlay the result on any image.

In the process of editing images in any graphic editor, one of the most frequently repeated operations, perhaps, is selecting and cutting out objects, performed for the purpose of moving, transforming, correcting, extracting from the background, etc.

There are a lot of graphic editors on the Internet, but having thoroughly mastered how to select an object in Photoshop, it will not be difficult to cope with this in all other programs or online services.

If we say that in terms of variety and convenience of selection methods, Photoshop has no equal, this would not be an exaggeration (at least not an obvious one).

You can select manually by tracing the outline of an object or drawing a selection area with a brush, or automatically using standard selection path shapes and other “magic” tools. In addition, Photoshop uses masks, color channels, filters and special plugins to select fragments.

However, despite the variety, simplicity and convenience of special selection tools in Photoshop, according to many experienced Photoshoppers, there is no more accurate and better way than using the Pen tool.

On the contour of the object carefully outlined with a pen, right-click and select the “Make Selection” command, then in the dialog box that opens, set the feathering radius, check/uncheck the “Anti-aliasing” checkbox and click OK. That's it, the selection is ready.

Automatic selection of an object in Photoshop comes down to stretching a frame along the contour of the element if it has a rectangular or oval shape, and in some tools to clicking (clicking) the mouse inside the selected area.

Rectangular and round selections

The selection tools with rectangles, ellipses (circles) and narrow stripes (lines) are collected on the panel in a group with the tooltip “Rectangular Marquee Tool”, which, in addition to the above, includes the tools “Oval region” (Elliptical Marquee Tool), “Area horizontal line" (Single Row Marquee Tool) and "Vertical line area" (Single Column Marquee Tool).

To make a selection, you need to click where necessary with the mouse, stretch the frame to the desired size and release the button - the selection is ready. If you drag the mouse with the Shift key pressed, you will get a square (or circle), and if you drag with the Alt key, the frame will begin to stretch from the center of the shape, and not from the corner or edge.

The next very useful “if” is associated with the spacebar, which, by pressing it during a selection (without releasing the Shift key), you can interrupt the process of stretching the frame and move the entire path to better “aim”, then release the spacebar and continue the selection.

And the last “if” refers to the cursor, which changes its appearance inside the selected area, indicating that the entire outline can now be moved.

All selections in the top panel have the same settings, with the exception of the oval selection, which has an Anti-aliased mode to smooth out opacity transitions at the edges.

Complex selection paths

Once you understand whether the selection outlines are rectangular or oval (round), you can move on to more intelligent selection tools.

For elements with complex contours, a group of tools is provided at your service with the hint "Polygonal Lasso Tool", which, in addition to the above, includes the Tool) and the "Magnetic Lasso Tool".

A simple Lasso is like a pencil. By pressing the left mouse button, draw a lasso around the desired area (object) and release the button. The circuit will automatically close wherever you release the button. If the outline is unsuccessful, you can, without releasing the button, press the Esc key, thus removing the selection, and “throw the lasso” again.

By turning on the "Rectilinear/Polygonal Lasso", you outline the object not with a smooth, continuous line, but with an angular outline, sequentially clicking the mouse from point to point, between which straight lines are drawn. To close a contour, it is not necessary to combine the beginning with the end point - it is enough to get close to it so that a circle appears next to the cursor, hinting that you can safely click - the contour will close. You can also create a path without closing it completely by double-clicking or pressing the Ctrl key.

If the line goes in the wrong direction, the Esc key will help out, but it is better to use the Delete key, which deletes the last segment of the contour. With the Alt key pressed during the selection, both lassos change roles.

If you don’t care how to cut out an object in Photoshop, as long as the selection is more or less high-quality and, most importantly, fast, then, perhaps, Magnetic Lasso will cope with this in the best possible way.

A wise “lasso with a magnet” itself recognizes the line of maximum difference in color, brightness or contrast and “sticks” to this line. All we need to do is click the mouse on the border of the selection object and simply “lasso” it around it, without bothering with the details. Unlike conventional lasso, a magnetic lasso needs to be given the width (width) of the zone (strip) that it must analyze when determining the boundary of the selected object. The circuit of the magnetic tool is closed in the same way as with conventional lasso.

"Magic" tools

Another sweet pair of selection tools hidden under one toolbar button includes the Magic Wand Tool and Quick Selection. These tools allow you to select areas of the same color or similar colors in an image.

Unlike the familiar “Fill” tool (a bucket of paint) with the same settings, it does not fill areas with a different color, but selects them. By clicking the mouse on any point, the Magic Wand analyzes the color around it and selects all adjacent areas of the same color, provided that the “Contiguous” mode is selected in the tool settings. Otherwise, the selection will spread to all suitable areas throughout the image.

The Quick Selection tool works on the same principle, only here the selection area is painted with its own brush with customizable parameters (size, hardness, spacing, angle and shape).

There are many reasons why using standard selection tools in certain situations is inappropriate or undesirable, so it is advisable to figure out how to select an object in Photoshop in such a capricious case.

To do this, they use a group of erasing tools (erasers), among which there are also “wizards”. The group includes the Eraser Tool itself, the Background Erser Tool and the Magic Eraser Tool.

The essence of selecting objects using erasers is obvious and simple: everything around the selected element is completely erased (or with a smooth transition), after which retrieving the object will no longer be difficult.

The "Eraser" works like a brush or a pencil, so their settings are the same. The principle of operation of the "Magic Eraser" is the same as that of the "Magic Wand" tool, only the eraser does not create a selection, but removes areas of the same color from the drawing or part of it.

The "background eraser" is not magical, but if you show it a sample (click the mouse over the area to be deleted) and, while holding the button, trace the outline of the object, it will delete exactly what you need, regardless of the complexity of the border, and even generously allow you to "brazenly" "climb the cursor-sight onto an object.

As an alternative to selecting by color, consider the Color Range command in the Select menu. This command will open the settings window for this function with a small copy of the image in the center. The color that should be highlighted is indicated by clicking with the mouse (eyedropper) on the thumbnail or on the image itself. You can click until you lose your pulse until the selected shade suits you, and if you click with the Shift key, the new color will be added to the previously selected ones, and clicking with the Alt key, on the contrary, excludes the specified shade from candidates for selection (the same thing is done pipettes with +/-).

To control the selection of a multi-colored area, you need to select the “Selection” radio button under the thumbnail.

Extracting an object from the background

Photoshop does an excellent job of separating an object from the background using the “Extract” command in the menu. This command takes us to a separate dialog box worthy of the status of a mini-selection editor. We are required to select a tool similar to a felt-tip pen at the top left, set the thickness of the stroke and outline the object, thus showing the program where the border between the element to be separated and the background will be. The border must be inside the drawn line bordering the object. Having closed the outline, select the paint bucket (Fill Tool) and fill the object by clicking inside (not outside!) the drawn outline. Only after this the “OK” button will allow you to click and be convinced of the extraordinary capabilities of the Extract filter.

Selection using color channels

To select objects with a very complex configuration, they sometimes resort to the help of color channels, since it turns out that selecting an object in Photoshop is possible not only in standard ways.

To do this, go to the “Channels” tab in the layers panel and select the most contrasting (usually blue) channel. Then duplicate the layer of the selected channel, go to “Image” > “Correction” (Adjustments) > “Brightness”/“Contrast” (Contrast) and enhance both parameters, extremely darkening the object and “whitening” the background. If necessary, you can make refinements with a black or white brush.

Next, the image is inverted (Invert) by selecting this command in the same menu “Image” > “Correction”. Now all that remains is to click with the Ctrl key pressed on the channel copy layer and, “closing its eye,” return to the “Layers” tab in the RGB mode, where a neat and precise selection is already waiting for you.

Selecting with Quick Mask

You can also select/cut out an object using the Quick selection tool located at the very bottom of the toolbar. The selection area here is simply painted in black (but the mask is red) using regular brushes. Partial selection for shading its borders is achieved not only by varying hardness, opacity and brush pressure, but also by painting with different shades of gray. In mask mode, you can also apply a gradient fill “from black to white” or vice versa.

Often there is a need for some reason to slightly move an object in the image. It is better to carry out such an operation in conditions of a relatively uniform background, so that it is easier to “patch the hole” in the old place of the displaced fragment. It turns out that there are programs in which this is done almost automatically “without noise and dust.” For example, you can move CS6 "invisibly" to another location using the Content-Aware Move Tool, which is located in the Spot Healing Brush tool group.

To do this, you need to select an object in any way and simply move it to the desired place, and the program will make sure that there are no traces (at least obvious) of the “immigrant’s” former place of residence in the background. If it gets a little messy, you can help the Content-Aware Move tool “cover its tracks” by choosing Fill from the Edit menu and selecting Content-Aware from the Use list.

Refine the edges of the selection

Starting with version CS5, Photoshop introduces a powerful Refine Edge tool, located among other options in the settings panel of all selection tools. Using this tool, you can set the width of the edge detection area (Radius setting and Smart Radius function) and adjust the parameters for offset, smoothing, feathering, and contrast of the edges of the selected object.