AnonymousUser
AnonymousUser

Reputation: 31

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?

Upvotes: 3

Views: 7788

Answers (2)

apc
apc

Reputation: 5566

There is a Xamarin wrapper for Google's Teseract you could use: https://github.com/halkar/Tesseract.Xamarin

Upvotes: 0

Supun Liyanaarachchi
Supun Liyanaarachchi

Reputation: 549

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

Upvotes: 1

Related Questions