"无法打开文件' opencv_calib3d320d.lib'"错误

时间:2017-04-11 19:55:06

标签: c++ opencv

我试图让OpenCV与visual studio合作。按照正式的OpenCV安装说明,我试着建立一个示例程序。我在标题中得到了错误。奇怪的是命名空间' cv'工作正常 - 其余代码没有错误。这是我尝试构建的示例程序:

#include <opencv2/core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/highgui.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main(int argc, char** argv)
{
    if (argc != 2)
    {
        cout << " Usage: display_image ImageToLoadAndDisplay" << endl;
        return -1;
    }
    Mat image;
    image = imread(argv[1], IMREAD_COLOR); // Read the file
    if (image.empty()) // Check for invalid input
    {
        cout << "Could not open or find the image" << std::endl;
        return -1;
    }
    namedWindow("Display window", WINDOW_AUTOSIZE); // Create a window for display.
    imshow("Display window", image); // Show our image inside it.
    waitKey(0); // Wait for a keystroke in the window
    return 0;
}

此外,这是我在项目属性中添加的其他依赖项列表:

opencv_calib3d320d.lib
opencv_core320d.lib
opencv_features2d320d.lib
opencv_flann320d.lib
opencv_highgui320d.lib
opencv_imgcodecs320d.lib
opencv_imgproc320d.lib
opencv_ml320d.lib
opencv_objdetect320d.lib
opencv_photo320d.lib
opencv_shape320d.lib
opencv_stitching320d.lib
opencv_superres320d.lib
opencv_ts320d.lib
opencv_video320d.lib
opencv_videoio320d.lib
opencv_videostab320d.lib

我非常需要这项工作:(。应该注意的是,我已经对这些工作进行了四重检查,所以我不认为它与头文件或其他东西有关。

0 个答案:

没有答案