Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

身份证识别为何不加上远程图片识别的接口 #54

Open
jiangguilong2000 opened this issue Aug 23, 2023 · 0 comments
Open

身份证识别为何不加上远程图片识别的接口 #54

jiangguilong2000 opened this issue Aug 23, 2023 · 0 comments

Comments

@jiangguilong2000
Copy link

openAPI 支持远程图片识别,但SDK却不支持,希望尽快支持!如以下的接口只支持本地图片,不支持远程图片url,谢谢!
image

  /**
     * 身份证识别接口
     * 用户向服务请求识别身份证,身份证识别包括正面和背面。
     *
     * @param image - 本地图片路径
     * @param idCardSide - front:身份证含照片的一面;back:身份证带国徽的一面
     * @param options - 可选参数对象,key: value都为string类型
     * options - options列表:
     *   detect_direction 是否检测图像朝向,默认不检测,即:false。朝向是指输入图像是正常方向、逆时针旋转90/180/270度。可选值包括:<br>- true:检测朝向;<br>- false:不检测朝向。
     *   detect_risk 是否开启身份证风险类型(身份证复印件、临时身份证、身份证翻拍、修改过的身份证)功能,默认不开启,即:false。可选值:true-开启;false-不开启
     * @return JSONObject
     */
    public JSONObject idcard(String image, String idCardSide, HashMap<String, String> options) {
        try {
            byte[] data = Util.readFileByBytes(image);
            return idcard(data, idCardSide, options);
        } catch (IOException e) {
            e.printStackTrace();
            return AipError.IMAGE_READ_ERROR.toJsonResult();
        }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant