Giter Club home page Giter Club logo

idcardrecognition's Introduction

IDCardRecognition

简介

一个近乎完整的可识别**身份证信息的Demo

可自动快速读出身份证上的信息(姓名、性别、民族、住址、身份证号码)并截取到身份证图像

IDAuthViewController-开始验证身份证

实现原理

经实践发现,只要身份证号码处于摄像头预览图层中时,即不用完全对准身份证也可以读取到身份证号码,但此时截取到的身份证图像并不完整。

为获取到比较完整的身份证图像,经多次实践发现,当身份证人像大约位于拍摄框中的右上区域时,此时可获取到比较完整的身份证图像。

因此,在拍摄框中右上区域加了一个人像区域提示框,并将该区域设为扫描人脸的区域,只有该区域扫描到身份证上的人脸时(确保用户的确将身份证人像对准了拍摄框中的人像框),才执行读取身份证信息的操作。

Usage

将该功能集成到你开发的app里:

1、请把Category、Tool、libexidcard、Model、View、Controller这六个文件夹拖入到你的项目里;

2、将idcard_first.png、idcard_first_head.png、idcard_back.png、nav_back.png、nav_torch_on.png、nav_torch_off.png拖入到你的项目中,或在相应代码处替换为你的素材;

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

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

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

5、在你的项目中的相应处,首先:

`#import "IDAuthViewController.h"`

在使用该功能的地方:

`IDAuthViewController *IDAuthVC = [[IDAuthViewController alloc] init];`

`[self.navigationController pushViewController:IDAuthVC animated:YES];`
 

Star

iOS开发者交流群:446310206 喜欢就❤️❤️❤️star一下吧!你的支持是我更新的动力! Love is every every every star! Your support is my renewed motivation!

License

This code is distributed under the terms and conditions of the MIT license.

idcardrecognition's People

Contributors

xiaohange avatar

Watchers

James Cloos avatar yunyuchen 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.