在 .Net 中访问网络摄像头时,最好使用哪个 API/库?
在 .Net 中访问网络摄像头时最好使用哪个 API? (我知道它们可以是特定于网络摄像头的,如果这意味着更好的结果,我愿意购买新的网络摄像头)。
我想编写一个桌面应用程序,可以从网络摄像头获取视频并将其存储在 MPEG4 中格式(DivX、Xvid 等)。 我还想从设备访问位图静态图像,以便可以在帧之间进行图像比较。
我尝试过各种库,但没有一个真正适合(有些有性能问题(帧速率非常不一致),有些有图像质量限制,有些只是无缘无故地崩溃。我想要获得高质量的视频(尽可能高)我能得到的)和一个不错的帧速率。
我的网络摄像头足以胜任这项工作,我希望有一个很好的托管.Net 库来帮助我的事业。
网络摄像头 API 是否都非常糟糕?
Which is the best API to use when accessing a WebCam in .Net? (I know they can be webcam specific, I am willing to buy a new webcam if it means better results).
I want to write a desktop application that will take video from a webcam and store it in MPEG4 formats (DivX, Xvid, etc...). I would also like to access bitmap stills from the device so I can do image comparison between frames.
I have tried various libraries, and none have really been a great fit (some have performance issues (very inconsistent framerates), some have image quality limitations, some just crash out for seemingly no reason. I want to get high quality video (as high as I can get) and a decent framerate.
My webcam is more than up to the job and I was hoping that there would be a nice Managed .Net library around that would help my cause.
Are webcam APIs all just incredibly bad?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您从未说过您已经使用过哪些,但我建议您可能想尝试使用 DirectShow.NET 来捕获设备,并尝试使用 FFMPEG 来进行视频转换。 您可以在 SourceForge 上找到这两个库。
You never said which ones you have already used but I recommend you might want to try out DirectShow.NET for capturing the device and FFMPEG for your video conversions. You will find both these libraries on SourceForge.
使用 OpenCV。 它是一个计算机视觉库,可以接收来自网络摄像头、图像和视频的输入,并输出视频和图像。 它还带有许多图像处理功能,因此它可能是您想要的理想选择。
Use OpenCV. It is a computer vision library that can receive input from webcams, images and videos, and output videos and images. It also comes with a lot of image manipulation functions so it would probably be ideal for what you are wanting.