示例#1
0
        public static BaiduBandCardRecognition getBandCardRecognition(Newtonsoft.Json.Linq.JObject jObject)
        {
            if (jObject == null)
            {
                return(null);
            }
            BaiduBandCardRecognition card = new BaiduBandCardRecognition();
            string result = MyHelper.StringHelper.jsonCamelCaseToDBnameing(jObject.SelectToken("result").ToString());

            if (string.IsNullOrEmpty(result))
            {
                card = MyHelper.JsonHelper.JsonToObject(MyHelper.StringHelper.jsonCamelCaseToDBnameing(jObject.ToString()), typeof(BaiduBandCardRecognition)) as BaiduBandCardRecognition;
            }
            else
            {
                card = MyHelper.JsonHelper.JsonToObject(result, typeof(BaiduBandCardRecognition)) as BaiduBandCardRecognition;
            }
            return(card);
        }
 private void bankCardRecobnition()
 {
     Newtonsoft.Json.Linq.JObject ob   = getOcr().Bankcard(FileHelper.GetBytes(imagePath));
     BaiduBandCardRecognition     card = BaiduAipHelper.getBandCardRecognition(ob);
 }