开发者

Should I use WinForms or WPF for taking pics with webcam?

We have a Logitech web cam that we want to get working with .NET. It needs to recognize the device, and be able to take a picture. We just installed VS 2008, and I was wondering if Microsoft made it easier to interact with devices with some of the newer st开发者_开发知识库uff like WPF, Silverlight, or whatever. If anybody can point me in the right direction, or even provide some source code, it would really help a noob out.

Thanks in advance.


You can try the VideoCaptureElement control in my WPF MediaKit library. It should have everything you need for showing a webcam in WPF and/or getting snapshots.


I've used both, since the ultimate source of image data comes from either a COM component or a native DLL. I'm currently having a lot of success using WriteableBitmap to show the raw image data from a webcam. I've done the same with WinForms and the System.Drawing.Bitmap class.

With WPF, I can also easily use pixel shaders to change the image as I display it. I could also do this in WinForms, but it's easier in WPF.


Try taking a look at EmguCV. It has a nice simple interface for interacting with a webcam. And some cool image processing routines as well.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜