Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OCR with Xamarin

I would like to read info from an ID card using OCR in my Xamarin Forms app, but the only example I find is this and it's pretty outdated (or I just don't know how to use it).

I also saw the Google Vision AI, which I could use in my Xamarin.Android (or iOS) and pass the information to my shared project, but I can't imagine how I would do that.

Is there anyone who could help me with this?

like image 798
AnonymousUser Avatar asked Dec 06 '25 08:12

AnonymousUser


1 Answers

check this link. https://devblogs.microsoft.com/xamarin/performing-ocr-for-ios-android-and-windows-with-microsoft-cognitive-services/

sample app app to track invoices using Microsoft Cognitive Services and Xamarin - https://github.com/pierceboggan/smarter-apps

code sample -

using Microsoft.ProjectOxford.Vision;
using Microsoft.ProjectOxford.Vision.Contract;
...
OcrResults text;
var client = new VisionServiceClient("{YOUR-API-KEY-HERE}");
using (var photoStream = photo.GetStream())
{
    text = await client.RecognizeTextAsync(photoStream);
}

enter image description here

like image 178
Supun Liyanaarachchi Avatar answered Dec 07 '25 20:12

Supun Liyanaarachchi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!