Red eyes removal?

Having a D7000 with pop-up flash, I occasionally get it with certain subjects. My niece has big, bright red pupils in the photos I shot of her maternity shower. I tried a bunch of tools, but most were rather draconian, e.g., color the entire area gray, or somesuch. So, I wrote a redeye tool for my raw processor that allows selection of the eye center, then works its way out to a radius doing the following for each pixel:

  1. compute the average of the G and B tones
  2. if the R tone is 1.5 times greater than that average, replace the R with the GB average value.

In a working color space where no single color dominates, this works quite well to render a pupil that retains some highlight. It’s in rawproc 0.6, which I’m going to release in a week or two. If you want a compile-from-scratch adventure, you can clone the master branches from here:

GitHub - butcherg/rawproc: Raw camera and general image processor - the GUI program
GitHub - butcherg/gimage: Simple image loader/reader/manipulator for raw, jpeg, tiff, and png - the image library, in gimage.cpp, line 2000, you’ll find the C++ function.

Here’s before-and-after clips:
Before:
redeye
After:
redeye-gone

2 Likes