最近因为要做双目测距,所以在淘宝上买了一个双目相机玩,同时店家发来了他的上位机软件VideoCap,打开软件可以看到电脑自带摄像头的画面,同时当插入USB相机时,可以显示相机画面,同时该软件可以对相机参数做任意调整,由于我需要调整相机曝光,就把默认设置的自动曝光取消了,同时接入程序打开相机,发现是更改好的曝光参数。但是当我重新插拔相机后,再次运行程序,发现相机又自动变回自动曝光了,非常影响使用,总不能我每次使用之前都需要用上位机改一下吧。因此经过多次测试,找到了解决方法。

在原先的程序里,我只写了cap.set(CV_CAP_PROP_EXPOSURE,0.15);这里的0.15是相对的曝光值,发现并不好使,即每次重新插拔又变回自动曝光;因此只需要在此之前加入这句话即可,cap.set(CV_CAP_PROP_AUTO_EXPOSURE,0.25)。至于为什么是0.25不清楚

GitHub 加速计划 / opencv31 / opencv
77.36 K
55.71 K
下载
OpenCV: 开源计算机视觉库
最近提交(Master分支:1 个月前 )
3919f33e G-API: Introduce level optimization flag for ONNXRT backend #26293 ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [ ] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [x] The feature is well documented and sample code can be built with the project CMake 1 天前
489df18a Use border value in ipp version of warp affine #26313 ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [ ] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [ ] The feature is well documented and sample code can be built with the project CMake 1 天前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐