For example,I want load and show an image with code
#include <QtCore/QCoreApplication>
#include<opencv.hpp>
using namespace cv;
int main(int argc, char *argv[])
{
Mat image=imread("E:\\library\\Pictures\\images\\Lena.jpg");
imshow("image",image);
return a.exec();
}
#include <QtCore/QCoreApplication>
#include<opencv.hpp>
using namespace cv;
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
Mat image=imread("E:\\library\\Pictures\\images\\Lena.jpg");
imshow("image",image);
return a.exec();
}
To copy to clipboard, switch view to plain text mode
If I choose msvc2010 release compiler in Qt Creator,the image will show correctly.But if I choose msvc2010 debug compiler,no image will show.
Bookmarks