It is currently Sat Jul 20, 2024 12:29 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 18 posts ] 
Author Message
 Post subject: New color adjustment tool concept... input welcome
PostPosted: Mon Jun 25, 2012 8:28 pm  (#1) 
Offline
GimpChat Member

Joined: Jun 11, 2012
Posts: 24
Location: California, USA
I've been brainstorming trying to come up with a color adjustment tool concept someone could implement if they want to try.

The idea is to be able to selectively replace or tint colors in an image of a given luminance range in a simple and smooth manner.

Working theory so far is as follows:


Subject: “Image Gradient Color Shifter” or IGCS
A proposal for a new color adjustment tool.

Program Steps:
-In adjustments, Select IGCS
-Dialogue box with effect preview panel and configuration menus pops open
-Original Image placed in main preview panel. Thumbnail also placed in upper left corner to allow user to select and refer to image before any changes are made permanent for comparison. A side by side comparison option could also be available.
-Under the hood, image or layer is copied and desaturated to gray-scale, and placed in memory for reference.
-Luminance range of the gray-scale image is determined, and used to generate a gradient from the lightest to darkest value in the image.
-Each shade in the gray-scale image is mapped to the matching shades in the generated gradient.
-User then is allowed to change the gradient which changes the matching mapped shades in the gray-scale image accordingly.
-Special Note:
1. If the user chooses, a “shade locker” checkbox can be checked in order to limit color choices along the gradient to hues of the same shade only in order to maintain overall image luminance values if desired. True black or true white would not be changeable in this mode, but shades in-between would.
2. Un-checking this feature would allow the user to make similar adjustments to some Gradient Map tools, but still somewhat different due to how the gray-scale image and gradient are linked and the possibility of leaving some shade ranges in their original color if transparency is used in the gradient.
-As user makes changes to the gradient, changes are mapped back to the gray-scale image and applied. At this point, only changed pixels from the gray-scale image are copied to a third image with a transparent background and placed in a new layer on top of the original image in the preview pane and viewed as a composite image.
-An intensity slider will allow the transparency of the visible parts of the top image to be adjusted.
-For added flexibility, layer mix modes should be made available within IGCS to manipulate top layer if desired.
-The same options for changing the gradient as in the regular Gradient creation tool should also be included.

IGCS would be a color replacement/tinting tool for the whole image or selected portions based on image luminance values in an intelligent manner without the tediousness of replacing individual colors and depending on tolerance values to change what you want.

Please realize there may be more efficient ways to get the same result, this is just the way that popped into my head. I am not an expert programmer, I have never programmed anything more complicated than a very flexible virtual die roller... lol

These are just all ideas that I know are possible, and put together like puzzle pieces to get the desired result.


Right now I am trying to think of a way to mitigate possible color banding... Partha has suggested that maybe limiting the color palette to 8 or 16-bit might help.

Anyone interested is welcome to give input or experiment with programming a prototype. It's just a cool idea if it can be made to work.

Thank you for your interest :)


*Rod has suggested using blur to smooth transitions where color banding might occur. I believe this is an idea worth exploring, and seeing what results.


*To further clarify possibilities... Say you have a color image that contains both true white and true black for simplicity's sake... that would generate a gradient from white to black. Let's say that you want white left alone but you want the off whites to be tinted yellow blending into orange as they get a little darker. You also want the mid-tones left alone and the dark tones blending from a blue to a violet as the shades get darker with black staying black. In my original outline... if you have "Shade Locker" checked, true black and true white can not be changed, so that part is taken care of... next from left to right you adjust the shades in the gradient you would like to change in the image. To the right of white you would choose yellow then orange then a transparent/alpha then blue then violet (all selected colors being limited to colors of the same luminance value as the point in the gradient you are changing by the shade locker). After that, you would adjust the opacity to make it a tint rather than just replacing the colors which is what the proposed intensity slider is for.


Last edited by TGE on Sat Jun 30, 2012 4:11 am, edited 4 times in total.

Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: New color adjustment tool concept... input welcome
PostPosted: Tue Jun 26, 2012 3:34 am  (#2) 
Offline
GimpChat Member

Joined: Jun 21, 2012
Posts: 106
I may get around to coding this when I'm done with other projects (could be a while though!)- meantime keep adding to the requirements spec.

Check this fun gadget out it may inspire further ideas:
http://www.easyrgb.com/index.php?X=SOFT


Top
 Post subject: Re: New color adjustment tool concept... input welcome
PostPosted: Tue Jun 26, 2012 4:23 pm  (#3) 
Offline
GimpChat Member

Joined: Jun 11, 2012
Posts: 24
Location: California, USA
I could probably think of a lot of tweaks and additions for this tool, but I'd like to refine and get a model of the basics working first... So that there's something to base further enhancements and features on. Anyone else is also welcome to add their ideas if they think it's worthwhile. I personally have always wanted to be able to apply a gradient selectively over light and dark areas in an image. Like yellow over highlights blending into violet over shadowy shades... The other wild effects that might be possible are merely an afterthought. There also might be a much better solution... this is just a working theory open to change. I've never seen any tool that can really do what I'm trying to do with this idea, so it might be more challenging than I'm thinking. That's why I'm hoping for help from more experienced programmer types to help me refine the idea and hopefully get it working.

Any help at all is appreciated :)

step7 wrote:
I may get around to coding this when I'm done with other projects (could be a while though!)- meantime keep adding to the requirements spec.

Check this fun gadget out it may inspire further ideas:
http://www.easyrgb.com/index.php?X=SOFT


Top
 Post subject: Re: New color adjustment tool concept... input welcome
PostPosted: Tue Jun 26, 2012 5:08 pm  (#4) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
TGE wrote:
I could probably think of a lot of tweaks and additions for this tool, but I'd like to refine and get a model of the basics working first... So that there's something to base further enhancements and features on. Anyone else is also welcome to add their ideas if they think it's worthwhile. I personally have always wanted to be able to apply a gradient selectively over light and dark areas in an image. Like yellow over highlights blending into violet over shadowy shades... The other wild effects that might be possible are merely an afterthought. There also might be a much better solution...


What you've described here is a split-tone image. I'll point you at Rolf showing how to do that: http://blog.meetthegimp.org/episode-039 ... ar-future/

Image Image

Kevin


Top
 Post subject: Re: New color adjustment tool concept... input welcome
PostPosted: Wed Jun 27, 2012 5:57 am  (#5) 
Offline
GimpChat Member

Joined: Jun 11, 2012
Posts: 24
Location: California, USA
paynekj wrote:
What you've described here is a split-tone image. I'll point you at Rolf showing how to do that: http://blog.meetthegimp.org/episode-039 ... ar-future/

Image Image

Kevin


if I'm understanding the what they're discussing correctly, I'm thinking of a little more flexibility than they are. I wasn't thinking of starting with monotone images... I mean to use the gray-scale image only as a way to determine image luminance values... then find a way to apply the color changes selectively to a color image with the possibility of leaving parts of the original image unchanged. Being able to replace or tint based on a luminance range. I'm more interested in tinting than replacing really, but both should be possible. I'm also thinking of maybe more than a two color gradient.... A two color gradient is just the simplest starting point for an example.

It is however a related topic, and does give me an idea or two.

It's actually pretty simple to do with monotone images.... trying to figure a way to do it with color images... not so much:/


Top
 Post subject: Re: New color adjustment tool concept... input welcome
PostPosted: Wed Jun 27, 2012 6:18 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12532
I concocted this flow a few years ago that I call extreme toning TGE. http://www.fredmiranda.com/forum/topic/250107

See attachment for the layered compressed xcf file. Is this sort of what you are going for? :)


Attachments:
DSC00422crp.7z [2.34 MiB]
Downloaded 166 times

_________________
Lyle

Psalm 109:8

Image
Top
 Post subject: Re: New color adjustment tool concept... input welcome
PostPosted: Wed Jun 27, 2012 6:23 am  (#7) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
Very nice outcome Lyle. 115F in the shade will fry eggs won't it? too hot for me.

_________________
Image


Top
 Post subject: Re: New color adjustment tool concept... input welcome
PostPosted: Wed Jun 27, 2012 6:28 am  (#8) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12532
lol; maybe so Molly. Can choose any base color that you like though. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: New color adjustment tool concept... input welcome
PostPosted: Wed Jun 27, 2012 3:59 pm  (#9) 
Offline
GimpChat Member

Joined: Jun 11, 2012
Posts: 24
Location: California, USA
lylejk wrote:
I concocted this flow a few years ago that I call extreme toning TGE. http://www.fredmiranda.com/forum/topic/250107

See attachment for the layered compressed xcf file. Is this sort of what you are going for? :)




Hey lyle... what I'm going for is a way to apply a gradient in a non linear fashion over an original image's light and dark tones... that would work with both color and gray-scale images... in the simplest example you would take a gray-scale image and a two tone gradient like yellow to violet, and at least where there are gradients in the original image... the lights and darks of the gradient would be mapped over the lights and darks of the original image... the effect obviously wouldn't be as smooth where there is stark contrast and of course edges, but where there were smooth transitions I'd want the gradient to be smoothly applied over them in a new layer so that the intensity could be adjusted. The working theory above there would sort of work, but when you get to color images it's trickier because there are often many colors at the same luminosity value in an image. so color banding to some degree would probably happen even if it's the right shade... using it as a tint instead of a color replacement might still work. So, what I'm trying to solve is keeping color transitions smooth some how... I think I've managed to find a way to keep the light and dark values consistent... just have to tackle color banding or soften it somehow.


Top
 Post subject: Re: New color adjustment tool concept... input welcome
PostPosted: Wed Jun 27, 2012 5:29 pm  (#10) 
Offline
Script Coder

Joined: Apr 10, 2011
Posts: 532
If I understand correctly what you want to do:

Duplicate your layer, then on the duplicate use desaturate + gradient map. Then apply the resulting layer to the original with the "colour" layer mode.


Top
 Post subject: Re: New color adjustment tool concept... input welcome
PostPosted: Wed Jun 27, 2012 6:20 pm  (#11) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14715
Location: USA
You could use blur to smooth the transitions.

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: New color adjustment tool concept... input welcome
PostPosted: Wed Jun 27, 2012 7:11 pm  (#12) 
Offline
Global Moderator
User avatar

Joined: Nov 16, 2011
Posts: 5128
Location: Metro Vancouver, BC
Quote:
Check this fun gadget out it may inspire further ideas:
http://www.easyrgb.com/index.php?X=SOFT

I use to use OpenRGB years ago, I forgot all about it. That's great, it can be very useful.

_________________
Image
Gimp 2.8.18, Linux, median user
Gimp Chat Tutorials Index
Spirit Bear (Kermode)


Top
 Post subject: Re: New color adjustment tool concept... input welcome
PostPosted: Thu Jun 28, 2012 4:53 am  (#13) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
Personally I think I get fairly close to what you're asking for using layer masks as shown in the Meet the GIMP episode, just don't convert to monochrome:
Attachment:
IMGP4423tweak_sml_toned.jpg
IMGP4423tweak_sml_toned.jpg [ 68.62 KiB | Viewed 1171 times ]

I realise that you're asking for more control but this works for me.

Original image: Image

Example XCF attached

Kevin


Attachments:
IMGP4423tweak_sml.xcf [1.27 MiB]
Downloaded 105 times
Top
 Post subject: Re: New color adjustment tool concept... input welcome
PostPosted: Thu Jun 28, 2012 5:49 am  (#14) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
very cool Kevin, I like what you did with the masks.

_________________
Image


Top
 Post subject: Re: New color adjustment tool concept... input welcome
PostPosted: Thu Jun 28, 2012 4:54 pm  (#15) 
Offline
GimpChat Member

Joined: Jun 11, 2012
Posts: 24
Location: California, USA
dd wrote:
If I understand correctly what you want to do:

Duplicate your layer, then on the duplicate use desaturate + gradient map. Then apply the resulting layer to the original with the "colour" layer mode.


Close... except I've never seen a gradient map tool that could maintain image luminance. I want the option to limit the colors used from the gradient to match image luminance or at the least nearest neighbor.... ideally maintaining the image luminance and contrast. Which means that the applied gradient would have to skip steps where image luminance dictates. Also, it would probably be better to just have the changes made sent to a new top layer to further adjust separately if desired or needed. It's like a mass color replace using image luminance to determine what point in the gradient to pull the replacement color from. The steps I've discussed above are just thoughts on a way to possibly achieve that goal. Also, if after the luminance values are mapped and the part of the gradient is made transparent... I want the desaturated copy to reflect that change also... making the matching range transparent.

Unfortunately since there are typically many colors in a color image with with the same luminance value... I can foresee possible color banding, especially when the user sets part of the gradient to alpha.


Top
 Post subject: Re: New color adjustment tool concept... input welcome
PostPosted: Thu Jun 28, 2012 5:03 pm  (#16) 
Offline
GimpChat Member

Joined: Jun 11, 2012
Posts: 24
Location: California, USA
Rod wrote:
You could use blur to smooth the transitions.


Good thought, at this point I'd like someone to run with the idea to see what we've got so far and get an alpha version coded to see what issues there are and what might be done better... certainly any ideas are welcome though. That's what brainstorming is all about. :)


Top
 Post subject: Re: New color adjustment tool concept... input welcome
PostPosted: Thu Jun 28, 2012 6:48 pm  (#17) 
Offline
GimpChat Member

Joined: Jun 11, 2012
Posts: 24
Location: California, USA
paynekj wrote:
Personally I think I get fairly close to what you're asking for using layer masks as shown in the Meet the GIMP episode, just don't convert to monochrome:
Attachment:
IMGP4423tweak_sml_toned.jpg

I realise that you're asking for more control but this works for me.

Original image: Image

Example XCF attached

Kevin


Cool example... and thank you for bringing that technique to my attention. I've done stuff similar to that before, and in some cases it's worked fine for me, but occasionally I want 3 or 4 colors (not savvy enough to effectively adjust the fun color graph on four different color masked layers) and then I sort of have to roughly paint overlays and then the luminance values shift... and with complex images it's next to impossible to get a great result. So I'm trying to find a way to automate and more accurately place colors... and to avoid certain ranges of image luminance luminance if desired.


Top
 Post subject: Re: New color adjustment tool concept... input welcome
PostPosted: Thu Jun 28, 2012 7:43 pm  (#18) 
Offline
GimpChat Member

Joined: Jun 11, 2012
Posts: 24
Location: California, USA
To further clarify possibilities... Say you have a color image that contains both true white and true black for simplicity's sake... that would generate a gradient from white to black. Let's say that you want white left alone but you want the off whites to be tinted yellow blending into orange as they get a little darker. You also want the mid-tones left alone and the dark tones blending from a blue to a violet as the shades get darker with black staying black. In my original outline... if you have "Shade Locker" checked, true black and true white can not be changed, so that part is taken care of... next from left to right you adjust the shades in the gradient you would like to change in the image. To the right of white you would choose yellow then orange then a transparent/alpha then blue then violet (all selected colors being limited to colors of the same luminance value as the point in the gradient you are changing by the shade locker). After that, you would adjust the opacity to make it a tint rather than just replacing the colors which is what the proposed intensity slider is for.


Top
Post new topic Reply to topic  [ 18 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) GEGL Simple Background Removal Tool (by color range)

1

No new posts Attachment(s) proof of concept

9

No new posts Eager to learn to input text in python script (Solved)

2

No new posts Attachment(s) GEGL Stained Glass Tile theory (concept not a plugin yet)

0

No new posts Gimp's adjustment layers

1



* Login  



Powered by phpBB3 © phpBB Group