Hi,
I am a new one ,studying the Qt and OpenCV.I just put the OpenCV2.2 integration in Qt4.7.The steps likes this:Creating a QGui Application and in the .pro file add the INCLUDEPATH=INCLUDEPATH +=C:/OpenCV2.2/include
INCLUDEPATH +=C:/OpenCV2.2/include/opencv
LIBS +=C:/OpenCV2.2/bin/*.dll
I want to show the image using the OpenCV function and the codes likes:
void Widget::slot_showimage()
{
img=cvLoadImage("11.bmp");
cvNamedWindow("11.bmp",0);
cvShowImage("11.bmp",img);
cvWaitKey(0);
//QTimer::singleShot(100000,this,SLOT(close()));
cvDestroyWindow("11.bmp");
}
void Widget::slot_showimage()
{
img=cvLoadImage("11.bmp");
cvNamedWindow("11.bmp",0);
cvShowImage("11.bmp",img);
cvWaitKey(0);
//QTimer::singleShot(100000,this,SLOT(close()));
cvDestroyWindow("11.bmp");
}
To copy to clipboard, switch view to plain text mode
the Compile passed but it doesn't show the image window and the exited code likes this:
Starting E:\Qt_pratise\untitled4\debug\untitled4.exe...
E:\Qt_pratise\untitled4\debug\untitled4.exe exited with code -1073741515
I don't know why?
Bookmarks