bertsir / idcardrecognition Goto Github PK
View Code? Open in Web Editor NEWAndroid 身份证号码识别 (本地,在线,实时)
Android 身份证号码识别 (本地,在线,实时)
大佬您好,在看了您的本地识别源码,我有一些疑问
在CameraActivity
中
final Bitmap bitmap1 = Bitmap.createBitmap(bitmap, width / 2 - dip2px(150), height / 2 - dip2px(92), dip2px(300), dip2px(185));
int x, y, w, h;
x = (int) (bitmap1.getWidth() * 0.340);
y = (int) (bitmap1.getHeight() * 0.800);
w = (int) (bitmap1.getWidth() * 0.6 + 0.5f);
h = (int) (bitmap1.getHeight() * 0.12 + 0.5f);
Bitmap bit_hm = Bitmap.createBitmap(bitmap1, x, y, w, h);
这里应该是将整个SurfaceView
进行了身份证区域裁剪,然后又再身份证照片上进行了裁剪生成了bit_hm
,我猜想这个bit_hm
应该是身份证号的图片,我就想问一下这些bitmap1.getHeight() * 0.12 + 0.5f
这些是如何调试出来的,
谢谢!
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.