最近更新时间:2021-10-14
火车票识别用于识别您上传的火车票图片中的信息,并将识别的结果返回给您。支持对火车票上个8关键字段进行结构化识别,包括起始站、终点站、发车日期、发车时间、车次、车票价格、姓名、座位号。
调用地址:https://apim.unicloud.com/api/ocr/trainticket/1.0.0/
请求方式:POST
返回类型:JSON
Header如下:
参数 | 值 | 说明 |
---|---|---|
Content-Type | application/json | -- |
Authorization | Bearer | 参考Token获取 |
Body如下:
参数 | 是否必选 | 类型 | 可选值范围 | 说明 |
---|---|---|---|---|
train_pic | true | file | -- | 火车票图片(支持jpg、jpeg、png格式) |
注:Body使用form-data形式
curl -k -H "Authorization:Bearer 2b8296e1-86a5-3a68-bd61-9b88f9dce5c0" \ -F "train_pic=@imgpath.jpg" \ https://apim.unicloud.com/api/ocr/trainticket/1.0.0/
curl -k -H "Authorization:Bearer 2b8296e1-86a5-3a68-bd61-9b88f9dce5c0" \ -F "train_pic=@imgpath.jpg" \ https://apim.unicloud.com/api/ocr/trainticket/1.0.0/
curl -k -H "Authorization:Bearer 2b8296e1-86a5-3a68-bd61-9b88f9dce5c0" -F "train_pic=@imgpath.jpg" https://apim.unicloud.com/api/ocr/trainticket/1.0.0/
字段 | 类型 | 说明 |
---|---|---|
departure_station | string | 起始站 |
destination_station | string | 终点站 |
departure_date | string | 发车日期 |
departure_time | string | 发车时间 |
train_number | string | 车次 |
price | string | 车票价格 |
name | string | 姓名 |
seat_number | string | 座位号 |
code | string | 是否正常返回(“succeed”,”failed”) |
火车票信息:
{ "Data": { "departure_station": "宜春", "destination_station": "南昌西", "departure_time": "16:33", "departure_date": "2017-12-26", "train_number": "G1418", "price": "81.0元", "name": "易双智", "seat_number": "04车03D号" }, "code": "succeed" }
{ "Data": { "departure_station": "宜春", "destination_station": "南昌西", "departure_time": "16:33", "departure_date": "2017-12-26", "train_number": "G1418", "price": "81.0元", "name": "易双智", "seat_number": "04车03D号" }, "code": "succeed" }
{ "Data": { "departure_station": "宜春", "destination_station": "南昌西", "departure_time": "16:33", "departure_date": "2017-12-26", "train_number": "G1418", "price": "81.0元", "name": "易双智", "seat_number": "04车03D号" }, "code": "succeed"}