Windows Mobile 上的 Directshow 中的图像捕获(照片)太慢 - 有建议吗?
我正在使用 Directshow 在 winmo 设备上捕获图像。 我的本机代码基于 Windows Mobile 6 sdk 中的“CameraCapture”示例,并进行了一些细微的调整(简化了图表、添加了实时预览窗口、提高了照片分辨率等...)。
我的问题是,调用 IAMVideoControl::SetMode() 来实际“拍摄”照片需要很长时间才能完成。当我调用它时,它会异步运行,需要几秒钟,并且然后在创建照片文件时播放相机快门声音。 未修改的 CameraCapture 示例与我自己的代码中的速度同样慢,因此我添加的任何内容似乎都不会导致此问题。
我通过监听 dshow 事件来解决异步部分,但我无法找到更快的拍照方法。 令人烦恼的是,我还没有找到任何方法来消除快门声(?)。 这一切都非常令人失望,因为微软的“CameraCaptureDialog”立即以相同(和更高)的分辨率拍摄照片。
[编辑]:速度评论是根据我记忆中的运行情况以及最近使用另一台设备进行的测试而做出的,但在看到下面的评论后,我使用标准 CCD 重新进行了测试 - 它同样慢。 除非有人有任何技巧可以让速度更快(或消除快门噪音),否则我会说我将不得不忍受我所拥有的。 再次感谢!
对于我可以采取哪些措施来加快此过程有什么建议吗? 有没有更快的方法通过 Directshow 拍照?
再次感谢!
I'm using Directshow to capture images on a winmo device. I've based my native code on the "CameraCapture" example found in the Windows Mobile 6 sdk, with a few minor tweaks (simplified the graph, added a live preview window, upped the photo resolution, etc...).
My problem is that the call to IAMVideoControl::SetMode() to actually "take" the photo is taking too long to finish. When I call it, it runs asynchronously, takes a couple of seconds, and then plays back a camera shutter sound when the photo file gets created. It's equally slow on the unmodified CameraCapture example as it is in my own code, so nothing that I've added seems to be causing this problem.
I've worked around the asynchronous part by listening for dshow events, but I'm having trouble finding a faster way to take a photo. Annoyingly, I also haven't been able to find any way to silence the shutter sound yet (?). This is all pretty disappointing since the Microsoft "CameraCaptureDialog" instantly takes photos at equal (and higher) resolutions.
[EDIT]: The speed comment was made based on how I remembered it running and a recent test with another device, but after seeing the comments below, I retested with the standard CCD- it's just as slow. Unless anyone has any tricks to make this faster (or to silence the shutter noise), I'd say I'm gonna have to live with what I've got. THANKS AGAIN!
Any suggestions on what I might look into to speed this process up? Is there a faster way to go about taking a photo via Directshow?
thanks again!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最快的方法是 SampleGrabber,但它会捕获与预览分辨率相同的帧(通常预览分辨率等于屏幕分辨率)
The fastest way is SampleGrabber, but it will capture frames with the same resolution as preview (as a rule preview resolution equals to screen resolution)