【OpenCV】OpenCV环境搭建,Mac系统,C++开发环境

OpenCV环境搭建,Mac系统,C++开发环境

    • 一、步骤
    • VSCode C++环境安装运行
    • CMake安装运行
    • OpenCV 安装
    • CMakeList

一、步骤

  1. VSCode C++环境安装
  2. CMake 安装
  3. OpenCV 安装
  4. CmakeList.txt

VSCode C++环境安装运行

访问官网

CMake安装运行

CMake官网

参考文档

OpenCV 安装

brew install opencv@3

CMakeList

cmake_minimum_required(VERSION 3.10)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
project(opencv_demo)
find_package(OpenCV 3 REQUIRED HINTS /usr/local/opt/opencv@3) 

add_executable(opencv_demo opencv_1.cpp)

target_link_libraries(opencv_demo ${OpenCV_LIBS})

你可能感兴趣的:(OpenCV,计算摄影学,opencv,macos,c++)