OMh*_*Mhz 5 frameworks credit-card scanning ios swift
我想在 iOS 应用程序上扫描信用卡。我使用了 CardIO 框架,但它不适用于 ios13
guard let cardIOVC = CardIOPaymentViewController(paymentDelegate: self) else {
print("This device is incompatible with CardIO")
return
}
cardIOVC.collectCVV = false
cardIOVC.modalPresentationStyle = .overCurrentContext
present(cardIOVC, animated: true, completion: nil)
Run Code Online (Sandbox Code Playgroud)
所以我想知道在提供 cardInfo 时,在不显示内置预加载视图的情况下实现 CardIO 的最佳方法是什么。
guard let cardIOVC = ScanViewController.createViewController(withDelegate: self) else {
print("This device is incompatible with CardScan")
return
}
cardIOVC.allowSkip = true
present(cardIOVC, animated: true, completion: nil)
Run Code Online (Sandbox Code Playgroud)
因此 cardScan Library 但既不返回到期日期也不返回名片持有人。我不确定我开发的代码块是否错过了配置 creditInfo 回调的东西。
我还测试了 DyScan 框架作为 CardIO API 的更新,但是没有可用的podSpec:DyscanIntegrationGuide
iOS 是否为开发者提供任何公共 API 来扫描信用卡?或者有没有更好的解决方案?
基本上你可以创建自己的,步骤是
使用 VisionKit、Tesseract、AWS Textract 等从图像中提取文本。
获取已识别文本的标准化坐标
使用 CoreML、SciKit learn 等训练 mlmodel,其中包含各种卡详细信息(如 16 位数字、卡名称、到期日等)的标准化位置。
根据步骤 3 中的训练模型预测步骤 2 中的归一化值。
和我做的同类产品一样,效果不错。
| 归档时间: |
|
| 查看次数: |
2433 次 |
| 最近记录: |