Windows Phone中的System.IO.Stream [英] System.IO.Stream in Windows Phone

查看:54
本文介绍了Windows Phone中的System.IO.Stream的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我必须比较Windows Phone中的两个面孔(验证)。为此,我使用
Face API
来获取 faceId 并比较两个 faceId 。如何在 Microsoft中运行
项目牛津API参考
   application / octet-stream ,即如何发送  [图片文件二进制文件 ]

I have to compare two faces (verify) in Windows Phone. For this, I am using Face API to get faceId and compare the two faceId s. How to have that run in Microsoft Project Oxford API Reference with application/octet-stream, i.e., how to send [Image File Binaries]?

此外,我已实施了  Microsoft Project Oxford使用C#开始使用
Face API
。我在这里遇到的问题是我无法将 DetectAsync 的第二个参数发送为
Strea m 。如何在Windows Phone应用程序中使用  Stream
以使此应用程序正常运行?我几乎尝试过所有事情。

Also, I have implemented the sample solution given in Microsoft Project Oxford Getting started with Face API in C#. The problem that I am encountering here is that I can't send the second parameter of DetectAsync as Stream. How to use Stream in Windows Phone application so as to have this application working? I have tried almost everything.

这是两个不同的问题。首先是如何在doc页面中发送数据。其次是如何在Windows Phone中运行应用程序。

These are two different problems. First is of how to send the data in the doc page. Second is how to have the application running in Windows Phone.

谢谢&问候,

Amit Jha

推荐答案

1.对于detectasync的stream参数,你可以尝试

1.For the stream parameter of detectasync you could try

private   async   void
UploadAndDetectFaces( string   imageFilePath)

{

     尝试

     {

         使用  ( Stream   imageFileStream  =  文件 。OpenRead(imageFilePath))

         {

             var   faces  =  等待   faceServiceClient.DetectAsync(imageFileStream);

   

        }

    }

     catch  ( Exception

     {

    }

}

2.你可以参考sdk的ClientLibrary或在windows phone中使用rest api

2.You can refer ClientLibrary of the sdk or use rest api in windows phone


这篇关于Windows Phone中的System.IO.Stream的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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