使用Google的Firebase ML Kit,应用程序可以轻松地集成基于机器学习的OCR(字符识别)功能。如果你在使用Firebase ML Kit中的OCR功能时遇到了“Waiting for the text optional module to be downloaded”错误,这里是一些
implementation 'com.google.firebase:firebase-ml-vision:24.0.3'
FirebaseApp.initializeApp(this);
FirebaseVision.getInstance().getOnDeviceTextRecognizer()
.downloadModelIfNeeded()
.addOnSuccessListener(new OnSuccessListener
FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);
FirebaseVisionTextRecognizer recognizer = FirebaseVision.getInstance().getOnDeviceTextRecognizer();
recognizer.processImage(image)
.addOnSuccessListener(new OnSuccessListener
上一篇:Android密钥密码丢失