Qt, openCV y código de error durante la ejecución en modo de depuración de Windows 7
Frecuentes
Visto 697 veces
0
I have already install openCV and Qt framework on my windows 7 professiona 64. I have add path with dynamic lib to system variable PATH.
Mat img_1 = imread( "pic.jpg" );
imshow( "Easy sample", img_1 );
waitKey(0);
When i try to compile this example from OpenCV page it compile with no error's and warnings but it dosen't show any window with img. When i try to run it in debug mode i get error code 0xc0000138.
I found that 0xc0000135 is missing dynamic lib file in system, but I can't find what mean 0xc0000138.
1 Respuestas
0
i am also facing the same problem with opencv 2.4.0 and opencv 2.4.2...seems like imread is not working...
if you really need to work with image as Mat u can do the following....it works...
#include "iostream"
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace cv;
using namespace std;
int main()
{
IplImage *image = cvLoadImage("C:\\lena.jpg");
Mat im(image);
imshow("TEST",im);
waitKey();
return 0;
}
Respondido 28 ago 12, 14:08
link the debug files...it will work...like opencv_core240d.lib..opencv_highgui240d.lib - imagen_giratoria
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas qt opencv windows-7 or haz tu propia pregunta.
Not necesarily a solution, but a code without checks is dead. Write
Mat img_1 = imread(...); if(img_1.empty()) return -1;
- Sam