Esempio n. 1
0
        public static void TrainTicketDemo()
        {
            var image = File.ReadAllBytes(filePath);

            //预先识别检查是否为一张可以识别的火车票
            try
            {
                var firstresult = client.GeneralBasic(image);
            }
            catch (Exception e)
            {
                MessageBox.Show(string.Format("识别错误{0}", e), "车票识别", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            // 调用火车票识别
            try
            {
                var result = client.TrainTicket(image);
            }
            catch (Exception e)
            {
                MessageBox.Show(string.Format("识别错误{0}", e), "车票识别", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }