Reputation: 150
The Text Recognition API in Firebase Ml kit is not recognizing the digital numbers or a seven segment display numbers that i am trying to scan out from a weight scale , is there anyway to work it out ?
I tried the Dart package for firebase ml vision for flutter apps , and i used the firebaseVisionImage class and Text Recognizer class and visionText class as shown .
// get image file
final File imageFile = File(widget.imagePath);
// create vision image from that file
final FirebaseVisionImage visionImage =
FirebaseVisionImage.fromFile(imageFile);
// create detector index
final TextRecognizer textRecognizer =
FirebaseVision.instance.textRecognizer();
// find text in image
final VisionText visionText =
await textRecognizer.processImage(visionImage);
I expected to have the numbers as an output but , it's not recognized at all ,
Upvotes: 2
Views: 1269
Reputation: 179
You need to process the image in this type
final inputImage = InputImage.fromFilePath(imageFile.path);
final RecognizedText recognizedText = await textRecognizer.processImage(inputImage);
i hope it works :)
Upvotes: -1
Reputation: 600120
If the ML Kit model doesn't automatically recognize the text in your image, there isn't a lot you can do to tweak it.
Instead you'll want to:
Upvotes: 2