Creating a capture device driver in C++

asked 2016-06-26 23:13:24 -0600

briantopping gravatar image

Greetings, I see what seems to be all implementations of capture drivers build on C++ subclasses of struct CvCapture. But it seems that CvCapture is "black boxed" in the interfaces that are installed and the subclass cannot be laid out by the compiler without the definition.

I must be doing something wrong. I have a belief that I can create a capture driver outside of the main OpenCV source tree. Am I mistaken?

Thanks, Brian

edit retag flag offensive close merge delete

Comments

" I have a belief that I can create a capture driver outside of the main OpenCV source tree. Am I mistaken?"

most likely, yes.

berak gravatar imageberak ( 2016-06-27 01:34:42 -0600 )edit

"most likely, yes" Are you unsure about this?

briantopping gravatar imagebriantopping ( 2016-06-27 10:35:56 -0600 )edit

not at all.

what i'm unsure about is, - how to properly write a capture driver, so i haven't got a real answer.

berak gravatar imageberak ( 2016-06-27 10:39:11 -0600 )edit

Hmm. I've been using the modules in modules/videoio/src as a template:

  • cap_avfoundation.mm cap_cmu.cpp cap_dc1394.cpp cap_dc1394_v2.cpp cap_giganetix.cpp cap_gstreamer.cpp cap_images.cpp cap_msmf.cpp cap_openni.cpp cap_openni2.cpp cap_pvapi.cpp cap_qt.cpp cap_qtkit.mm cap_unicap.cpp cap_v4l.cpp cap_vfw.cpp cap_ximea.cpp cap_xine.cpp
briantopping gravatar imagebriantopping ( 2016-06-27 10:42:27 -0600 )edit

Funny story, I just realized I might not have searched well enough and did some more googling on creating a capture device and found a new page that wasn't in my browser cache. Lol, it was this page, google picked it up already.

Is there documentation on this that anyone might know about? folks that might be referred here? grateful for any guidance, thank you so much!!

briantopping gravatar imagebriantopping ( 2016-06-28 21:59:50 -0600 )edit

Any progress on this? I'm looking at writing a capture driver for a Baumer camera. It seems straightforward (derive from CvCapture, fill in device-specific stuff) but it would be nice to find a tutorial or any other documentation on how to properly implement a new driver.

queisser gravatar imagequeisser ( 2016-08-12 15:13:01 -0600 )edit