问题描述
- opencv读取图片失败,“error C2022: “438”: 对字符来说太大”
-
```int main()
{Mat src = imread("E:666.jpg", CV_LOAD_IMAGE_ANYCOLOR);
if (src.empty())
{
cout << "图像加载失败!" << endl;
return -1;
}
namedWindow("MyWindow", CV_WINDOW_AUTOSIZE);
imshow("MyWindow", src);本人opencv入门选手,代码很简单如上所示,用的win7+vs2015+opencv3.1.0,生成项目时imread那一行就会报错 error C2022: “438”: 对字符来说太大 求问各位大神这是什么原因阿,该怎么改呢?
解决方案
Mat src = imread("E:666.jpg", CV_LOAD_IMAGE_ANYCOLOR);
->
Mat src = imread("E:\666.jpg", CV_LOAD_IMAGE_ANYCOLOR);
解决方案二:
Mat src = imread("E:/666.jpg", CV_LOAD_IMAGE_ANYCOLOR);
时间: 2024-11-05 01:18:29