Page 1 of 1

Green becomes yellow problem

Posted: 2012-06-01T04:37:54-07:00
by Cobra_Fast
Greetings folks!

let's start right away; I'm having a quite specialized Problem.
I am remapping images (mainly photographs) to the eight 'base colors' (which are #000/black, #fff/white, #f00/red, #0f0/green, #00f/blue, #ff0/yellow, #0ff/cyan and #f0f/magenta) in order to roughly index present colors and color ratios of an image for archiving in a database.
After some tweaking I already worked out that I would need to brighten or darken the images a tad respectively to its overall brightness and increase the saturation a notch to let IM find a good amount of color so the remapping works well.

One problem is, though, that brighter green tones (like grass or palm leaves) often get mapped to yellow instead of green. (Which results in getting green pictures when browsing the archive for yellow ones and missing some pictures when browsing for green ones)
So the real question after all is, can I increase the intensity of the green colorchannel in a simple, yet natural (without tainting the entire image) manner so it would map those yellowish greens to green?
(Alternatively, decreasing the red channel if there is a sufficient ammount of green could work, too.)

I know it's not the ultimate solution for indexing images by color, but it works (except the above "problem").
I'd greatly appreciate anyone's help or thoughts, though!

Re: Green becomes yellow problem

Posted: 2012-06-01T08:15:03-07:00
by tomriddle
Hmm... have you maybe tried supplying RGB values instead of hex?

Re: Green becomes yellow problem

Posted: 2012-06-01T08:22:07-07:00
by Cobra_Fast
tomriddle wrote:Hmm... have you maybe tried supplying RGB values instead of hex?
Oh I'm sorry if my palette confused you.
I'm passing an image with those colors to -remap, not hex values.
The palette image is 8 pixels wide and 1 pixel high, it only contains those eight mentioned colors.