产品详情
API参数 云鉴_驾驶证图像识别_驾驶证OCR识别_驾驶证图片识别_驾驶证信息识别 调用地址: http,https://ocrjszv1.api.bdymkt.com/yjjszocr 请求方式: POST 支持格式: application/x-www-form-urlencoded 调用工具: 去调试 请求参数(Headers) 请求参数(Query) 请求参数(Body)
- 名称
- 类型
- 是否必须
- 示例值
- 描述
- photo
- string
- true
- /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgH
- 驾驶证照片(Base64字符串:不含img标签信息"data:image/jpg;base64,")格式为jpg或png,图片大小不能超过200kb)
<dependency>
<groupId>com.baidubce</groupId>
<artifactId>api-explorer-sdk</artifactId>
<version>1.0.0</version>
</dependency>
import com.baidubce.http.ApiExplorerClient;
import com.baidubce.http.AppSigner;
import com.baidubce.http.HttpMethodName;
import com.baidubce.model.ApiExplorerRequest;
import com.baidubce.model.ApiExplorerResponse;
// 云鉴_驾驶证图像识别_驾驶证OCR识别_驾驶证图片识别_驾驶证信息识别 Java示例代码
public class RequestDemo {
public static void main(String[] args) {
String path = "//yjjszocr";
ApiExplorerRequest request = new ApiExplorerRequest(HttpMethodName.POST, path);
request.setCredentials("您的 access key", "您的 secret key");
request.addHeaderParameter("Content-Type", "application/x-www-form-urlencoded");
ApiExplorerClient client = new ApiExplorerClient(new AppSigner());
try {
ApiExplorerResponse response = client.sendRequest(request);
// 返回结果格式为Json字符串
System.out.println(response.getResult());
} catch (Exception e) {
e.printStackTrace();
}
}
}
点击复制代码
正常返回示例 {
"jobid": "ZT20210128202754196384457",//系统流水号
"responsetime": "20210128202756110",//响应发起时间yyyyMMddHHmmssSSS
"errcode": "R0000",//返回码
"errmsg": "处理成功",//返回码描述信息
"result": {},//保留字段,暂未使用
"encresult": {//驾驶证识别结果集
"birthday": "1968-01-23",//出生日期 例如:1990-01-23
"address": "广东省广州市天河区天河北路709号2166房",//住址
"sex": "男",//性别
"type": "",//驾驶证类型
"firstissuedate": "1996-08-16",//初次领证日期 例如:2010-01-23
"nationality": "中国",//国籍
"validfromdate": "",//有效起始日期 例如:2020-01-23
"quasidrivingtype": "C1E",//准驾车型
"idcard": "440304199012345678",//驾驶证号
"name": "杨X",//姓名
"documentnumber": "",//档案编号
"validfordate": "2015-08-16至2025-08-16",//有效期
"closingdate": ""//有效截止日期 例如:2025-01-23
}
}
//errcode返码释义
R0000:处理成功
R0001:处理失败
P0027:图像信息不标准
00061:请求次数超限
21005:该产品暂时无法使用
910RE:系统交易超时
91096:系统其他错误
失败返回示例 {
"jobid": "ZT20201230164545238130741",
"responsetime": "20201230164545557",
"errcode": "P0027",
"errmsg": "图像信息不标准",
"result": {},
"encresult": ""
}
错误码定义
