Job*_*b M 5 ocr android android-vision
已经在github链接上浏览了Android OCR视觉示例https://codelabs.developers.google.com/codelabs/mobile-vision-ocr/index.html?index=..%2F..%2Findex#0
如何在不挣扎的情况下自动识别和选择信用卡号码.当前的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();
}
Run Code Online (Sandbox Code Playgroud)
我想要一种方法来自动识别有效的信用卡号码(可能是收据号码,账单号码),因为它扫描并切换到具有该值的另一个意图,以便与其一起执行其他活动.