History
Introduction
API Category
Making API Requests
Region APIs
Instance APIs
Cloud Hosting Cluster APIs
Image APIs
Instance Launch Template APIs
Placement Group APIs
Key APIs
Security Group APIs
Network APIs
Data Types
Error Codes
GET /<ObjectKey>?ci-process=AILicenseRec&CardType=IDCard HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: <GMT Date>Authorization: <Auth String>
GET /?ci-process=AILicenseRec&CardType=IDCard&detect-url=<detect-url> HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: <GMT Date>Authorization: <Auth String>
参数名称 | 描述 | 类型 | 是否必选 |
ObjectKey | 对象文件名,例如:folder/document.jpg | String | 必须与 detect-url 二选一 |
ci-process | 数据万象处理能力,卡证文字识别(OCR)固定为 AILicenseRec | String | 是 |
detect-url | 您可以通过填写 detect-url 处理任意公网可访问的图片链接。不填写 detect-url 时,后台会默认处理 ObjectKey ,填写了 detect-url 时,后台会处理 detect-url 链接,无需再填写 ObjectKey。 detect-url 示例: http://www.example.com/abc.jpg ,需要进行 UrlEncode,处理后为http%25253A%25252F%25252Fwww.example.com%25252Fabc.jpg | String | 必须与 ObjectKey 二选一 |
CardType | 卡证文字识别(OCR)类型,默认为 DriverLicense。有效值为: IDCard:表示身份证。 DriverLicense:表示驾驶证。 | String | 是 |
<Response><Status>1</Status><IdInfo><Name>姓名</Name><DetectedText>xxx</DetectedText><Score>99</Score><Location><Point>553,439</Point><Point>553,576</Point><Point>989,576</Point><Point>989,439</Point></Location></IdInfo><IdInfo><Name>性别</Name><DetectedText>男</DetectedText><Score>98</Score><Location><Point>541,597</Point><Point>541,723</Point><Point>798,723</Point><Point>798,597</Point></Location></IdInfo><IdInfo><Name>民族</Name><DetectedText>汉</DetectedText><Score>98</Score><Location><Point>1032,599</Point><Point>1032,725</Point><Point>1265,725</Point><Point>1265,599</Point></Location></IdInfo><IdInfo><Name>出生(日期)</Name><DetectedText>1974年12月1日</DetectedText><Score>99</Score><Location><Point>532,748</Point><Point>532,906</Point><Point>1346,906</Point><Point>1346,748</Point></Location></IdInfo><IdInfo><Name>住(地)址</Name><DetectedText>湖南省xxxxx</DetectedText><Score>99</Score><Location><Point>534,931</Point><Point>534,1253</Point><Point>1587,1253</Point><Point>1587,931</Point></Location></IdInfo><IdInfo><Name>公民身份证号(证号)</Name><DetectedText>43xxxx</DetectedText><Score>99</Score><Location><Point>842,1372</Point><Point>842,1615</Point><Point>2284,1615</Point><Point>2284,1372</Point></Location></IdInfo></Response>
节点名称(关键字) | 父节点 | 描述 | 类型 |
Response | 无 | 保存结果的容器 | Container |
节点名称(关键字) | 父节点 | 描述 | 类型 |
Status | Response | 卡证文字识别(OCR)结果,1:识别到结果 0:未识别到结果 | Int |
IdInfo | Response | 卡证文字识别(OCR)信息。 | String |
节点名称(关键字) | 父节点 | 描述 | 类型 |
Name | Response.IdInfo | 字段的名称 | String |
DetectedText | Response.IdInfo | 识别到字段的文本内容 | String |
Score | Response.IdInfo | 字段的置信度,取值范围为[0-100],值越高概率越大 | Int |
Location | Response.IdInfo | 驾驶证中识别到字段的坐标 | Container |
节点名称(关键字) | 父节点 | 描述 | 类型 |
Point | Response.IdInfo.Location | 驾驶证信息 坐标点(X 坐标,Y 坐标) | String |
GET /<ObjectKey>?CardType=IDCard&ci-process=AILicenseRec HTTP/1.1Authorization:q-sign-algorithm=sha1&q-ak=************************************&q-sign-time=1497530202;1497610202&q-key-time=1497530202;1497610202&q-header-list=&q-url-param-list=&q-signature=****************************************Host:bucket-1250000000.cos.ap-beijing.myqcloud.com
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 414641Date: Thu, 15 Jun 2017 12:37:29 GMTServer: tencent-cix-cos-request-id: NTk0MjdmODlfMjQ4OGY3XzYzYzhfMjc=<Response><Status>1</Status><IdInfo><Name>姓名</Name><DetectedText>xxx</DetectedText><Score>99</Score><Location><Point>553,439</Point><Point>553,576</Point><Point>989,576</Point><Point>989,439</Point></Location></IdInfo><IdInfo><Name>性别</Name><DetectedText>男</DetectedText><Score>98</Score><Location><Point>541,597</Point><Point>541,723</Point><Point>798,723</Point><Point>798,597</Point></Location></IdInfo><IdInfo><Name>民族</Name><DetectedText>汉</DetectedText><Score>98</Score><Location><Point>1032,599</Point><Point>1032,725</Point><Point>1265,725</Point><Point>1265,599</Point></Location></IdInfo><IdInfo><Name>出生(日期)</Name><DetectedText>1974年12月1日</DetectedText><Score>99</Score><Location><Point>532,748</Point><Point>532,906</Point><Point>1346,906</Point><Point>1346,748</Point></Location></IdInfo><IdInfo><Name>住(地)址</Name><DetectedText>湖南省xxxxx</DetectedText><Score>99</Score><Location><Point>534,931</Point><Point>534,1253</Point><Point>1587,1253</Point><Point>1587,931</Point></Location></IdInfo><IdInfo><Name>公民身份证号(证号)</Name><DetectedText>43xxxx</DetectedText><Score>99</Score><Location><Point>842,1372</Point><Point>842,1615</Point><Point>2284,1615</Point><Point>2284,1372</Point></Location></IdInfo></Response>
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback