Directory
Reference Links:
1,cmake compiling
http://blog.csdn.net/baidu_36316735/article/details/53168438
2,clion Import OpenCV
http://blog.csdn.net/xiangxianghehe/article/details/71438789
In addition, configuring Opencv3 in VS can refer to my blog post:
OPENCV3.2.0+VS2017 environment configuration and frequently asked questions (Size Pit Daddy Edition)
In addition: Mac + Pycharm can refer to my blog:
Mac + OpenCV3.3.0 + pycharm (very simple configuration process)
Download Clion, CMake, OpenCV3.3.0 I will not say, Jetbeans Use the student mailbox can apply for free family barrels.
The following main talk about configuration
Begin
1. Create a build folder in download/opencv-3.3.0/to save the compiled file
2, open CMake, fill in OpenCV path and build path->configure->done->, etc.->generate
3, open the terminal, use the CD command to enter the build folder directory, and then enter the command
Make
Then, wait for it to compile to 100%, and then enter the command
sudo make install
4, create a project, my name is Opencv3_demo
//打开摄像头样例#include <opencv2/highgui/highgui.hpp>#include <opencv2/imgproc/imgproc.hpp>#include <opencv2/core/core.hpp>using namespace cv;int main(){ VideoCapture cap(0); Mat frame; while(1) { cap >> frame; imshow("调用摄像头", frame); waitKey(0); } return 0;}
Change CMakeLists.txt
cmake_minimum_required(VERSION 3.7)project(opencv3_demo)set(CMAKE_CXX_STANDARD 11)set(SOURCE_FILES main.cpp)add_executable(opencv3_demo ${SOURCE_FILES})find_package(OpenCV REQUIRED)target_link_libraries(opencv3_demo ${OpenCV_LIBS})
Completed the
OpenCV3.3.0 + clion + CMake configuration (Mac size invincible version)