Search:
License: BSD
Rating:+1 (3 votes)
simple-iphone-image-processing
-1
I've written a simple C++ class with an Objective-C wrapper that provides a set of common image processing tasks along with conversion to and from UIImage.

The code supports the following operations:

Canny edge detection
Histogram equalisation
Skeletonisation
Thresholding, adaptive and global
Gaussian blur (used as a preprocessing step for canny edge detection)
Brightness normalisation
Connected region extraction
Resizing - uses interpolation

You can give it a UIImage and it converts it to a greyscale image ready for processing. At the moment I'm taking a shortcut and just taking the green channel from the image (my images tend to be of newspapers so there's no colour). You might want to uncomment the lines that take the average of the r,g and b channels.

With the sample project you can add images to your resources and they show up in the list of images to process.

The Objective-C image wrapper class takes care of memory management for you. All the methods on the C++ class either return you one of these wrapper objects or operate directly on the current image.
Leave a comment
Copyright © 2010. All Rights Reserved