I'm using logitech c270 cam with opencv 3.0.
The aim is to capture a frame and save it as jpg. It works great, but i can't change frame width/height. It's always 640x480 (tried bigger and smaller sizes).
Function VideoCapture.set(CAP_PROP_FRAME_WIDTH, val) always returns false.
Some steps:
- Changed the resolution with
v4l2-ctl --set-fmt-video, but after launching my program, all settings are gone back to 640x480. - Test the same thing via
fswebcam --save -r 1280x960and finally got image with needed sizes - Checked
v4l2-ctl --get-fmt-video. There are correct values
It looks like opencv always sets default resolution and not provides opportunity to change it.