Calling Gstreamer inside openCV

Deadly 提交于 2019-12-04 14:58:17

Actually, you can't use GStreamer API through OpenCV. What OpenCV has is a series of wrapper functions (as, for instance, cvCaptureFromCam) which implement their functionalities through external multimedia libraries. For instance, aside from GStreamer, OpenCV might use other libraries such as ffmpeg, v4l.. in fact, if you check the complete list of files related with multimedia capture through different external libraries you will find:

(in opencv/modules/highgui/src)
cap_cmu.cpp    
cap_dc1394.cpp    
cap_ffmpeg.cpp    
cap_gstreamer.cpp
...

So, if you compile OpenCV with GStreamer support, you will call the same highgui functions (as cvCaptureFromCam) but, at a low level it will be calling functions like cvCreateCapture_GStreamer which implement the calls to the GStreamer API. But it does not mean that you can call yourself to those low-level functions (hence the "was not declared in this scope" error).

Hope that it helps!

EDITED: take a look to the cap.cpp file in the opencv source. Notice the different options for CvCreateCameraCapture_XXX. It makes me think that you should be able to open your camera without some of the dependencies (by using others instead).

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