运单识别-腾讯ocr

腾讯云ocr识别

https://console.cloud.tencent.com/api/explorer?Product=ocr&Version=2018-11-19&Action=WaybillOCR&SignVersion=

 

 

 

 

using System;
using System.Threading.Tasks;
using TencentCloud.Common;
using TencentCloud.Common.Profile;
using TencentCloud.Ocr.V20181119;
using TencentCloud.Ocr.V20181119.Models;

namespace TencentCloudExamples
{
    class WaybillOCR
    {
        static void Main(string[] args)
        {
            try
            {
                Credential cred = new Credential {
                    SecretId = "",
                    SecretKey = ""
                };

                ClientProfile clientProfile = new ClientProfile();
                HttpProfile httpProfile = new HttpProfile();
                httpProfile.Endpoint = ("ocr.tencentcloudapi.com");
                clientProfile.HttpProfile = httpProfile;

                OcrClient client = new OcrClient(cred, "ap-guangzhou", clientProfile);
                WaybillOCRRequest req = new WaybillOCRRequest();
                req.ImageBase64 = "图片base64";
                WaybillOCRResponse resp = client.WaybillOCRSync(req);
                Console.WriteLine(AbstractModel.ToJsonString(resp));
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
            }
            Console.Read();
        }
    }
}

 

posted @ 2020-10-14 14:29  CHHC  阅读(389)  评论(0编辑  收藏  举报