BankCardRecognizer

protected void recognizeCard(Bitmap cardBitmap, Rect scanRect, boolean isVertical, ICardRecognizeCallback cardRecognizeCallback)

识别银行卡

调用示例:

BankCardRecognizer bankCardRecognizer = new BankCardRecognizer(BankCardActivity.this);
            bankCardRecognizer.recognizeCard(confirmBmp, getCardOrientationVertical(), getScanIsInFrame(), new CardRecognizer.ICardRecognizeCallback() {
                @Override
                public void callback(Card card, Bitmap recognizeBitmap) {
                    // 将识别完后的卡信息添加到结果页
                    goToResultActivity(card, copyBitmap, recognizeBitmap);
                }
            });
参数 说明
cardBitmap 需要识别的图片
scanRect 扫描框在需要识别的图片中的位置
isVertical 是否为竖版银行卡
cardRecognizeCallback 识别后返回数据的回调

protected boolean initRecognizerinitRecognizer(String licenseName)

初始化识别类

调用示例:

int initRet = initRecognizer();
参数 说明
licenseName license的名称

protected void destroyRecognizer()

销毁识别类

调用示例:

CardRecognizer cardRecognizer = getCardRecognizer();
        if (cardRecognizer != null) {
            cardRecognizer.destroyRecognizer();
        }
参数 说明

results matching ""

    No results matching ""