Ubuntu 18.04 学习笔记

Ubuntu 18.04 学习笔记,第1张

安装 opencv c++开发组件
apt install libopencv-*-dev

然后可以简单测试下 opencv 是否工做正常:

CMakeLists.txt:

cmake_minimum_required (VERSION 3.0)
set(CMAKE_CXX_STANDARD 17)

project(MyTTT VERSION 1.0.2)

find_package(OpenCV 3.0 REQUIRED COMPONENTS core imgproc calib3d highgui objdetect)
if(${OpenCV_FOUND})
	MESSAGE("OpenCV information:") 
	MESSAGE("  OpenCV_INCLUDE_DIRS: ${OpenCV_INCLUDE_DIRS}") 
	MESSAGE("  OpenCV_LIBRARIES: ${OpenCV_LIBRARIES}") 
	MESSAGE("  OpenCV_LIBRARY_DIRS: ${OpenCV_LINK_DIRECTORIES}") 
else()
    MESSAGE(FATAL_ERROR "OpenCV not found in the system.")
endif() 

include_directories(${OpenCV_INCLUDE_DIRS})
link_directories(${OpenCV_LIBRARY_DIRS})

add_executable(MyTTT tt.cpp)
target_link_libraries(MyTTT ${OpenCV_LIBS}) 

tt.cpp:

#include
main()
{
    return 0;
}
安装 portainer-ce 管理 Docker
apt install docker.io
mkdir -p ~/portainer/data/
docker run -d --restart=always --name portainer \
    -p 9000:9000 \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -v ~/portainer/data:/data \
    portainer/portainer-ce:latest

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1324367.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-12
下一篇 2022-06-12

发表评论

登录后才能评论

评论列表(0条)

保存