Пример #1
0
        static void Main(string[] args)
        {
            // 设置为你自己的密钥对
            string appid     = "1000031";
            string secretId  = "AKIDUIDlPDt5mZutfr46NT0GisFcQh1nMOox";
            string secretKey = "ind5yAd55ZspBc7MCANcxEjuXi8YU8RL";
            string userid    = "380549494";



            Conf.Instance().setAppInfo(appid, secretId, secretKey, userid, Conf.Instance().YOUTU_END_POINT);

            string path   = System.IO.Directory.GetCurrentDirectory() + "\\test.jpg";
            string path2  = System.IO.Directory.GetCurrentDirectory() + "\\test.jpg";
            string result = string.Empty;

            result = Youtu.facecompare(path, path2);
            Console.WriteLine(result);
            Console.ReadKey();

            //// 人脸定位 调用demo
            result = Youtu.faceshape(path);
            Console.WriteLine(result);
            Console.ReadKey();

            result = Youtu.getpersonids("group");
            Console.WriteLine(result);
            Console.ReadKey();
        }
Пример #2
0
        static void Main(string[] args)
        {
            // 设置为你自己的密钥对
            string appid     = "1006935";
            string secretId  = "AKIDmtnfLVH3DoWpn5yOIdu5jG5alHacadvt";
            string secretKey = "lmHyGzfLibqK5NAZSQ7dcIYNN72dEOtF";
            string userid    = "380549494";



            Conf.Instance().setAppInfo(appid, secretId, secretKey, userid, Conf.Instance().YOUTU_END_POINT);

            string path   = System.IO.Directory.GetCurrentDirectory() + "\\test.jpg";
            string path2  = System.IO.Directory.GetCurrentDirectory() + "\\test.jpg";
            string result = string.Empty;

            result = Youtu.facecompare(path, path2);
            Console.WriteLine(result);
            Console.ReadKey();

            //// 人脸定位 调用demo
            result = Youtu.faceshape(path);
            Console.WriteLine(result);
            Console.ReadKey();

            result = Youtu.getpersonids("group");
            Console.WriteLine(result);
            Console.ReadKey();
        }
Пример #3
0
        static void Main(string[] args)
        {
            // 设置为你自己的密钥对
            string appid     = "";
            string secretId  = "";
            string secretKey = "";
            string userid    = "";



            Conf.Instance().setAppInfo(appid, secretId, secretKey, userid, Conf.Instance().YOUTU_END_POINT);

            string path   = System.IO.Directory.GetCurrentDirectory() + "\\test.jpg";
            string path2  = System.IO.Directory.GetCurrentDirectory() + "\\test.jpg";
            string result = string.Empty;

            result = Youtu.facecompare(path, path2);
            Console.WriteLine(result);
            Console.ReadKey();

            //// 人脸定位 调用demo
            result = Youtu.faceshape(path);
            Console.WriteLine(result);
            Console.ReadKey();

            result = Youtu.getpersonids("group");
            Console.WriteLine(result);
            Console.ReadKey();
        }
Пример #4
0
    /// <summary>人脸追踪</summary>
    public void FaceTracking(byte[] bytes)
    {
        string result = string.Empty;

        try
        {
            result = Youtu.faceshape(bytes);
        }
        catch (Exception e)
        {
            Debug.Log(e.Message);
        }
    }
Пример #5
0
        private void btn_faceidentify_Click(object sender, EventArgs e)
        {
            string            path      = System.IO.Directory.GetCurrentDirectory() + "\\test.jpg";
            string            result    = Youtu.faceshape(path);
            faceshapeResponse faceshape = JsonHelper <faceshapeResponse> .ToEntity(result);

            if (faceshape.errorcode == 0)
            {
                pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
                pictureBox1.Image    = drawPorint(path, faceshape.face_shape[0]);
            }
            else
            {
                MessageBox.Show(faceshape.errormsg);
            }
        }