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/rele... .
But I have realised that it is compiled without CUDA support which I need, e.g. see build/include/opencv2
screenshot
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 part with error: https://gist.github.com/Pzixel/496994...
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
see this post https://devtalk.nvidia.com/default/to... I have got same error... CUDA 9.1 and msvc 2017 is it compatibel?
Ye, just change the header value. Here is my script for it: https://github.com/Pzixel/cv-rs/blob/... . It's ok to change it because it how NVidia itself is doing it: https://devtalk.nvidia.com/default/to...
Hmm, it seems to be a known incompatibility, see post at `
12/29/2017 08:38 PM
on last url. Beign said, that's funny enough that they have broken compatibility with minor update (15.3 -> 15.4). Going to search some workarounds...Ok, I managed to configure AppVeyor to use MSVC 1911 which is working fine with CUDA 9.1. HOwever, build is failing because of timeout. Is there any way to speed it up? Build log: https://ci.appveyor.com/project/nebgn...
Just for info, in windows "to reproduce OpenCV official build locally" and get the same directory structure you need to build the INSTALL project in Visual Studio and look inside the install directory.