gpt4 book ai didi

visual-studio-2010 - 应用程序崩溃说:访问冲突读取位置0xbaadf04d

转载 作者:行者123 更新时间:2023-12-02 17:54:52 25 4
gpt4 key购买 nike

我在opencv中做项目...我遇到这样的错误

“touch.exe中0x775a15ee处未处理的异常:0xC0000005:访问冲突读取位置0xbaadf04d。

该代码是

using namespace std;

#include "stdafx.h"
#include "cv.h"
#include "cxcore.h"
#include "highgui.h"
#include "math.h"
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <conio.h>
#include <sstream>

int main(int argc, char* argv[]){
//declerations

CvCapture *frame=0;
IplImage *image=0;

cvNamedWindow( "Image taken", CV_WINDOW_AUTOSIZE );
frame=cvCreateCameraCapture(2);
frame=cvCreateCameraCapture(2);
image = cvQueryFrame(frame);
cvShowImage("Image taken", image);
cvWaitKey(0);

return 0;
}

最佳答案

尝试更换

frame=cvCreateCameraCapture(2);


frame=cvCreateCameraCapture(-1);
if (!frame) {
puts("Couldn't detect a camera.");
return(1);
}

关于visual-studio-2010 - 应用程序崩溃说:访问冲突读取位置0xbaadf04d,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8989047/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com