本人在学习OpenCV时按照书上的代码敲:
cvtColor(srcImage,grayImage,COLOR_BGR2GRAY );
这里遇到报错:
error: ‘CV_BGR2GRAY’ was not declared in this scope
cvtColor(srcImage,grayImage,CV_BGR2GRAY );
一直不解,查了半天才发现是由于版本更新,CV_BGR2GRAY改为了COLOR_BGR2GRAY。
且所有都发生了变化需将CV改为COLOR。