using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace 测试
{
class Program
{
static void Main(string[] args)
{
var ApiKey = "eLSeFV【Key自己去申请】V5xt5AoZI1";
var SecretKey = "wwlexj5【Key自己去申请】fzchemaCcXkec";
var tuPian = "D:\\1.png";
var client = new Baidu.Aip.Ocr.Ocr(ApiKey, SecretKey);
var image = File.ReadAllBytes(tuPian);
// 通用文字识别
var result = client.GeneralBasic(image, null);
Console.WriteLine(result);
Console.ReadKey();
}
}
}