您当前的位置:首页 > 计算机 > 软件应用 > 图形编设

将彩色图片转成线描图

时间:06-12来源:作者:点击数:

在中文资料中,彩色图片转成线描图的材料很少,无外乎两种:用Matlab或别的语言实现边缘检测算法;用PS去进行边缘检测,抠图,然后再用滤镜进行转换。

老外的一篇Photo to Line Drawing帮助我解决了实际的问题。在PS CS5中操作很简单。

文中High Pass对应 滤镜-》其他-》高反差保留

Sketch->Note Paper对应 滤镜-》素描-》便条纸

Image / Adjustments / Threshold 对应 图像-》调整-》阈值。

Photo to Line Drawing

Introduction

There are several Photoshop techniques to convert a photograph to a line drawing. One of them was already discussed in the Drawing/Painting effect Photoshop tutorial.

That Photoshop technique was based on the Film Grain filter. Most of these kind of conversions are done in Photoshop with filters like Smart Blur, Find Edges or Glowing Edges.

In this Photoshop tutorial I'm showing a recently discovered technique that I haven't seen anywhere else and that's the reason why I'm sharing it with you. The technique is based on two filters:

  • High Pass
  • Note Paper

The results are slightly different and often better than other Photoshop techniques I've talked about earlier.

1. Select the right image

Open an image that doesn't have a lot of rough textures, because like with the other techniques the results are not going to be that good.

In my example I've opened the image of a clock in Photoshop.

Original image of a clock

Duplicate this background layer by clicking on its icon in the layers palette and while holding the mouse button, drag and drop it on the Create a New Layer icon New Layer.

Duplicate Layer

First press Ctrl + D (Command + D on the Mac) to change the foreground color to black: Fore- and background color

2. Apply High Pass Filter

Select in the menu: Filter / Other / High Pass

Select a very small radius. The radius depends on the size of the image. In my example I've chosen a radius of only 0.3 pixels.

Result of High pass

Just make sure that you don't use too much radius like in this example:

Image with too much High Pass applied

3. Apply Note Paper filter

Select in the menu: Filter / Sketch / Note Paper...

Use the following values:

  • Image Blance: 25 (depends on the image, experiment)
  • Graininess: 0
  • Relief: 0

The result looks like this:

Image after applying filter 'Note Paper'

4. Convert gray lines to black

In our previous step the lines are not black but some shade of gray. We can change this by adding a threshold correction.

Select in the menu: Image / Adjustments / Threshold...

Move the slider to the right until you see a black & white drawing of the image. In my example a Threshold Level of 180 was enough.

Here's the result:

Concerting gray lines to B&W

Go to the tool bar and select the Pencil Tool Pencil Tooland set the foreground to white by pressing X on your keyboard (this switches the fore- and background colors)
Now remove some a the few distracting pixels by clicking on them with the pencil tool. Make sure that you zoom in and that you use a small sized pencil.

Final image after some small pencil corrections

Here's another example:

Flower image   Flower Image converted to line art

Have fun!

方便获取更多学习、工作、生活信息请关注本站微信公众号城东书院 微信服务号城东书院 微信订阅号
推荐内容
相关内容
栏目更新
栏目热门