Re: Image Colours
Re: Image Colours
- Subject: Re: Image Colours
- From: Amy Heavey <email@hidden>
- Date: Sat, 03 Mar 2012 21:47:23 +0000
Thanks everyone for your help, it has certainly given me ideas.
The images I'll be using are mainly generated web ready images, which I think will make it easier than photos.
I also don't need exact matches, so reducing the colour resolution would probably be a good idea, or perhaps if I use hsb values I could just look at the hue as this is the more useful value. I'll be looking for images that coordinate together so different shades etc of the same hue would want to be looked at as well.
I'll 'just' need to work out how to convert the rgb images to hsb,
Thank You all,
On 3 Mar 2012, at 20:35, Jens Alfke <email@hidden> wrote:
>
> On Mar 3, 2012, at 5:17 AM, Amy Heavey wrote:
>
>> 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.
>
> The trouble is that images tend to have subtle gradations of color, and even an area that looks solid often has adjoining pixels that are almost but not quite the same color. So you have to use approximations or averaging.
>
> I haven’t done this myself, but one approach that might work is to lower the color resolution. Say you divide the raw pixel components by 16 so they’re only in the range 0…15 instead of 0…255. That way nearby colors will clump together into the same value. It also gives you only 4096 possible color values to count occurrences of, instead of 24 million.
>
> It probably also makes a difference what color space you use. My hunch is that HSB or HSV will work better than RGB. Experiment!
>
> —Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden