无法在 opencv 中读取图像?

Not able to read image in opencv?

我正在用 openCV 和 VB2013 编写我的第一个代码,但我无法读取图像。我正在尝试使用示例代码。

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>

using namespace cv;
using namespace std;

int main(int argc, char** argv)
{
if (argc != 2)
{
    cout << " Usage: display_image ImageToLoadAndDisplay" << endl;
    return -1;
}

Mat image;
image = imread(argv[1], CV_LOAD_IMAGE_COLOR);   // Read the file

if (!image.data)                              // Check for invalid input
{
    cout << "Could not open or find the image" << std::endl;
    return -1;
}

namedWindow("Display window", WINDOW_AUTOSIZE);// Create a window for display.
imshow("Display window", image);                   // Show our image inside it.

waitKey(0);                                          // Wait for a keystroke in the window
return 0;
}

这是给我看的:

这是我存储图片的地方:

要么我们必须给出图像的位置。 或者我们可以使用命令行,我们必须再次提供图像的位置。 或者我们可以这样使用代码。enter link description here