OpenCV error in setting resolution with c910

Ask Ubuntu Asked by evan54 on October 19, 2020

I’ve been trying to use OpenCV to control my webcam (Logitech c910) through python. I ‘ve managed to capture images through .read() but they are 640 x 480 and I haven’t managed to set the resolution to the max which is 2592 x 1944.

I used to have opencv 2.4.8 but now I have 3.0.0-dev

Here is the code I try and the outputs:

In [1]: import cv2
In [2]: cap = cv2.VideoCapture(1)
In [3]:
HIGHGUI ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV
Out[3]: True
In [4]: r,f =
VIDIOC_STREAMON: Bad file descriptor
In [5]: r
Out[5]: False

I installed 3.0.0-dev following the instructions from this other question I posted.
How to install opencv 2.9 for python?

The reason I went with the dev version is because in this post someone said that resolved their problem.

One Answer

Since you're building opencv from sources, try to follow the build process used by the debian packaging to ensure the compatibility with linux. I'm thinking about the V4L2 support for example:


Answered by Sylvain Pineau on October 19, 2020

Add your own answers!

Related Questions

GRUB recordfail broken regarding LVM

2  Asked on August 27, 2020 by mrkskwsnck


I cant install old nvidia driver after kernel update

1  Asked on August 25, 2020 by mersadakbari


How to solve public key error when running Ansible playbook

0  Asked on August 25, 2020 by frank-din


I am trying to make a Windows Install USB, but there are issues

1  Asked on August 23, 2020 by infinitejayz


Use phone as microphone in Linux

6  Asked on August 22, 2020 by someanon


Can Ubuntu TRIM another (NTFS) partition?

4  Asked on August 21, 2020 by user259452


Skip Unneeded services in Ubuntu boot

1  Asked on August 20, 2020 by pasmon-79


Windows very very slow after system upgrade?

0  Asked on August 17, 2020 by asher


Instaling UBUNTU in XPS 11 2-in-1 Ultrabook

0  Asked on August 16, 2020 by adriano-alejandro-bustos-musta


Uninstall gcc-5.4.0 to run gcc-4.8 as default

3  Asked on August 9, 2020 by claudio-nahmad


Can’t boot from Ubuntu USB stick

4  Asked on August 7, 2020 by poorav


How to record the RAM usage during Python and C++ run time?

1  Asked on August 6, 2020 by generalcode


Ask a Question

Get help from others!

© 2022 All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP