1
我在OpenCV中創造了這個代碼,並在約900幀,出現此錯誤:OpenCV中,內存不足錯誤
OpenCV Error: Insufficient memory (Failed to allocate 921600 bytes) in function, file ..\..\..\..\ocv\opencv\src\cxcore\cxalloc.cpp, line 52
,但我曾經初始化的變量。 下面是代碼:
int _tmain(int argc, _TCHAR* argv[])
{
IplImage * image;
CvCapture * capture = cvCaptureFromCAM (0);
while (1){
image = cvCreateImage (cvSize (640,480) , 8, 3);
image = cvQueryFrame (capture);
cvShowImage ("test", image);
cvWaitKey (10);
}
}