Example #1
0
        //Calculates the position of the moustache using the Points as vectors.
        public void SetMoustacheLocation()
        {
            Point mouth = workingImage.GetMouth();

            Point[] eyes      = workingImage.GetEyes();
            Point   eyeMiddle = new Point((eyes[0].X + eyes[1].X) / 2, (eyes[0].Y + eyes[1].Y) / 2);
            Point   dirVector = new Point(eyeMiddle.X - mouth.X, eyeMiddle.Y - mouth.Y);

            moustacheLocation = new Point(1280 - (mouth.X + dirVector.X / 4), 720 - (mouth.Y + dirVector.Y / 4));
        }