How to load and display image;
Code:
/* usage: prog <image_name> */
#include "cv.h"
#include "highgui.h"
int main( int argc, char** argv )
{
IplImage* img;
if( argc == 2 && (img = cvLoadImage( argv[1], 1)) != 0 )
{
cvNamedWindow( "Image view", 1 );
cvShowImage( "Image view", img );
cvWaitKey(0); // very important, contains event processing loop inside
cvDestroyWindow( "Image view" );
cvReleaseImage( &img );
return 0;
}
return -1;
}
This is just one of the examples that you can find
here.
Lots of other things OpenCV related are there.