簡體   English   中英

Visual Studio 2012中的OpenCV 2.4.13缺少opencv_core2413d.dll

[英]OpenCV 2.4.13 missing opencv_core2413d.dll in visual studio 2012

我開始在項目中使用opencv,但是在vs 2012中進行設置時遇到了一些問題。

我下載了OpenCV 2.4.13。 我看了很多教程,但是卻說錯了

The program can't start because opencv_core2413d.dll is missing from your computer. Try reinstalling the program to fix this problem

這是我所有的設置步驟:

1)設置Windows環境變量,“ C:\\ opencv \\ build \\ x64 \\ vc11 \\ bin”的路徑

2)在vs 2012中打開一個空項目,將配置管理器更改為64位平台。

3)然后在VC ++目錄->包含目錄中添加“ C:\\ opencv \\ build \\ include”和“ C:\\ opencv \\ build \\ include \\ opencv”

4)在VC ++目錄->庫目錄中添加“ C:\\ opencv \\ build \\ x64 \\ vc11”

5)切換到C / C ++->常規->其他包含目錄,添加“ C:\\ opencv \\ build \\ include”

6)將“ C:\\ opencv \\ build \\ x64 \\ vc11 \\ lib”添加到鏈接器->常規->其他庫目錄

7)將以下內容添加到鏈接->輸入->其他依賴項

opencv_core2413d.lib
opencv_calib3d2413d.lib
opencv_contrib2413d.lib
opencv_features2d2413d.lib
opencv_highgui2413d.lib
opencv_imgproc2413d.lib

這是我使用openCV的主要測試方法

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>

using namespace cv;
using namespace std;

int main( int argc, char** argv ){ 
    Mat image;
    if( argc != 2){
        cout <<" Usage: display_image ImageToLoadAndDisplay" << endl;
        image = imread("HappyMan's Girl.jpg", CV_LOAD_IMAGE_COLOR);
        // Read the file
    }
    else{
        image = imread(argv[1], CV_LOAD_IMAGE_COLOR);
    }

    if(! image.data ){// Check for invalid input
        cout <<  "Could not open or find the image" << endl ;
        system("pause");
        return -1;
    }

    namedWindow( "HappyMan - Display window", CV_WINDOW_AUTOSIZE );
    // Create a window for display.
    imshow( "HappyMan - Display window", image );
    // Show our image inside it.

    waitKey(0);
    // Wait for a keystroke in the window
    return 0;
}

我可以在這方面尋求幫助嗎?

謝謝


更新了我的系統變量設置圖像:

在此處輸入圖片說明

只需將dll文件粘貼到存在.exe文件的項目目錄中,就可以了。 另一種方法是將.dll文件粘貼到System32文件夾中(雖然尚未嘗試過),例如C:\\ Users \\ Reaper \\ Documents \\ Visual Studio 2013 \\ Projects \\ ConsoleApplication1 \\ Debug希望對您有所幫助

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM