简体   繁体   中英

Using emguCV (OpenCV) to capture video in 2 different program from the firewire camera?

I'm looking for a way to use OpenCV (or specifically emguCV in C#) to capture video from the same firewire on 2 different programs simultaneously. Some posts here said that it can't be done since the source driver would be locked into one application at a time.

I found some answers here suggesting the use of SplitCam , but it seems to only work with Webcam. Also I don't like the ads on SplitCam (but I can't complain since it's a freeware).

SplitCam seems to be using the source signal and creates a virtual driver for other programs to use. Is there a way to do the same thing as SplitCam does using OpenCV? OpenCV can access firewire camera and I have no issue using it in emguCV with a single program running.

After searching for a while, I found 2 different solutions.

1) Implement DirectShow Virtual Video Capture Source Filter. This project has been documented quite well over at CodeProject . This method takes a bit of a learning curve since I don't know much about DirectShow.

2) Use a 3rd Party component. I found one from e2esoft that works like SplitCam but it's an SDK that you can use in your own project. They already have a CSharp example. I did have a little bit of issue (Error 80040154) using the COM object provided with this example since it's a 32-bit COM object but I'm running a 64-bit Windows 7. I found a work around here using the registry hack.

I ended up going with solution #2 since it's easy to implement quickly. I use the component to create a virtual device that grabs the video from the main firewire camera device. After that my program that uses the emguCV to grab frame can just grab from the virtual device. The virtual device can be used by multiple sources and so far I have 3 instances of my program grabbing from the virtual device and I don't see any lag in frame rates (granted that this firewire camera is only running 15FPS max). The downside to this solution is that I would have to pay for the license to get rid of the water mark on the video. I'll update this when I found out how much it is since they don't post the price of SDK on the website. If it's really expensive, I'll have to go to the first solution and learn to implement the DirectShow filter.

Edit 1-16-2013: The price of the VCam SDK is $699.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM