gpt4 book ai didi

c++ - opencv_highgui242.dll opencv 问题

转载 作者:太空宇宙 更新时间:2023-11-03 22:33:19 27 4
gpt4 key购买 nike

我是 openCV 的新手。我使用本教程配置它 http://karanjthakkar.wordpress.com/2012/11/21/usin-opencv-2-4-2-with-visual-studio-2012-on-windows-7-64 -bit/ 但是我用的是win8。当我写这个基本代码时:

#include "stdafx.h"
#include "opencv2/highgui/highgui.hpp"


int _tmain(int argc, _TCHAR* argv[])
{
CvCapture* capture = 0;
IplImage* frame = 0;
while(true)
{
capture = cvCaptureFromCAM(1);
frame = cvQueryFrame( capture );
cvNamedWindow("Sample Program", CV_WINDOW_AUTOSIZE);
cvShowImage("Sample Program", frame);
int c = cvWaitKey(10);
if( (char)c == 27 ) { exit(0); }
}
cvReleaseImage(&frame);



return 0;
}

显示此消息的对话框:

    opencv_highgui242.dll is missing from your computer.
try re installing the program to fix this problem.

我能为此做什么?

EDIT:
I solve that with adding library to my project path but i have new error:


the application was unable start correctly(0xc000007b). click ok to close the application.

最佳答案

我发现了问题:问题出在环境变量:我创建了新变量并将值复制到它们,但我必须编辑路径变量(如果退出)或创建名称为路径的新变量(如果不存在)并复制:

C:\OpenCV-2.4.2\opencv\build\x64\vc10\bin\;C:\OpenCV2.4.2\opencv\build\common\tbb\intel64\vc10\;如果路径存在

 and copy  ;C:\OpenCV-2.4.2\opencv\build\x64\vc10\bin\;C:\OpenCV-2.4.2\opencv\build\common\tbb\intel64\vc10\; if not exist.

关于c++ - opencv_highgui242.dll opencv 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15189168/

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