With the Microsoft LifeCam Cinema (on Ubuntu) in guvcview I get 30fps on 1280x720. In my OpenCV program, I only get 10fps (only queryframe and showimage, no image processing is done). I found out that it is a 'problem' in gstreamer (
https://bugzilla.gnome.org/show_bug.cgi?id=676093). A solution is to set a capsfilter in gstreamer, in terminal I can do it like this:
gst-launch v4l2src device=/dev/video0 ! 'video/x-raw-yuv,width=1280,height=720,framerate=30/1' ! xvimagesink
This works! The question is:
- How do I implement this in my c++/OpenCV program?
- Or is it possible to set gstreamer to always use this capsfilter to force 30 fps?
I already found this
Q&A, but I can't get it working with a webcam.
All ideas/sugestions would be really welcome!