iPhone:如何将照片转换为铅笔素描 [英] iPhone: How to convert a photo into a pencil drawing
问题描述
我想知道将照片转换成铅笔图的步骤。人们通常建议:
- 反转图片(设为负面)
查看此处:将图片转换为铅笔素描
有没有其他方法?我会特别感兴趣的方法,强调铅笔的笔触,像这个iPhone应用程序: Snap and Sketch
我非常感谢任何有关如何开始使用的建议。
我想你必须遍历图像中的所有像素,并实现你在问题本身提到的算法。在iPhone中没有默认的图像过滤库(CoreImage是有的,但只有Mac)。我认为您的选项是
- 第三方库名为
imageMagic 在这里,
这些人似乎有
移植它成功到
iphone。需要思考。 - 另一个简单图像过滤
库(特别是对于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:
- invert the image (make negative)
- apply Gaussian Blur
- 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
- A third party library named imageMagic is there, and these people seems to have ported it successfully to iphone. Something to ponder over.
- Another simple image filtering library (especially for iphone) does some basic image filtering. Gaussian blur is one of them.
- 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屋!