Hi David,

I made a file showing a typical use case:


My goal here is to select the over-saturated part of the red hairs of 
the layer L1 as shown in L10 (a blue 'quick mask' of the final selection).

L2, L3 and L4 are simply the layers obtained by the HSV decomposition of 
L1. I used them to simulate the effects of the proposed 'Curve Selection 

After opening the 'Curve Selection Tool' the image would switch to a 
mode similar to the 'quick mask' mode showing the amount of selection at 
each point using a transparent coloured channel.  By default, all curves 
would be initialized to the function f(x)=1.0 so everything would be 
selected by default (unless the original selection is also taken into 

The first selection curve I would edit would be the 'Hue' as shown in 
The horizontal axis represents the HUE while the vertical axis 
represents the amount of selection according to the HUE. Here I am 
trying to select the red pixels so most of the curve should be set to 0% 
expect for the red area which should be set to 100%. After setting the 
Hue curve, the selection mask will be equivalent to the layer L5 which I 
obtained by applying curve1 to L2.

Then I would select the 'Saturation' curve and set it as shown in 
'curve2' to discard the pixels with a low saturation. The effect of that 
saturation curve is shown in L6.

Of course, since the Hue curve is already set, the layer mask will be in 
fact equivalent to multiplication of L5 and L6 as shown in L5b (obtained 
by merging L5 and L6 in Multiply mode).

Finally, I would have to edit the 'Value' curve as shown in curve3 to 
discard the dark pixels.
L7 shows the effect of curve3 alone.

L8 shows the effect of the 3 curves applied together (by multiplying L5, 
L6 and L7).

L10 shows how the 'quick mask mode' would appear after setting the 3 curves.

David Gowers wrote:
> Hi Stephane,
> On Nov 20, 2007 10:10 AM, Stephane Chauveau
> <[EMAIL PROTECTED]> wrote:
>> Hello,
>> I just got an idea about the curve tool: Why not use it as a selection tool?
>> Apart from The Gimp, I do not know a lot of image manipulation programs
>> so the feature might very well be common.
>> I see it like that:
>> A new tool called the 'curve selection' would be added probably in the
>> Select menu.
>> Like the original curve tool, the 'curve selection' tool would provide
>> several curves for the different properties of the current layer (see
>> the list below).
>> The value of each curve would not provide a transformation of the
>> property but an amount of selection (from 0.0 to 1.0) according to the
>> property.
>> The result of the curve selection tool would be a selection mask
>> obtained by multiplying the values of all curves.
>> For most curves, the initial value value would not be the identify
>> function 'f(x)=x' but 'f(x)=1.0'.
>> The following curves could be provided:
>>    - Red , Green and Blue  ( default  f(x)=1.0 )
>>    - Hue, Saturation, Value/Lightness/Brightness  (default  f(x)=1.0)
>>    - Initial Selection Mask ( default f(x)=x )
>>    - Alpha (default f(x)=1.0)
>> With those defaults, the overall default result would be the initial
>> selection mask.
>> Because of it circular nature, the Hue curve may require a specific
>> treatment.
> I don't understand your explanation of how this would work. How about
> showing some example results?

Gimp-developer mailing list

Reply via email to