xcode 信用卡扫描仪

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11845981/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 01:09:55  来源:igfitidea点击:

Credit Card Scanner

iosxcodeocrphotoscanning

提问by Andrei Filip

I want to implement a credit card scanner in my application. I have come across https://www.card.io/and it is exactly the sort of thing I was looking for, but it is not free. Also, I would like not to communicate the information with a remote server. Do you know any open-source library that can scan a credit card and extract the card number and expiration date from the photo?

我想在我的应用程序中实现信用卡扫描仪。我遇到过https://www.card.io/,这正是我正在寻找的东西,但它不是免费的。另外,我不想与远程服务器通信信息。您知道任何可以扫描信用卡并从照片中提取卡号和有效期的开源库吗?

回答by Pablosproject

You can use the OpenCVlibrary for computer vision to process the image and "isolate" the part of the image where there're the numbers. After that you can use Tesseract, a good OCR engine mantained by Google to "read" the number from the image; both the libraries are open source.

您可以使用计算机视觉的OpenCV库来处理图像并“隔离”图像中包含数字的部分。之后,您可以使用Tesseract,这是 Google 提供的一个很好的 OCR 引擎,可以从图像中“读取”数字;这两个库都是开源的。

Exists precompiled version of both the libraries that you can easily include in a Xcode project as static libraries.

存在两个库的预编译版本,您可以轻松地将它们作为静态库包含在 Xcode 项目中。