Hi Amy, how are you?

Sounds quite right to me. There is one catch, though: the definition of 
"dominant color". If you just count the number of pixels with certain colors 
and grab the top 10, it may not result in what you want. To our eyes, the most 
dominant color is, usually, the one that has the largest continuous area (blob) 
in the picture. Think of it like this: if I create a completely noised picture 
with more blue pixels than red, you won't notice the difference unless the 
difference itself is significant.

What you may be interested at is something called “region growth”, which 
returns the continuous regions in the picture and their areas. This may give 
you better results.

I haven't worked with Quartz Filters, but there may be something there that 
could help you. Otherwise, grab a region growth algorithm from the web and use 
it in your code. Just make sure that it will work with you colored pictures 
(these algorithms are commonly intended to be applied to grayscale images).

I hope that helps.

Abraços,
Alvaro Costa Neto

Em 03/03/2012, às 10:17, Amy Heavey escreveu:

> Hi,
> 
> I've got an app that is a custom app for me and my home business, it's not 
> something commercial. It's a core data app and some of the entities have 
> images associated with them. The images themselves are stored separately, and 
> the coredata datastore stores the reference to them.
> 
> What I'd like to do if its possible is to analyse the images to find the most 
> dominant colours, then find images with similar colours in them.
> 
> I thought I would do this by analysing each image as it is saved and 
> calculate the most common pixel colours, probably by analysing each pixel in 
> the image? and saving the most common colours, perhaps 10 colours. Then I can 
> see what other images have the same colour(s) in.
> 
> Does this sound possible at all? I'm a self taught hobby programmer, not an 
> expert at all.
> 
> I appreciate any advice or pointers,
> 
> Many Thanks,
> 
> Amy
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/nepheus.br%40gmail.com
> 
> This email sent to nepheus...@gmail.com


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to