Ask Your Question

alex-dev's profile - activity

2014-11-29 02:54:02 -0600 commented question Usb camera resolution problem

Thank you or your answer. Could you please provide a bit more details? What you mean 'go into debug'? Are there any opencv logs or smting like that?

2014-11-22 10:47:45 -0600 asked a question Usb camera resolution problem

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:

  1. Changed the resolution with v4l2-ctl --set-fmt-video, but after launching my program, all settings are gone back to 640x480.
  2. Test the same thing via fswebcam --save -r 1280x960 and finally got image with needed sizes
  3. 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.