【问题标题】:Windows 8 Metro C# CameraWindows 8 Metro C# 相机
【发布时间】:2012-10-07 17:49:18
【问题描述】:

我在 Win8 Metro 中遇到网络摄像头问题。 我想制作一个应用程序,该应用程序将利用来自网络摄像头的 photo.source 视频。 不幸的是,我只找到了这个How to get camera feeds in Windows 8 Metro style app? 并且应用程序只打开了捕获,我只需要显示网络摄像头。感谢您的回答。

【问题讨论】:

    标签: windows-runtime webcam winrt-xaml windows-store-apps


    【解决方案1】:

    您可以使用CaptureElement 将相机源集成到您的应用程序中。在 XAML 中:

    <CaptureElement x:Name="capElement" Width="400"></CaptureElement>
    

    在代码隐藏中,您需要激活源代码:

    MediaCapture captureMgr = new MediaCapture();
    await captureMgr.InitializeAsync();
    
    capElement.Source = captureMgr;
    
    await captureMgr.StartPreviewAsync();
    

    【讨论】:

      【解决方案2】:

      你的意思是这样的? windowsapps/CameraCaptureUI

      【讨论】:

      • 不鼓励发布仅仅是链接的答案。如果你能以某种方式总结这篇文章,那将大大改善这个答案。
      • Brianswer,您没有详细说明链接,因此我无法为您的答案投票。
      猜你喜欢
      • 1970-01-01
      • 2011-11-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-07-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多