Author Topic: Color Keywords  (Read 2856 times)

Offline jarrowwx

  • Newcomer
  • *
  • Posts: 5
    • View Profile
Color Keywords
« on: October 28, 2008, 03:27:46 PM »
Here is a feature I built for my web site once upon a time, and it might be cool to do this in Photo Mechanic. 

The basic idea was to identify the most common colors in a photo, limited to the 'named' colors (rgb.txt on unix systems).  In PhotoMechanic, these could become keywords added to the photo.

What I think would be really cool in Photo Mechanic would be a button in one or both of the keyword dialogs for 'color keywords' which upon being clicked would apply the technique to extract the top N colors from the image (16 colors?  8 colors? 4 colors?  Maybe make it user-configurable).  Then the user is shown the NAMES of the top colors, and they can add those colors as keywords.  The pop-up dialog could display the color names as a list, from which they could multi-select the ones they want to apply, or just click OK to apply all of them.

Ideally, this list would also include generic terms for the highly specific colors.  For example, if there are two shades of yellow, say, goldenrod and canary, then the word 'yellow' would also be provided.  This is easy enough to do by simply picking which of the standard 16 colors the color is closest to, and providing the color name and its synonyms for that standard color.

Of course, a Modifier-Click of the "Color Keywords" would auto-apply all of the keywords that are identified.

In the event that a selection of multiple images is in place, naturally this needs to be done individually to each image, rather than applying the same color keywords to all images.

I implemented this so I could find images by color.  My implementation was perl scripts making ImageMagick calls, but if it would help, I would share those scripts with Camera Bits, to help them more rapidly implement this feature, if they were to decide to do so.  But for simplicity, here is the basics:

I created a bitmap image from the contents of rgb.txt, and used that as a color map.  Then I applied color reduction to, say, 16 colors, but using the color map as the palette.  End result is a copy of the image that is limited to 16 closest named colors (I think I also shrunk the file to 1/2 or 1/4 size).  Then, by taking the histogram of the resultant image and looking up each one in the rgb list, you have a set of colors that apply to the image. 

But the real question is, would anyone besides me (because I know I would) use this feature if it were implemented?

-- John

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2552
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Re: Color Keywords
« Reply #1 on: October 31, 2008, 06:36:38 AM »
John,

There are probably uses for this, but to be honest, this seems like a specialised feature that would only be used by a very limited number of people.  I'd rather have some other features worked-on than this one to be honest…

Cheers
Hayo Baan - Photography
Web: www.hayobaan.nl