Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/opencv/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 代码>路径正确,而不是将操作系统弄得一团糟。 #include "stdafx.h" #include "opencv2/highgui/highgui.hpp" #include <iostream> using namespace cv;_C++_Opencv_Visual Studio 2013 - Fatal编程技术网

C++ 代码>路径正确,而不是将操作系统弄得一团糟。 #include "stdafx.h" #include "opencv2/highgui/highgui.hpp" #include <iostream> using namespace cv;

C++ 代码>路径正确,而不是将操作系统弄得一团糟。 #include "stdafx.h" #include "opencv2/highgui/highgui.hpp" #include <iostream> using namespace cv;,c++,opencv,visual-studio-2013,C++,Opencv,Visual Studio 2013,代码>路径正确,而不是将操作系统弄得一团糟。 #include "stdafx.h" #include "opencv2/highgui/highgui.hpp" #include <iostream> using namespace cv; using namespace std; int main(int argc, const char** argv) { Mat img = imread("rgb_1.png", CV_LOAD_IMAGE_UNCHANGED);

代码>路径正确,而不是将操作系统弄得一团糟。
#include "stdafx.h"
#include "opencv2/highgui/highgui.hpp"
#include <iostream>

using namespace cv;
using namespace std;

int main(int argc, const char** argv)
{
    Mat img = imread("rgb_1.png", CV_LOAD_IMAGE_UNCHANGED); //read the image data in the file "MyPic.JPG" and store it in 'img'

    if (img.empty()) //check whether the image is loaded or not
    {
        cout << "Error : Image cannot be loaded..!!" << endl;
        //system("pause"); //wait for a key press
        return -1;
    }

    namedWindow("MyWindow", CV_WINDOW_AUTOSIZE); //create a window with the name "MyWindow"
    imshow("MyWindow", img); //display the image which is stored in the 'img' in the "MyWindow" window

    waitKey(0); //wait infinite time for a keypress

    destroyWindow("MyWindow"); //destroy the window with the name, "MyWindow"

    return 0;
}
<your install directory>\opencv30\build\x64\vc12\bin
<your solution directory>\x64\Release