error: ‘CV_BGR2GRAY’ was not declared in this scope
原博客搬移到:https://blog.csdn.net/u013171226/article/details/108062603
某项目中opencv版本由opencv3更换为opencv4之后,之前的代码编译出错,
error: ‘CV_BGR2GRAY’ was not declared in this scope
这是由于版本更新,宏定义发生了改变。
修改方法为:将CV_BGR2GRAY改为cv::COLOR_BGR2GRAY
作者:cumtchw
出处:http://www.cnblogs.com/cumtchw/
我的博客就是我的学习笔记,学习过程中看到好的博客也会转载过来,若有侵权,与我联系,我会及时删除。