我认为我对指针感到困惑......
Vision vis;
IplImage* imgB0=cvCreateImage(img_sz, IPL_DEPTH_32F, 1);
IplImage* imgB1=cvCreateImage(img_sz, IPL_DEPTH_32F, 1);
//Get next frame
vis->getFrame();
imgB0=vis->image;
usleep(3);
vis->getFrame();
imgB1=vis->image;
cvAddWeighted(imgB0, 1./(float)2., imgB1,1./(float)2.,0,imgB1);
cvReleaseImage(&imgB0); //<-SIGABRT
...
Vision.h:
class Vision
{
public:
IplImage* image;
...
Vision.cpp:
void Vision::getFrame()
{
image = cvQueryFrame(capture);
}
有什么想法吗? 谢谢!