Пример #1
0
        static void Main(string[] args)
        {
            CognitiveFace cog = new CognitiveFace("a36648d3c5134ab692acd35605d491f7", false);

            cog.Recognize(@"bill.jpg");
            FoundFace(cog);
            cog.Recognize(@"bill2.jpg");
            FoundFace(cog);
            cog.Recognize(@"yacht.jpg");
            FoundFace(cog);
        }
Пример #2
0
 static void FoundFace(CognitiveFace cog)
 {
     if (cog.FaceFound)
     {
         Console.WriteLine("Face Found!");
         if (cog.SmileFound)
         {
             Console.WriteLine("Found a Smile :)");
         }
         else
         {
             Console.WriteLine("No smile found :(");
         }
     }
     else
     {
         Console.WriteLine("No Face Found");
     }
 }
Пример #3
0
 public static bool FoundFace(CognitiveFace cog)
 {
     if (cog.FaceFound)
     {
         Console.WriteLine("Face Found!");
         if (cog.SmileFound)
         {
             Console.WriteLine("Found a Smile :)");
         }
         else
         {
             Console.WriteLine("No smile found :(");
         }
         return(true);
     }
     else
     {
         Console.WriteLine("No Face Found");
     }
     return(false);
 }