iPhone:如何将照片转换为铅笔素描 [英] iPhone: How to convert a photo into a pencil drawing

查看:1131
本文介绍了iPhone:如何将照片转换为铅笔素描的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道将照片转换成铅笔图的步骤。人们通常建议:


  1. 反转图片(设为负面)


查看此处:将图片转换为铅笔素描



有没有其他方法?我会特别感兴趣的方法,强调铅笔的笔触,像这个iPhone应用程序: Snap and Sketch



我非常感谢任何有关如何开始使用的建议。

解决方案

我想你必须遍历图像中的所有像素,并实现你在问题本身提到的算法。在iPhone中没有默认的图像过滤库(CoreImage是有的,但只有Mac)。我认为您的选项是


  1. 第三方库名为
    imageMagic 在这里,
    这些人似乎有
    移植它成功到
    iphone。需要思考。

  2. 另一个简单图像过滤
    (特别是对于iphone)
    做一些基本的图像
    过滤。 通过
    实现
    中的每个像素实现您自己的方法image image 这个线程非常
    用于图像过滤
    seekers在iphone。他们是
    实现一些过滤器。至少
    您将获得有关如何浏览图片每个像素的信息。

编辑:在iphone。我没有机会玩它。 是文档 p>

I was wondering what the steps would be to convert a photo into a pencil drawing. People usually suggest to:

  1. invert the image (make negative)
  2. apply Gaussian Blur
  3. blend the above images by linear dodge or color dodge.

See here: Convert Image to Pencil Sketch

Are there other methods? I'd be particularly interested in methods which emphasise the stroke of the pencil, like this iPhone App: Snap and Sketch

I'd be very grateful for any suggestions of how to get started.

解决方案

I think you will have to iterate through all the pixels in the image and implement the algorithm you mentioned in the question itself. There is no default image filtering library in iphone (CoreImage is there but only for Mac). I think your options are

  1. A third party library named imageMagic is there, and these people seems to have ported it successfully to iphone. Something to ponder over.
  2. Another simple image filtering library (especially for iphone) does some basic image filtering. Gaussian blur is one of them.
  3. Implement your own methods by going through each pixel in image..This thread is very useful for image filtering seekers in iphone. They are implementing some filters. At least you will get information about how to go through every pixels of an image.

EDIT: Core Image now present in iphone. I did not get a chance to play with it yet. This is the documentation

这篇关于iPhone:如何将照片转换为铅笔素描的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆