명령어 실행
git clone https://github.com/opencv/opencv.git
mkdir build/
mkdir install/
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../install ../opencv
make -j 2 # 혹은 make -j
sudo make install
설치 완료
예제 코드 실행
#include "opencv2/opencv.hpp"
#include <iostream>
using namespace std;
int main()
{
cout << CV_VERSION << endl;
return 0;
}