opencv调试出错:x7c812afb处有未经处理的异常:MicrosoftC++异常:内存位置0x0011f408处的cv::Exception
提取usb摄像头拍摄的图片的surf特征的程序出现0x7c812afb处最可能的异常:内存位置0x0011f408处的cv::Exception。将其中的cvExtrac...
提取usb摄像头拍摄的图片的surf特征的程序出现0x7c812afb 处最可能的异常: 内存位置 0x0011f408 处的 cv::Exception。
将其中的cvExtractSURF( frame, 0, &imageKeypoints, &imageDescriptors, storage, params );
printf("Image Descriptors: %d\n", imageDescriptors->total);
这两行代码注释掉就没问题。求高手解释下,谢谢咯
程序如下:
#include "opencv2/objdetect/objdetect.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include <iostream>
#include <vector>
#include <stdio.h>
using namespace std;
int main(int argc, char** argv)
{
CvCapture* capture = 0;
capture = cvCaptureFromCAM( 0 );
IplImage * frame;
CvMemStorage* storage = cvCreateMemStorage(0);
CvSURFParams params = cvSURFParams(500, 0);
CvSeq* imageKeypoints = 0, *imageDescriptors = 0;
cvNamedWindow("result",1);
frame = cvRetrieveFrame( capture,0 );
cvExtractSURF( frame, 0, &imageKeypoints, &imageDescriptors, storage, params );
printf("Image Descriptors: %d\n", imageDescriptors->total);
cvShowImage("result",frame);
cvReleaseCapture( &capture );
cvWaitKey(0);
cvDestroyWindow("result");
return 0;
} 展开
将其中的cvExtractSURF( frame, 0, &imageKeypoints, &imageDescriptors, storage, params );
printf("Image Descriptors: %d\n", imageDescriptors->total);
这两行代码注释掉就没问题。求高手解释下,谢谢咯
程序如下:
#include "opencv2/objdetect/objdetect.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include <iostream>
#include <vector>
#include <stdio.h>
using namespace std;
int main(int argc, char** argv)
{
CvCapture* capture = 0;
capture = cvCaptureFromCAM( 0 );
IplImage * frame;
CvMemStorage* storage = cvCreateMemStorage(0);
CvSURFParams params = cvSURFParams(500, 0);
CvSeq* imageKeypoints = 0, *imageDescriptors = 0;
cvNamedWindow("result",1);
frame = cvRetrieveFrame( capture,0 );
cvExtractSURF( frame, 0, &imageKeypoints, &imageDescriptors, storage, params );
printf("Image Descriptors: %d\n", imageDescriptors->total);
cvShowImage("result",frame);
cvReleaseCapture( &capture );
cvWaitKey(0);
cvDestroyWindow("result");
return 0;
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询