Script to Implement Red-Eye Removal Technique

by Eric Jeschke

The latest issue of Linux Journal includes an article explaining how you can remove "red-eye" from flash photographs. Martin Guldahl, author of the Channel Mixer plugin, recently sent me a script that implements the technique in the article (see Listing 1). Put the script into your GIMP scripts directory (e.g., ~/.gimp-1.2/scripts/).

Listing 1. red-eye.scm

To use the script, simply select a few pixels in the red region of one pupil (i.e., draw a small outline with the rectangle selection tool), then run the script (RC/Script-Fu/Selection/Red Eye). Fill in the parameters, which correspond with the ones described above, and click OK. If the result is not satisfactory, click Undo (Ctrl+Z) and retry the script with different values. Repeat with the other pupil. A second script included in the file (Script-Fu/Selection/Red Eye Desaturate) uses the red channel desaturate technique, and thus does not require Channel Mixer if you don't have it installed.

Red-eye reduction may seem to be an involved process at first, but it actually takes only a couple of minutes once you have the hang of it or even less time if you use the script. Best of all, the results are excellent, especially when photos are printed on a high-resolution photo inkjet printer. Throw this technique into your bag of GIMP tricks, and you'll never have to worry about red-eye ruining your candid flash photos again.

Eric Jeschke holds a PhD in computer science from Indiana University and has worked as a software engineer, university professor and freelance consultant.

Load Disqus comments

Firstwave Cloud