我正在编写一个用于在窗口中显示图像的简单程序,但是在运行时它不会加载图像。我不明白为什么会这样?
#include<opencv/cvaux.h>
#include<opencv/highgui.h>
#include<opencv/cxcore.h>
#include<opencv/cv.h>
#include<stdio.h>
#include<stdlib.h>
int main(int argc, CHAR* argv[])
{
IplImage* img = cvLoadImage("C:\Users\jai guru umesh\Desktop\6.jpg");
if (!img)
{
printf("Image can NOT Load!!!\n");
return 1;
}
cvNamedWindow("myfirstwindow");
cvShowImage("myfirstwindow", img);
cvWaitKey(0);
cvReleaseImage(&img);
return 0;
}