Skip to content
Nick Walker edited this page Jan 20, 2018 · 2 revisions

OpenCV

This will work for either 2 or 3. Download the latest source release. If using the 3.x line, download the contrib source and update the modules path.

cd <opencv source path>
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D WITH_CUDA=ON \
-D CUDA_USE_STATIC_CUDA_RUNTIME=OFF \
-D WITH_TBB=ON  \
-D ENABLE_FAST_MATH=1 \
-D CUDA_FAST_MATH=1 \
-D WITH_CUBLAS=1 \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.4.0/modules \
-D BUILD_EXAMPLES=ON ..
make -j8
Clone this wiki locally