** 우분투에서 opencv 설치하기 **
Background: ubuntu16.04LTS + python 2.7
step1) install required libraries
(See http://www.pyimagesearch.com/2016/10/24/ubuntu-16-04-how-to-install-opencv/)
step2) download opencv source from terminal
$ cd ~
$ wget -0 opencv.zip https://github.com/Itseez/opencv/archive/3.2.0.zip
$ unzip opencv.zip
step3) Do cmake. (In my case, the option "D WITH_FFMPEG=OFF" is essential for successful installation)
$mkdir build
$cd build
$cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D INSTALL_C_EXAMPLES=OFF \
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib-3.2.0/modules \
-D ENABLE_PRECOMPILED_HEADERS=OFF \
-D BUILD_EXAMPLES=ON \
-D WITH_FFMPEG=OFF ..
step4) Do make. (This may take a very long time. Be patient!!)
$make -j4
$sudo make install
$sudo ldconfig
step5) check your opencv version.
$pkg-config --modversion opencv
'Opencv' 카테고리의 다른 글
how to read/save an image as bmp in python (0) | 2017.08.11 |
---|---|
how to put text message on images using opencv library on C (0) | 2017.08.10 |
how to put text message on images using opencv library on python (0) | 2017.07.27 |
How to use SEEDS for superpixel segmentation (0) | 2017.07.19 |
[opencv] how to install opencv for python under anaconda+window10 (0) | 2017.07.18 |