.net 3.5 windows form application, using webcam

≡放荡痞女 提交于 2019-12-11 18:09:08

问题


Having searched high and low for native c# hook to webcam, I found 5 basic ways to interact with the camera.

  1. Video for Windows (VFW)
  2. DirectX
  3. avicap32.dll
  4. WIA
  5. 3rd party tools

My requirement is to take a photo. The application will be used on some legacy windows XP and Vista machines, but going forward Windows 7 and greater will be required. So what might the best approach be with the broad install base? Just reading WIA looked like the way to go but looks like some changes were made so it works a little different now (I don't know for sure). I understand that some people have done combos.

Might need to crop photo, but that is really about it.

For school visitor monitoring.


回答1:


I think the best thing is to use the WIA. I know a third party toolkit that could help you doing your requirements which is leadtools. You can check this Tutorial




回答2:


I would always try to pick up something already on the web and tweak it to my own needs... some open source project or an example where the mainly portion of my app is already made.

on Codeplex you can find a nice library to work with webcams and it's simply called

WebCam Library for WinForm and WPF with C# and VB.NET

Give that a try, maybe you can even help the project, by contributing your own findings, and everyone is a winner... isn't Open Source a great idea?!



来源:https://stackoverflow.com/questions/10591036/net-3-5-windows-form-application-using-webcam

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!