iPhone: How to convert a photo into a pencil drawing

前端 未结 1 1840
南旧
南旧 2020-12-15 13:27

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 Ga
相关标签:
1条回答
  • 2020-12-15 14:16

    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

    0 讨论(0)
提交回复
热议问题