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);

Now, what is the error that the compiler is giving you?

error is

the application has requested the runtime to terminate it in unusual way.please contact application support team for more information.

the error is
application has terminated in an unusual way.contact application support team for more information.

Part of the problem may be the spaces in your filenames. I tried it with 2 files that had no spaces in the filenames, but got this error instead

OpenCV Error: Assertion failed (dst.size() == src.size() && dst.channels() == sr
c.channels()) in unknown function, file ..\..\..\..\..\..\..\..\OpenCV2.0\src\cv
\cvaccum.cpp, line 545

I think because my images weren't the same size.

I don't know what the problem is, but the OpenCV Yahoo group (http://tech.groups.yahoo.com/group/OpenCV/) is probably with whom you should check.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.