error: ‘CV_LOAD_IMAGE_UNCHANGED’ was not declared in this scope

1-错误在这里插入图片描述
2-错误原因
opencv4.x以上,有些宏,API名字改了,需要改为新的
3-解决方案

 CV_LOAD_IMAGE_UNCHANGED 改为 cv::IMREAD_UNCHANGED
   CV_LOAD_IMAGE_GRAYSCALE  改为 cv::IMREAD_GRAYSCALE
   CV_LOAD_IMAGE_COLOR    改为 cv::IMREAD_COLOR
   CV_LOAD_IMAGE_ANYDEPTH   改为 cv::IMREAD_ANYDEPTH

你可能感兴趣的:(BUG,opencv,计算机视觉,python)