问题描述
“CV_XXX“was not declared in this scope
解决方法
在出错的程序里面添加相应的头文件即可
1.‘CV_LOAD_IMAGE_COLOR’ was not declared in this scope
#include "opencv2/imgcodecs/legacy/constants_c.h"
2.‘CV_FILLED’ was not declared in this scope
#include <opencv2/imgproc/imgproc_c.h>
3.‘CV_AA’ was not declared in this scope
#include "opencv2/imgproc/imgproc_c.h"
4.‘CV_RGB2GRAY’ was not declared in this scope
#include<opencv2/imgproc/types_c.h>
5.‘CV_MINMAX’ was not declared in this scope
#include<opencv2/opencv.hpp>
6…‘CV_RGB2GRAY ’ was not declared in this scope
#include <opencv2/highgui/highgui_c.h>
7.‘CV_GRAY2RGB’ was not declared in this scope
#include<opencv2/imgproc/types_c.h>
8.CV_ADAPTIVE_THRESH_MEAN_C’ was not declared in this scope
#include <opencv2/calib3d/calib3d_c.h>
9.‘CV_LOAD_IMAGE_GRAYSCALE’ was not declared in this scope
#include"opencv2/imgcodecs/legacy/constants_c.h"