Changing resolution of front LifeCam on MS Surface Pro

asked 2015-06-22 15:08:23 -0500

Hello OpenCV community!

I am trying to set HD resolution of the front facing camera on a MicroSoft Surface Pro 3, using OpenCV 3.0 x64 for VS2012, on WIn 8.1 OS. As in:

cv::VideoCapture INvidstream(CV_CAP_DSHOW | 1); dWidth = 1920 dHeight = 1080 INsidstream.set(CV_CAP_PROP_FRAME_WIDTH, dWidth); INvidstream.set(CV_CAP_PROP_FRAME_HEIGHT,dHeight);

with the rear camera (setting dev=0, instead of 1) OpenCV works, but the front facing camera (dev=1) it does not. The Native camera apps can set, display and record at various higher resolutions. Is this limitation of the built ffmpeg lib? From an earlier post, I found, as one possible native solution, but I was hoping to stick within the OpenCV/Qt framework, before spending time and energy going down roads already traveled.

thanks, t

edit retag flag offensive close merge delete


idk anything about your surface box, but it's probably safe to rule out ffmpeg for camera acquisition on win, that will be either the dshow or vfw path

(also theo's videoInput code is kinda exactly what you get with opencv, if you use CV_CAP_DSHOW)

berak gravatar imageberak ( 2015-06-22 15:21:39 -0500 )edit

I found this:

which is the same API but he used WIndows Media Foundation instead. I'm not yet sure if and how this path can be compiled into the latest rel of OpenCV or not. thanks--

Tedzini gravatar imageTedzini ( 2015-06-25 16:43:29 -0500 )edit