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

Edited 5 Years Ago by ~s.o.s~: Added code tags, learn to use them.

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.

This article has been dead for over six months. Start a new discussion instead.