1. 程式人生 > >VS 永久配置opencv

VS 永久配置opencv

mat pty emp gui turn spa pre ios lease

本文借鑒鏈接中博客的方法對VS2015永久配置了opencv

http://blog.csdn.net/mwymi/article/details/51564169

可參照博客中的方法對release X64 進行配置

且用如下代碼測試

#include "stdafx.h"
#include <iostream>
#include <opencv2/highgui/highgui.hpp>


int main()
{
    const std::string window_name = "lena";
    const std::string input_pic = "lena.jpg
"; cv::Mat test_pic = cv::imread(input_pic); if (test_pic.empty()) { std::cout << "no input image" << std::endl; return -1; } cv::namedWindow(window_name); cv::imshow(window_name, test_pic); cv::waitKey(0); return 0; }

註意 imread 路徑需為 “\\”

若直接讀取的話需要和 C++文件在同一文件夾內

VS 永久配置opencv