Why Xcode runs OpenCV with no title?

asked 2014-05-31 07:23:27 -0600

itempo gravatar image

I just wrote a simple cpp which add an image file to a window created using cvNamedWindow(), but when I run the code, the image was showed in a window with no title. I've searched online for solution but there was no similar question on the net here is my code:

include <opencv2 opencv.hpp="">

include <iostream>

include <string>

using namespace cv; using namespace std;

int main() {

IplImage *img = cvLoadImage("/Users/iPaul/Desktop/xxx.jpg");

cvNamedWindow("xxx",CV_WINDOW_AUTOSIZE);
cvShowImage("xxx",img);

cvWaitKey(0);

cvDestroyWindow("xxx");
cvReleaseImage(&img);

return 0;

}

edit retag flag offensive close merge delete