3
已通过github链接浏览了Android OCR愿景样本https://codelabs.developers.google.com/codelabs/mobile-vision-ocr/index.html?index=..%2F..%2Findex#0Android-vision OCR; Android-vision
如何自动识别并挑选信用卡号码而不用费力去点击它。 目前receiveDetection方法是
@Override
public void receiveDetections(Detector.Detections<TextBlock> detections) {
mGraphicOverlay.clear();
SparseArray<TextBlock> items = detections.getDetectedItems();
for (int i = 0; i < items.size(); ++i) {
TextBlock item = items.valueAt(i);
if (item != null && item.getValue() != null) {
Log.d("Processor", "Text detected! " + item.getValue());
}
OcrGraphic graphic = new OcrGraphic(mGraphicOverlay, item);
mGraphicOverlay.add(graphic);
}
}
@Override
public void release() {
mGraphicOverlay.clear();
}
我想自动识别有效的信用卡号(也能像一个收据号码,账单顺序号的任何东西),因为它扫描并切换到与另一个意图的方法价值为了执行其他活动。
虽然嗨,这不是解决你的问题。但为什么不使用https://www.card.io/? – Pranaysharma
我正尝试创建一个应用程序来协助OCR解决方案 – Job