使用 WIA 控制相机
首先,这是我在 stackoverflow 上的第一篇文章。我经常使用这一面,几乎找到了我需要的一切。
现在我的问题。我搜索了这个问题,但我没有真正找到任何东西。我想编写一个应用程序,我可以单击一个按钮并制作一个人的照片,并将该照片与数据库中的用户链接起来。可以用WIA控制相机吗?我需要一个特殊的相机吗?
如果有人可以发布有关 WIA 一般使用的好教程,我将不胜感激。
First of all, this is my first post in stackoverflow. I use this side very often and I found nearly everything I needed.
And now to my Question. I searched for this Question but I didn't really found anything. I wanted to write an application where I can click on a button and make a picture of a person and link that photo with the user in the database. Is it possible to control a camera with WIA? Do I need a special camera for that?
I would appreciate, if somebody could post a good Tutorial for the general use of WIA.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
C# 中的 WIA 相机测试示例。花了我一整夜的时间!
WIA Camera test example in C#. Took me a whole night!
看起来微软已经在这里提供了教程。
我认为您会对 部分特别感兴趣从流视频捕获静态图像。
It looks like Microsoft has provided a tutorial here.
I think you'd be specifically interested in the section Capturing a Still Image from Streaming Video.
我去过那里并且我已经做到了。您需要一台具有 WIA 驱动程序的相机。有几个人这样做。这并不容易,但肯定可以做到。
I've been there and I've done that. You need a camera that has WIA drivers. Several ones do it. It's not easy but can be done for sure.
至于 WIA C# 包装器,我在 Codeplex 上发现了 ScanWIA。它没有大量的文档。不过,阅读源代码可能会有所帮助。此外,该项目还有一个演示项目,您可以定制该项目以从相机获取照片。
As for a WIA C# wrapper, I came across ScanWIA on Codeplex. It doesn't have a whole lot of documentation. However, reading the source code might help. Also, the project has a demo project that you may tailor to get pictures from a camera.