here is the code ....plz help
IplImage *cur_frame = NULL;
IplImage* background=NULL;
IplImage*temp1=NULL;
//IplImage*difference=NULL;
cur_frame=cvCreateImage(cvSize(640,480),IPL_DEPTH_8U,1);
background=cvCreateImage(cvSize(640,480),IPL_DEPTH_32F,1);
temp1=cvCreateImage(cvSize(640,480),IPL_DEPTH_32F,1);
cur_frame=cvLoadImage("C:\\Documents and Settings\\samia\\My Documents\\My Pictures\\frame.jpg",CV_LOAD_IMAGE_COLOR);
background=cvLoadImage("C:\\Documents and Settings\\samia\\My Documents\\My Pictures\\background.jpg", CV_LOAD_IMAGE_COLOR);
cvRunningAvg(cur_frame,background,0.005,NULL);
cvConvertScale(background,cur_frame,1,0);
cvNamedWindow("back",CV_WINDOW_AUTOSIZE);
cvShowImage("back",background);