Exemplo n.º 1
0
        public void Idcard(string filePath)
        {
            var image = File.ReadAllBytes(filePath);

            var options = new Dictionary <string, object>
            {
                { "detect_direction", "true" } // 检测方向
            };
            // 身份证正面识别
            var result = client.IdCardFront(image, options);

            // 身份证背面识别
            result = client.IdCardBack(image);
        }
Exemplo n.º 2
0
        public static void Idcard()
        {
            var client = new Ocr.Ocr(Config.clientId, Config.clientSecret);
            var image  = File.ReadAllBytes("图片文件路径");

            var options = new Dictionary <string, object>
            {
                { "detect_direction", "true" } // 检测方向
            };
            // 身份证正面识别
            var result = client.IdCardFront(image, options);

            // 身份证背面识别
            result = client.IdCardBack(image);
        }