View Full Version : Colour comparison?

Mar 20, 2011, 01:45 PM
Heya all,

I am looking at which idea to put forward for an app and wondering if the SDK has classes that allow the IPhone to take a photo and then analyse the image for a colour? (Almost like a piece of comparison code that asks if certain colours exist in the image taken.)

Probably a stupid question but thought i'd ask the Rumors Collective Mind. :rolleyes:

Mar 20, 2011, 02:03 PM
Not directly no. There are ways to get the pixel data of an image that you could then iterate over and do whatever you want. But you have to write it all yourself: the iteration, the colour comparison etc.

Mar 20, 2011, 02:45 PM
There are already at least a half dozen apps in the store that do this, but not by just calling an API or existing library function.

Mar 20, 2011, 03:12 PM
Thanks guys, I thought there might be a way, just wasn't sure.

I want to use it as an way of forming a basic ID.

For example, if an image was taken of a red car, the app would call ALL red car images from its library to show the user.

Either way, looks like I may need to look at the ideas you have given.

Appreciated, thanks. :o