Flutter OCR using Google ML Kit | Flutter Text Recognition 2024

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video we will be creating a text recognition app using Google ml kit text recognition API with this API you can upload any images or PDFs and recognize the text within the image or PDF before we dive into the code don't forget to hit the Subscribe button in this tutorial we will be using image Pier package and Google ml kit text recognition package the biggest advantage of this Google ml kit package is that it's totally free however it's only available for mobile apps but not for flutter web make sure you add the latest version of both packages to your flutter project so in my main do do file I have created a simple UI with button and image widget as shown in the simulator now firstly we have to create a pck image function this is an asynchronized function that return nothing so it's a future void type so in order to pick an image we can use pick image function from the image picker package and provide the source as Gallery next we will check if the file return is not null we will then update the file to the image file variable using set State method once the image piaker function completed we can now add this function to the onpress of the elevated button however it's not done yet because we have to create the second function which is process image this is also an asynchronized function that used to execute the Google ml kit text recognition API with the image pick from the function above firstly we have to get the input image type by passing the image file to the from file path function next we have to create the text recognizer instance and then use that instance to execute process image function to the input image this process image function will call the Google ml kit text recognition API and return the recognized text for tutorial purposes I will just add a print statement to the extracted text now we have completed the process image function the last step is to add the process image execution into the pck image function now let's try it out in the simulator so when I when I click on the pig image elevated button it pops out the gallery successfully then I will select a dummy invoice file once I selected you can see that the invoice information is recognized and printed in my vs code terminal with this API you can easily build your own text scanner application this API has high accuracy and supports images and PDF most importantly it's a free to use conclusion this is how you create a text recognition app using Google ml kit API if you have any question feel free to comment below don't forget to like the video and subscribe to our Channel see you in the next tutorial
Info
Channel: AI with Flutter
Views: 1,236
Rating: undefined out of 5
Keywords: flutter google mlkit text recognition, flutter ocr scanner, flutter ocr text recognition, flutter ocr example, flutter google ml kit, flutter image picker, text recognition flutter, flutter tutorial for beginner
Id: GmhkXH8fO-A
Channel Id: undefined
Length: 4min 48sec (288 seconds)
Published: Thu Feb 29 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.