The program below is for opening an image

#include <opencv\cv.h>#include <opencv\highgui.h>usingnamespacecv;intmain(intargc,char**argv){IplImage*img=cvLoadImage("image.png");//change the name (image.jpg) according to your Image filename.cvNamedWindow("Example1",CV_WINDOW_NORMAL);cvShowImage("Example1",img);cvWaitKey(0);cvReleaseImage(&img);cvDestroyWindow("Example1");return0;}