FILE* f=fopen("d:\\background_left.jpg","r");
unsigned char *m=(unsigned char*)malloc(1280*720);
fread(m,50000,1,f);
CvMat mat = cvMat(720,1280,CV_8UC1, m);
IplImage *p = cvDecodeImage( &mat, 1 );
cvNamedWindow("a");
cvShowImage("a",p);
cvWaitKey(0);