0

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 by ~s.o.s~: Added code tags, learn to use them.

2
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by jonsca
0

error is

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

0

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

0

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 topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.