Ofnuts





Administrator

Threads: 160

Joined: Oct 2016

Reputation:

Operating system(s): Linux

Gimp version: 2.10 Posts: 3,460Threads: 160Joined: Oct 2016Reputation: 208 Operating system(s):Gimp version: 2.10 #1

Quote:

compute the average of the G and B tones

if the R tone is 1.5 times greater than that average, replace the R with the GB average value.



Fortunately, there is a Gimp equivalent:

Make a selection on the eyes. It can/ should include the iris, but avoid skin tones. Feather a bit

Make a new layer from that: Ctrl-C, Ctr-V, Ctrl-Shift N. Let's call it "Eyes".

Make a copy of "Eyes", call it "Red 75%", start Color>Component>Channel mixer, set to "Monochrome", set Red to 75%, and Green and Blue to 0

Make a second copy of Eyes, call if G+B/2, start Color>Component>Channel mixer, set to "Monochrome", set Red to 0%, and Green and Blue to 50%

Make sure that all layers are invisible except these last two, with "G+B/2" over "Red 75%" and set G+B/2 to "Grain extract". The result should be eyes with a white disk where the red pupil was (with a dark spot where the white spot is).

Open the Channels list, and drag one of the R, G or B channels to the "main" list to copy it.

Back to the Layers list, make a last copy of "Eyes", call it "Correction", start Color>Component>Channel mixer, reset "Monochrome", set the Red channel to R=0%, G=50%, B=50%.

Make all layers invisible except the original picture and "Correction"

Right-click "Correction", and "Layer>Add layer mask". Initialize to "Channel" and pick the channel you copied at step 6. You should now have a fixed image.

At that point, you are editing the layer mask of "Correction" so you can tweak the amount of correction by playing with Levels or Curves (the most radical being thresholding the mask around 200, but this can make the fix limits a bit more visible).





Before:



After:



The layers ("Visible" is extra, it is actually the result of step 5 (and what is copied to a Channel)):





Now, to adapt the technique to cats and dogs, whose eyes turn yellow or blue... Editing in a photo is fraught with peril, in the good cases the subject looks weird, in the bad case s/he looks dead. But using the camera flash often makes it necessary to edit the picture to fix these awful red eyes, which is why I tried with much interest a technique alluded to on Pixls.us , for a new RawTherapee plugin:Fortunately, there is a Gimp equivalent:Before:After:The layers ("Visible" is extra, it is actually the result of step 5 (and what is copied to a Channel)):Now, to adapt the technique to cats and dogs, whose eyes turn yellow or blue... Find Reply Issabella





Frequent Gimper

Threads: 1

Joined: Jan 2017

Reputation:

Operating system(s): Windows (Vista and later) Posts: 51Threads: 1Joined: Jan 2017Reputation: 3 Operating system(s): #2 (01-31-2018, 10:13 PM) Ofnuts Wrote: Editing in a photo is fraught with peril, in the good cases the subject looks weird, in the bad case s/he looks dead. But using the camera flash often makes it necessary to edit the picture to fix these awful red eyes, which is why I tried with much interest a technique alluded to on Pixls.us, for a new RawTherapee plugin:

Quote:

compute the average of the G and B tones

if the R tone is 1.5 times greater than that average, replace the R with the GB average value.



Fortunately, there is a Gimp equivalent:

Make a selection on the eyes. It can/ should include the iris, but avoid skin tones. Feather a bit

Make a new layer from that: Ctrl-C, Ctr-V, Ctrl-Shift N. Let's call it "Eyes".

Make a copy of "Eyes", call it "Red 75%", start Color>Component>Channel mixer, set to "Monochrome", set Red to 75%, and Green and Blue to 0

Make a second copy of Eyes, call if G+B/2, start Color>Component>Channel mixer, set to "Monochrome", set Red to 0%, and Green and Blue to 50%

Make sure that all layers are invisible except these last two, with "G+B/2" over "Red 75%" and set G+B/2 to "Grain extract". The result should be eyes with a white disk where the red pupil was (with a dark spot where the white spot is).

Open the Channels list, and drag one of the R, G or B channels to the "main" list to copy it.

Back to the Layers list, make a last copy of "Eyes", call it "Correction", start Color>Component>Channel mixer, reset "Monochrome", set the Red channel to R=0%, G=50%, B=50%.

Make all layers invisible except the original picture and "Correction"

Right-click "Correction", and "Layer>Add layer mask". Initialize to "Channel" and pick the channel you copied at step 6. You should now have a fixed image.

At that point, you are editing the layer mask of "Correction" so you can tweak the amount of correction by playing with Levels or Curves (the most radical being thresholding the mask around 200, but this can make the fix limits a bit more visible).





Before:





After:





The layers ("Visible" is extra, it is actually the result of step 5 (and what is copied to a Channel)):







Now, to adapt the technique to cats and dogs, whose eyes turn yellow or blue...

Thank you so much Ofnuts for this new technique to repair this problem in some photos. I think It'll be very helpful. As soon as I find a photo with this problem, I'll use it. Thank you so much Ofnuts for this new technique to repair this problem in some photos. I think It'll be very helpful. As soon as I find a photo with this problem, I'll use it. Find Reply Ofnuts





Administrator

Threads: 160

Joined: Oct 2016

Reputation:

Operating system(s): Linux

Gimp version: 2.10 Posts: 3,460Threads: 160Joined: Oct 2016Reputation: 208 Operating system(s):Gimp version: 2.10 #3 (02-05-2018, 03:16 PM) Issabella Wrote: Thank you so much Ofnuts for this new technique to repair this problem in some photos. I think It'll be very helpful. As soon as I find a photo with this problem, I'll use it.

There is also Filters>Enhance>Red-eye removal , which is roughly the same algorithm, but you can't tweak it There is also, which is roughly the same algorithm, but you can't tweak it Find Reply titocharro





Newbie

Threads: 0

Joined: May 2018

Reputation:

Operating system(s): Windows (Vista and later)

Gimp version: 2.8 Posts: 1Threads: 0Joined: May 2018Reputation: 0 Operating system(s):Gimp version: 2.8 #4 This is what I was looking for some time ago to fix my photos. Thank you very much and I'm going to put it right now to fix them. Website Find Reply is_it_tennant





Newbie

Threads: 0

Joined: May 2018

Reputation:

Operating system(s): Windows (Vista and later)

Linux

Gimp version: 2.8 Posts: 3Threads: 0Joined: May 2018Reputation: 0 Operating system(s):Gimp version: 2.8 #5 I tried to sort this out too by myself in a blindfolded fashion, wrote a huge piece of an algorithm, but it just turned red eyes into unnaturally black ones, as if they were drawn in Paint or something. Thanks for that thing Find Reply