Giter Site home page Giter Site logo

wyidcardocr's Introduction

介绍

一份完整的身份证正反面、银行卡光学识别框架

可自动快速读出身份证,银行卡上的信息

身份证:(姓名、性别、民族、出生日期、住址、身份证号码、签发机关、有效期限)并截取到身份证正反面图像

银行卡:(卡号、银行名称)并截取到银行卡图像

使用

1、在你的项目的Info.plist文件中,添加权限描述(Key   Value)

Privacy - Camera Usage Description 是否允许访问相机

Privacy - Photo Library Usage Description 是否允许访问相册

2、运行程序,可能会报 ENABLE_BITCODE 错误:

WYIDCardOCR-ERROR

解决方法:

在TARGETS 中的 Buid Setting 下找到 Enable Bitcode 将其设置为NO; Xcode8 环境下会检测.a 文件, 所以将 Enable Testability 设置为 NO。

可能还会报错


Undefined symbols for architecture arm64:
  "_ZIM_SaveImage", referenced from:
      ImgSave(tagIMG, char const*) in libbankcard.a(gjimage.o)
  "_ZIM_LoadImage", referenced from:
      ImgLoad(tagIMG&, char const*) in libbankcard.a(gjimage.o)
  "_ZIM_DoneImage", referenced from:
      ImgLoad(tagIMG&, char const*) in libbankcard.a(gjimage.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
解决办法:build settings 搜索 ENABLE_TESTABILITY 改为NO

3、在你的项目中的相应处倒入头文件:

#import "WYIDScanViewController.h"

在使用该功能的地方:

WYIDScanViewController *VC = [[WYIDScanViewController alloc] initWithCarInfo: 扫描的类型 ];

[self.navigationController VC animated:YES];

扫描成功回调:

[VC scanDidFinishCarInfo:^(CardType status, WYScanResultModel *scanModel) {

}];

4、使用真机,大功告成!

特别感谢

本代码参考自mxl123/IDAndBankCard,非常感谢mxl123大神的开源!

真机运行

WYIDCardOCR-拍照正面 WYIDCardOCR-拍照反面 WYIDCardOCR-读取正面 WYIDCardOCR-读取反面 WYIDCardOCR-卡凹槽正面 WYIDCardOCR-卡平滑正面 WYIDCardOCR-卡读取

wyidcardocr's People

Contributors

unseim avatar maltsugar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.