- 👋 Hi, I’m @tonyleen
- 👀 I’m interested in ...
- 🌱 I’m currently learning ...
- 💞️ I’m looking to collaborate on ...
- 📫 How to reach me ...
tonyleen / idcardocr Goto Github PK
View Code? Open in Web Editor NEW身份证信息识别,同时提供阿里以及优图识别
License: MIT License
身份证信息识别,同时提供阿里以及优图识别
License: MIT License
'use strict';
var fs=require("fs");
var img = fs.readFileSync('img.txt', 'utf8'); //img.txt 内容为 image/jpeg;base64
var ocrAli = require('./index').ali;
var sfz1 = 'data:image/jpeg;base64,'+img // 如果把img.txt 的内容在这里放置能正常解析出所需内容,但从文件读取后就出错
var params = {
image: sfz1,
card_type: 0,////身份证图片类型,0-正面,1-反面
session_id: ''
};
var aliTest = function () {
ocrAli.idCardOCR(params, function (err, result) {
console.log('ali(头像面):', err, result);
console.log('-----line-----');
});
};
aliTest();
提示如下错误:
ali(头像面): null { authority: undefined,
start_date: undefined,
end_date: undefined,
valid_date: '-undefined',
side: 1 }
-----line-----
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.