当前位置: 代码迷 >> 综合 >> error: ‘CV_CAP_PROP_FRAME_WIDTH’ was not declared in this scope
  详细解决方案

error: ‘CV_CAP_PROP_FRAME_WIDTH’ was not declared in this scope

热度:9   发布时间:2023-12-05 21:45:10.0

一般情况下是opencv版本不兼容问题

解决方法:在opencv安装路径下搜索CV_CAP_PROP_FRAME_WIDTH,方法:进入安装目录后,

grep CV_CAP_PROP_FRAME_WIDTH -r ./

在cpp中将其重新定义:

#define CV_CAP_PROP_FRAME_WIDTH  3

重新编译即可

  相关解决方案