問題描述
我想連接到 .NET 中的 USB 網絡攝像頭,特別是使用 C#.作為 .NET 的新手,我不知道標準庫中有什么樣的支持.我在網上找到了一個通過剪貼板復制位圖的示例,但這看起來很笨拙(而且可能很慢).有沒有更好的辦法?
I want to connect to a USB Webcam in .NET, specifically using C#. Being new to .NET I don't know what kind of support there is in the standard libraries for doing so. I found one example on the web that copies bitmaps through the clipboard, but that seems very hacky (and probably slow). Is there a better way?
推薦答案
您需要使用 Windows 圖像采集 (WIA) 將網絡攝像頭與您的應用程序集成.有很多這樣的現成的例子.這是 C# 網絡攝像頭用戶控件 帶有來源.
You will need to use Windows Image Acquisition (WIA) to integrate a webcam with your application. There are plenty examples of this readily available. Here is a C# Webcam User Control with source.
這里有更多文章和博客文章來自希望解決與您相同的問題的人們:
Here are some more articles and blog posts from people looking to solve the same problem you are:
- MSDN Coding4Fun:看看我!Windows 圖像采集
- 代碼項目:WIA 腳本和 .NET李>
- CodeProject:WebCam 快速圖像捕獲服務使用 WIA
- clausn.dk:來自 C# 和 WIA 的網絡攝像頭控制
這篇關于如何在 .NET 中連接到 USB 網絡攝像頭?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!