Selection through fuzz? Red-eye removal.

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Kjartan
Posts: 2
Joined: 2011-09-12T05:21:56-07:00
Authentication code: 8675308

Selection through fuzz? Red-eye removal.

Post by Kjartan »

Hello!

I have stumbled upon a particular problem which I seem to be unable to solve. My goal is to remove red-eyes through a web interface.

Code: Select all

convert.exe before.jpg 	-region "230x140+60+130" ^ // input from user
					-fill black ^
					-fuzz 25%% ^
					-opaque rgb("192","00","10") ^

					after.jpg
My current solution:
1. I am trying to remove red eyes from photographs via a web interface.
2. The user chooses a rectangular region where the eyes are.
3. From a standard red I've aquired from varius red-eye photograhp and using fuzzy I am able to paint them black.

This solution is not sufficient, so here's my next plan:

1. User select region
2. Select red-eye through standard red-eye color.
3. Expand this selected region by a few pixels and everything in it.
4. Reduce the Red-channel

However there's a great problem with step 2 and 3. This has to happen automagically with no input from the user, and I can't seem to find the appropriate functions for this to be done.

Again, if you have any input on how to solve it, the logical steps that are needed to be taken I would be very thankful.

(I am not expecting, nor do I want, a complete solution. I am here to learn and develop! :) )

Thank you
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Selection through fuzz? Red-eye removal.

Post by fmw42 »

User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Selection through fuzz? Red-eye removal.

Post by fmw42 »

I have uploaded a script to my web site (see link below), called redeye, to remove redeye from a photo. It is not automatic. The user must identify a point in each redeye area.
Post Reply