如何在.NET中连接到USB网络摄像头? [英] How do I connect to a USB webcam in .NET?
问题描述
我想在.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#Webcam用户
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映像获取
- CodeProject: WIA脚本和.NET
- CodeProject:使用WIA的WebCam Fast Image Capture服务
- clausn.dk:C#和WIA的网络摄像头控制
- MSDN Coding4Fun: Look at me! Windows Image Acquisition
- CodeProject: WIA Scripting and .NET
- CodeProject: WebCam Fast Image Capture Service using WIA
- clausn.dk: Webcam control from C# and WIA
这篇关于如何在.NET中连接到USB网络摄像头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!