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