ubuntu16.04LTS + QT5 + CUDA8.0 + PCL + OpenCV3.2

 

1:Install QT5   ##### need or download .run or .deb file. Just use commands as following:
    sudo apt-get install build-essential

 

    sudo apt-get install cmake qt5-default qtcreator

2:Download and install cuda8.0 from org:
    ##### https://developer.nvidia.com/cuda-80-ga2-download-archive
    ##### cuda8.0 is easier than 9.0 to config. cuda8.0 and opencv3.2 may be safe, opencv3.2 and cuda9.0 lead error.

    sudo dpkg -i cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb
    sudo dpkg -i cuda-repo-ubuntu1604-8-0-local-cublas-performance-update_8.0.61-1_amd64.deb
    sudo apt-get update
    sudo apt-get install cuda

    gedit ~/.bashrc and add following at the end
    export PATH=$PATH:/usr/local/cuda-8.0/bin
    source ~/.bashrc

3:Install pcl1.8   
    #####https://blog.csdn.net/dantengc/article/details/78446600
    sudo apt-get update  
    sudo apt-get install git build-essential linux-libc-dev  
    sudo apt-get install cmake cmake-gui   
    sudo apt-get install libusb-1.0-0-dev libusb-dev libudev-dev  
    sudo apt-get install mpi-default-dev openmpi-bin openmpi-common    
    sudo apt-get install libflann1.8 libflann-dev  
    sudo apt-get install libeigen3-dev  
    sudo apt-get install libboost-all-dev  
    sudo apt-get install libvtk6
    sudo apt-get install libvtk6-dev libvtk6-qt-dev
    sudo apt-get install libqhull* libgtest-dev  
    sudo apt-get install freeglut3-dev pkg-config  
    sudo apt-get install libxmu-dev libxi-dev libproj9 libproj-dev
    sudo apt-get install mono-complete  libopenni-dev
    sudo apt-get install qt-sdk openjdk-8-jdk openjdk-8-jre  

    git clone https://github.com/PointCloudLibrary/pcl.git 

    mkdir build

 

    cd build

 

    cmake -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_GPU=ON  -DBUILD_CUDA=ON -DBUILD_OPENNI=ON -DBUILD_gpu_kinfu=ON -DBUILD_gpu-kinfu_large_scale=ON -DBUILD_apps=ON 

     -DBUILD_examples=ON -DCMAKE_INSTALL_PREFIX=/usr .. 

 

     make -j2         ###### Dot install anything when compling pcl, or you may occurre troubles
     sudo make install

 

4:Download and install OpenCV3.2 

    #####cuda8.0 and opencv3.2 are compatible. opencv3.2 and cuda9.0 are not.

    ####OpenCV3.2 : https://opencv.org/releases.html

    cd opencv3.2

    mkdir build

    cd build

    cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_CUDA=ON  -D                     WITH_OPENMP=ON -D WITH_QT=ON -D CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-8.0 -D CUDA_ARCH_BIN=5.0     -D WITH_GTK=ON -D WITH_VTK=OFF ..      

    #####-D WITH_VTK=OFF may not use. cuda may lead errors. so we can make cuda off , vtk off when errors                because of them.

     #####  -DCUDA_ARCH_BIN=5.0 5.0 is for GT940M, and 6.2 is for TX2. TX2 is so powerful!

     Nvidia GPU compute capability: https://blog.csdn.net/xiaxuesong666/article/details/79192162

5:Config xxxxlidar sdk env
   sudo apt-get install libproj-dev libpcap-dev libboost-all-dev libyaml-cpp-dev libjpeg-dev libgdal-dev libpq-dev              libvtk6-dev libvtk6-qt-dev libpcl-dev 

   if occurs error "'nullptr' was not declared in this scope", please :
   add two followings commands in ~/.bashrc and source it
   alias gcc='gcc -std=gnu++0x'
   alias g++='g++ -std=gnu++0x'

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值