两幅图像相减去除背景_如何通过两个快速步骤从白色背景中删除几乎所有图像...

两幅图像相减去除背景_如何通过两个快速步骤从白色背景中删除几乎所有图像...

两幅图像相减去除背景

两幅图像相减去除背景_如何通过两个快速步骤从白色背景中删除几乎所有图像...

Cutting an object out from a white background can be a pain. Photoshop’s automated tools give uneven results in a lot of case. However, we do have a technique that, while not perfect, gives great results more than 90% of the time. More importantly, it’s nice and quick.

从白色背景中切出一个对象可能会很痛苦。 在很多情况下,Photoshop的自动化工具都会使结果不均匀。 但是,我们确实有一种技术,虽然不完美,但超过90%的时间都能产生出色的结果。 更重要的是,它既好又快速。

设定文件 (Setting Up the Document)

Open the image from which you want to remove the white background from in Photoshop. I’m using this product photo of a Tissot Le Locle watch which was our sister site, Review Geek’s, pick for best affordable automatic gold watch.

在Photoshop中打开要从中删除白色背景的图像。 我正在使用Tissot Le Locle手表的这张产品照片,这是我们的姊妹网站Review Geek's,为最好的价格适中的自动金表

两幅图像相减去除背景_如何通过两个快速步骤从白色背景中删除几乎所有图像...

Double click on the Background layer to unlock it.

双击Background层将其解锁。

两幅图像相减去除背景_如何通过两个快速步骤从白色背景中删除几乎所有图像...

Next, go to Layer > Duplicate Layer, and then click “OK” or use the keyboard shortcut Control-J (Command-J on a Mac).

接下来,转到“图层”>“复制图层”,然后单击“确定”或使用键盘快捷键Control-J(在Mac上为Command-J)。

两幅图像相减去除背景_如何通过两个快速步骤从白色背景中删除几乎所有图像...

Click on the little eye icon to turn visibility off for the top layer, in my case it’s “Layer 0 Copy” and everything is set up.

单击小眼睛图标以关闭顶层的可见性,在我的情况下为“第0层副本”,所有内容均已设置。

两幅图像相减去除背景_如何通过两个快速步骤从白色背景中删除几乎所有图像...

One optional step is to add a colored background to make things a little easier to see. I’m going to do it just to make the screenshots clearer.

一个可选步骤是添加彩色背景,使事情更容易看清。 我要做的只是使屏幕截图更清晰。

Go to Layer > New Fill Layer > Solid Color, click “OK,” and then select a nice bright color. I’m going with this fetching pink.

转到“图层”>“新建填充图层”>“纯色”,单击“确定”,然后选择一种漂亮的亮色。 我要搭配这种粉红色。

两幅图像相减去除背景_如何通过两个快速步骤从白色背景中删除几乎所有图像...

Drag the Fill Layer to the bottom of the Layer stack, so it’s underneath everything, and you’re ready to go.

将“填充图层”拖到“图层”堆栈的底部,因此它位于所有内容的下面,您可以开始使用。

两幅图像相减去除背景_如何通过两个快速步骤从白色背景中删除几乎所有图像...

创建大纲 (Creating the Outline)

The first step is to get rid of all the white in the image. To do this we’re going to use Blend If, one of Photoshop’s more advanced features. Just follow the instructions and you’ll be fine.

第一步是要消除图像中的所有白色。 为此,我们将使用Photoshop更高级功能之一的Blend If。 只需按照说明进行操作,就可以了。

Double-click on the original layer (Layer 0 in our example), to bring up the Layer Styles dialog.

双击原始图层(在本示例中为第0层),以打开“图层样式”对话框。

两幅图像相减去除背景_如何通过两个快速步骤从白色背景中删除几乎所有图像...

The only thing we’re interested in here is the Blend If sliders.

我们唯一感兴趣的是Blend If滑块。

两幅图像相减去除背景_如何通过两个快速步骤从白色背景中删除几乎所有图像...

Click on the white arrow on the right hand side of the top slider—“This Layer”—and drag it to the left. Instantly, a lot of the white will vanish.

单击顶部滑块右侧的白色箭头“此层”,然后将其拖动到左侧。 瞬间,许多白色将消失。

两幅图像相减去除背景_如何通过两个快速步骤从白色背景中删除几乎所有图像...

This is obviously a rough correction, so we need to use a bit more finesse. Drag the arrow until there’s only a thin white border around the object you’re cutting out. Don’t worry about any pink showing up on it, we’ll fix that in the next step.

这显然是一个粗略的校正,因此我们需要使用更多的技巧。 拖动箭头,直到要裁剪的对象周围只有白色的细边框。 不用担心上面会出现粉红色,我们将在下一步中修复它。

两幅图像相减去除背景_如何通过两个快速步骤从白色背景中删除几乎所有图像...

Next, hold down Alt or Option, click on the arrow, and keep dragging to the left. This will split the arrow.

接下来,按住Alt或Option,单击箭头,然后继续向左拖动。 这将拆分箭头。

两幅图像相减去除背景_如何通过两个快速步骤从白色背景中删除几乎所有图像...

Play around with the split arrows until even the thin white border has pretty much disappeared. Again, don’t worry about how things look on the inside of the object.

玩弄分裂箭头,直到即使是细小的白色边框也几乎消失了。 同样,不必担心事物在对象内部的外观。

两幅图像相减去除背景_如何通过两个快速步骤从白色背景中删除几乎所有图像...

When you’re happy that almost all the white is removed from the background, click OK. Here’s what the watch looks like now. The white’s all gone from the background, but the center of the watch is showing quite a bit of pink.

当您满意从背景中删除几乎所有白色时,请单击“确定”。 这是手表现在的样子。 白色全部从背景中消失了,但手表的中心显示出相当多的粉红色。

两幅图像相减去除背景_如何通过两个快速步骤从白色背景中删除几乎所有图像...

中间掩蔽 (Masking in the Middle)

Select the layer you duplicated at the start and turn visibility back on by clicking in the box where the eye icon was.

选择您在开始时复制的图层,然后通过单击眼睛图标所在的框来重新打开可见性。

两幅图像相减去除背景_如何通过两个快速步骤从白色背景中删除几乎所有图像...

Next, go to Layer > Layer Mask > Hide All. This will add a black layer mask to the layer.

接下来,转到图层>图层蒙版>全部隐藏。 这将为该图层添加黑色图层蒙版。

两幅图像相减去除背景_如何通过两个快速步骤从白色背景中删除几乎所有图像...

If you’re confused about layer masks, check out our full guide. The basics are that any black on a layer mask conceals, while any white on a layer mask reveals. Since we’ve added a totally black mask, the duplicated layer is now hidden, but we can paint white on the mask using the Brush tool (or any other tool you like) to reveal things. This is how we’re going to fix up the inside of the object.

如果您对图层蒙版感到困惑, 请查看我们的完整指南 。 基本原理是,图层蒙版上的所有黑色都可以隐藏,而图层蒙版上的任何白色都可以隐藏。 由于我们添加了全黑的蒙版,因此现在隐藏了重复的图层,但是我们可以使用“画笔”工具(或您喜欢的任何其他工具)在蒙版上绘制白色以显示事物。 这就是我们要修复对象内部的方式。

Select the Brush tool (the keyboard shortcut is B). Make sure that Hardness is set to about 80% and that Opacity and Flow are at 100%. Also press D to reset the brush to its default colors; this means we’ll be automatically be painting with white.

选择“画笔”工具(键盘快捷键是B)。 确保将“硬度”设置为大约80%,并且“不透明度”和“流动”为100%。 同时按D重置画笔为默认颜色; 这意味着我们将自动用白色绘画。

两幅图像相减去除背景_如何通过两个快速步骤从白色背景中删除几乎所有图像...

Resize the brush using the [ and ] keys and then just start painting on any area of the inside that’s pink. Since we’ve already got a good outline, you can be pretty heavy handed with the stuff in the middle. Make the brush smaller and smaller as you get closer to the edges so you don’t stray over the lines. If you make a mistake, press X to switch to painting with black and paint over where you’ve messed up; press X again to go back to white.

使用[和]键调整画笔的大小,然后在粉红色的内部任何区域开始绘画。 既然我们已经有了一个很好的大纲,那么中间的内容可能会给您带来沉重的负担。 当您靠近边缘时,使画笔变得越来越小,以免流浪。 如果输入有误,请按X键切换为黑色绘画,然后在混乱的地方绘画; 再次按X返回至白色。

两幅图像相减去除背景_如何通过两个快速步骤从白色背景中删除几乎所有图像...

Once you’re done, you should have something that looks like this.

完成后,您应该会看到类似以下的内容。

两幅图像相减去除背景_如何通过两个快速步骤从白色背景中删除几乎所有图像...

Set the background to whatever you want and then save your image . If you want to keep the background transparent, make sure to save it as a PNG file.

将背景设置为任何您想要的,然后保存图像。 如果要保持背景透明,请确保将其另存为PNG文件。

整理起来 (Finishing Up)

This is a quick and dirty method but it works. You can spend more time and use some of Photoshop’s more technical tools to create marginally better masks, but it’s rarely worth it.

这是一种快速而肮脏的方法,但是它可以工作。 您可以花费更多时间并使用Photoshop的某些技术工具来创建稍微更好的蒙版,但这很少值得。

This method isn’t perfect. I deliberately chose an object that’s a bit difficult for the demonstration. Things that are close to white in color or shiny around the edges like the watch require more care to get right. If you’re cutting something out with hard black edges, you can do it in seconds.

这种方法并不完美。 我特意选择了一个对演示有点困难的对象。 颜色接近白色或边缘有光泽的东西(如手表)需要加倍注意。 如果您要切掉一些带有坚硬黑色边缘的东西,则可以在几秒钟内完成。

翻译自: https://www.howtogeek.com/358115/how-to-remove-almost-any-image-from-a-white-background-in-two-quick-steps/

两幅图像相减去除背景