opencv_highgui242.dll opencv的问题

时间:2013-03-03 18:29:16

标签: c++ opencv windows-8 64-bit

我是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.

1 个答案:

答案 0 :(得分:2)

我发现了问题: 问题出在environment Variables: 我创建了新变量并将值复制到它们但我必须编辑路径变量(if exiting)或创建名为路径(if not exist)的新变量并复制:

C:\OpenCV-2.4.2\opencv\build\x64\vc10\bin\;C:\OpenCV2.4.2\opencv\build\common\tbb\intel64\vc10\; to that if path exist

 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.