产品详情
API参数 云鉴_车牌图像识别_车牌OCR识别_车牌图片识别_车牌信息识别 调用地址: http,https://ocrchepai.api.bdymkt.com/yjchepaiocr 请求方式: 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 = "//yjchepaiocr";
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": "ZT20210128204031758689442",//系统流水号
"responsetime": "20210128204032326",//响应发起时间yyyyMMddHHmmssSSS
"errcode": "R0000",//返回码
"errmsg": "处理成功",//返回码描述信息
"result": {//车牌识别结果集
"number": "粤R6A978",//车牌号
"color": "blue"//车牌颜色
},
"encresult": ""//保留字段,暂未使用
}
//errcode返码释义
R0000:处理成功
R0001:处理失败
P0027:图像信息不标准
00061:请求次数超限
21005:该产品暂时无法使用
910RE:系统交易超时
91096:系统其他错误
失败返回示例 {
"jobid": "ZT20201230164545238130741",
"responsetime": "20201230164545557",
"errcode": "P0027",
"errmsg": "图像信息不标准",
"result": {},
"encresult": ""
}
错误码定义
