我如何连接到.NET中的USB摄像头? [英] How do I connect to a USB webcam in .NET?
问题描述
我要连接到一个USB网络摄像机在.net中,特别是使用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图像采集
- $ C $的CProject:WIA脚本和.NET
- $ C $的CProject:摄像头使用WIA快速图像捕捉服务
- <一个href="http://web.archive.org/web/20111216162211/http://clausn.dk/post/2006/02/Webcam-control-from-C-and-WIA.aspx"相对=nofollow> 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
一个屏幕截图中的Coding4Fun文章。
A screen shot from the Coding4Fun article.
这篇关于我如何连接到.NET中的USB摄像头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!