C#Metro Style应用程序中的手写识别 [英] hand writing recognition in c# metro style app

查看:82
本文介绍了C#Metro Style应用程序中的手写识别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在使用C#/XAML开发笔记记录应用程序.我希望用户使用"Windows.UI.Input.Inking"的InkManager在画布上写任何东西.然后,我想将其作为文本显示在画布上,然后将那些可识别的文本保存为文本或图像格式.

我已经检查了 MSDN [

Hi, I am developing a note taking application in C#/XAML. I want a user to write anything on canvas with InkManager of "Windows.UI.Input.Inking". Then I want to display it as text onto canvas and then I want to save those recognized text in either text or image format.

I have checked MSDN[^] documentation, but still I am confused how to start. How can I get ink strokes onto canvas and how can I recognize that ? Please anyone can guide me ? I need it ASAP for my app.

I have tried some coding, but it is not working.

private async void Recognize_Click(object sender, RoutedEventArgs e)
{
    IReadOnlyList<InkRecognitionResult> x = await _inkManager.RecognizeAsync(InkRecognitionTarget.All);
    IReadOnlyList<String> text;
    foreach (InkRecognitionResult i in x)
    {
        text = i.GetTextCandidates();
    }
}

推荐答案

这是我的解决方案

Here is my solution

IReadOnlyList<string> text;
string finalt = "";
private async void Recognize_Click(object sender, RoutedEventArgs e)
{
    IReadOnlyList<inkrecognitionresult> x = await _inkManager.RecognizeAsync(InkRecognitionTarget.All);
    foreach (InkRecognitionResult i in x)
    {
        text = i.GetTextCandidates();
        finalt = finalt + " " + text[0];
        res.Text = finalt;   //res is x:Key of the textblock
    }



Subramanian的解决方案:
在CSharp中具有手写识别功能的InkPen [ Windows 8输入法:C#/Xaml中的墨水示例 [ ^ ]

致以 Subramanian [可以 [



Solution by Subramanian : InkPen with Handwriting Recognition sample in CSharp[^]

Solution by Can: Windows 8 Input: Ink sample in C#/Xaml[^]

Kudos To Subramanian[^] and Can[^]


这篇关于C#Metro Style应用程序中的手写识别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆