wyt_ocr_ali
v1.0.0
Published
封装了阿里云ocr常用证件的识别方法
Downloads
4
Readme
如何使用
- 安装依赖
npm install wyt_ocr_ali
- 相关引入:
import { AliOcrClientSingle, IdCardFace, IdCardBack, BankCard, BusinessLicense } from 'wyt_ocr_ali';
- 简单示例:
// 所有方法都定义在AliOcrClientSingle类中(目前有内地身份证识别(正反面),银行卡识别,公司营业执照识别) const single = AliOcrClientSingle.getInstance("你的阿里云accessKeyId","你的阿里云accessKeySecret"); const result: BankCard = await single.readBankCard('你的银行本本地文件路径'); if(!result){ throw new Error('没有识别你的银行卡信息'); }