文档

RecognizeExitEntryPermitToHK - 往来港澳台通行证识别

更新时间:

往来港澳台通行证识别。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用背景高亮的方式表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
ocr:RecognizeExitEntryPermitToHKRead
  • 全部资源
    *

请求参数

名称类型必填描述示例值
Urlstring

图片链接(长度不超 2048,不支持 base64)

https://img.alicdn.com/imgextra/i2/O1CN01Rs4C321G2oTD7Dg1U_!!6000000000565-0-tps-1024-692.jpg
bodybyte

图片二进制字节流,最大 10MB

图片二进制
OutputFigureboolean

图案坐标信息输出,针对结构化,如身份证人脸头像

true/false

支持的图片格式

  • PNG、JPG、JPEG、BMP、GIF、TIFF、WebP

返回参数

名称类型描述示例值
object

Schema of Response

RequestIdstring

请求唯一 ID

C99EABB8-9FCB-5E5E-B4D9-AFCFA6C8B3FD
Datastring

返回数据

{ "data":{ "permitType":"往来港澳通行证", "nameCn":"朱伟", "nameEn":"ZHU,WEI", "birthDate":"2021.01.01", "sex":"男", "validPeriod":"2018.06.11-2028.06.10", "issueAuthority":"公安部出入境管理局", "issuePlace":"江苏", "permitNumber":"C88600000", "mrzCode":"CSC886084772<2800800<8200000<6" }, "ftype":0, "height":692, "orgHeight":692, "orgWidth":1024, "prism_keyValueInfo":[ { "key":"permitType", "keyProb":100, "value":"往来港澳通行证", "valuePos":[ { "x":142, "y":39 }, { "x":476, "y":35 }, { "x":477, "y":75 }, { "x":142, "y":79 } ], "valueProb":100 }, { "key":"nameCn", "keyProb":100, "value":"朱伟", "valuePos":[ { "x":272, "y":126 }, { "x":346, "y":124 }, { "x":347, "y":160 }, { "x":272, "y":161 } ], "valueProb":100 }, { "key":"nameEn", "keyProb":100, "value":"ZHU,WEI", "valuePos":[ { "x":273, "y":168 }, { "x":403, "y":167 }, { "x":403, "y":194 }, { "x":274, "y":196 } ], "valueProb":100 }, { "key":"birthDate", "keyProb":100, "value":"2021.01.01", "valuePos":[ { "x":421, "y":240 }, { "x":421, "y":269 }, { "x":281, "y":269 }, { "x":281, "y":240 } ], "valueProb":100 }, { "key":"sex", "keyProb":100, "value":"男", "valuePos":[ { "x":502, "y":240 }, { "x":502, "y":270 }, { "x":474, "y":270 }, { "x":474, "y":240 } ], "valueProb":100 }, { "key":"validPeriod", "keyProb":100, "value":"2018.06.11-2028.06.10", "valuePos":[ { "x":579, "y":301 }, { "x":579, "y":328 }, { "x":275, "y":328 }, { "x":275, "y":301 } ], "valueProb":100 }, { "key":"issueAuthority", "keyProb":100, "value":"公安部出入境管理局", "valuePos":[ { "x":278, "y":361 }, { "x":524, "y":361 }, { "x":524, "y":391 }, { "x":278, "y":391 } ], "valueProb":100 }, { "key":"issuePlace", "keyProb":100, "value":"江苏", "valuePos":[ { "x":619, "y":361 }, { "x":619, "y":391 }, { "x":561, "y":391 }, { "x":561, "y":361 } ], "valueProb":100 }, { "key":"permitNumber", "keyProb":100, "value":"C88600000", "valuePos":[ { "x":524, "y":61 }, { "x":727, "y":60 }, { "x":728, "y":92 }, { "x":524, "y":94 } ], "valueProb":100 }, { "key":"mrzCode", "keyProb":98, "value":"CSC886084772<2800800<8200000<6", "valuePos":[ { "x":714, "y":421 }, { "x":714, "y":449 }, { "x":65, "y":449 }, { "x":65, "y":421 } ], "valueProb":98 } ], "sliceRect":{ "x0":107, "y0":135, "x1":880, "y1":134, "x2":874, "y2":616, "x3":117, "y3":624 }, "width":1024 }
Codestring

错误码

noPermission
Messagestring

错误提示

You are not authorized to perform this operation.

返回数据说明

permitType  证件类别
nameCn 中文姓名
nameEn 英文姓名
birthDate 出生日期
sex 性别
validPeriod 有效期限
issueAuthority 签发机关
issuePlace 签发地
permitNumber 证件号码
mrzCode 机读码
angle              角度:0-360,0 表示向上,90 表示向右,180 表示向下,270 度表示向左
height            算法矫正图片后的高度
width             算法矫正图片后的宽度
orgHeight      原图的高度
orgWidth       原图的宽度
----------------------------------------prism_keyValueInfo 文字块数组内的字段说明---------------------------------------
valuePos 外矩形四个点的坐标按顺时针排列,左上、右上、右下、左下

示例

正常返回示例

JSON格式

{
  "RequestId": "C99EABB8-9FCB-5E5E-B4D9-AFCFA6C8B3FD",
  "Data": "{     \"data\":{         \"permitType\":\"往来港澳通行证\",         \"nameCn\":\"朱伟\",         \"nameEn\":\"ZHU,WEI\",         \"birthDate\":\"2021.01.01\",         \"sex\":\"男\",         \"validPeriod\":\"2018.06.11-2028.06.10\",         \"issueAuthority\":\"公安部出入境管理局\",         \"issuePlace\":\"江苏\",         \"permitNumber\":\"C88600000\",         \"mrzCode\":\"CSC886084772<2800800<8200000<6\"     },     \"ftype\":0,     \"height\":692,     \"orgHeight\":692,     \"orgWidth\":1024,     \"prism_keyValueInfo\":[         {             \"key\":\"permitType\",             \"keyProb\":100,             \"value\":\"往来港澳通行证\",             \"valuePos\":[                 {                     \"x\":142,                     \"y\":39                 },                 {                     \"x\":476,                     \"y\":35                 },                 {                     \"x\":477,                     \"y\":75                 },                 {                     \"x\":142,                     \"y\":79                 }             ],             \"valueProb\":100         },         {             \"key\":\"nameCn\",             \"keyProb\":100,             \"value\":\"朱伟\",             \"valuePos\":[                 {                     \"x\":272,                     \"y\":126                 },                 {                     \"x\":346,                     \"y\":124                 },                 {                     \"x\":347,                     \"y\":160                 },                 {                     \"x\":272,                     \"y\":161                 }             ],             \"valueProb\":100         },         {             \"key\":\"nameEn\",             \"keyProb\":100,             \"value\":\"ZHU,WEI\",             \"valuePos\":[                 {                     \"x\":273,                     \"y\":168                 },                 {                     \"x\":403,                     \"y\":167                 },                 {                     \"x\":403,                     \"y\":194                 },                 {                     \"x\":274,                     \"y\":196                 }             ],             \"valueProb\":100         },         {             \"key\":\"birthDate\",             \"keyProb\":100,             \"value\":\"2021.01.01\",             \"valuePos\":[                 {                     \"x\":421,                     \"y\":240                 },                 {                     \"x\":421,                     \"y\":269                 },                 {                     \"x\":281,                     \"y\":269                 },                 {                     \"x\":281,                     \"y\":240                 }             ],             \"valueProb\":100         },         {             \"key\":\"sex\",             \"keyProb\":100,             \"value\":\"男\",             \"valuePos\":[                 {                     \"x\":502,                     \"y\":240                 },                 {                     \"x\":502,                     \"y\":270                 },                 {                     \"x\":474,                     \"y\":270                 },                 {                     \"x\":474,                     \"y\":240                 }             ],             \"valueProb\":100         },         {             \"key\":\"validPeriod\",             \"keyProb\":100,             \"value\":\"2018.06.11-2028.06.10\",             \"valuePos\":[                 {                     \"x\":579,                     \"y\":301                 },                 {                     \"x\":579,                     \"y\":328                 },                 {                     \"x\":275,                     \"y\":328                 },                 {                     \"x\":275,                     \"y\":301                 }             ],             \"valueProb\":100         },         {             \"key\":\"issueAuthority\",             \"keyProb\":100,             \"value\":\"公安部出入境管理局\",             \"valuePos\":[                 {                     \"x\":278,                     \"y\":361                 },                 {                     \"x\":524,                     \"y\":361                 },                 {                     \"x\":524,                     \"y\":391                 },                 {                     \"x\":278,                     \"y\":391                 }             ],             \"valueProb\":100         },         {             \"key\":\"issuePlace\",             \"keyProb\":100,             \"value\":\"江苏\",             \"valuePos\":[                 {                     \"x\":619,                     \"y\":361                 },                 {                     \"x\":619,                     \"y\":391                 },                 {                     \"x\":561,                     \"y\":391                 },                 {                     \"x\":561,                     \"y\":361                 }             ],             \"valueProb\":100         },         {             \"key\":\"permitNumber\",             \"keyProb\":100,             \"value\":\"C88600000\",             \"valuePos\":[                 {                     \"x\":524,                     \"y\":61                 },                 {                     \"x\":727,                     \"y\":60                 },                 {                     \"x\":728,                     \"y\":92                 },                 {                     \"x\":524,                     \"y\":94                 }             ],             \"valueProb\":100         },         {             \"key\":\"mrzCode\",             \"keyProb\":98,             \"value\":\"CSC886084772<2800800<8200000<6\",             \"valuePos\":[                 {                     \"x\":714,                     \"y\":421                 },                 {                     \"x\":714,                     \"y\":449                 },                 {                     \"x\":65,                     \"y\":449                 },                 {                     \"x\":65,                     \"y\":421                 }             ],             \"valueProb\":98         }     ],     \"sliceRect\":{         \"x0\":107,         \"y0\":135,         \"x1\":880,         \"y1\":134,         \"x2\":874,         \"y2\":616,         \"x3\":117,         \"y3\":624     },     \"width\":1024 }",
  "Code": "noPermission",
  "Message": "You are not authorized to perform this operation."
}

错误码

访问错误中心查看更多错误码。

  • 本页导读 (0)
文档反馈