
3.3 多种抠图
抠图是指将图像中需要的部分从画面中精确地提取出来。抠图是后续图像处理的重要基础。在装修店铺时,时常需要将一些图片单独抠取出来,放在漂亮的背景图片中,从而制作出店铺中的海报、直通车图、钻展图等图形效果。在Photoshop中,抠图的方法有很多种,常见的有不规则形状抠图、简单背景抠图、复杂图形抠图等,本节将详细讲解多种抠图的方法。
3.3.1 不规则形状抠图
使用磁性套索工具可以将不规则形状的图形从背景图中单独抠取出来,下面将介绍其具体操作步骤。
实例效果

扫一扫

下载视频教学
01 执行“文件”|“打开”命令,打开“素材\第3章\3.3.1\电烤盘.jpg”图像文件,如图3-43所示。

图3-43 打开图像文件
02 在“图层”面板中,双击“背景”图层,弹出“新建图层”对话框,单击“确定”按钮,即可将其转换为“图层0”图层,如图3-44所示。

图3-44 转换图层
03 在工具箱中选择(磁性套索工具),在图像上单击,确定起点锚点,拖动鼠标指针会显示一条磁性套索路径,如图3-45所示。

图3-45 显示磁性套索路径
04 继续沿着电烤盘边缘拖动鼠标指针,创建锚点,如图3-46所示。

图3-46 创建锚点
05 当绘制到第一个锚点上单击,即可将磁性套索路径封闭,并自动创建选区,如图3-47所示。

图3-47 自动创建选区
06 在创建的选区上右击,弹出快捷菜单,选择“选择反向”命令,如图3-48所示。

图3-48 选择“选择反向”命令
07 即可反选选区,按Delete键,即可删除选区内的蓝色背景图像,按快捷键Ctrl+D取消选中选区,如图3-49所示。

图3-49 删除选区图像
08 在工具箱中选择(橡皮擦工具),在工具选项栏中,设置“大小”参数为“10像素”,在背景图像上按住鼠标左键拖曳,擦除多余的图像,如图3-50所示。

图3-50 擦除图像
09 执行“文件”|“打开”命令,打开“素材\第3章\3.3.1\背景图.jpg”图像文件,如图3-51所示。

图3-51 打开背景图像
10 在工具箱中选择(移动工具),在“电烤盘”图像上,选择电烤盘图像,将其拖曳至“背景图”的背景图像上,得到最终图像效果,如图3-52所示。

图3-52 最终图像
TIPS
使用磁性套索工具绘制选区的过程中,按住Alt键在其他区域单击,可以切换为多边形套索工具创建直线选区;如果按住Alt键单击并拖动鼠标,可以切换为套索工具。
3.3.2 简单背景抠图
在抠取图像时,如果图像的背景效果很简单,则可以使用魔棒工具,快速选择色彩变化不大且色调相近的区域,进行图像抠图操作。
实例效果

扫一扫

下载视频教学
01 执行“文件”|“打开”命令,打开“素材\第3章\3.3.2\坚果.jpg”图像文件,如图3-53所示。

图3-53 打开图像文件
02 在“图层”面板中,双击“背景”图层,弹出“新建图层”对话框,单击“确定”按钮,即可将其转换为“图层0”图层,如图3-54所示。

图3-54 转换图层
03 在工具箱中选择(魔棒工具),在图像的蓝色背景上单击,即可创建选区,如图3-55所示。

图3-55 创建选区
04 按Delete键,即可删除选区内的蓝色背景图像,如图3-56所示。

图3-56 删除选区图像
05 使用同样的方法,依次创建其他选区,并删除选区内的蓝色背景图像,并选择(橡皮擦工具),擦除多余的背景,如图3-57所示。

图3-57 删除选区图像
06 执行“文件”|“打开”命令,打开“素材\第3章\3.3.2\背景.jpg”图像文件,如图3-58所示。

图3-58 打开图像文件
07 在工具箱中选择(移动工具),将“坚果”图像中的坚果拖曳至“背景”图像上,得到最终的图像效果,如图3-59所示。

图3-59 最终图像效果
TIPS
使用魔棒工具时,按住Shift键单击可以添加选区;按住Alt键单击可以在当前选区中减去选区;按住快捷键Shift+Alt单击可以得到与当前选区相交的选区。
3.3.3 复杂图形抠图
在抠取图像时,有的图像边缘呈现不规则形状,有直线,也有曲线。此时,可以使用钢笔工具绘制出光滑的曲线路径或直线路径来进行图像的抠图操作。
实例效果

扫一扫

下载视频教学
01 执行“文件”|“打开”命令,打开“素材\第3章\3.3.3\皮鞋.jpg”图像文件,如图3-60所示。

图3-60 打开图像文件
02 在工具箱中选择(钢笔工具),在工具选项栏中,设置“工具模式”为“路径”。多次按快捷键Ctrl++,放大图像,在图像窗口的皮鞋边缘上,按住鼠标左键拖动鼠标指针,绘制第一个点,如图3-61所示。

图3-61 绘制第一个点
03 移动指针到合适的位置,按住鼠标左键绘制第二个曲线锚点,此时可以看到在两点之间产生了一条曲线,如图3-62所示。

图3-62 产生曲线
04 用同样的方法,继续绘制其他锚点,这样就形成一条曲线路径,如图3-63所示。

图3-63 创建曲线路径
05 继续沿着皮鞋边缘创建锚点,在直线段的地方单击添加锚点,曲线段的地方拖动鼠标指针创建锚点,如图3-64所示。

图3-64 产生曲线
06 当绘制到第一个锚点时,指针右下角将显出一个小圆圈,此时单击,即可将路径封闭,如图3-65所示。

图3-65 创建曲线路径
07 在“路径”面板的底部,单击“将路径作为选区载入”按钮,如图3-66所示,即可将钢笔工具路径转换为选区,如图3-67所示。

图3-66 单击“将路径作为选区载入”按钮

图3-67 转换选区
08 执行“文件”|“打开”命令,打开“素材\第3章\3.3.3\背景.jpg”图像文件,如图3-68所示。

图3-68 打开图像文件
09 在工具箱中选择(移动工具),将选区内的图像移动并拖曳至“背景”图像窗口中,按快捷键Ctrl+T,打开变换控制框,调整图像的大小和位置,得到最终的图像效果如图3-69所示。

图3-69 最终图像
TIPS
使用钢笔工具绘制直线的方法比较简单,在操作时单击,不要拖动鼠标指针,否则将创建为曲线路径。如果要绘制水平、垂直或以45°角为增量的直线,可以按住Shift键进行操作。