com.aiwiown.face.request.OCRDriverLicenseV1Request Maven / Gradle / Ivy
package com.aiwiown.face.request;
import com.aiwiown.face.ApiMethod;
import com.aiwiown.face.ApiObject;
import com.aiwiown.face.ApiRequest;
import com.aiwiown.face.internal.util.RequestParamUtils;
import com.aiwiown.face.response.OCRDriverLicenseV1Response;
import java.util.Map;
/**
* 描述
* 检测和识别中华人民共和国机动车驾驶证(以下称“驾照”)图像为结构化的文字信息。目前只支持驾照主页正面,不支持副页正面反面。
*
* 驾照图像须为正拍(垂直角度拍摄),但是允许有一定程度的旋转角度;
* 仅支持图像里有一个驾照的主页正面,如果同时出现多页、或正副页同时出现,可能会返回空结果。
* https://api-cn.faceplusplus.com/cardpp/v1/ocrdriverlicense
*/
public class OCRDriverLicenseV1Request implements ApiRequest {
private String apiVersion = "v1";
private static String apiUrl = "/ocrdriverlicense";
private String bizContent;
private ApiObject bizModel = null;
@Override
public ApiMethod getApiMethod() {
return ApiMethod.POST;
}
@Override
public String getApiUrl() {
return "/" + this.apiVersion + apiUrl;
}
@Override
public Map getTextParams() throws IllegalAccessException {
return RequestParamUtils.getTextParams(this.bizModel);
}
@Override
public Map getByteArrayParams() throws IllegalAccessException {
return RequestParamUtils.getByteArrayParams(this.bizModel);
}
@Override
public Class getResponseClass() {
return OCRDriverLicenseV1Response.class;
}
@Override
public String getApiVersion() {
return this.apiVersion;
}
@Override
public String getBizContent() {
return this.bizContent;
}
public void setBizModel(ApiObject bizModel) {
this.bizModel = bizModel;
}
@Override
public String signVersion() {
return null;
}
@Override
public String getSignInfo(String apiKey, String secretKey) throws Exception {
return null;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy