I want to load an image with opencv. Everything is working properly but it doesn't show me the image. Code what I usin is here: #include #include #include
using namespace cv;
using namespace std;
int main( int argc, const char** argv )
{
IplImage *img = cvLoadImage("D:/C++/ MGC.JPG");
cvNamedWindow("MyWindow", 1); //create a window with the name "MyWindow"
cvMoveWindow("MyWindow", 100, 100);
cvShowImage("MyWindow", img);
cvWaitKey(0); //wait infinite time for a keypress
cvDestroyWindow("MyWindow"); //destroy the window with the name, "MyWindow"
return 0;
}
Is there a specific reason you chose to use the C interface? If not, you should be using the C++ interface