0

hey all
so here's my problem: im just trying to learn a little opencv and ive been stuck at this for a while. When i run the following code, i get a runtime error " An application has made an attempt to load the C runtime library incorrectly ". This happens whenever i try to play an avi using this code

#include "stdafx.h"
#include "highgui.h"
 
int main(int argc, char *argv[])
{
	int c;
	IplImage *img;
	CvCapture* capture = cvCreateFileCapture( "test.avi" );
	cvNamedWindow("mainWin", CV_WINDOW_AUTOSIZE);
	cvMoveWindow("mainWin", 5, 5);
	while(1)
	{
		img=cvQueryFrame(capture);
		cvShowImage("mainWin", img );
		c=cvWaitKey(10);
		if(c == 27)
			break;
	}
	return 0;
}

Any suggestion?
Thnx

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by WolfPack
0

Looks like a setup issue of the OpenCV Library.
Can you run a basic program that just loads an image and displays it?
If not, I would suggest going through the installation instructions back from the beginning.

Also, give us information about your compiler and operating system next time.

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.