Ask Your Question
1

read analog video signal - supported grabber

asked 2015-02-17 03:52:09 -0600

Micka gravatar image

updated 2015-02-17 03:56:25 -0600

I would like to read analog video signal images, if possible directly from OpenCV VideoCapture object from Windows (7/8).

After testing a cheap usb video grabber (maybe stk-1160 chip) without any success (didnt even work with DirectShow Graphstudio) I would like to know two things:

  1. Are there any usb analog video grabber known to work with OpenCV.

  2. What properties must be fulfilled for a device to be readable from a OpenCV VideoCapture element (e.g. if OpenCV was compiled with DirectShow support)? Is it enough that the device uses a WDM Video Capture driver? So that I don't have to buy 100 different devices and test each one ;)

If none of the questions can be answered: How can I grab a analog video signal to use it in my own code (asking for both: hardware and SDKs/libraries/etc)?

edit: will definitely need PAL signal support and maybe NTSC too

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-02-25 09:39:16 -0600

Micka gravatar image

updated 2015-02-26 08:23:59 -0600

Now I tried Hauppauge USB-Live 2 which unfortunately didnt work with cv::VideoCapture out of the box (it is found as a device but doesnt give images).

Successfully accessed it with VLC (DSHOW - use configuration dialog given by the driver) and with DirectShow GraphstudioNext, but one thing has to be taken care of: 1. Create the Crossbar object and route the pins correcly. 2. CONNECT the Crossbar Video Decoder Out to the Analog Video In of the Video Capture Filter.

Since it worked with Graphstudio, I hoped it to work with VideoInput Library, too (later seen that OpenCV uses VideoInput itself), but same as OpenCVs VideoCapture, the device is found but doesnt provide any images. Finally I found out, that VideoInput Library creates the crossbar and routes the PINs, but it doesn't insert the crossbar in the filter graph! I guess that's because in many/most/some drivers/devices, the crossbar isn't connect to the filter at all. But some Filters really need the Crossbar to be connected (like my Hauppauge USB capture dongle)!

My next steps will be to change code in OpenCVs cap_dshow.cpp file to connect the crossbar if possible/necessary.


EDIT: I found that it wasnt related to connecting the crossbar but that there is a line in VideoInput: hr = VD->pCaptureGraph->RenderStream(&PIN_CATEGORY_PREVIEW, &MEDIATYPE_Video, VD->pVideoInputFilter, VD->pGrabberF, VD->pDestFilter); which doesnt work for that device. hr = VD->pCaptureGraph->RenderStream(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video, VD->pVideoInputFilter, VD->pGrabberF, VD->pDestFilter); works instead!!

or use CAPTURE_MODE instead, which is PIN_CATEGORY_PREVIEW if possible or PIN_CATEGORY_CAPTURE otherwise: pCaptureGraph->RenderStream(&CAPTURE_MODE, ...);

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-02-17 03:52:09 -0600

Seen: 2,778 times

Last updated: Feb 26 '15