Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to reproduce OpenCV official build locally

I used to use OpenCV build vc14_vc15 from the official github page: https://github.com/opencv/opencv/releases . But I have realised that it is compiled without CUDA support which I need, e.g. see build/include/opencv2 screenshot

enter image description here

When I build it myself (e.g. using this instruction) I don't have any include folder at all. But I need it because I need cudaobjdetect.hpp and several other guys (such as features2d.hpp) being located here.

Why my local build doesn't look like those in opencv-3.4.0-vc14_vc15.7z and how can I achieve same result, but with several extra CMake switches (like CUDA in this example)? I mean I want OpenCV to be built with CUDA support and cudaobject.hpp located in build/include/opencv2 folder.

How to reproduce OpenCV official build locally

I used to use OpenCV build vc14_vc15 from the official github page: https://github.com/opencv/opencv/releases . But I have realised that it is compiled without CUDA support which I need, e.g. see build/include/opencv2 screenshot

enter image description here

When I build it myself (e.g. using this instruction) I don't have any include folder at all. But I need it because I need cudaobjdetect.hpp and several other guys (such as features2d.hpp) being located here.

Why my local build doesn't look like those in opencv-3.4.0-vc14_vc15.7z and how can I achieve same result, but with several extra CMake switches (like CUDA in this example)? I mean I want OpenCV to be built with CUDA support and cudaobject.hpp located in build/include/opencv2 folder.


Ok, I configured CMake with following options:

CMAKE_OPTIONS='-DWITH_CUDA:BOOL=ON -DCUDA_ARCH_BIN="5.2" -DCUDA_ARCH_PTX="" -DBUILD_opencv_java:BOOL=OFF -DBUILD_opencv_python:BOOL=OFF -DBUILD_opencv_python2:BOOL=OFF -DBUILD_opencv_python3:BOOL=OFF -DBUILD_PERF_TESTS:BOOL=OFF -DBUILD_TESTS:BOOL=OFF -DBUILD_DOCS:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF -DINSTALL_CREATE_DISTRIB:BOOL=ON'

But in this case OpenCV just doesn't get built, see log: https://gist.github.com/Pzixel/4969943e4fb8360712e539024e6a939a

How to reproduce OpenCV official build locally

I used to use OpenCV build vc14_vc15 from the official github page: https://github.com/opencv/opencv/releases . But I have realised that it is compiled without CUDA support which I need, e.g. see build/include/opencv2 screenshot

enter image description here

When I build it myself (e.g. using this instruction) I don't have any include folder at all. But I need it because I need cudaobjdetect.hpp and several other guys (such as features2d.hpp) being located here.

Why my local build doesn't look like those in opencv-3.4.0-vc14_vc15.7z and how can I achieve same result, but with several extra CMake switches (like CUDA in this example)? I mean I want OpenCV to be built with CUDA support and cudaobject.hpp located in build/include/opencv2 folder.


Ok, I configured CMake with following options:

CMAKE_OPTIONS='-DWITH_CUDA:BOOL=ON -DCUDA_ARCH_BIN="5.2" -DCUDA_ARCH_PTX="" -DBUILD_opencv_java:BOOL=OFF -DBUILD_opencv_python:BOOL=OFF -DBUILD_opencv_python2:BOOL=OFF -DBUILD_opencv_python3:BOOL=OFF -DBUILD_PERF_TESTS:BOOL=OFF -DBUILD_TESTS:BOOL=OFF -DBUILD_DOCS:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF -DINSTALL_CREATE_DISTRIB:BOOL=ON'

But in this case OpenCV just doesn't get built, see log: https://gist.github.com/Pzixel/4969943e4fb8360712e539024e6a939a

CUDA is installed with following flags:

Start-Process -FilePath "cuda_9.1.exe" -ArgumentList "-s nvcc_9.1 cublas_9.1 cublas_dev_9.1 cufft_9.1 cufft_dev_9.1 npp_9.1 npp_dev_9.1" -Wait

How to reproduce OpenCV official build locally

I used to use OpenCV build vc14_vc15 from the official github page: https://github.com/opencv/opencv/releases . But I have realised that it is compiled without CUDA support which I need, e.g. see build/include/opencv2 screenshot

enter image description here

When I build it myself (e.g. using this instruction) I don't have any include folder at all. But I need it because I need cudaobjdetect.hpp and several other guys (such as features2d.hpp) being located here.

Why my local build doesn't look like those in opencv-3.4.0-vc14_vc15.7z and how can I achieve same result, but with several extra CMake switches (like CUDA in this example)? I mean I want OpenCV to be built with CUDA support and cudaobject.hpp located in build/include/opencv2 folder.


Ok, I configured CMake with following options:

CMAKE_OPTIONS='-DWITH_CUDA:BOOL=ON -DCUDA_ARCH_BIN="5.2" -DCUDA_ARCH_PTX="" -DBUILD_opencv_java:BOOL=OFF -DBUILD_opencv_python:BOOL=OFF -DBUILD_opencv_python2:BOOL=OFF -DBUILD_opencv_python3:BOOL=OFF -DBUILD_PERF_TESTS:BOOL=OFF -DBUILD_TESTS:BOOL=OFF -DBUILD_DOCS:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF -DINSTALL_CREATE_DISTRIB:BOOL=ON'

But in this case OpenCV just doesn't get built, see log: log part with error: https://gist.github.com/Pzixel/4969943e4fb8360712e539024e6a939a

For more context: here is full log

CUDA is installed with following flags:

Start-Process -FilePath "cuda_9.1.exe" -ArgumentList "-s nvcc_9.1 cublas_9.1 cublas_dev_9.1 cufft_9.1 cufft_dev_9.1 npp_9.1 npp_dev_9.1" -Wait