Grab Video Stream from FireWire

送分小仙女□ 提交于 2019-12-01 14:19:58
mevatron

See my related answer here. OpenCV cannot capture video from Firewire cameras natively. You will either need to use the CMU1394 driver, or the Sony driver (if an SDK is available for it) to capture video from that camera, and then pass it to OpenCV.

Years ago, I've made something like this using DirectShow. The main limitation was fact, that image acquired via DShow was in standard PAL resolution. HD Image grabbing was not possible (it was one of the first pro-consumer HD camcorders from Sony, don't remember exact model now). Good thing was - this method didn't need anything except bare DirectShow - no additional drivers and so on. And it was VERY fast.

In general, method was something like this:

  • building media render graph (of course, You have to enumerate video devices in that stage)
  • inserting into it custom class which inherited from ISampleGrabberCB.

How it worked:

  • it used BufferCB() virtual method from ISampleGrabberCB - which you have to write in your inherited class.
  • in mentioned method, you have to leave data in global struct, and from main thread - take care of them.

I know, that's a bit fuzzy description, but I hope You'll find Your info (googling for "ISampleGrabberCB" should be a good starting point, there should be a lot of sample code).

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