how to compile kinfu_remake with cuda 9.0 opencv2.4.13.4

13 篇文章 0 订阅
7 篇文章 0 订阅

1.  download from the git : https://github.com/Nerei/kinfu_remake.git

 

 

update on 15, Oct.

before compile opencv, please install libgtk2.0-dev and pkg-config first

2. As cuda 9.0 splits nppi into pieces, we need to change some files:

 

/usr/local/share/OpenCV/OpenCVConfig.cmake

 

find_cuda_helper_libs(nppc)
    #find_cuda_helper_libs(nppi)
  find_cuda_helper_libs(nppial)
  find_cuda_helper_libs(nppicc)
  find_cuda_helper_libs(nppicom)
  find_cuda_helper_libs(nppidei)
  find_cuda_helper_libs(nppif)
  find_cuda_helper_libs(nppig)
  find_cuda_helper_libs(nppim)
  find_cuda_helper_libs(nppist)
  find_cuda_helper_libs(nppisu)
  find_cuda_helper_libs(nppitc)
    find_cuda_helper_libs(npps)
    #list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_nppc_LIBRARY} ${CUDA_nppi_LIBRARY} ${CUDA_npps_LIBRARY})
list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_nppc_LIBRARY} ${CUDA_nppial_LIBRARY} ${CUDA_nppicc_LIBRARY} ${CUDA_nppicom_LIBRARY} ${CUDA_nppidei_LIBRARY} ${CUDA_nppif_LIBRARY} ${CUDA_nppig_LIBRARY} ${CUDA_nppim_LIBRARY} ${CUDA_nppist_LIBRARY} ${CUDA_nppisu_LIBRARY} ${CUDA_nppitc_LIBRARY} ${CUDA_npps_LIBRARY})

 

update on 08/10/2019:  if you don't do this step, the error like " find -lopencv_dep_nppial" will pop out.

 

 

 

/usr/share/cmake-3.5/Modules/FindCUDA.cmake

注意这个里面的cmake也改一下opencv-2.4.13.6/cmake

#unset(CUDA_nppi_LIBRARY CACHE)
  unset(CUDA_nppial_LIBRARY CACHE)
  unset(CUDA_nppicc_LIBRARY CACHE)
  unset(CUDA_nppicom_LIBRARY CACHE)
  unset(CUDA_nppidei_LIBRARY CACHE)
  unset(CUDA_nppif_LIBRARY CACHE)
  unset(CUDA_nppig_LIBRARY CACHE)
  unset(CUDA_nppim_LIBRARY CACHE)
  unset(CUDA_nppist_LIBRARY CACHE)
  unset(CUDA_nppisu_LIBRARY CACHE)
  unset(CUDA_nppitc_LIBRARY CACHE)

 

#find_cuda_helper_libs(nppi)
  find_cuda_helper_libs(nppial)
  find_cuda_helper_libs(nppicc)
  find_cuda_helper_libs(nppicom)
  find_cuda_helper_libs(nppidei)
  find_cuda_helper_libs(nppif)
  find_cuda_helper_libs(nppig)
  find_cuda_helper_libs(nppim)
  find_cuda_helper_libs(nppist)
  find_cuda_helper_libs(nppisu)
  find_cuda_helper_libs(nppitc)
  find_cuda_helper_libs(npps)
  #set(CUDA_npp_LIBRARY "${CUDA_nppc_LIBRARY};${CUDA_nppi_LIBRARY};${CUDA_npps_LIBRARY}")
  set(CUDA_npp_LIBRARY "${CUDA_nppc_LIBRARY};${CUDA_nppial_LIBRARY};${CUDA_nppicc_LIBRARY};${CUDA_nppicom_LIBRARY};${CUDA_nppidei_LIBRARY};${CUDA_nppif_LIBRARY};${CUDA_nppig_LIBRARY};${CUDA_nppim_LIBRARY};${CUDA_nppist_LIBRARY};${CUDA_nppisu_LIBRARY};${CUDA_nppitc_LIBRARY};${CUDA_npps_LIBRARY}")

 

 

 

 

Unsupported Features General CUDA ‣ CUDA library. The built-in functions __float2half_rn() and __half2float() have been removed. Use equivalent functionality in the updated fp16 header file from the CUDA toolkit.

 

To do this, you need to add:

#include <cuda_fp16.h>

 

 

 

 

/usr/bin/ld: cannot find -lopencv_dep_cudart

CUDA_USE_STATIC_CUDA_RUNTIME=OFF

 

 

update on 7/10/2019:

 

https://stackoverflow.com/questions/46584000/cmake-error-variables-are-set-to-notfound

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值