error: ‘CV_CAP_PROP_FRAME_WIDTH’ was not declared in this scope

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

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

grep CV_CAP_PROP_FRAME_WIDTH -r ./

在cpp中将其重新定义:

#define CV_CAP_PROP_FRAME_WIDTH  3

重新编译即可

你可能感兴趣的:(error: ‘CV_CAP_PROP_FRAME_WIDTH’ was not declared in this scope)