mkdir /sdb/build/opencv
cd /sdb/build/opencv/
git clone https://github.com/opencv/opencv_contrib.git
git clone https://github.com/opencv/opencv.git
cd opencv
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX=./install \
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules/ \
-D BUILD_SHARED_LIBS=OFF \
-D BUILD_SHARED_LIBS=NO \
-D BUILD_PNG=ON \
-D BUILD_JASPER=ON \
-D BUILD_JPEG=ON \
-D BUILD_TIFF=ON \
-D BUILD_ZLIB=ON \
-D WITH_JPEG=ON \
-D WITH_PNG=ON \
-D WITH_JASPER=ON \
-D WITH_TIFF=ON \
..
make -j 2
make install
网友评论