Home > dev, graphics, image processing, iPhone, vDSP > UIImage processing using vDSP/Accelerate framework

UIImage processing using vDSP/Accelerate framework

Image processing on mobiles can be pretty performance intensive given the relatively low power of their CPU’s (as compared to desktops).

In order to get reasonable processing speeds for my application Bokeh Booth I decided to build some efficient UIImage extensions which make use of the vDSP routines in the iOS 4 and up Accelerate framework. This framework allows for efficient matrix based image processing on iPhone/iPad devices, even those without OpenGL shader support.

You can grab a copy of all my routines here: https://github.com/gdawg/uiimage-dsp

The github repository contains a UIImage Category with the dsp processing routines and an example app showing how to call the routines.

I’ve tried to make the routines as easy as possible to use, for example you can blur an image using code as simple as

UIImage* src = [UIImage imageNamed:@"image.png"];
UIImage* blurred = [src imageByApplyingGaussianBlur3x3];

At this stage the library is still very much in it’s infancy but there’s support for blur/sharpen/2pass Gaussian Blur/emboss functions with the potential for many more to come.

The two pass Gaussian filter is particularly fast compared to any trivial implementation in software.

The github repository contains an example project showing usage:

If you use the library anywhere I’d love to hear about it. Also if you have any bugfixes or ideas on improvements I’d love to hear them too!

email me

Andrew.

Advertisement
  1. November 14, 2011 at 10:24 pm | #1

    Great implementation, very fast indeed. Thanks for sharing.

    • November 14, 2011 at 11:37 pm | #2

      glad to hear it’s been useful to others thanks for the feedback!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.