{"id":2323,"date":"2023-01-28T22:57:12","date_gmt":"2023-01-28T13:57:12","guid":{"rendered":"https:\/\/blog.minatoproject.com\/?p=2323"},"modified":"2023-01-28T22:58:54","modified_gmt":"2023-01-28T13:58:54","slug":"net-maui%e3%81%a8ocr%e3%81%a7%e9%81%8a%e3%81%b6","status":"publish","type":"post","link":"https:\/\/blog.minatoproject.com\/?p=2323","title":{"rendered":".NET MAUI\u3068OCR\u3067\u904a\u3076"},"content":{"rendered":"<div class=\"veu_autoEyeCatchBox\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"493\" src=\"https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2023\/01\/SC2020226145412-1118x538-1-1024x493.jpg\" class=\"attachment-large size-large wp-post-image\" alt=\"\" srcset=\"https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2023\/01\/SC2020226145412-1118x538-1-1024x493.jpg 1024w, https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2023\/01\/SC2020226145412-1118x538-1-300x144.jpg 300w, https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2023\/01\/SC2020226145412-1118x538-1-768x370.jpg 768w, https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2023\/01\/SC2020226145412-1118x538-1.jpg 1118w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div>\n<p>\u4e45\u3057\u632f\u308a\u306b\u30a8\u30f3\u30b8\u30cb\u30a2\u3063\u307d\u3044\u30a8\u30f3\u30c8\u30ea\u30fc\u3067\u3059\u3002<\/p>\n\n\n\n<p>.NET MAUI\u3067WinRT API\u306eOCR\u30a8\u30f3\u30b8\u30f3\u3092\u5b9f\u88c5\u3057\u3066\u307f\u307e\u3057\u305f\u3001\u3068\u3044\u3046\u304a\u306f\u306a\u3057\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">.NET MAUI\u3068\u306f<\/h2>\n\n\n\n<p>\u6628\u4eca\u306e.NET\u754c\u9688\u306b\u306f\u3042\u307e\u308a\u8a73\u3057\u304f\u306a\u304f\u3001MS\u516c\u5f0f\u304b\u3089\u306e\u53d7\u3051\u58f2\u308a\u306b\u306a\u308b\u306e\u3067\u3059\u304c\u3001<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>.NET Multi-Platform App UI (.NET MAUI) \u306f\u3001C# \u3068 XAML \u3092\u4f7f\u7528\u3057\u3066\u3001\u30cd\u30a4\u30c6\u30a3\u30d6\u306e\u30e2\u30d0\u30a4\u30eb \u30a2\u30d7\u30ea\u3084\u30c7\u30b9\u30af\u30c8\u30c3\u30d7 \u30a2\u30d7\u30ea\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306e\u30af\u30ed\u30b9\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0 \u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3059\u3002<\/p>\n\n\n\n<p>.NET MAUI \u3092\u4f7f\u7528\u3059\u308b\u3068\u30011 \u3064\u306e\u5171\u6709\u30b3\u30fc\u30c9 \u30d9\u30fc\u30b9\u304b\u3089 Android\u3001iOS\u3001macOS\u3001Windows \u3067\u5b9f\u884c\u3067\u304d\u308b\u30a2\u30d7\u30ea\u3092\u958b\u767a\u3067\u304d\u307e\u3059\u3002<\/p>\n<cite><a href=\"https:\/\/learn.microsoft.com\/ja-jp\/dotnet\/maui\/what-is-maui?view=net-maui-7.0\" target=\"_blank\" rel=\"noopener\" title=\"\">.NET MAUI \u3068\u306f &#8211; .NET MAUI | Microsoft Learn<\/a><\/cite><\/blockquote>\n\n\n\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u8981\u3059\u308b\u306bXamarin\u306e\u9032\u5316\u7cfb\u3063\u307d\u3044\u3082\u306e\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4f5c\u3063\u305f\u3082\u306e<\/h2>\n\n\n\n<p>\u3076\u3063\u3061\u3083\u3051\u4f5c\u308a\u304b\u3051\u3067\u3059\u304c\u3001\u3053\u3061\u3089\u306b\u7f6e\u3044\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<a href=\"https:\/\/github.com\/step63r\/MauiOcrSample\"><img decoding=\"async\" src=\"https:\/\/gh-card.dev\/repos\/step63r\/MauiOcrSample.svg\"><\/a>\n\n\n\n<h2 class=\"wp-block-heading\">\u3068\u308a\u3042\u3048\u305aMVVM\u5316<\/h2>\n\n\n\n<p>\u3044\u304b\u3093\u305b\u3093MAUI\u3067\u307e\u3068\u3082\u306b\u4f5c\u308b\u306e\u304c\u521d\u3081\u3066\u3060\u3063\u305f\u305f\u3081\u3001\u77e5\u540d\u5ea6\u306e\u9ad8\u3044MVVM\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3092\u30ea\u30b5\u30fc\u30c1\u3059\u308b\u3068\u3053\u308d\u304b\u3089\u59cb\u307e\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u7d50\u679c\u3001DI\u30b3\u30f3\u30c6\u30ca\u306fMAUI\u306b\u642d\u8f09\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u5206\u304b\u308a\u3001INotifyPropertyChanged\u306e\u30a2\u30ec\u3092\u3059\u308b\u306e\u306bReactiveProperty\u3092\u3001BindableBase\u306f\u81ea\u4f5c\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<a href=\"https:\/\/github.com\/runceel\/ReactiveProperty\"><img decoding=\"async\" src=\"https:\/\/gh-card.dev\/repos\/runceel\/ReactiveProperty.svg\"><\/a>\n\n\n\n<p>\u305d\u306e\u4ed6\u3001\u30d5\u30a9\u30eb\u30c0\u306e\u69cb\u6210\u306a\u3069\u306f\u6982\u306d\u4ee5\u4e0b\u306e\u30b5\u30a4\u30c8\u3092\u53c2\u8003\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/www.gunshi.info\/entry\/2022\/07\/01\/090944\" target=\"_blank\" rel=\"noopener\" title=\"\">.NET MAUI \u3067 MVVM \u30d1\u30bf\u30fc\u30f3\u3092\u66f8\u3044\u3066\u307f\u3088\u3046 &#8211; \u653e\u6d6a\u8ecd\u5e2b\u306e\u30a2\u30d7\u30ea\u958b\u767a\u5c40 (gunshi.info)<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">WinRT API\u3092\u4f7f\u3046\u305f\u3081\u306e\u8a2d\u5b9a<\/h2>\n\n\n\n<p>\u624b\u306a\u308a\u3067\u9032\u3081\u3066\u3044\u308b\u3068WinRT API\u304c\u305d\u306e\u307e\u307e\u3067\u306f\u4f7f\u3048\u306a\u3044\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3057\u305f\u3002\u30a8\u30e9\u30fc\u5185\u5bb9\u7684\u306b\u306fWindows\u4ee5\u5916\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u3001\u307f\u305f\u3044\u306a\u611f\u3058\u3060\u3063\u305f\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u308c\u306f\u4ee5\u4e0b\u3092\u53c2\u8003\u306b\u3057\u3066\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u5909\u66f4\u3057\u3066\u89e3\u6c7a\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/tera1707.com\/entry\/2022\/03\/16\/224307\" target=\"_blank\" rel=\"noopener\" title=\"\">.NET6\u30a2\u30d7\u30ea\u304b\u3089UWP\u306eAPI(WinRT API)\u3092\u4f7f\u3046 &#8211; tera1707\u2019s blog<\/a><\/p>\n\n\n\n<p>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30d5\u30a1\u30a4\u30eb\u306b\u3042\u3063\u305f\u306e\u306f TargetFramework<strong>s<\/strong> \u3068\u3044\u3046\u30d7\u30ed\u30d1\u30c6\u30a3\u3060\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u3053\u308c\u306f\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3066\u5358\u6570\u5f62\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u65b0\u898f\u8ffd\u52a0\u3059\u308b\u304b\u305f\u3061\u3067\u3002\u3053\u308c\u304c\u6b63\u653b\u6cd5\u306a\u306e\u304b\u3069\u3046\u304b\u306f\u5206\u304b\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\" data-file=\"MauiOcrSample.csproj\" data-line=\"3\" data-show-lang=\"0\"><code>&lt;!--&lt;TargetFrameworks&gt;net6.0-android;net6.0-ios;net6.0-maccatalyst&lt;\/TargetFrameworks&gt;\n&lt;TargetFrameworks Condition=&quot;$([MSBuild]::IsOSPlatform(&#39;windows&#39;))&quot;&gt;$(TargetFrameworks);net6.0-windows10.0.19041.0&lt;\/TargetFrameworks&gt;--&gt;\n&lt;TargetFramework&gt;net6.0-windows10.0.19041.0&lt;\/TargetFramework&gt;<\/code><\/pre><\/div>\n\n\n\n<p>\u3053\u308c\u3067Windows\u3057\u304b\u52d5\u4f5c\u3057\u306a\u304f\u306a\u308a\u307e\u3059\u3002\u6700\u65e9MAUI\u3067\u4f5c\u3063\u3066\u3044\u308b\u610f\u5473\u304c\u5206\u304b\u3089\u306a\u304f\u306a\u3063\u3066\u304d\u307e\u3059\u304c\u3001\u4eca\u56de\u306f\u30b5\u30f3\u30d7\u30eb\u3068\u3044\u3046\u3053\u3068\u3067\u30e8\u30b7\u3068\u3057\u307e\u3059\u3002\u30e8\u30b7\u3068\u3055\u305b\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">OCR\u306e\u5b9f\u88c5<\/h2>\n\n\n\n<p>\u3055\u307b\u3069\u81ea\u5206\u3067\u8003\u3048\u308b\u3068\u3053\u308d\u306f\u306a\u304f\u3066\u3001\u4ee5\u4e0b\u306eQiita\u8a18\u4e8b\u3092\u53c2\u8003\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/qiita.com\/menon\/items\/c05fb712126be398f925\" target=\"_blank\" rel=\"noopener\" title=\"\">C#.net(WPF)\u3067\u753b\u9762\u3092\u6587\u5b57\u8a8d\u8b58\u3057\u3066\u307f\u308b &#8211; Qiita<\/a><\/p>\n\n\n\n<p>\u304a\u4f5c\u6cd5\u7684\u306a\u3068\u3053\u308d\u306f\u7f6e\u3044\u3066\u304a\u3044\u3066\u3001\u3053\u3053\u304cOCR\u306e\u30df\u30bd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism off-numbers lang-csharp\" data-file=\"MauiOcr.cs\" data-lang=\"C#\"><code>OcrResult =  await _engine.RecognizeAsync(softwareBitmap);<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u30d5\u30a1\u30a4\u30eb\u9078\u629e\u3068\u753b\u50cf\u306e\u8868\u793a<\/h2>\n\n\n\n<p>\u30e6\u30fc\u30b6\u30fc\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u9078\u629e\u3055\u305b\u308b\u306b\u306fFilePicker\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u6211\u3089\u306e\u53e4\u304dOpenFileDialog\u306f\u304a\u4ea1\u304f\u306a\u308a\u306b\u306a\u3063\u305f\u3088\u3046\u3067\u3059\u3002<br><a href=\"https:\/\/learn.microsoft.com\/ja-jp\/dotnet\/maui\/platform-integration\/storage\/file-picker?view=net-maui-7.0&amp;tabs=windows\" target=\"_blank\" rel=\"noopener\" title=\"\">\u30d5\u30a1\u30a4\u30eb \u30d4\u30c3\u30ab\u30fc &#8211; .NET MAUI | Microsoft Learn<\/a><\/p>\n\n\n\n<p>\u3067\u3001View\u306eImage\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306b\u30d0\u30a4\u30f3\u30c9\u3059\u308b\u3068\u304d\u306fImageSource\u578b\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u7d10\u4ed8\u3051\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism off-numbers lang-csharp\" data-file=\"MainPageViewModel.cs\" data-lang=\"C#\"><code>Model.Value.ResultImage = ImageSource.FromFile(result.FullPath);<\/code><\/pre><\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism off-numbers lang-plain\" data-file=\"MainPage.xaml\"><code>&lt;Image Source=&quot;{Binding Model.Value.ResultImage}&quot; \/&gt;<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u6240\u611f<\/h2>\n\n\n\n<p>\u305d\u3093\u306a\u3053\u3093\u306a\u3067\u3060\u3044\u305f\u3044\u5b8c\u6210\u3002<\/p>\n\n\n\n<p>\u7279\u306b\u4f55\u3082\u3057\u306a\u304f\u3066\u3082UI\u304c\u305d\u308c\u306a\u308a\u306b\u5c0f\u7dba\u9e97\u306b\u6574\u3063\u3066\u3044\u308b\u306e\u306f\u5b09\u3057\u3044\u3067\u3059\u306d\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2023\/01\/image.png\"><img loading=\"lazy\" decoding=\"async\" width=\"957\" height=\"647\" src=\"https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2023\/01\/image.png\" alt=\"\" class=\"wp-image-2324\" srcset=\"https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2023\/01\/image.png 957w, https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2023\/01\/image-300x203.png 300w, https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2023\/01\/image-768x519.png 768w\" sizes=\"auto, (max-width: 957px) 100vw, 957px\" \/><\/a><\/figure>\n\n\n\n<p>\u3067\u3001\u809d\u5fc3\u306eOcrEngine\u306b\u3064\u3044\u3066\u96d1\u611f\u3067\u3059\u304c\u3001\u65e5\u672c\u8a9e\u306b\u95a2\u3057\u3066\u306f\u3076\u3063\u3061\u3083\u3051\u3055\u307b\u3069\u7cbe\u5ea6\u306f\u3088\u304f\u306a\u3044\u304b\u306a\u3068\u601d\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u773a\u3081\u308b\u9650\u308a\u3001\u8a8d\u8b58\u7cbe\u5ea6\u306e\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u304c\u3067\u304d\u305d\u3046\u306a\u30d7\u30ed\u30d1\u30c6\u30a3\u3084\u30e1\u30bd\u30c3\u30c9\u3082\u306a\u3044\u3067\u3059\u3057\u3001MS\u7684\u306b\u306fAzure Cognitive Services\u3092\u4f7f\u3048\u3063\u3066\u611f\u3058\u306a\u3093\u3067\u3057\u3087\u3046\u304b\u306d\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/learn.microsoft.com\/ja-jp\/uwp\/api\/windows.media.ocr.ocrengine?view=winrt-22621\" target=\"_blank\" rel=\"noopener\" title=\"\">OcrEngine \u30af\u30e9\u30b9 (Windows.Media.Ocr) &#8211; Windows UWP applications | Microsoft Learn<\/a><\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>\u4ee5\u4e0a\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e45\u3057\u632f\u308a\u306b\u30a8\u30f3\u30b8\u30cb\u30a2\u3063\u307d\u3044\u30a8\u30f3\u30c8\u30ea\u30fc\u3067\u3059\u3002 .NET MAUI\u3067WinRT API\u306eOCR\u30a8\u30f3\u30b8\u30f3\u3092\u5b9f\u88c5\u3057\u3066\u307f\u307e\u3057\u305f\u3001\u3068\u3044\u3046\u304a\u306f\u306a\u3057\u3002 .NET MAUI\u3068\u306f \u6628\u4eca\u306e.NET\u754c\u9688\u306b\u306f\u3042\u307e\u308a\u8a73\u3057\u304f\u306a\u304f\u3001MS\u516c\u5f0f\u304b\u3089\u306e\u53d7\u3051\u58f2 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2330,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"vkexunit_cta_each_option":"","footnotes":""},"categories":[24,3],"tags":[],"class_list":["post-2323","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-net","category-c"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=\/wp\/v2\/posts\/2323","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2323"}],"version-history":[{"count":5,"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=\/wp\/v2\/posts\/2323\/revisions"}],"predecessor-version":[{"id":2329,"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=\/wp\/v2\/posts\/2323\/revisions\/2329"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=\/wp\/v2\/media\/2330"}],"wp:attachment":[{"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2323"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}