Red eye removal - dt 4.6.

If you can spend as much time on the photo, I would:

Create a new exposure module and put it below the original one (so that if you change the exposure, it does not change the mask).
Create parametric mask for the eye (red) colour and/or lightness. If there is more red, combine with drawn mask around eyes. Some blur and feathering might be needed.
Decrease the exposure in the new layer.
Apply monochrome with the raster mask from exposure module and blend opacity to your liking.

You can also use tone curve instead of exposure decrease, but I recommend creating the mask in the exposure module. Using tone curve might make for easier catchlight preservation. Catchlight can be considered also in parametric mask creation, but it depends on the image.
You can also use color balance instead of monochrome, I have a frogmouth red eyed photo, where I decreased global saturation by 89 %. But I think monochrome would be easier with nearly the same results.

It might also be possible to use the RGB curve, but I do not use it.

The issue in my topic is rather more complicated to deal with, generally I darken the eyes a lot, monochrome, add noise and add synthetic (frequently not so good) catchlight by another tonecurve in hard light mode. Often I need to use color zones to take care of the colour spill from the eyes. Yes, it is very tedious :smiley: .

PS: If you have more photos under similar light and exposure, you can create a style from the modules above and then simply create the drawn mask for each (or possibly not even that, if the parametric mask allows).

1 Like

Be sure the cat tab is set to bypass and then the CC should equal the channel mixer… I suspect you might also be able to leverage the new primaries module…

1 Like

This is a red eye fix using color zones. Seems a simple solution.

Here an example with the color calibration module:


Original image.CC BY 2.0 Deed.


29613688105_e3319dae76_b.png.xmp (5.9 KB)

2 Likes

Many thanks to all. I’m going to examine this all and come back when everythink is fine.
Rgrds, and good night to those who go to sleep.

@FalCT60
For DarkTable: “Removal of red-eye effect” in the darktable usermanual

You may also be interested in: Search results for 'red eyes' - discuss.pixls.us

You want DT4.6, but if you want to try RawTherapee: Local Adjustments - RawPedia

Greetings!

Hello,
@arturoisilvia:
The first link you point me to is the one I refer to in my first post and is now obsolete due to deprecation.
I did search for red eye and did not find anything that I could use.
And I don’t want to use anysthing else than dt.
Thanks for posting anyway, as as usually I often come back on subjects and read again so maybe I find something that I could not understand at first.
-=o#=O=#o=-
However, I think I finally accidentally found how to achieve my goal, yesternight just after thanking everyone here and turning this computer off. Dt is installed on a linux laptop in my bedroom, and before shutting it off I gave it another try and accidentally did two things I had not done before:

  1. I created a duplicate instance of the color calibration module instead of using the existing one, and
  2. I decreased the R level in the R tab instead of trying to adjust chroma and tint in the CAT tab.
    Well, the result is not as good as what @Thomas_Do shows just above, so I am going to examine his method. Just need to copy to an usb key and transfer to the dt laptop. :wink:

Yes, I would also advise using a second instance of the color calibration module to avoid interfering with the general white balance settings.
I just used the gray tab of color calibration with a drawn mask. The input for monochrome was limited to “blue” because this gave a darker result with the outer darker ring of the pupil less visible.

1 Like

Yes. Your approach increasing grey
Grey increase
seems to give softer and more natural results than decreasing red,
Red decrease
but it may not be always so.
I am also trying to dig out from my archives the way I used to do long ago, in the times of Bibble (further Aftershot Pro).
Thanks for helping.

It is not really obsolete… CC module when in bypass and if you use only the R G B tabs is the channel mixer… it is just part of the CC module and if you create a second instance it will be created by default in bypass it not using the CAT space so that it can be used as such. Therefore any references from the past or in other software to the channel mixer are still relevant wrt using a "channel mixer " in DT

1 Like

There is another important difference between the instance doing CAT (‘white balance’) and non-CAT (‘channel mixer’) instances, see Monochrome conversion, dt at its best. - #12 by kofa.

1 Like

That is what I did not do first, and that led to awful results: I did not create another instance.
Now I do.
As a casual user, I only use very few modules that are defaulted with setting that (are to) suit my needs, and I never modify anything except exposure.
Thus I hadn’t understood how to transpose the use of the old channel mixer in the color calibration, or how to use cc as a cm. Now, I know.
Thanks.

It was a topic of discussion more than one time that the combined features might be better left separate but in the end it has stayed as is. I think wb using the CC module has been one area that has confounded or at least caused many users to pause and at times struggle a bit to settle in on how to use it…

1 Like

Back when I was using a camera with on-board flash I implemented a red eye tool in rawproc. Don’t know if this can be translated into use of some existing dt tool but here’s a snip from the comments describing the operation on a single pixel:

//The essential algorithm is to calculate the red intensity proportionate to the averaged
//green and blue intensities; if greater than the threshold, the red value is replaced 
//with the average of the green and blue.  This means that things like light reflections
//(white highlights) and other "non-red" pixels are not touched, leaving a well-formed eye.
3 Likes

Hello,
After some more experiments, it seems Red slider is not always the best choice.
In fact, Blue slider sems to give better results in most cases.
Starting from a red eyed photo


tuning the Red slider in R tab is prone to actefacts - see the green tint into the pupil

pushing the Blue sider in Grey tab to the right does not give good results in the case of this subject with brown eyes, despites what I thought first

for which I found that Blue at 0.25 would give results more suitting in most cases

In some cases, it can be useful to tune the Green slider.
I am still reading the posts related to the modules, but some refer to other posts, so it is not that easy.

1 Like

color calibration in bypass mode (simple channel mixer preset), with these settings:

Desaturate red:
image

Darken red:
image

Drawn + parametric mask; two shapes over the eyes:

Only affect saturated colours:
image

Only reds (note the inversion!):
image

With a bit of feathering:
image

The resulting mask:

The image (with a thin red ring that could probably be removed by tweaking the params):

With tweaked refinement:

5 Likes

Thank-you @kofa. Now I could understand some subtilities of masking, which I did not before despites watching many tutorials. And I know for sure of at least four methods to remove red eyes.
Rgrds,

I’m a little confused why you first desaturate red, and then select the for the saturated part of the Chroma (Cz) tab, when it’s the red areas we shall apply the mask to.
I appreciate it if you would explain that, @kofa.

The mask is based on the input, where the pixels are still red.
So, two things will be done to the pixels that are originally red:

  • they will be turned grey;
  • they will be darkened.

The desaturation does not take away all the red (left: original; right: red desaturated):

Then the brightness change:

The code is here, but I don’t understand it: https://github.com/darktable-org/darktable/blob/master/src/iop/channelmixerrgb.c#L702-L761, so I just suspect that since the skin and the eyes are not pure Rec2020 red, the desaturation is not complete, and then the brightness can still work based on the remaining red (R channel value).

1 Like

As I said: “confused” …
Thanks!