I attempted to build opencv-2.4.11 for Jetson TX1 with cuda7.0-71 and managed to build successfully.
However my application failed to execute when it try using the gpu functions such as gpu::matchTemplate.
The following error are observed.
[i]NCV Assertion Failed: cudaError_t=18, file=opencv-2.4.11/modules/gpu/src/NVidia/NPP_staging/NPP_staging.cu, line=336
NCV Assertion Failed: NcvStat=4, file=opencv-2.4.11/modules/gpu/src/NVidia/NPP_staging/NPP_staging.cu, line=464
NCV Assertion Failed: NcvStat=4, file=opencv-2.4.11/modules/gpu/src/NVidia/NPP_staging/NPP_staging.cu, line=578
OpenCV Error: Gpu API call (NCV_FILE_ERROR [Code = 4]) in sqrIntegral, file opencv-2.4.11/modules/gpu/src/imgproc.cpp, line 636
terminate called after throwing an instance of ‘cv::Exception’
what(): opencv-2.4.11/modules/gpu/src/imgproc.cpp:636: error: (-217) NCV_FILE_ERROR [Code = 4] in function sqrIntegral
OpenCV Build command used:
cmake -DCMAKE_BUILD_TYPE=RELEASE -DWITH_CUDA=ON -DCUDA_ARCH_BIN=“3.2” -DCUDA_ARCH_PTX="" -DCMAKE_TOOLCHAIN_FILE=…/platforms/Linux/arm=-gnueabi.toolchain.cmake …
During my opencv build, I saw some warning about target-cpu-architecture being deprecated.
I suspect my openCV build might not been configured correctly, however I managed to get it to work in Jetson TK1, so I’m not too sure what went wrong.