C#+ DirectShow.NET =简单WebCam的访问? [英] C# + DirectShow.NET = Simple WebCam access?

查看:219
本文介绍了C#+ DirectShow.NET =简单WebCam的访问?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现了一个 的例子在C#中访问一个摄像头。该示例使用 DirectShow.NET 库。我试图了解code,但到目前为止,我能想出的唯一事情是,不知怎的,用户控件调用DirectShow来直接绘制到用户控件的表面。

I have found an example for accessing a webcam in C#. The example uses the DirectShow.NET library. I have tried to understand the code, but so far the only thing I could figure out is that somehow the usercontrol calls directshow to draw directly to the surface of the user control.

我要访问的每一帧,并把它变成一个位图对象。我怎样才能知道当一个新的帧来了吗?我怎么能抓住这个新的框架成位图对象?

I want to access each frame and put it into a Bitmap object. How can I tell when a new frame arrived? How can I capture this new frame into a Bitmap Object?

这可能是简单回答如果你知道周围DirectShow.NET自己的方式。

This might be simple to answer if you know your way around DirectShow.NET.

推荐答案

您将需要使用的 ISampleGrabber 界面有许多C ++关于如何使用它的网络的例子,它会给你在RGB原始格式的数据,您可以送入Bitmap类。

You will need to use the ISampleGrabber interface there are many c++ examples on the net on how to use it, it will give you data the in RGB raw format which you can feed into the Bitmap class.

有也被称为一个开源库非接触它在$ C $项目ç这需要一个网络摄像头,每一个新的帧到达的时间给你的回调。

There is also an open source library called Touchless it has a project in code which takes a web cam and give you a callback every time a new frame arrived.

这篇关于C#+ DirectShow.NET =简单WebCam的访问?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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