示例#1
0
文件: Program.cs 项目: Fran1611/Repos
        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
文件: Program.cs 项目: Fran1611/Repos
 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);
 }