From Documentation
Jump to: navigation, search
m (OpenCV: destination)
(Preliminaries)
 
(10 intermediate revisions by the same user not shown)
Line 5: Line 5:
  
 
===Preliminaries===
 
===Preliminaries===
 +
Make sure this is set for everything that follows:
  
 
  module unload intel
 
  module unload intel
 
  module unload mkl
 
  module unload mkl
 
  module unload openmpi
 
  module unload openmpi
 +
module load gcc/4.8.1
 
  export PATH=/home/ppomorsk/software_installs/cmake/2.8.12/gcc/installdir/bin:$PATH
 
  export PATH=/home/ppomorsk/software_installs/cmake/2.8.12/gcc/installdir/bin:$PATH
 +
 +
The last line makes my cmake install the default.  This is needed because the default system cmake is not recent enough.
  
 
===Installation of OpenNI===
 
===Installation of OpenNI===
Line 26: Line 30:
 
* comment out doc generation in Redist_OpenNi.py  as it seems to cause segfault  (#execute_check("doxygen Doxyfile > "+ SCRIPT_DIR + "/Output/EngineDoxy.txt", "Creating Documentation")    )
 
* comment out doc generation in Redist_OpenNi.py  as it seems to cause segfault  (#execute_check("doxygen Doxyfile > "+ SCRIPT_DIR + "/Output/EngineDoxy.txt", "Creating Documentation")    )
 
  ./RedistMaker
 
  ./RedistMaker
  cd ../Redist/OpenNI-Bin-Dev-Linux-x64-v1.5.2.23/
+
  cd ../Redist/OpenNI-Bin-Dev-Linux-x64-v1.5.8.5/
 
  mkdir -p /scratch/$USER/t21801/openni/usr/lib
 
  mkdir -p /scratch/$USER/t21801/openni/usr/lib
 
  mkdir -p /scratch/$USER/t21801/openni/usr/bin
 
  mkdir -p /scratch/$USER/t21801/openni/usr/bin
Line 41: Line 45:
  
 
  elseif(UNIX OR APPLE)
 
  elseif(UNIX OR APPLE)
     find_file(OPENNI_INCLUDES NAMES "XnCppWrapper.h" PATHS "$ENV{OPENNI_INCLUDE_DIR}" DOC "OpenNI c++ interface header")
+
     find_file(OPENNI_INCLUDES "XnCppWrapper.h" PATHS "$ENV{OPENNI_INCLUDE_DIR}" "/usr/include/ni" "/usr/include/openni" DOC "OpenNI c++ interface header")
     find_library(OPENNI_LIBRARY NAMES "OpenNI" PATHS "$ENV{OPENNI_LIB_DIR}"   DOC "OpenNI library")
+
     find_library(OPENNI_LIBRARY "OpenNI" PATHS "$ENV{OPENNI_LIB_DIR}" "/usr/lib" DOC "OpenNI library")
 
  endif()
 
  endif()
  
 
+
Define variables (these will be needed by PCL as well):
 
+
 
  export OPENNI_INCLUDE_DIR=/scratch/ppomorsk/t21801/openni/usr/include/ni
 
  export OPENNI_INCLUDE_DIR=/scratch/ppomorsk/t21801/openni/usr/include/ni
 
  export OPENNI_LIB_DIR=/scratch/ppomorsk/t21801/openni/usr/lib
 
  export OPENNI_LIB_DIR=/scratch/ppomorsk/t21801/openni/usr/lib
Line 54: Line 57:
 
cmake options (QT turned off to avoid compile errors):
 
cmake options (QT turned off to avoid compile errors):
  
 +
mkdir build
 +
cd build
 
  cmake -DWITH_XINE=ON -DWITH_OPENGL=ON -DWITH_TBB=ON -DBUILD_EXAMPLES=ON -DWITH_QT=ON -DBUILD_JPEG=ON -DBUILD_PNG=ON  
 
  cmake -DWITH_XINE=ON -DWITH_OPENGL=ON -DWITH_TBB=ON -DBUILD_EXAMPLES=ON -DWITH_QT=ON -DBUILD_JPEG=ON -DBUILD_PNG=ON  
 
  -DBUILD_TIFF=ON -DBUILD_opencv_gpu=ON -DWITH_CUDA=ON -DWITH_OPENNI=ON -DWITH_QT=OFF -DCUDA_GENERATION=Fermi  
 
  -DBUILD_TIFF=ON -DBUILD_opencv_gpu=ON -DWITH_CUDA=ON -DWITH_OPENNI=ON -DWITH_QT=OFF -DCUDA_GENERATION=Fermi  
  -DCMAKE_INSTALL_PREFIX/scratch/ppomorsk/t21801/usr/local ..
+
  -DCMAKE_INSTALL_PREFIX=/scratch/ppomorsk/t21801/usr/local ..
 +
 
 +
===PCL===
 +
 
 +
git clone https://github.com/PointCloudLibrary/pcl pcl-trunk
 +
cd pcl-trunk
 +
 
 +
 
 +
Modify: cmake/Modules/FindOpenNI.cmake
 +
 
 +
 
 +
 
 +
#add a hint so that it can find it without the pkg-config
 +
find_path(OPENNI_INCLUDE_DIR XnStatus.h
 +
          HINTS ${PC_OPENNI_INCLUDEDIR} ${PC_OPENNI_INCLUDE_DIRS} /usr/include/openni /usr/include/ni "${OPENNI_ROOT}" "$ENV{OPENNI_ROOT}"
 +
          PATHS "$ENV{OPENNI_INCLUDE_DIR}" "$ENV{OPEN_NI_INSTALL_PATH${OPENNI_SUFFIX}}/Include"
 +
          PATH_SUFFIXES openni include Include)
 +
#add a hint so that it can find it without the pkg-config
 +
find_library(OPENNI_LIBRARY
 +
            NAMES OpenNI${OPENNI_SUFFIX}
 +
            HINTS ${PC_OPENNI_LIBDIR} ${PC_OPENNI_LIBRARY_DIRS} /usr/lib "${OPENNI_ROOT}" "$ENV{OPENNI_ROOT}"
 +
            PATHS "$ENV{OPENNI_LIB_DIR}" "$ENV{OPEN_NI_LIB${OPENNI_SUFFIX}}"
 +
            PATH_SUFFIXES lib Lib Lib64)
 +
mkdir build && cd build
 +
 
 +
 
 +
 
 +
cmake -DBUILD_CUDA=ON -DBUILD_GPU=ON -DBoost_INCLUDE_DIR=/home/ppomorsk/software_installs/boost/gcc/1.51.0/installdir/include  -DCMAKE_BUILD_TYPE=Release ..
 +
make

Latest revision as of 17:41, 25 February 2014

Page with provisional install instructions.

Installing latest PCL on monk

Preliminaries

Make sure this is set for everything that follows:

module unload intel
module unload mkl
module unload openmpi
module load gcc/4.8.1
export PATH=/home/ppomorsk/software_installs/cmake/2.8.12/gcc/installdir/bin:$PATH

The last line makes my cmake install the default. This is needed because the default system cmake is not recent enough.

Installation of OpenNI

mkdir ~/kinect
cd ~/kinect
git clone https://github.com/OpenNI/OpenNI.git

And change the branch to unstable:

cd OpenNI
git checkout unstable

Run these lines to install OpenNI

cd Platform/Linux/CreateRedist/
chmod +x RedistMaker
  • comment out doc generation in Redist_OpenNi.py as it seems to cause segfault (#execute_check("doxygen Doxyfile > "+ SCRIPT_DIR + "/Output/EngineDoxy.txt", "Creating Documentation") )
./RedistMaker
cd ../Redist/OpenNI-Bin-Dev-Linux-x64-v1.5.8.5/
mkdir -p /scratch/$USER/t21801/openni/usr/lib
mkdir -p /scratch/$USER/t21801/openni/usr/bin
./install.sh  -c /scratch/$USER/t21801/openni

OpenCV

OpenCV

first, must fix oversight in cmake files

vi cmake/OpenCVFindOpenNI.cmake
elseif(UNIX OR APPLE)
   find_file(OPENNI_INCLUDES "XnCppWrapper.h" PATHS "$ENV{OPENNI_INCLUDE_DIR}" "/usr/include/ni" "/usr/include/openni" DOC "OpenNI c++ interface header")
   find_library(OPENNI_LIBRARY "OpenNI" PATHS "$ENV{OPENNI_LIB_DIR}"  "/usr/lib" DOC "OpenNI library")
endif()

Define variables (these will be needed by PCL as well):

export OPENNI_INCLUDE_DIR=/scratch/ppomorsk/t21801/openni/usr/include/ni
export OPENNI_LIB_DIR=/scratch/ppomorsk/t21801/openni/usr/lib


cmake options (QT turned off to avoid compile errors):

mkdir build
cd build
cmake -DWITH_XINE=ON -DWITH_OPENGL=ON -DWITH_TBB=ON -DBUILD_EXAMPLES=ON -DWITH_QT=ON -DBUILD_JPEG=ON -DBUILD_PNG=ON 
-DBUILD_TIFF=ON -DBUILD_opencv_gpu=ON -DWITH_CUDA=ON -DWITH_OPENNI=ON -DWITH_QT=OFF -DCUDA_GENERATION=Fermi 
-DCMAKE_INSTALL_PREFIX=/scratch/ppomorsk/t21801/usr/local ..

PCL

git clone https://github.com/PointCloudLibrary/pcl pcl-trunk 
cd pcl-trunk 


Modify: cmake/Modules/FindOpenNI.cmake


#add a hint so that it can find it without the pkg-config
find_path(OPENNI_INCLUDE_DIR XnStatus.h
         HINTS ${PC_OPENNI_INCLUDEDIR} ${PC_OPENNI_INCLUDE_DIRS} /usr/include/openni /usr/include/ni "${OPENNI_ROOT}" "$ENV{OPENNI_ROOT}"
         PATHS "$ENV{OPENNI_INCLUDE_DIR}" "$ENV{OPEN_NI_INSTALL_PATH${OPENNI_SUFFIX}}/Include"
         PATH_SUFFIXES openni include Include)
#add a hint so that it can find it without the pkg-config
find_library(OPENNI_LIBRARY
            NAMES OpenNI${OPENNI_SUFFIX}
            HINTS ${PC_OPENNI_LIBDIR} ${PC_OPENNI_LIBRARY_DIRS} /usr/lib "${OPENNI_ROOT}" "$ENV{OPENNI_ROOT}"
            PATHS "$ENV{OPENNI_LIB_DIR}" "$ENV{OPEN_NI_LIB${OPENNI_SUFFIX}}"
            PATH_SUFFIXES lib Lib Lib64)
mkdir build && cd build 


cmake -DBUILD_CUDA=ON -DBUILD_GPU=ON -DBoost_INCLUDE_DIR=/home/ppomorsk/software_installs/boost/gcc/1.51.0/installdir/include   -DCMAKE_BUILD_TYPE=Release ..
make