首页 > 代码库 > VS 永久配置opencv
VS 永久配置opencv
本文借鉴链接中博客的方法对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
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。