繁体   English   中英

带 Xamarin 的 OCR

[英]OCR with Xamarin

我想在我的 Xamarin Forms 应用程序中使用 OCR 从 ID 卡中读取信息,但我发现的唯一例子是这个,它已经过时了(或者我只是不知道如何使用它)。

我还看到了 Google Vision AI,我可以在我的 Xamarin.Android(或 iOS)中使用它并将信息传递给我的共享项目,但我无法想象我会如何做到这一点。

有没有人可以帮我解决这个问题?

检查此链接。 https://devblogs.microsoft.com/xamarin/performing-ocr-for-ios-android-and-windows-with-microsoft-cognitive-services/

使用 Microsoft 认知服务和 Xamarin - https://github.com/pierceboggan/smarter-apps跟踪发票的示例应用应用

代码示例 -

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

在此处输入图像描述

您可以使用 Google Teseract 的 Xamarin 包装器: https://github.com/halkar/Tesseract.Xamarin

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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