New kipi-plugin: Automatically remove red-eyes (in batch mode)
Some years ago, we had an addition to our family and I took a lot of photos in that time. During the months I had taken nearly 2000 images of the newborn, but most of them had red-eyes on it.
This happens quite a lot with little children since their pupils don't close that fast and the light of the camera flash is reflected by the eye.
It always annoyed me to remove the red-eyes by hand, although most image software can do this with a single click in the defective image region. One day I had to correct hundreds of images to
sent them to a printing service, and that was the day I decided that I need something that can remove red-eyes all by itself.
I found the tools I need in the OpenCV image library and trained an eye classifier that works quite well in most situations. I used a predefined classifier before, but it was only trained to
track eyes from a webcamera output, which didn't work that reliable. With the trained classifier, I'm able to find eyes in a photograph and create a mask from those regions that will be used in the final correction process. For the mask creation I use the additional Blob Extraction Library for OpenCV.
The plugin works quite well with high-res images that are not too blurry, so portraits like the one in the screenshot above are good candidates for it.
To use it select the images you want to be corrected and start the plugin. A good practice is to add only images that contain red-eyes, you can for sure add a whole folder and see what will happen, but then most of the time the false-positive rate is too high. The plugin has two modes, a testrun to test the settings for the imageset and the final correction mode, where the images are corrected and saved.
The plugin just made its way into KIPI SVN and will be released with the next version.