나는 OpenCV의에서이 코드를 생성하고 약 900 프레임 후,이 오류가 나타납니다을 OpenCV, 메모리 부족 오류
OpenCV Error: Insufficient memory (Failed to allocate 921600 bytes) in function, file ..\..\..\..\ocv\opencv\src\cxcore\cxalloc.cpp, line 52
하지만 한 번 변수를 초기화했다. 당신은 어떤 점에서 cvReleaseImage
를 호출 할 필요가
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);
}
}