Did you try the new Lightness Filter in Inkscape 0.48 devel ? It's has three sliders : one for lights, a second for shadows and a third for global lightness. It's based on Component Transfer "Gamma"

ivan


De : Michael Grosberg <grosberg.michael@...2179......>
À : inkscape-devel@lists.sourceforge.net
Envoyé le : Mardi 24 avril 2012 22h19
Objet : [Inkscape-devel] Retinex color operation

I'd like to Discuss Retinex. I decided to do it here before submitting a bug
report.

In theory the retinex operation is very useful in fixing badly lit images. In
practice, I've had little success with it. So I decided to fiddle around with
it. My test picture was a chinese temple on a background of blue sky. usually
you want to just brighten up some darker areas or bring detail in an area
that's too brightly lit, without changing the rest of the image. In my test
case, The sky's color was ruined when retinex was applied and most of the
well-lit areas lost most of their color.

I'll break down what happened:

1. The properties that can be changed by the sliders in the retinex dialog
are not clear at all. The documentation doesn't explain the first two in terms
understandable to a non-mathematician. Whatever it is they are doing, they are
not helping in correcting images.

2. The result is too strong. I find I have to do a "fade" every time I use it.
My suggestion: add a multiplier slider that would do an internal fade. The
default should be about 0.5.

3. The algorithm is indiscriminate: it is used to fix bad lighting but it also
works on well-lit areas. I believe it should have less effect on pixels (or
areas) whose average luminosity value is 0.5, and more effect on pixels with
values closer to 0 or 1.

I managed to achieve a selective retinex using the following method:
1. copy the layer
2. paste into quick mask
3. blur the mask using gaussian blur (8.0 radius)
4. invert the colors (only if you want to affect just the darker areas)
5. use levels or contrast to mask out the mid values
6. Perform Retinex

The above procedure can probably be turned into an integral part of retinex so
that retinex only works on those parts. Perhaps adding another slider that
controls the luminosity / strength ratio. 

Photoshop's "lighting/shadow" algorithm has two sliders. One for choosing the
strength of the effect on lighter parts of the image, and one for choosing
the strength of the effect on darker parts of the image. This seems like a
desirable thing to have.

Comments?


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Inkscape-devel mailing list
Inkscape-devel@...838...ourceforge.net
https://lists.sourceforge.net/lists/listinfo/inkscape-devel