【发布时间】:2011-09-28 13:49:22
【问题描述】:
当我尝试编译我的代码时出现上述错误。它是一个非常非常非常简单的功能,我无法弄清楚为什么会出现问题。最糟糕的是,我什至找不到 array.cpp 在 opencv 文件夹中的位置,所以我看不出有什么问题。有人知道吗?请帮忙!
int imgreg_capture_image()
{
/*********************Try capturing an image from the camera first*************************************/
CvCapture* imgregCapture = cvCaptureFromCAM( CV_CAP_ANY );
if ( !imgregCapture ) {
fprintf( stderr, "ERROR: capture is NULL \n" );
exit(-1);
}
// Get one frame
IplImage* frame = 0;
frame = cvQueryFrame(imgregCapture);
if ( !frame ) {
fprintf( stderr, "ERROR: frame is null...\n" );
return -1;
}
//save the image into a file
cvSaveImage( CAPTURE_FILE, frame );
// Release the capture device housekeeping
cvReleaseCapture(&imgregCapture);
cvReleaseImage(&frame);
return 0;
/***************Finish Try capturing an image from the camera first*************************************/
}
【问题讨论】:
-
array.cpp 文件位于
modules/core/src/array.cpp。如果您提供有关您得到的错误的更多详细信息可能会有所帮助-您可以发布编译器的完整输出吗?您能否还指出哪些行号是指您发布的代码中的哪些行?