Have gone through the Android OCR vision sample on github link https://codelabs.developers.google.com/codelabs/mobile-vision-ocr/index.html?index=..%2F..%2Findex#0
How can you automatically identify and pick numbers of a credit card without struggling to tap on it. The current receiveDetection method is
@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();
}
I want to a method to automatically recognize a valid credit card number(could be anything like a receipt number, bill-order number) as it scans and switch to another intent with the value in-order to perform other activities with it.