护照OCR识别
  • 支持对护照的关键字段识别
  • 支持扫描仪扫描、手机拍照的图像

  API 文档     立即购买

在线体验

本地上传

产品概述

   * OCR识别速度快,小于1秒
   * 开发包不超过1.0M,几乎不增加应用大小

API

接口说明

接口地址: www.etoplive.com/ocr/server.srvc
接口调用方法:Post
接口调用参数:
序号名称类型必填说明
1fileString上传的文件(图片的base64流)
2keyString用户ocrKey
3secretString 用户ocrSecret
4pidInteger识别类型(护照OCR识别 固定值:8)
返回数据:
返回数据类型: JSON
返回数据示例: [{"pid":8,"type":"护照","position":{"left":75,"top":22,"width":1249,"height":822},"direct":0,"angle":0,"image_data":"","ocr_error_code":0,"head_image_data":"","FieldList":[{"key":"MRZ1","chn_key":"机读码1","value":"P","image_data":"/9j","position":{"left":49,"top":668,"width":1095,"height":38},"quad":[0,0,0,0,0,0,0,0]},{"key":"MRZ2","chn_key":"机读码2","value":"8002681313GBR7609125M161221700","image_data":"/9","position":{"left":48,"top":727,"width":1095,"height":41},"quad":[0,0,0,0,0,0,0,0]},{"key":"Name","chn_key":"姓名","value":"","image_data":"","position":{"left":0,"top":0,"width":0,"height":0},"quad":[0,0,0,0,0,0,0,0]},{"key":"BirthPlace","chn_key":"出生地点","value":"","image_data":"","position":{"left":0,"top":0,"width":0,"height":0},"quad":[0,0,0,0,0,0,0,0]},{"key":"IssuePlace","chn_key":"签发地点","value":"","image_data":"","position":{"left":0,"top":0,"width":0,"height":0},"quad":[0,0,0,0,0,0,0,0]},{"key":"IssueDate","chn_key":"签发日期","value":"","image_data":"","position":{"left":0,"top":0,"width":0,"height":0},"quad":[0,0,0,0,0,0,0,0]},{"key":"PPType","chn_key":"类型","value":"P","image_data":"","position":{"left":0,"top":0,"width":0,"height":0},"quad":[0,0,0,0,0,0,0,0]},{"key":"PPNo","chn_key":"护照号码","value":"800268131","image_data":"","position":{"left":0,"top":0,"width":0,"height":0},"quad":[0,0,0,0,0,0,0,0]},{"key":"SurName","chn_key":"姓","value":"","image_data":"","position":{"left":0,"top":0,"width":0,"height":0},"quad":[0,0,0,0,0,0,0,0]},{"key":"GivenNames","chn_key":"名","value":"","image_data":"","position":{"left":0,"top":0,"width":0,"height":0},"quad":[0,0,0,0,0,0,0,0]},{"key":"EnName","chn_key":"英文姓名","value":"OLDFIELD FRANCIS LEE AU CHI FAN","image_data":"","position":{"left":0,"top":0,"width":0,"height":0},"quad":[0,0,0,0,0,0,0,0]},{"key":"CountryCode","chn_key":"国家码","value":"GBR","image_data":"","position":{"left":0,"top":0,"width":0,"height":0},"quad":[0,0,0,0,0,0,0,0]},{"key":"Nation","chn_key":"国籍","value":"GBR","image_data":"","position":{"left":0,"top":0,"width":0,"height":0},"quad":[0,0,0,0,0,0,0,0]},{"key":"Birth","chn_key":"出生日期","value":"19760912","image_data":"","position":{"left":0,"top":0,"width":0,"height":0},"quad":[0,0,0,0,0,0,0,0]},{"key":"Sex","chn_key":"性别","value":"M","image_data":"","position":{"left":0,"top":0,"width":0,"height":0},"quad":[0,0,0,0,0,0,0,0]},{"key":"ExpiryDate","chn_key":"有效期至","value":"20161221","image_data":"","position":{"left":0,"top":0,"width":0,"height":0},"quad":[0,0,0,0,0,0,0,0]},{"key":"Authority","chn_key":"签发机关","value":"","image_data":"","position":{"left":0,"top":0,"width":0,"height":0},"quad":[0,0,0,0,0,0,0,0]}]}]
通用字段说明:
ErrorCode OCR识别状态码
Time 识别时间
ResultList 返回结果数组
type 证件类型
image_data 裁切后的图片base64编码
direct 图片方向
key 英文字段名称
chn_key 中文字段名称
value 对应字段识别结果
position 当前裁切图片或字段在图片上的位置信息
证件特有返回字段说明:
PPType护照类型
PPNo护照号码
Name姓名
EnName英文姓名
Sex性别
Birth出生日期
MRZ1机读码第一行
MRZ2机读码第二行
IssueDate签发日期
ExpiryDate有效期至
BirthPlace出生地
IssuePlace签发地
ErrorCode返回码说明:
0成功
16不支持的图像文件(读取图像文件失败)
19识别失败
-1用户已屏蔽。
-2用户key或secret验证错误。
-3服务次数不足。
-4用户未找到。
-5未支持的识别类型。
-6file参数未提供。
-7未提供key或secret参数
-8服务器IO错误.
-49请求超时
-51图片错误,请换张图片再重试.
-52服务器繁忙
其他 请咨询服务商

购买记录

购买用户 订单套餐 金额 购买时间