示例#1
0
 void drawEyes(object objc)
 {
     try
     {
         object[]           obj          = (object[])objc;
         int                imageHandle  = (int)obj[0];
         FSDK.TFacePosition facePosition = (FSDK.TFacePosition)obj[1];
         Graphics           gr           = (Graphics)obj[2];
         FSDK.TPoint[]      eye          = new FSDK.CImage(imageHandle).DetectEyesInRegion(ref facePosition);
         byte[]             eyes         = new byte[0];
         FSDK.GetFaceTemplateUsingEyes(imageHandle, ref eye, out eyes);
         gr.DrawRectangle(Pens.Pink, eye[0].x, eye[0].y, 20f, 10f);
         gr.DrawRectangle(Pens.Pink, eye[1].x, eye[1].y, 20f, 10f);
     }
     catch (Exception)
     {
         //who sai
     }
 }