OpenCV (via python) on Linux: Set frame width/height?

前端 未结 5 1744
庸人自扰
庸人自扰 2021-01-02 00:02

I\'m using openCV via python on linux (ubuntu 12.04), and I have a logitech c920 from which I\'d like to grab images. Cheese is able to grab frames up to really high resolut

5条回答
  •  醉话见心
    2021-01-02 00:30

    I had the same problem as you. Ended up going into the OpenCV source and changing the default parameters in modules/highgui/src/cap_v4l.cpp, lines 245-246 and rebuilding the project.

    #define DEFAULT_V4L_WIDTH  1920
    #define DEFAULT_V4L_HEIGHT 1080
    

    This is for OpenCV 2.4.8

提交回复
热议问题