前言
本文主要介绍如何在linux系统安装使用opencv.
具体步骤可参考opencv官网here.
注意事项
1. 注意你要安装的opencv的版本以及cv12、cv14等;
2.首先需要安装opencv的依赖库,而且必须是在安装opencv之前优先安装依赖库,可参考here;
3.测试程序完成之后,需要CMakeLists.txt进行编译,可参考here;
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(test_opencv)
SET(OpenCV_DIR /lib/opencv2413/opencv-2.4.13.4/build)
INCLUDE_DIRECTORIES(/lib/opencv2413/opencv-2.4.13.4/build/include)
FIND_PACKAGE(OpenCV REQUIRED)
ADD_EXECUTABLE(test_opencv test_opencv.cpp)
TARGET_LINK_LIBRARIES(test_opencv ${OpenCV_LIBS})
4.其他多是调试代码;
参考
1.opencv官网;
2.CMakeLists编写;
3.CMakeLists-practice文档;
完
原文地址:https://www.cnblogs.com/happyamyhope/p/8477069.html
时间: 2024-10-14 16:09:36