Esempio n. 1
0
 public static void FaceAudit()
 {
     var client  = new Baidu.Aip.ImageCensor.Solution("Api Key", "Secret Key");
     var image   = File.ReadAllBytes("图片文件路径");
     var result  = client.FaceAudit(new[] { image });
     var result2 = client.FaceAudit(new[] { "图片URL" }, 1);
 }
Esempio n. 2
0
        public void Combo()
        {
            var client = new Baidu.Aip.ImageCensor.Solution("Api Key", "Secret Key");
            var image  = File.ReadAllBytes("图片文件路径");
            var result = client.Combo(image, new[] { "ocr", "watermark", "public" }, new Dictionary <string, object>()
            {
                { "webimage", "{}" },
                { "watermark", new Dictionary <String, String>() },                    // 可传入字典
                { "ocr", JsonConvert.SerializeObject(new Dictionary <string, string>() // 也可传入序列化后的数组
                    {
                        { "detect_direction", "true" }
                    }) }
            });

            Console.WriteLine(result);
        }