简体   繁体   中英

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?

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);
}

在此处输入图像描述

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM