I suggest you run through OpenCV-2.1.0 Visual C++ 2010 on Windows 7 to make sure it works. It does not seem like you should have to build the OpenCV binaries yourself?
Steve Townsend
2010-10-25 18:16:05
I suggest you run through OpenCV-2.1.0 Visual C++ 2010 on Windows 7 to make sure it works. It does not seem like you should have to build the OpenCV binaries yourself?
[Sorry, not an answer, but not enough space in a comment]
I have the same problem. Windows 7 X64, VS2008 SP1, OpenCV2.1.
Code:
#include "stdafx.h"
#include "highgui.h"
int main(int argc, char** argv)
{
cvNamedWindow("Example2",CV_WINDOW_AUTOSIZE);
CvCapture* capture = cvCreateFileCapture(argv[1]);
IplImage* frame;
while(1) {
frame=cvQueryFrame(capture);
if (! frame) break;
cvShowImage("Example2",frame);
char c=cvWaitKey(1000);
if (c==27) break;
}
cvReleaseCapture(&capture);
cvDestroyWindow("Example2");
return 0;
}
Notice the 1000mS pause. The first frame displays and then I get:
Two observations:
From the symptoms and the messages, I'm thinking it's a combination of alignment and a static variable that's not being re-initialised, or something on those lines.
If anyone can throw some light on this, I'd be most grateful, it's very frustrating to buy the book and not get past lesson 2.