Search code examples
ios4image-processinguiimageviewuiimage

How to do image processing with iPhoneSDK


How does one do image processing & manipulation in an iPhone application?

I would like to include below 3 important steps:

  1. access raw RGB from image data
  2. apply any image processing (edge detect, grey-scale, contrast & color).
  3. create a new image from this modified data.

I got few links with color & contrast, but still looking for edge detection just from the corners of the image.

Here are the links:

https://launchpad.net/imagemagick/main/6.3.2-2

http://code.google.com/p/image-tools2009/source/checkout

http://www.google.com/codesearch#I0cABDTB4TA/pub/FreeBSD/

Is there any other open source code available for these functionalities?


Solution

  • Your question highlights open source frameworks - but I'm going to throw my answer behind Apple's CoreImage framework that is now available in iOS5. CI has been around as an OSX framework for a very long time and as of iOS 5+ you can use a subset of the filters in iOS.

    Advantages include:

    • Very powerful
    • Highly Optimised
    • Been around for ages

    Ray Wenderlich has great tutorials and he has one on "Beginning Core Image in OS5" which I think might be right up your alley. He talks of the fundamental parts like CIContext, CIImage, CIFilter.

    The second place you should look is the Core Image Programming guide for iOS and then CoreImage Filter Reference from Apple. The filter reference mentions which filters are available in iOS.

    If you're finding that all a bit difficult, I think you may need to step backwards into CoreGraphics to learn the underlying basics of graphics on iOS - but that's outside the scope of this question.