Getting screen size on OpenCV

后端 未结 6 2031
独厮守ぢ
独厮守ぢ 2021-02-19 09:04

How do I get the computer screen resolution on OpenCV? I need to show two images side by side using the whole screen width, OpenCV requires the exact window size I wanna create.

6条回答
  •  暖寄归人
    2021-02-19 09:20

    In new version it also works like below, which is great :-D

    printf("%f",cap.get(CV_CAP_PROP_FRAME_HEIGHT));
    

    for setting video res.

    .set(property_in_caps, value_in_double);
    
    ex, cap.set(CV_CAP_PROP_FRAME_HEIGHT, 720);
    

提交回复
热议问题