How to give sketch effect on image in iphone?

2020-04-10 11:11发布

I am implementing an iPhone application, in which I have implemented the following functionalities:

  1. Select photo
  2. Capture photo
  3. Now I want to give a sketch effect to that photo like this one.

How could I do this?

标签: iphone
3条回答
【Aperson】
2楼-- · 2020-04-10 11:23

If I may once again recommend it, my open source GPUImage framework has a built in filter that does just this. The GPUImageSketchFilter uses Sobel edge detection to highlight edges in black on images or video, leading to the exact same effect as seen in that application:

Sketch filter

The above image was drawn from this answer, where I describe how that filter works, as well as show a couple other filter examples.

In fact, the SimplePhotoFilter example application that comes with the framework does exactly what you describe (capture a photo, apply a sketch filter to it, and save it to the photo library), so I'd start there if you want to get this up and running quickly.

查看更多
够拽才男人
4楼-- · 2020-04-10 11:40

OpenCV can be used to give sketch effect on image in iphone.

Refer iphone-how-to-convert-a-photo-into-a-pencil-drawing link and get helped.

查看更多
登录 后发表回答