//In automatic mode, thresholds need to kick in
 //In manual mode, we have to autodetect (a) do we need to sublocate the eye? or (b) is they eye already selected such that trying to locate it will fail?
 protected unsafe void SemiAutoCorrectRedEye(UnmanagedImage image, int cx, int cy)
 {
     Rectangle bright = new GridSearch().FindBrightestSquare(image, cx, cy);
     CorrectRedEye(image, bright.X + bright.Width / 2, bright.Y + bright.Height / 2, bright.Width / 2, 3 + (int)(bright.Width * 0.2));
 }
Beispiel #2
0
        //In automatic mode, thresholds need to kick in
        //In manual mode, we have to autodetect (a) do we need to sublocate the eye? or (b) is they eye already selected such that trying to locate it will fail?

        protected unsafe void SemiAutoCorrectRedEye(UnmanagedImage image, int cx, int cy)
        {
            Rectangle bright = new GridSearch().FindBrightestSquare(image, cx, cy);

            CorrectRedEye(image, bright.X + bright.Width / 2, bright.Y + bright.Height / 2, bright.Width / 2, 3 + (int)(bright.Width * 0.2));
        }