├── algorithm
├── eigen
│ ├── src
│ │ ├── SparseCore
│ │ │ ├── SparseAssign.h
│ │ │ ├── CMakeLists.txt
│ │ │ ├── SparseFuzzy.h
│ │ │ ├── SparseRedux.h
│ │ │ ├── CoreIterators.h
│ │ │ ├── SparseTranspose.h
│ │ │ └── SparseView.h
│ │ ├── Core
│ │ │ ├── util
│ │ │ │ ├── NonMPL2.h
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── ReenableStupidWarnings.h
│ │ │ │ └── DisableStupidWarnings.h
│ │ │ ├── arch
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── NEON
│ │ │ │ │ └── CMakeLists.txt
│ │ │ │ ├── SSE
│ │ │ │ │ └── CMakeLists.txt
│ │ │ │ ├── AltiVec
│ │ │ │ │ └── CMakeLists.txt
│ │ │ │ └── Default
│ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ └── Settings.h
│ │ │ ├── products
│ │ │ │ └── CMakeLists.txt
│ │ │ ├── CMakeLists.txt
│ │ │ ├── CoreIterators.h
│ │ │ └── ReturnByValue.h
│ │ ├── QR
│ │ │ ├── CMakeLists.txt
│ │ │ └── HouseholderQR_MKL.h
│ │ ├── SVD
│ │ │ └── CMakeLists.txt
│ │ ├── misc
│ │ │ ├── CMakeLists.txt
│ │ │ ├── Solve.h
│ │ │ ├── Kernel.h
│ │ │ └── Image.h
│ │ ├── Jacobi
│ │ │ └── CMakeLists.txt
│ │ ├── LU
│ │ │ ├── arch
│ │ │ │ └── CMakeLists.txt
│ │ │ └── CMakeLists.txt
│ │ ├── plugins
│ │ │ ├── CMakeLists.txt
│ │ │ ├── CommonCwiseBinaryOps.h
│ │ │ └── MatrixCwiseUnaryOps.h
│ │ ├── Cholesky
│ │ │ └── CMakeLists.txt
│ │ ├── SparseLU
│ │ │ ├── CMakeLists.txt
│ │ │ ├── SparseLU_Utils.h
│ │ │ └── SparseLU_relax_snode.h
│ │ ├── SparseQR
│ │ │ └── CMakeLists.txt
│ │ ├── Eigenvalues
│ │ │ └── CMakeLists.txt
│ │ ├── Householder
│ │ │ ├── CMakeLists.txt
│ │ │ └── BlockHouseholder.h
│ │ ├── StlSupport
│ │ │ ├── CMakeLists.txt
│ │ │ └── details.h
│ │ ├── MetisSupport
│ │ │ └── CMakeLists.txt
│ │ ├── SPQRSupport
│ │ │ └── CMakeLists.txt
│ │ ├── Geometry
│ │ │ ├── arch
│ │ │ │ └── CMakeLists.txt
│ │ │ └── CMakeLists.txt
│ │ ├── PaStiXSupport
│ │ │ └── CMakeLists.txt
│ │ ├── CholmodSupport
│ │ │ └── CMakeLists.txt
│ │ ├── PardisoSupport
│ │ │ └── CMakeLists.txt
│ │ ├── SparseCholesky
│ │ │ └── CMakeLists.txt
│ │ ├── SuperLUSupport
│ │ │ └── CMakeLists.txt
│ │ ├── UmfPackSupport
│ │ │ └── CMakeLists.txt
│ │ ├── OrderingMethods
│ │ │ └── CMakeLists.txt
│ │ ├── Eigen2Support
│ │ │ ├── Geometry
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ └── All.h
│ │ │ ├── CMakeLists.txt
│ │ │ ├── Macros.h
│ │ │ ├── TriangularSolver.h
│ │ │ ├── Memory.h
│ │ │ ├── QR.h
│ │ │ ├── Lazy.h
│ │ │ ├── MathFunctions.h
│ │ │ ├── VectorBlock.h
│ │ │ └── Meta.h
│ │ ├── IterativeLinearSolvers
│ │ │ └── CMakeLists.txt
│ │ └── CMakeLists.txt
│ ├── Eigen
│ ├── Dense
│ ├── Array
│ ├── Householder
│ ├── CMakeLists.txt
│ ├── Sparse
│ ├── Jacobi
│ ├── StdList
│ ├── QtAlignedMalloc
│ ├── MetisSupport
│ ├── LeastSquares
│ ├── StdDeque
│ ├── StdVector
│ ├── Cholesky
│ ├── PardisoSupport
│ ├── SVD
│ ├── SPQRSupport
│ ├── QR
│ ├── SparseQR
│ ├── LU
│ ├── UmfPackSupport
│ ├── Eigenvalues
│ ├── SparseCholesky
│ ├── PaStiXSupport
│ ├── IterativeLinearSolvers
│ ├── CholmodSupport
│ ├── Geometry
│ ├── SparseLU
│ ├── SparseCore
│ ├── SuperLUSupport
│ └── OrderingMethods
├── DynamicFusion
│ ├── CudaCholeskeySolver.cu
│ ├── SparseVolume.cu
│ ├── GpuHeap.h
│ ├── CudaUtil.cpp
│ ├── cudpp
│ │ ├── ModerGpuWrapper.h
│ │ ├── moderngpu
│ │ │ └── include
│ │ │ │ ├── kernels
│ │ │ │ └── cubradixsort.cuh
│ │ │ │ ├── moderngpu.cuh
│ │ │ │ ├── mgpuenums.h
│ │ │ │ └── util
│ │ │ │ └── mgpualloc.h
│ │ ├── ModerGpuWrapper.cu
│ │ └── thrust_wrapper.h
│ ├── cuda_utils.h
│ ├── VoxelHash
│ │ ├── chunk.h
│ │ ├── voxel_hashing_utils.cu
│ │ └── voxel_hashing_device.h
│ ├── GpuCholeSky.h
│ ├── kinect_util.cpp
│ ├── CpuGaussNewton.h
│ ├── RayCaster.h
│ ├── CudaCholeskeySolver.h
│ ├── MarchingCubes.h
│ ├── SparseVolume.h
│ ├── kinect_util.h
│ ├── CudaDiagBlockMatrix.h
│ ├── RayCaster.cpp
│ ├── TsdfVolume.h
│ ├── glsl
│ │ └── glslprogram.h
│ ├── CudaDiagBlockMatrix.cpp
│ └── MicrosoftKinect.h
├── FreeImage
│ ├── FreeImage.h
│ └── CFreeImage.h
├── mpu
│ ├── Convolution_Helper.cpp
│ └── MarchingCube.h
├── global_param.h
├── freeglut
│ ├── glut.h
│ └── freeglut.h
├── global_data_holder.h
├── BFGS
│ ├── BFGSFit.h
│ └── BFGSFit.cpp
├── Renderable
│ ├── GLNode.h
│ ├── AbstractMesh.cpp
│ ├── Renderable.h
│ └── AbstractMesh.h
├── kdtree
│ ├── AABB.cpp
│ ├── common.h
│ └── BSphere.h
├── global_data_holder.cpp
└── camera
│ └── Camera.h
├── dynamicfusionui.qrc
├── main.cpp
├── .gitignore
├── DynamicFusionUI.vcxproj.user
├── DepthViewer.h
├── DynamicFusionUI.sln
├── RayCastViewer.h
└── dynamicfusionui.h
/algorithm/eigen/src/SparseCore/SparseAssign.h:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/algorithm/eigen/Eigen:
--------------------------------------------------------------------------------
1 | #include "Dense"
2 | //#include "Sparse"
3 |
--------------------------------------------------------------------------------
/algorithm/DynamicFusion/CudaCholeskeySolver.cu:
--------------------------------------------------------------------------------
1 | #include "CudaCholeskeySolver.h"
--------------------------------------------------------------------------------
/algorithm/DynamicFusion/SparseVolume.cu:
--------------------------------------------------------------------------------
1 | #include "SparseVolume.h"
2 |
3 | namespace dfusion
4 | {
5 |
6 | }
--------------------------------------------------------------------------------
/dynamicfusionui.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/algorithm/FreeImage/FreeImage.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dolphin-li/DynamicFusion/HEAD/algorithm/FreeImage/FreeImage.h
--------------------------------------------------------------------------------
/algorithm/mpu/Convolution_Helper.cpp:
--------------------------------------------------------------------------------
1 | #include "Convolution_Helper.h"
2 |
3 | namespace conv_helper
4 | {
5 |
6 | }
--------------------------------------------------------------------------------
/algorithm/DynamicFusion/GpuHeap.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dolphin-li/DynamicFusion/HEAD/algorithm/DynamicFusion/GpuHeap.h
--------------------------------------------------------------------------------
/algorithm/eigen/src/Core/util/NonMPL2.h:
--------------------------------------------------------------------------------
1 | #ifdef EIGEN_MPL2_ONLY
2 | #error Including non-MPL2 code in EIGEN_MPL2_ONLY mode
3 | #endif
4 |
--------------------------------------------------------------------------------
/algorithm/global_param.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace global_param
4 | {
5 | const static float VOLUME_BAND_HALF_WIDTH = 5.f;
6 | }
--------------------------------------------------------------------------------
/algorithm/eigen/src/Core/arch/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | ADD_SUBDIRECTORY(SSE)
2 | ADD_SUBDIRECTORY(AltiVec)
3 | ADD_SUBDIRECTORY(NEON)
4 | ADD_SUBDIRECTORY(Default)
5 |
--------------------------------------------------------------------------------
/algorithm/eigen/Dense:
--------------------------------------------------------------------------------
1 | #include "Core"
2 | #include "LU"
3 | #include "Cholesky"
4 | #include "QR"
5 | #include "SVD"
6 | #include "Geometry"
7 | #include "Eigenvalues"
8 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/QR/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_QR_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_QR_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/QR COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/SVD/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_SVD_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_SVD_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SVD COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/misc/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_misc_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_misc_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/misc COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/Jacobi/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_Jacobi_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_Jacobi_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Jacobi COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/LU/arch/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_LU_arch_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_LU_arch_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/LU/arch COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/plugins/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_plugins_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_plugins_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/plugins COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/Cholesky/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_Cholesky_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_Cholesky_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Cholesky COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/SparseLU/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_SparseLU_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_SparseLU_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SparseLU COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/SparseQR/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_SparseQR_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_SparseQR_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SparseQR/ COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/Core/util/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_Core_util_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_Core_util_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/util COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/Eigenvalues/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_EIGENVALUES_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_EIGENVALUES_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Eigenvalues COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/Householder/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_Householder_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_Householder_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Householder COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/LU/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_LU_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_LU_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/LU COMPONENT Devel
6 | )
7 |
8 | ADD_SUBDIRECTORY(arch)
9 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/SparseCore/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_SparseCore_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_SparseCore_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SparseCore COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/StlSupport/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_StlSupport_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_StlSupport_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/StlSupport COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/MetisSupport/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_MetisSupport_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_MetisSupport_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/MetisSupport COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/SPQRSupport/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_SPQRSupport_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_SPQRSupport_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SPQRSupport/ COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/Core/arch/NEON/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_Core_arch_NEON_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_Core_arch_NEON_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/NEON COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/Core/arch/SSE/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_Core_arch_SSE_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_Core_arch_SSE_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/SSE COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/Core/products/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_Core_Product_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_Core_Product_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/products COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/Geometry/arch/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_Geometry_arch_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_Geometry_arch_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Geometry/arch COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/PaStiXSupport/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_PastixSupport_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_PastixSupport_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/PaStiXSupport COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/main.cpp:
--------------------------------------------------------------------------------
1 | #include "dynamicfusionui.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | DynamicFusionUI w;
8 | w.show();
9 | return a.exec();
10 | }
11 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/CholmodSupport/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_CholmodSupport_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_CholmodSupport_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/CholmodSupport COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/PardisoSupport/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_PardisoSupport_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_PardisoSupport_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/PardisoSupport COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/SparseCholesky/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_SparseCholesky_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_SparseCholesky_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SparseCholesky COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/SuperLUSupport/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_SuperLUSupport_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_SuperLUSupport_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SuperLUSupport COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/UmfPackSupport/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_UmfPackSupport_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_UmfPackSupport_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/UmfPackSupport COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/OrderingMethods/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_OrderingMethods_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_OrderingMethods_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/OrderingMethods COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/Core/arch/AltiVec/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_Core_arch_AltiVec_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_Core_arch_AltiVec_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/AltiVec COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/Core/arch/Default/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_Core_arch_Default_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_Core_arch_Default_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/Default COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/Geometry/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_Geometry_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_Geometry_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Geometry COMPONENT Devel
6 | )
7 |
8 | ADD_SUBDIRECTORY(arch)
9 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/Eigen2Support/Geometry/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_Eigen2Support_Geometry_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_Eigen2Support_Geometry_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Eigen2Support/Geometry
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/Eigen2Support/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_Eigen2Support_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_Eigen2Support_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Eigen2Support COMPONENT Devel
6 | )
7 |
8 | ADD_SUBDIRECTORY(Geometry)
--------------------------------------------------------------------------------
/algorithm/eigen/src/IterativeLinearSolvers/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_IterativeLinearSolvers_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_IterativeLinearSolvers_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/IterativeLinearSolvers COMPONENT Devel
6 | )
7 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/Core/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | FILE(GLOB Eigen_Core_SRCS "*.h")
2 |
3 | INSTALL(FILES
4 | ${Eigen_Core_SRCS}
5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core COMPONENT Devel
6 | )
7 |
8 | ADD_SUBDIRECTORY(products)
9 | ADD_SUBDIRECTORY(util)
10 | ADD_SUBDIRECTORY(arch)
11 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | file(GLOB Eigen_src_subdirectories "*")
2 | escape_string_as_regex(ESCAPED_CMAKE_CURRENT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
3 | foreach(f ${Eigen_src_subdirectories})
4 | if(NOT f MATCHES "\\.txt" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/[.].+" )
5 | add_subdirectory(${f})
6 | endif()
7 | endforeach()
8 |
--------------------------------------------------------------------------------
/algorithm/eigen/Array:
--------------------------------------------------------------------------------
1 | #ifndef EIGEN_ARRAY_MODULE_H
2 | #define EIGEN_ARRAY_MODULE_H
3 |
4 | // include Core first to handle Eigen2 support macros
5 | #include "Core"
6 |
7 | #ifndef EIGEN2_SUPPORT
8 | #error The Eigen/Array header does no longer exist in Eigen3. All that functionality has moved to Eigen/Core.
9 | #endif
10 |
11 | #endif // EIGEN_ARRAY_MODULE_H
12 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/Core/util/ReenableStupidWarnings.h:
--------------------------------------------------------------------------------
1 | #ifdef EIGEN_WARNINGS_DISABLED
2 | #undef EIGEN_WARNINGS_DISABLED
3 |
4 | #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
5 | #ifdef _MSC_VER
6 | #pragma warning( pop )
7 | #elif defined __INTEL_COMPILER
8 | #pragma warning pop
9 | #elif defined __clang__
10 | #pragma clang diagnostic pop
11 | #endif
12 | #endif
13 |
14 | #endif // EIGEN_WARNINGS_DISABLED
15 |
--------------------------------------------------------------------------------
/algorithm/DynamicFusion/CudaUtil.cpp:
--------------------------------------------------------------------------------
1 | #include "cuda_utils.h"
2 | #include
3 | void ___cudaSafeCall(cudaError_t err, const char* msg)
4 | {
5 | //// debug
6 | //err = cudaThreadSynchronize();
7 | //if (cudaSuccess != err){
8 | // printf("CUDA error1(%s): %s\n", msg, cudaGetErrorString(err));
9 | // exit(-1);
10 | //}
11 | //// end debug
12 |
13 | if (cudaSuccess != err){
14 | printf("CUDA error(%s): %s\n", msg, cudaGetErrorString(err));
15 | exit(-1);
16 | }
17 | }
--------------------------------------------------------------------------------
/algorithm/DynamicFusion/cudpp/ModerGpuWrapper.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace modergpu_wrapper
4 | {
5 | void mergesort(int* val, int count);
6 | void mergesort(float* val, int count);
7 | void mergesort_by_key(int* keys_global, int* values_global, int count);
8 | void mergesort_by_key(int* keys_global, float* values_global, int count);
9 | void mergesort_by_key(float* keys_global, int* values_global, int count);
10 | void mergesort_by_key(float* keys_global, float* values_global, int count);
11 | void mergesort_by_key(int* keys_global, float4* values_global, int count);
12 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # folders
2 | data/*
3 | tmp/*
4 | GeneratedFiles/*
5 |
6 | # Compiled Object files
7 | *.slo
8 | *.lo
9 | *.o
10 | *.obj
11 | *.sdf
12 | *.opensdf
13 | *.suo
14 | *.pdb
15 | *.ilk
16 |
17 | # Precompiled Headers
18 | *.gch
19 | *.pch
20 |
21 | # Compiled Dynamic libraries
22 | *.so
23 | *.dylib
24 | *.dll
25 |
26 | # Fortran module files
27 | *.mod
28 |
29 | # Compiled Static libraries
30 | *.lai
31 | *.la
32 | *.a
33 | *.lib
34 |
35 | # Executables
36 | *.exe
37 | *.out
38 | *.app
39 |
40 | # Data Files
41 | *.depth
42 | *.fdepth
43 | *.png
44 | *.dvol
45 | *.cvol
46 | *.dfusion
47 | *.hfdvol
--------------------------------------------------------------------------------
/algorithm/eigen/Householder:
--------------------------------------------------------------------------------
1 | #ifndef EIGEN_HOUSEHOLDER_MODULE_H
2 | #define EIGEN_HOUSEHOLDER_MODULE_H
3 |
4 | #include "Core"
5 |
6 | #include "src/Core/util/DisableStupidWarnings.h"
7 |
8 | /** \defgroup Householder_Module Householder module
9 | * This module provides Householder transformations.
10 | *
11 | * \code
12 | * #include
13 | * \endcode
14 | */
15 |
16 | #include "src/Householder/Householder.h"
17 | #include "src/Householder/HouseholderSequence.h"
18 | #include "src/Householder/BlockHouseholder.h"
19 |
20 | #include "src/Core/util/ReenableStupidWarnings.h"
21 |
22 | #endif // EIGEN_HOUSEHOLDER_MODULE_H
23 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */
24 |
--------------------------------------------------------------------------------
/algorithm/eigen/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | include(RegexUtils)
2 | test_escape_string_as_regex()
3 |
4 | file(GLOB Eigen_directory_files "*")
5 |
6 | escape_string_as_regex(ESCAPED_CMAKE_CURRENT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
7 |
8 | foreach(f ${Eigen_directory_files})
9 | if(NOT f MATCHES "\\.txt" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/[.].+" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/src")
10 | list(APPEND Eigen_directory_files_to_install ${f})
11 | endif()
12 | endforeach(f ${Eigen_directory_files})
13 |
14 | install(FILES
15 | ${Eigen_directory_files_to_install}
16 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen COMPONENT Devel
17 | )
18 |
19 | add_subdirectory(src)
20 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/Eigen2Support/Macros.h:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // Copyright (C) 2011 Benoit Jacob
5 | //
6 | // This Source Code Form is subject to the terms of the Mozilla
7 | // Public License v. 2.0. If a copy of the MPL was not distributed
8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 |
10 | #ifndef EIGEN2_MACROS_H
11 | #define EIGEN2_MACROS_H
12 |
13 | #define ei_assert eigen_assert
14 | #define ei_internal_assert eigen_internal_assert
15 |
16 | #define EIGEN_ALIGN_128 EIGEN_ALIGN16
17 |
18 | #define EIGEN_ARCH_WANTS_ALIGNMENT EIGEN_ALIGN_STATICALLY
19 |
20 | #endif // EIGEN2_MACROS_H
21 |
--------------------------------------------------------------------------------
/algorithm/DynamicFusion/cuda_utils.h:
--------------------------------------------------------------------------------
1 | /***********************************************************/
2 | /** \file
3 | \brief cuda utils used by Kinect Fusion
4 | \details
5 | \author Yizhong Zhang
6 | \date 11/13/2013
7 | */
8 | /***********************************************************/
9 | #ifndef __CUDA_UTILS_H__
10 | #define __CUDA_UTILS_H__
11 |
12 | #include
13 | #include
14 | #include "cuda_runtime_api.h"
15 | #pragma comment(lib, "cudart.lib")
16 |
17 |
18 | #define cudaSafeCall ___cudaSafeCall
19 |
20 |
21 | void ___cudaSafeCall(cudaError_t err, const char* msg = NULL);
22 |
23 | static inline int divUp(int total, int grain) { return (total + grain - 1) / grain; }
24 |
25 |
26 |
27 | #endif
--------------------------------------------------------------------------------
/algorithm/eigen/Sparse:
--------------------------------------------------------------------------------
1 | #ifndef EIGEN_SPARSE_MODULE_H
2 | #define EIGEN_SPARSE_MODULE_H
3 |
4 | /** \defgroup Sparse_Module Sparse meta-module
5 | *
6 | * Meta-module including all related modules:
7 | * - \ref SparseCore_Module
8 | * - \ref OrderingMethods_Module
9 | * - \ref SparseCholesky_Module
10 | * - \ref SparseLU_Module
11 | * - \ref SparseQR_Module
12 | * - \ref IterativeLinearSolvers_Module
13 | *
14 | * \code
15 | * #include
16 | * \endcode
17 | */
18 |
19 | #include "SparseCore"
20 | #include "OrderingMethods"
21 | #include "SparseCholesky"
22 | #include "SparseLU"
23 | #include "SparseQR"
24 | #include "IterativeLinearSolvers"
25 |
26 | #endif // EIGEN_SPARSE_MODULE_H
27 |
28 |
--------------------------------------------------------------------------------
/algorithm/freeglut/glut.h:
--------------------------------------------------------------------------------
1 | #ifndef __GLUT_H__
2 | #define __GLUT_H__
3 |
4 | /*
5 | * glut.h
6 | *
7 | * The freeglut library include file
8 | *
9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
10 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
11 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
12 | * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
13 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
14 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15 | */
16 |
17 | #include "freeglut_std.h"
18 |
19 | /*** END OF FILE ***/
20 |
21 | #endif /* __GLUT_H__ */
22 |
--------------------------------------------------------------------------------
/DynamicFusionUI.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D:\Qt\Qt5.3.1\5.3\msvc2013_64_opengl
6 | PATH=$(QTDIR)\bin%3b$(PATH)
7 | Auto
8 |
9 |
10 | D:\Qt\Qt5.3.1\5.3\msvc2013_64_opengl
11 | PATH=$(QTDIR)\bin%3b$(PATH)
12 |
13 |
--------------------------------------------------------------------------------
/algorithm/DynamicFusion/VoxelHash/chunk.h:
--------------------------------------------------------------------------------
1 | /***********************************************************/
2 | /** \file
3 | \brief data structure for chunk
4 | \details
5 | \author Yizhong Zhang
6 | \date 12/12/2013
7 | */
8 | /***********************************************************/
9 | #ifndef __CHUNK_H__
10 | #define __CHUNK_H__
11 |
12 | #include
13 | #include "voxel_hashing_internal.h"
14 |
15 |
16 | class Chunk{
17 | public:
18 | std::vector hash_entry;
19 | std::list voxel_block;
20 |
21 | public:
22 | inline void AddData(const HashEntry& entry, const VoxelBlock& block){
23 | hash_entry.push_back(entry);
24 | voxel_block.push_back(block);
25 | }
26 | };
27 |
28 |
29 |
30 |
31 | #endif // __CHUNK_H__
--------------------------------------------------------------------------------
/algorithm/eigen/Jacobi:
--------------------------------------------------------------------------------
1 | #ifndef EIGEN_JACOBI_MODULE_H
2 | #define EIGEN_JACOBI_MODULE_H
3 |
4 | #include "Core"
5 |
6 | #include "src/Core/util/DisableStupidWarnings.h"
7 |
8 | /** \defgroup Jacobi_Module Jacobi module
9 | * This module provides Jacobi and Givens rotations.
10 | *
11 | * \code
12 | * #include
13 | * \endcode
14 | *
15 | * In addition to listed classes, it defines the two following MatrixBase methods to apply a Jacobi or Givens rotation:
16 | * - MatrixBase::applyOnTheLeft()
17 | * - MatrixBase::applyOnTheRight().
18 | */
19 |
20 | #include "src/Jacobi/Jacobi.h"
21 |
22 | #include "src/Core/util/ReenableStupidWarnings.h"
23 |
24 | #endif // EIGEN_JACOBI_MODULE_H
25 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */
26 |
27 |
--------------------------------------------------------------------------------
/algorithm/freeglut/freeglut.h:
--------------------------------------------------------------------------------
1 | #ifndef __FREEGLUT_H__
2 | #define __FREEGLUT_H__
3 |
4 | /*
5 | * freeglut.h
6 | *
7 | * The freeglut library include file
8 | *
9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
10 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
11 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
12 | * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
13 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
14 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15 | */
16 |
17 | #include "freeglut_std.h"
18 | #include "freeglut_ext.h"
19 |
20 | /*** END OF FILE ***/
21 |
22 | #endif /* __FREEGLUT_H__ */
23 |
--------------------------------------------------------------------------------
/algorithm/eigen/StdList:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // Copyright (C) 2009 Hauke Heibel
5 | //
6 | // This Source Code Form is subject to the terms of the Mozilla
7 | // Public License v. 2.0. If a copy of the MPL was not distributed
8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 |
10 | #ifndef EIGEN_STDLIST_MODULE_H
11 | #define EIGEN_STDLIST_MODULE_H
12 |
13 | #include "Core"
14 | #include
15 |
16 | #if (defined(_MSC_VER) && defined(_WIN64)) /* MSVC auto aligns in 64 bit builds */
17 |
18 | #define EIGEN_DEFINE_STL_LIST_SPECIALIZATION(...)
19 |
20 | #else
21 |
22 | #include "src/StlSupport/StdList.h"
23 |
24 | #endif
25 |
26 | #endif // EIGEN_STDLIST_MODULE_H
27 |
--------------------------------------------------------------------------------
/algorithm/eigen/QtAlignedMalloc:
--------------------------------------------------------------------------------
1 |
2 | #ifndef EIGEN_QTMALLOC_MODULE_H
3 | #define EIGEN_QTMALLOC_MODULE_H
4 |
5 | #include "Core"
6 |
7 | #if (!EIGEN_MALLOC_ALREADY_ALIGNED)
8 |
9 | #include "src/Core/util/DisableStupidWarnings.h"
10 |
11 | void *qMalloc(size_t size)
12 | {
13 | return Eigen::internal::aligned_malloc(size);
14 | }
15 |
16 | void qFree(void *ptr)
17 | {
18 | Eigen::internal::aligned_free(ptr);
19 | }
20 |
21 | void *qRealloc(void *ptr, size_t size)
22 | {
23 | void* newPtr = Eigen::internal::aligned_malloc(size);
24 | memcpy(newPtr, ptr, size);
25 | Eigen::internal::aligned_free(ptr);
26 | return newPtr;
27 | }
28 |
29 | #include "src/Core/util/ReenableStupidWarnings.h"
30 |
31 | #endif
32 |
33 | #endif // EIGEN_QTMALLOC_MODULE_H
34 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */
35 |
--------------------------------------------------------------------------------
/algorithm/eigen/MetisSupport:
--------------------------------------------------------------------------------
1 | #ifndef EIGEN_METISSUPPORT_MODULE_H
2 | #define EIGEN_METISSUPPORT_MODULE_H
3 |
4 | #include "SparseCore"
5 |
6 | #include "src/Core/util/DisableStupidWarnings.h"
7 |
8 | extern "C" {
9 | #include
10 | }
11 |
12 |
13 | /** \ingroup Support_modules
14 | * \defgroup MetisSupport_Module MetisSupport module
15 | *
16 | * \code
17 | * #include
18 | * \endcode
19 | * This module defines an interface to the METIS reordering package (http://glaros.dtc.umn.edu/gkhome/views/metis).
20 | * It can be used just as any other built-in method as explained in \link OrderingMethods_Module here. \endlink
21 | */
22 |
23 |
24 | #include "src/MetisSupport/MetisSupport.h"
25 |
26 | #include "src/Core/util/ReenableStupidWarnings.h"
27 |
28 | #endif // EIGEN_METISSUPPORT_MODULE_H
29 |
--------------------------------------------------------------------------------
/DepthViewer.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "Camera.h"
5 | #include "kinect_util.h"
6 | class DepthViewer : public QGLWidget
7 | {
8 | Q_OBJECT
9 |
10 | public:
11 | DepthViewer(QWidget *parent);
12 | ~DepthViewer();
13 |
14 | void setImage_h(const dfusion::depthtype* image_h, int w, int h);
15 | void setImage_d(PtrStepSz image_d);
16 | void setNormal_d(const dfusion::MapArr& image_d);
17 |
18 | void download_currentmap(std::vector& hostmap);
19 |
20 | void initializeGL();
21 | void resizeGL(int w, int h);
22 | void paintGL();
23 | protected:
24 | QGLFunctions *m_gl_func;
25 | GLuint m_texture_id;
26 | Camera m_camera;
27 | std::vector m_depthColors_h;
28 |
29 | PtrStepSz m_pbo_buffer;
30 | GLuint m_pbo_id;
31 | cudaGraphicsResource* m_pbo_cuda_res;
32 | };
--------------------------------------------------------------------------------
/algorithm/DynamicFusion/GpuCholeSky.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace gpu_cholesky
4 | {
5 | void cholesky(float * A, int n_rows);
6 |
7 | // batched cholesky decomposition of PSD matrix:
8 | // ptr: input/output, only the lower triangular part is read and wrote.
9 | void single_thread_LtL_batched(float* outputLLt, int strideLLt,
10 | const float *inputL, int strideL, int nMatRowCol, int batchSize);
11 |
12 | // batched triangular matrix inverse of Lower part:
13 | // ptr: input/output, only the lower triangular part is read and wrote.
14 | void single_thread_tril_inv_batched(float *ptr, int nMatRowCol, int stride, int batchSize);
15 |
16 | // batched triangular matrix multiplication: L'*L
17 | // ptr: input/output, only the lower triangular part is read and wrote.
18 | void single_thread_cholesky_batched(float *ptr, int nMatRowCol, int stride, int batchSize);
19 | }
--------------------------------------------------------------------------------
/algorithm/eigen/LeastSquares:
--------------------------------------------------------------------------------
1 | #ifndef EIGEN_REGRESSION_MODULE_H
2 | #define EIGEN_REGRESSION_MODULE_H
3 |
4 | #ifndef EIGEN2_SUPPORT
5 | #error LeastSquares is only available in Eigen2 support mode (define EIGEN2_SUPPORT)
6 | #endif
7 |
8 | // exclude from normal eigen3-only documentation
9 | #ifdef EIGEN2_SUPPORT
10 |
11 | #include "Core"
12 |
13 | #include "src/Core/util/DisableStupidWarnings.h"
14 |
15 | #include "Eigenvalues"
16 | #include "Geometry"
17 |
18 | /** \defgroup LeastSquares_Module LeastSquares module
19 | * This module provides linear regression and related features.
20 | *
21 | * \code
22 | * #include
23 | * \endcode
24 | */
25 |
26 | #include "src/Eigen2Support/LeastSquares.h"
27 |
28 | #include "src/Core/util/ReenableStupidWarnings.h"
29 |
30 | #endif // EIGEN2_SUPPORT
31 |
32 | #endif // EIGEN_REGRESSION_MODULE_H
33 |
--------------------------------------------------------------------------------
/algorithm/eigen/StdDeque:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // Copyright (C) 2009 Gael Guennebaud
5 | // Copyright (C) 2009 Hauke Heibel
6 | //
7 | // This Source Code Form is subject to the terms of the Mozilla
8 | // Public License v. 2.0. If a copy of the MPL was not distributed
9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 |
11 | #ifndef EIGEN_STDDEQUE_MODULE_H
12 | #define EIGEN_STDDEQUE_MODULE_H
13 |
14 | #include "Core"
15 | #include
16 |
17 | #if (defined(_MSC_VER) && defined(_WIN64)) /* MSVC auto aligns in 64 bit builds */
18 |
19 | #define EIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(...)
20 |
21 | #else
22 |
23 | #include "src/StlSupport/StdDeque.h"
24 |
25 | #endif
26 |
27 | #endif // EIGEN_STDDEQUE_MODULE_H
28 |
--------------------------------------------------------------------------------
/algorithm/eigen/StdVector:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // Copyright (C) 2009 Gael Guennebaud
5 | // Copyright (C) 2009 Hauke Heibel
6 | //
7 | // This Source Code Form is subject to the terms of the Mozilla
8 | // Public License v. 2.0. If a copy of the MPL was not distributed
9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 |
11 | #ifndef EIGEN_STDVECTOR_MODULE_H
12 | #define EIGEN_STDVECTOR_MODULE_H
13 |
14 | #include "Core"
15 | #include
16 |
17 | #if (defined(_MSC_VER) && defined(_WIN64)) /* MSVC auto aligns in 64 bit builds */
18 |
19 | #define EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(...)
20 |
21 | #else
22 |
23 | #include "src/StlSupport/StdVector.h"
24 |
25 | #endif
26 |
27 | #endif // EIGEN_STDVECTOR_MODULE_H
28 |
--------------------------------------------------------------------------------
/algorithm/DynamicFusion/kinect_util.cpp:
--------------------------------------------------------------------------------
1 | #include "kinect_util.h"
2 | #include "ObjMesh.h"
3 | namespace dfusion
4 | {
5 | void mapsToObj(ObjMesh& mesh, const dfusion::MapArr& vmap, const dfusion::MapArr& nmap)
6 | {
7 | int w = vmap.cols();
8 | int h = vmap.rows();
9 | int n = w*h;
10 | std::vector vhost(n), nhost(n);
11 | vmap.download(vhost.data(), w*sizeof(float4));
12 | nmap.download(nhost.data(), w*sizeof(float4));
13 |
14 | mesh.clear();
15 | mesh.vertex_list.resize(n);
16 | mesh.vertex_normal_list.resize(n);
17 |
18 | for (int i = 0; i < n; i++)
19 | {
20 | mesh.vertex_list[i][0] = vhost[i].x;
21 | mesh.vertex_list[i][1] = vhost[i].y;
22 | mesh.vertex_list[i][2] = vhost[i].z;
23 | mesh.vertex_normal_list[i][0] = nhost[i].x;
24 | mesh.vertex_normal_list[i][1] = vhost[i].y;
25 | mesh.vertex_normal_list[i][2] = vhost[i].z;
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/algorithm/DynamicFusion/CpuGaussNewton.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "definations.h"
3 | #include "DynamicFusionParam.h"
4 | namespace dfusion
5 | {
6 | class WarpField;
7 | struct EigenContainter;
8 | class CpuGaussNewton
9 | {
10 | public:
11 | CpuGaussNewton();
12 | ~CpuGaussNewton();
13 |
14 | void init(WarpField* pWarpField, const MapArr& vmap_cano, const MapArr& nmap_cano,
15 | Param param, Intr intr);
16 |
17 | void findCorr(const MapArr& vmap_live, const MapArr& nmap_live,
18 | const MapArr& vmap_warp, const MapArr& nmap_warp);
19 |
20 | void solve(bool factor_rigid_out = true);
21 |
22 | void debug_set_init_x(const float* x_host, int n);
23 | protected:
24 | private:
25 | WarpField* m_pWarpField;
26 | EigenContainter* m_egc;
27 | DeviceArray2D m_vmapKnn;
28 | DeviceArray m_twist;
29 | DeviceArray m_vw;
30 | DeviceArray m_nodesKnn;
31 | };
32 | }
--------------------------------------------------------------------------------
/algorithm/eigen/Cholesky:
--------------------------------------------------------------------------------
1 | #ifndef EIGEN_CHOLESKY_MODULE_H
2 | #define EIGEN_CHOLESKY_MODULE_H
3 |
4 | #include "Core"
5 |
6 | #include "src/Core/util/DisableStupidWarnings.h"
7 |
8 | /** \defgroup Cholesky_Module Cholesky module
9 | *
10 | *
11 | *
12 | * This module provides two variants of the Cholesky decomposition for selfadjoint (hermitian) matrices.
13 | * Those decompositions are accessible via the following MatrixBase methods:
14 | * - MatrixBase::llt(),
15 | * - MatrixBase::ldlt()
16 | *
17 | * \code
18 | * #include
19 | * \endcode
20 | */
21 |
22 | #include "src/misc/Solve.h"
23 | #include "src/Cholesky/LLT.h"
24 | #include "src/Cholesky/LDLT.h"
25 | #ifdef EIGEN_USE_LAPACKE
26 | #include "src/Cholesky/LLT_MKL.h"
27 | #endif
28 |
29 | #include "src/Core/util/ReenableStupidWarnings.h"
30 |
31 | #endif // EIGEN_CHOLESKY_MODULE_H
32 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */
33 |
--------------------------------------------------------------------------------
/algorithm/DynamicFusion/RayCaster.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "definations.h"
4 |
5 | class Camera;
6 |
7 | namespace dfusion
8 | {
9 | class TsdfVolume;
10 | class RayCaster
11 | {
12 | public:
13 | RayCaster();
14 | ~RayCaster();
15 |
16 | void init(const TsdfVolume& v);
17 |
18 | void setCamera(const Camera& cam);
19 |
20 | // host_gray_buffer: pre-allocated, size = viewport width*height defined by the camera
21 | // host_step: strides of each row in bytes
22 | void shading(LightSource light, ColorMap& colorMap, bool show_normal_map=false);
23 |
24 | void clear();
25 |
26 | const MapArr* get_vmap()const{ return &m_vmap; }
27 | const MapArr* get_nmap()const{ return &m_nmap; }
28 | protected:
29 | void raycast();
30 | private:
31 | const TsdfVolume* m_volume;
32 | Intr m_intr;
33 | Mat33 m_Rc2v;
34 | float3 m_tc2v;
35 | Mat33 m_Rv2c;
36 | float3 m_tv2c;
37 |
38 | MapArr m_vmap;
39 | MapArr m_nmap;
40 | };
41 |
42 | }
--------------------------------------------------------------------------------
/algorithm/eigen/PardisoSupport:
--------------------------------------------------------------------------------
1 | #ifndef EIGEN_PARDISOSUPPORT_MODULE_H
2 | #define EIGEN_PARDISOSUPPORT_MODULE_H
3 |
4 | #include "SparseCore"
5 |
6 | #include "src/Core/util/DisableStupidWarnings.h"
7 |
8 | #include
9 |
10 | #include
11 |
12 | /** \ingroup Support_modules
13 | * \defgroup PardisoSupport_Module PardisoSupport module
14 | *
15 | * This module brings support for the Intel(R) MKL PARDISO direct sparse solvers.
16 | *
17 | * \code
18 | * #include
19 | * \endcode
20 | *
21 | * In order to use this module, the MKL headers must be accessible from the include paths, and your binary must be linked to the MKL library and its dependencies.
22 | * See this \ref TopicUsingIntelMKL "page" for more information on MKL-Eigen integration.
23 | *
24 | */
25 |
26 | #include "src/PardisoSupport/PardisoSupport.h"
27 |
28 | #include "src/Core/util/ReenableStupidWarnings.h"
29 |
30 | #endif // EIGEN_PARDISOSUPPORT_MODULE_H
31 |
--------------------------------------------------------------------------------
/algorithm/eigen/SVD:
--------------------------------------------------------------------------------
1 | #ifndef EIGEN_SVD_MODULE_H
2 | #define EIGEN_SVD_MODULE_H
3 |
4 | #include "QR"
5 | #include "Householder"
6 | #include "Jacobi"
7 |
8 | #include "src/Core/util/DisableStupidWarnings.h"
9 |
10 | /** \defgroup SVD_Module SVD module
11 | *
12 | *
13 | *
14 | * This module provides SVD decomposition for matrices (both real and complex).
15 | * This decomposition is accessible via the following MatrixBase method:
16 | * - MatrixBase::jacobiSvd()
17 | *
18 | * \code
19 | * #include
20 | * \endcode
21 | */
22 |
23 | #include "src/misc/Solve.h"
24 | #include "src/SVD/JacobiSVD.h"
25 | #if defined(EIGEN_USE_LAPACKE) && !defined(EIGEN_USE_LAPACKE_STRICT)
26 | #include "src/SVD/JacobiSVD_MKL.h"
27 | #endif
28 | #include "src/SVD/UpperBidiagonalization.h"
29 |
30 | #ifdef EIGEN2_SUPPORT
31 | #include "src/Eigen2Support/SVD.h"
32 | #endif
33 |
34 | #include "src/Core/util/ReenableStupidWarnings.h"
35 |
36 | #endif // EIGEN_SVD_MODULE_H
37 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */
38 |
--------------------------------------------------------------------------------
/algorithm/eigen/SPQRSupport:
--------------------------------------------------------------------------------
1 | #ifndef EIGEN_SPQRSUPPORT_MODULE_H
2 | #define EIGEN_SPQRSUPPORT_MODULE_H
3 |
4 | #include "SparseCore"
5 |
6 | #include "src/Core/util/DisableStupidWarnings.h"
7 |
8 | #include "SuiteSparseQR.hpp"
9 |
10 | /** \ingroup Support_modules
11 | * \defgroup SPQRSupport_Module SuiteSparseQR module
12 | *
13 | * This module provides an interface to the SPQR library, which is part of the suitesparse package.
14 | *
15 | * \code
16 | * #include
17 | * \endcode
18 | *
19 | * In order to use this module, the SPQR headers must be accessible from the include paths, and your binary must be linked to the SPQR library and its dependencies (Cholmod, AMD, COLAMD,...).
20 | * For a cmake based project, you can use our FindSPQR.cmake and FindCholmod.Cmake modules
21 | *
22 | */
23 |
24 | #include "src/misc/Solve.h"
25 | #include "src/misc/SparseSolve.h"
26 | #include "src/CholmodSupport/CholmodSupport.h"
27 | #include "src/SPQRSupport/SuiteSparseQRSupport.h"
28 |
29 | #endif
30 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/SparseCore/SparseFuzzy.h:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // Copyright (C) 2008 Gael Guennebaud
5 | //
6 | // This Source Code Form is subject to the terms of the Mozilla
7 | // Public License v. 2.0. If a copy of the MPL was not distributed
8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 |
10 | #ifndef EIGEN_SPARSE_FUZZY_H
11 | #define EIGEN_SPARSE_FUZZY_H
12 |
13 | // template
14 | // template
15 | // bool SparseMatrixBase::isApprox(
16 | // const OtherDerived& other,
17 | // typename NumTraits::Real prec
18 | // ) const
19 | // {
20 | // const typename internal::nested::type nested(derived());
21 | // const typename internal::nested::type otherNested(other.derived());
22 | // return (nested - otherNested).cwise().abs2().sum()
23 | // <= prec * prec * (std::min)(nested.cwise().abs2().sum(), otherNested.cwise().abs2().sum());
24 | // }
25 |
26 | #endif // EIGEN_SPARSE_FUZZY_H
27 |
--------------------------------------------------------------------------------
/algorithm/eigen/QR:
--------------------------------------------------------------------------------
1 | #ifndef EIGEN_QR_MODULE_H
2 | #define EIGEN_QR_MODULE_H
3 |
4 | #include "Core"
5 |
6 | #include "src/Core/util/DisableStupidWarnings.h"
7 |
8 | #include "Cholesky"
9 | #include "Jacobi"
10 | #include "Householder"
11 |
12 | /** \defgroup QR_Module QR module
13 | *
14 | *
15 | *
16 | * This module provides various QR decompositions
17 | * This module also provides some MatrixBase methods, including:
18 | * - MatrixBase::qr(),
19 | *
20 | * \code
21 | * #include
22 | * \endcode
23 | */
24 |
25 | #include "src/misc/Solve.h"
26 | #include "src/QR/HouseholderQR.h"
27 | #include "src/QR/FullPivHouseholderQR.h"
28 | #include "src/QR/ColPivHouseholderQR.h"
29 | #ifdef EIGEN_USE_LAPACKE
30 | #include "src/QR/HouseholderQR_MKL.h"
31 | #include "src/QR/ColPivHouseholderQR_MKL.h"
32 | #endif
33 |
34 | #ifdef EIGEN2_SUPPORT
35 | #include "src/Eigen2Support/QR.h"
36 | #endif
37 |
38 | #include "src/Core/util/ReenableStupidWarnings.h"
39 |
40 | #ifdef EIGEN2_SUPPORT
41 | #include "Eigenvalues"
42 | #endif
43 |
44 | #endif // EIGEN_QR_MODULE_H
45 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */
46 |
--------------------------------------------------------------------------------
/algorithm/eigen/SparseQR:
--------------------------------------------------------------------------------
1 | #ifndef EIGEN_SPARSEQR_MODULE_H
2 | #define EIGEN_SPARSEQR_MODULE_H
3 |
4 | #include "SparseCore"
5 | #include "OrderingMethods"
6 | #include "src/Core/util/DisableStupidWarnings.h"
7 |
8 | /** \defgroup SparseQR_Module SparseQR module
9 | * \brief Provides QR decomposition for sparse matrices
10 | *
11 | * This module provides a simplicial version of the left-looking Sparse QR decomposition.
12 | * The columns of the input matrix should be reordered to limit the fill-in during the
13 | * decomposition. Built-in methods (COLAMD, AMD) or external methods (METIS) can be used to this end.
14 | * See the \link OrderingMethods_Module OrderingMethods\endlink module for the list
15 | * of built-in and external ordering methods.
16 | *
17 | * \code
18 | * #include
19 | * \endcode
20 | *
21 | *
22 | */
23 |
24 | #include "src/misc/Solve.h"
25 | #include "src/misc/SparseSolve.h"
26 |
27 | #include "OrderingMethods"
28 | #include "src/SparseCore/SparseColEtree.h"
29 | #include "src/SparseQR/SparseQR.h"
30 |
31 | #include "src/Core/util/ReenableStupidWarnings.h"
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/algorithm/mpu/MarchingCube.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "VolumeData.h"
3 | #include "ObjMesh.h"
4 | namespace mpu
5 | {
6 | class MarchingCube
7 | {
8 | public:
9 | MarchingCube();
10 | ~MarchingCube();
11 |
12 | void run(const VolumeData& data, ObjMesh& mesh);
13 | void run(const VolumeData& data, ObjMesh& mesh, ldp::Int3 begin, ldp::Int3 end);
14 | void run(const VolumeData& data, ObjMesh& mesh, kdtree::AABB box);
15 | protected:
16 | struct GridCell
17 | {
18 | // input field for marching cube
19 | ldp::Float3 p[8];//position of each corner of the grid in world space
20 | float val[8]; //value of the function at this grid corner
21 |
22 | // output field for marching cube
23 | ldp::Int3 out_tri[10];
24 | ldp::Float3 out_vert[15];
25 | int n_out_tri;
26 | int n_out_vert;
27 |
28 | // tmp field
29 | ldp::Float3 tmp_vert[12];
30 | char tmp_map[12];
31 | };
32 |
33 | // given a grid cell, returns the set of triangles that approximates the region where val == 0.
34 | // NOTE:
35 | // preallocate Triangles[10] and Vertices [15]
36 | void polygonize(GridCell &Grid);
37 | private:
38 | };
39 | }
--------------------------------------------------------------------------------
/algorithm/eigen/LU:
--------------------------------------------------------------------------------
1 | #ifndef EIGEN_LU_MODULE_H
2 | #define EIGEN_LU_MODULE_H
3 |
4 | #include "Core"
5 |
6 | #include "src/Core/util/DisableStupidWarnings.h"
7 |
8 | /** \defgroup LU_Module LU module
9 | * This module includes %LU decomposition and related notions such as matrix inversion and determinant.
10 | * This module defines the following MatrixBase methods:
11 | * - MatrixBase::inverse()
12 | * - MatrixBase::determinant()
13 | *
14 | * \code
15 | * #include
16 | * \endcode
17 | */
18 |
19 | #include "src/misc/Solve.h"
20 | #include "src/misc/Kernel.h"
21 | #include "src/misc/Image.h"
22 | #include "src/LU/FullPivLU.h"
23 | #include "src/LU/PartialPivLU.h"
24 | #ifdef EIGEN_USE_LAPACKE
25 | #include "src/LU/PartialPivLU_MKL.h"
26 | #endif
27 | #include "src/LU/Determinant.h"
28 | #include "src/LU/Inverse.h"
29 |
30 | #if defined EIGEN_VECTORIZE_SSE
31 | #include "src/LU/arch/Inverse_SSE.h"
32 | #endif
33 |
34 | #ifdef EIGEN2_SUPPORT
35 | #include "src/Eigen2Support/LU.h"
36 | #endif
37 |
38 | #include "src/Core/util/ReenableStupidWarnings.h"
39 |
40 | #endif // EIGEN_LU_MODULE_H
41 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */
42 |
--------------------------------------------------------------------------------
/algorithm/eigen/UmfPackSupport:
--------------------------------------------------------------------------------
1 | #ifndef EIGEN_UMFPACKSUPPORT_MODULE_H
2 | #define EIGEN_UMFPACKSUPPORT_MODULE_H
3 |
4 | #include "SparseCore"
5 |
6 | #include "src/Core/util/DisableStupidWarnings.h"
7 |
8 | extern "C" {
9 | #include
10 | }
11 |
12 | /** \ingroup Support_modules
13 | * \defgroup UmfPackSupport_Module UmfPackSupport module
14 | *
15 | * This module provides an interface to the UmfPack library which is part of the suitesparse package.
16 | * It provides the following factorization class:
17 | * - class UmfPackLU: a multifrontal sequential LU factorization.
18 | *
19 | * \code
20 | * #include
21 | * \endcode
22 | *
23 | * In order to use this module, the umfpack headers must be accessible from the include paths, and your binary must be linked to the umfpack library and its dependencies.
24 | * The dependencies depend on how umfpack has been compiled.
25 | * For a cmake based project, you can use our FindUmfPack.cmake module to help you in this task.
26 | *
27 | */
28 |
29 | #include "src/misc/Solve.h"
30 | #include "src/misc/SparseSolve.h"
31 |
32 | #include "src/UmfPackSupport/UmfPackSupport.h"
33 |
34 | #include "src/Core/util/ReenableStupidWarnings.h"
35 |
36 | #endif // EIGEN_UMFPACKSUPPORT_MODULE_H
37 |
--------------------------------------------------------------------------------
/algorithm/FreeImage/CFreeImage.h:
--------------------------------------------------------------------------------
1 | #ifndef __IMAGE_LOADER_H__
2 | #define __IMAGE_LOADER_H__
3 |
4 | #include
5 | class CFreeImage
6 | {
7 | public:
8 | CFreeImage();
9 | CFreeImage(const CFreeImage& other);
10 | ~CFreeImage();
11 |
12 | bool load(const char* filename);
13 | bool save(const char* filename)const;
14 |
15 | int width()const{return _width;}
16 | int height()const{return _height;}
17 | int nChannels()const{return _nChannels;}
18 |
19 | /**
20 | * if numChannels == 3 or 4, then return BGR or BGRA format
21 | * */
22 | const unsigned char* getBits()const{return _bits.data();}
23 | unsigned char* getBits(){return _bits.data();}
24 | const unsigned char* rowPtr(int y)const{return _bits.data()+y*_width*_nChannels;}
25 |
26 | /**
27 | * if numChannels == 3 or 4, then return BGR or BGRA format
28 | * */
29 | void createImage(int width, int height, int nChannels, const unsigned char* bits=0);
30 |
31 | enum ResizeType
32 | {
33 | Bilinear,
34 | Lanczos3,//bugs now...
35 | };
36 | bool ResizeImage(CFreeImage& dst, int w, int h, ResizeType type)const;
37 |
38 | void rgb2bgr();
39 |
40 | void clear();
41 | private:
42 | std::vector _bits;
43 | int _width, _height, _nChannels;
44 | };//ImageLoader
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | #endif//__IMAGE_LOADER_H__
--------------------------------------------------------------------------------
/DynamicFusionUI.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.21005.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DynamicFusionUI", "DynamicFusionUI.vcxproj", "{B12702AD-ABFB-343A-A199-8E24837244A3}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Win32 = Debug|Win32
11 | Debug|x64 = Debug|x64
12 | Release|Win32 = Release|Win32
13 | Release|x64 = Release|x64
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|Win32.ActiveCfg = Debug|Win32
17 | {B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|Win32.Build.0 = Debug|Win32
18 | {B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|x64.ActiveCfg = Debug|x64
19 | {B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|x64.Build.0 = Debug|x64
20 | {B12702AD-ABFB-343A-A199-8E24837244A3}.Release|Win32.ActiveCfg = Release|Win32
21 | {B12702AD-ABFB-343A-A199-8E24837244A3}.Release|Win32.Build.0 = Release|Win32
22 | {B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x64.ActiveCfg = Release|x64
23 | {B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x64.Build.0 = Release|x64
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/algorithm/DynamicFusion/CudaCholeskeySolver.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | class CudaBsrMatrix;
9 | struct CudaCholeskeySolver_EigenContainter;
10 | class CudaCholeskeySolver
11 | {
12 | public:
13 | CudaCholeskeySolver();
14 | ~CudaCholeskeySolver();
15 |
16 | void init();
17 | void clear();
18 |
19 | // analysis the sparse pattern of A
20 | // if reorder, then a CPU-path reorder algorithm is performed
21 | // which needs cpu-gpu data copies.
22 | // but the fill-ins will be greatly reduced when factor
23 | void analysis(const CudaBsrMatrix* A, bool reorder = false);
24 |
25 | // numerical factorize
26 | void factor();
27 |
28 | // solve for A*x = b
29 | void solve(float* x, const float* b);
30 |
31 | // since A = L*L'
32 | // this functions solves for L*u = b
33 | void solveL(float* u, const float* b);
34 |
35 | // this functions solves for L'*x = u
36 | void solveLt(float* x, const float* u);
37 | private:
38 | const CudaBsrMatrix* m_A;
39 | CudaBsrMatrix* m_A_csr;
40 | bool m_reorder;
41 | bool m_isAnalysied;
42 | bool m_isFactored;
43 | bool m_isInited;
44 |
45 | cusolverSpHandle_t m_handle;
46 | csrcholInfo_t m_info;
47 | DeviceArray m_workSpace;
48 |
49 | CudaCholeskeySolver_EigenContainter* m_container;
50 | };
51 |
52 |
--------------------------------------------------------------------------------
/RayCastViewer.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "Camera.h"
5 | #include "definations.h"
6 | class RayCastViewer : public QGLWidget
7 | {
8 | Q_OBJECT
9 | public:
10 | RayCastViewer(QWidget *parent);
11 | ~RayCastViewer();
12 |
13 | void initializeGL();
14 | void resizeGL(int w, int h);
15 | void paintGL();
16 |
17 | void setId(int id){ m_id = id; }
18 |
19 | void setRayCastingShadingImage(const dfusion::ColorMap& img);
20 |
21 | void setSameView(const RayCastViewer* other);
22 |
23 | const int getId()const{ return m_id; }
24 |
25 | void getCameraInfo(Camera& cam)const;
26 | void setCameraInfo(const Camera& cam);
27 | protected:
28 | void mousePressEvent(QMouseEvent *);
29 | void mouseReleaseEvent(QMouseEvent *);
30 | void mouseMoveEvent(QMouseEvent*);
31 | void wheelEvent(QWheelEvent*);
32 | void keyPressEvent(QKeyEvent*);
33 |
34 | void renderRayCasting();
35 | protected:
36 | // camera related
37 | int m_id;
38 | Camera m_camera;
39 | ldp::Float3 m_defaultCameraLocation;
40 | ldp::Float3 m_defaultCameraDirection;
41 | ldp::Float3 m_defaultCameraUp;
42 | Qt::MouseButtons m_buttons;
43 | QPoint m_lastPos, m_lastMousePressPos;
44 | ldp::Mat4f m_rootTrans, m_defaultRootTrans;
45 | float m_dataScale;
46 |
47 | QGLFunctions* m_gl_func;
48 | GLuint m_texture_id;
49 | PtrStepSz m_pbo_buffer;
50 | GLuint m_pbo_id;
51 | cudaGraphicsResource* m_pbo_cuda_res;
52 | };
--------------------------------------------------------------------------------
/algorithm/global_data_holder.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "util.h"
4 | #include "ObjMesh.h"
5 | #include "mpu\VolumeData.h"
6 | #include "MicrosoftKinect.h"
7 | #include "kinect_util.h"
8 | #include "TsdfVolume.h"
9 | #include "RayCaster.h"
10 | #include "MarchingCubes.h"
11 | #include "GpuMesh.h"
12 | #include "DynamicFusionParam.h"
13 | #include "DynamicFusionProcessor.h"
14 | #include "GpuKdTree.h"
15 | class GlobalDataHolder
16 | {
17 | public:
18 | void init();
19 |
20 | static void saveDepth(const std::vector& depth_h, std::string filename);
21 | static void loadDepth(std::vector& depth_h, std::string filename);
22 | public:
23 | dfusion::DynamicFusionProcessor m_processor;
24 | Microsoft_Kinect m_kinect;
25 | dfusion::Param m_dparam;
26 | dfusion::LightSource m_lights;
27 |
28 | std::vector m_depth_h;
29 | std::vector m_color_h;
30 | dfusion::DepthMap m_depth_d;
31 | dfusion::ColorMap m_color_d;
32 | dfusion::ColorMap m_warpedview_shading;
33 | dfusion::ColorMap m_canoview_shading;
34 | dfusion::ColorMap m_errorMap_shading;
35 |
36 | // the following is used for debugging/visualizing loaded volumes.
37 | dfusion::RayCaster m_rayCaster;
38 | dfusion::MarchingCubes m_marchCube;
39 | dfusion::TsdfVolume m_volume;
40 | dfusion::GpuMesh m_mesh;
41 | private:
42 | mutable ldp::TimeStamp m_timeStamp;
43 | };
44 |
45 | extern GlobalDataHolder g_dataholder;
--------------------------------------------------------------------------------
/algorithm/BFGS/BFGSFit.h:
--------------------------------------------------------------------------------
1 | // ******************************************************
2 | // Class BFGSFit
3 | // Solve the x in min{(Ax-B)^2} using BFGS
4 | // Author: Chen Cao 10/17/2013
5 | // ******************************************************
6 |
7 | #pragma once
8 |
9 | // Include common
10 | #include "program.h"
11 |
12 | // Include Eigen
13 | #include
14 | #include
15 |
16 | namespace ldp
17 | {
18 | class BFGSFit : public Program
19 | {
20 | public:
21 | // Constructor, initialize
22 | BFGSFit ( int n, double* x, double* lb, double* ub, long int* btype,
23 | int m = defaultm, int maxiter = defaultmaxiter,
24 | double factr = defaultfactr, double pgtol = defaultpgtol );
25 | void initialize ();
26 |
27 | // Access functions
28 | void setMatrix ( const Eigen::MatrixXf& A, const Eigen::VectorXf& B );
29 |
30 | // Re-implemented functions
31 | virtual double computeObjective ( int n, double* x );
32 | virtual void computeGradient ( int n, double* x, double* g );
33 | virtual void iterCallback ( int t, double* x, double f );
34 |
35 | protected:
36 | // Basic members
37 | std::vector mX; // Object
38 | std::vector mG; // Gradient
39 |
40 | const Eigen::MatrixXf* mA_P; // Matrix A's pointer
41 | const Eigen::VectorXf* mB_P; // Vector B's pointer
42 |
43 | Eigen::VectorXf mAx_B; // A * X - B
44 | Eigen::MatrixXf mAt; // At
45 | Eigen::VectorXf mAtAx_B; // At*(A*X-B)
46 | };
47 | }
48 |
--------------------------------------------------------------------------------
/algorithm/DynamicFusion/MarchingCubes.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "definations.h"
4 | #include "DynamicFusionParam.h"
5 | namespace dfusion
6 | {
7 | class GpuMesh;
8 | class TsdfVolume;
9 | class MarchingCubes
10 | {
11 | public:
12 | struct Tile
13 | {
14 | int3 begin;
15 | int3 end;
16 | float3 origion;
17 | float voxelSize;
18 | int level; // w.r.t. a voxel, volume.voxelSize< m_tiles;
44 | std::vector m_tiledMeshes;
45 |
46 | // buffered for each tile
47 | DeviceArray m_voxelVerts;
48 | DeviceArray m_voxelVertsScan;
49 | DeviceArray m_compVoxelArray;
50 | cudaTextureObject_t m_volTex;
51 | };
52 | }
53 |
--------------------------------------------------------------------------------
/algorithm/DynamicFusion/cudpp/moderngpu/include/kernels/cubradixsort.cuh:
--------------------------------------------------------------------------------
1 | #include "device/deviceutil.cuh"
2 | #include "cub/cub.cuh"
3 |
4 | namespace mgpu {
5 |
6 | template
7 | bool CubRadixSort(Key* keys_global, Key* keys2_global, int count, int beginBit,
8 | int endBit, CudaContext& context) {
9 |
10 | cub::DoubleBuffer keys(keys_global, keys2_global);
11 |
12 | size_t tempBytes = 0;
13 | cub::DeviceRadixSort::SortKeys(0, tempBytes, keys, count, beginBit, endBit,
14 | context.Stream());
15 |
16 | MGPU_MEM(byte) tempDevice = context.Malloc(tempBytes);
17 |
18 | cub::DeviceRadixSort::SortKeys(tempDevice->get(), tempBytes, keys, count,
19 | beginBit, endBit, context.Stream());
20 | MGPU_SYNC_CHECK("cub::DeviceRadixSort::SortKeys");
21 |
22 | return 1 == keys.selector;
23 | }
24 |
25 | template
26 | bool CubRadixSort(Key* keys_global, Key* keys2_global, Value* values_global,
27 | Value* values2_global, int count, int beginBit, int endBit,
28 | CudaContext& context) {
29 |
30 | cub::DoubleBuffer keys(keys_global, keys2_global);
31 | cub::DoubleBuffer values(values_global, values2_global);
32 |
33 | size_t tempBytes = 0;
34 | cub::DeviceRadixSort::SortPairs(0, tempBytes, keys, values, count,
35 | beginBit, endBit, context.Stream());
36 |
37 | MGPU_MEM(byte) tempDevice = context.Malloc(tempBytes);
38 |
39 | cub::DeviceRadixSort::SortPairs(tempDevice->get(), tempBytes, keys, values,
40 | count, beginBit, endBit, context.Stream());
41 | MGPU_SYNC_CHECK("cub::DeviceRadixSort::SortPairs");
42 |
43 | return 1 == keys.selector;
44 | }
45 |
46 | } // namespace mgpu
47 |
--------------------------------------------------------------------------------
/algorithm/eigen/Eigenvalues:
--------------------------------------------------------------------------------
1 | #ifndef EIGEN_EIGENVALUES_MODULE_H
2 | #define EIGEN_EIGENVALUES_MODULE_H
3 |
4 | #include "Core"
5 |
6 | #include "src/Core/util/DisableStupidWarnings.h"
7 |
8 | #include "Cholesky"
9 | #include "Jacobi"
10 | #include "Householder"
11 | #include "LU"
12 | #include "Geometry"
13 |
14 | /** \defgroup Eigenvalues_Module Eigenvalues module
15 | *
16 | *
17 | *
18 | * This module mainly provides various eigenvalue solvers.
19 | * This module also provides some MatrixBase methods, including:
20 | * - MatrixBase::eigenvalues(),
21 | * - MatrixBase::operatorNorm()
22 | *
23 | * \code
24 | * #include
25 | * \endcode
26 | */
27 |
28 | #include "src/Eigenvalues/Tridiagonalization.h"
29 | #include "src/Eigenvalues/RealSchur.h"
30 | #include "src/Eigenvalues/EigenSolver.h"
31 | #include "src/Eigenvalues/SelfAdjointEigenSolver.h"
32 | #include "src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h"
33 | #include "src/Eigenvalues/HessenbergDecomposition.h"
34 | #include "src/Eigenvalues/ComplexSchur.h"
35 | #include "src/Eigenvalues/ComplexEigenSolver.h"
36 | #include "src/Eigenvalues/RealQZ.h"
37 | #include "src/Eigenvalues/GeneralizedEigenSolver.h"
38 | #include "src/Eigenvalues/MatrixBaseEigenvalues.h"
39 | #ifdef EIGEN_USE_LAPACKE
40 | #include "src/Eigenvalues/RealSchur_MKL.h"
41 | #include "src/Eigenvalues/ComplexSchur_MKL.h"
42 | #include "src/Eigenvalues/SelfAdjointEigenSolver_MKL.h"
43 | #endif
44 |
45 | #include "src/Core/util/ReenableStupidWarnings.h"
46 |
47 | #endif // EIGEN_EIGENVALUES_MODULE_H
48 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */
49 |
--------------------------------------------------------------------------------
/algorithm/eigen/SparseCholesky:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // Copyright (C) 2008-2013 Gael Guennebaud
5 | //
6 | // This Source Code Form is subject to the terms of the Mozilla
7 | // Public License v. 2.0. If a copy of the MPL was not distributed
8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 |
10 | #ifndef EIGEN_SPARSECHOLESKY_MODULE_H
11 | #define EIGEN_SPARSECHOLESKY_MODULE_H
12 |
13 | #include "SparseCore"
14 | #include "OrderingMethods"
15 |
16 | #include "src/Core/util/DisableStupidWarnings.h"
17 |
18 | /**
19 | * \defgroup SparseCholesky_Module SparseCholesky module
20 | *
21 | * This module currently provides two variants of the direct sparse Cholesky decomposition for selfadjoint (hermitian) matrices.
22 | * Those decompositions are accessible via the following classes:
23 | * - SimplicialLLt,
24 | * - SimplicialLDLt
25 | *
26 | * Such problems can also be solved using the ConjugateGradient solver from the IterativeLinearSolvers module.
27 | *
28 | * \code
29 | * #include
30 | * \endcode
31 | */
32 |
33 | #ifdef EIGEN_MPL2_ONLY
34 | #error The SparseCholesky module has nothing to offer in MPL2 only mode
35 | #endif
36 |
37 | #include "src/misc/Solve.h"
38 | #include "src/misc/SparseSolve.h"
39 | #include "src/SparseCholesky/SimplicialCholesky.h"
40 |
41 | #ifndef EIGEN_MPL2_ONLY
42 | #include "src/SparseCholesky/SimplicialCholesky_impl.h"
43 | #endif
44 |
45 | #include "src/Core/util/ReenableStupidWarnings.h"
46 |
47 | #endif // EIGEN_SPARSECHOLESKY_MODULE_H
48 |
--------------------------------------------------------------------------------
/algorithm/eigen/PaStiXSupport:
--------------------------------------------------------------------------------
1 | #ifndef EIGEN_PASTIXSUPPORT_MODULE_H
2 | #define EIGEN_PASTIXSUPPORT_MODULE_H
3 |
4 | #include "SparseCore"
5 |
6 | #include "src/Core/util/DisableStupidWarnings.h"
7 |
8 | #include
9 | extern "C" {
10 | #include
11 | #include
12 | }
13 |
14 | #ifdef complex
15 | #undef complex
16 | #endif
17 |
18 | /** \ingroup Support_modules
19 | * \defgroup PaStiXSupport_Module PaStiXSupport module
20 | *
21 | * This module provides an interface to the PaSTiX library.
22 | * PaSTiX is a general \b supernodal, \b parallel and \b opensource sparse solver.
23 | * It provides the two following main factorization classes:
24 | * - class PastixLLT : a supernodal, parallel LLt Cholesky factorization.
25 | * - class PastixLDLT: a supernodal, parallel LDLt Cholesky factorization.
26 | * - class PastixLU : a supernodal, parallel LU factorization (optimized for a symmetric pattern).
27 | *
28 | * \code
29 | * #include
30 | * \endcode
31 | *
32 | * In order to use this module, the PaSTiX headers must be accessible from the include paths, and your binary must be linked to the PaSTiX library and its dependencies.
33 | * The dependencies depend on how PaSTiX has been compiled.
34 | * For a cmake based project, you can use our FindPaSTiX.cmake module to help you in this task.
35 | *
36 | */
37 |
38 | #include "src/misc/Solve.h"
39 | #include "src/misc/SparseSolve.h"
40 |
41 | #include "src/PaStiXSupport/PaStiXSupport.h"
42 |
43 |
44 | #include "src/Core/util/ReenableStupidWarnings.h"
45 |
46 | #endif // EIGEN_PASTIXSUPPORT_MODULE_H
47 |
--------------------------------------------------------------------------------
/algorithm/Renderable/GLNode.h:
--------------------------------------------------------------------------------
1 | #ifndef __NODE_H121__
2 | #define __NODE_H121__
3 |
4 | #include
5 | #include
6 | #include
7 | #include "Renderable.h"
8 | using namespace std;
9 | using namespace ldp;
10 | class AbstractMesh;
11 | class GLNode :public Renderable
12 | {
13 | public:
14 | GLNode(void);
15 | ~GLNode(void);
16 |
17 | /**
18 | * showType = MESH::SW_V,...
19 | * */
20 | void render(int showType, int frameIndex=0);
21 | void renderConstColor(ldp::Float3 color)const;
22 | void renderChildrenAsIndex(int indexBegin)const;
23 | virtual int getMeshType()const{return TYPE_NODE;}
24 |
25 | void attach(GLNode& node);
26 | void attach(Renderable* mesh);
27 |
28 | void detachLastNode();
29 | void detachLastMesh();
30 |
31 | void detachAll();
32 | void detachMesh(int i);
33 |
34 | int getNumChildMesh()const;
35 | int getNumChildNode()const;
36 | Renderable* getMesh(int i);
37 | Renderable* getLastMesh();
38 |
39 | GLNode* getNode(int i);
40 | GLNode* getLastNode();
41 |
42 |
43 | int getNumAllMeshes()const;//meshes of mine and my child-nodes
44 |
45 | //recursivly make index from meshes of mine and my child-nodes.
46 | void getMeshWithGlobalIndex(int index, Renderable** me, GLNode** fatherNode);
47 |
48 | void setTransMat(const ldp::Mat4f& tMat);
49 | ldp::Mat4f getTransMat()const;
50 |
51 | GLNode *getFatherNode();
52 | private:
53 | void recurRenderIndex(int &ib)const;
54 | void recurGetMeshWithIdx(int &idx, Renderable** out, GLNode** fatherNode);
55 | protected:
56 | list _childNodes;
57 | vector _meshes;
58 |
59 | ldp::Mat4f _myTrans;
60 | GLNode *_fatherNode;
61 | };
62 |
63 | #endif //__NODE_H__
64 |
--------------------------------------------------------------------------------
/algorithm/kdtree/AABB.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | This file is part of Mitsuba, a physically based rendering system.
3 |
4 | Copyright (c) 2007-2012 by Wenzel Jakob and others.
5 |
6 | Mitsuba is free software; you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License Version 3
8 | as published by the Free Software Foundation.
9 |
10 | Mitsuba is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see .
17 | */
18 |
19 | #include "AABB.h"
20 |
21 | namespace ldp
22 | {
23 | namespace kdtree
24 | {
25 |
26 |
27 | Point AABB::getCorner(uint8_t corner) const {
28 | return Point(corner & 1 ? max[0] : min[0],
29 | corner & 2 ? max[1] : min[1],
30 | corner & 4 ? max[2] : min[2]);
31 | }
32 |
33 |
34 | bool AABB::overlaps(const BSphere &sphere) const {
35 | real distance = 0;
36 | for (int i = 0; i < 3; ++i) {
37 | if (sphere.center[i] < min[i]) {
38 | real d = sphere.center[i] - min[i];
39 | distance += d*d;
40 | }
41 | else if (sphere.center[i] > max[i]) {
42 | real d = sphere.center[i] - max[i];
43 | distance += d*d;
44 | }
45 | }
46 | return distance < sphere.radius*sphere.radius;
47 | }
48 |
49 | BSphere AABB::getBSphere() const {
50 | Point3 center = getCenter();
51 | return BSphere(center, (center - max).length());
52 | }
53 |
54 | }//namespace mitsuba
55 |
56 | }// namespace ldp
57 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/Eigen2Support/TriangularSolver.h:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // Copyright (C) 2010 Gael Guennebaud
5 | //
6 | // This Source Code Form is subject to the terms of the Mozilla
7 | // Public License v. 2.0. If a copy of the MPL was not distributed
8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 |
10 | #ifndef EIGEN_TRIANGULAR_SOLVER2_H
11 | #define EIGEN_TRIANGULAR_SOLVER2_H
12 |
13 | namespace Eigen {
14 |
15 | const unsigned int UnitDiagBit = UnitDiag;
16 | const unsigned int SelfAdjointBit = SelfAdjoint;
17 | const unsigned int UpperTriangularBit = Upper;
18 | const unsigned int LowerTriangularBit = Lower;
19 |
20 | const unsigned int UpperTriangular = Upper;
21 | const unsigned int LowerTriangular = Lower;
22 | const unsigned int UnitUpperTriangular = UnitUpper;
23 | const unsigned int UnitLowerTriangular = UnitLower;
24 |
25 | template
26 | template
27 | typename ExpressionType::PlainObject
28 | Flagged::solveTriangular(const MatrixBase& other) const
29 | {
30 | return m_matrix.template triangularView().solve(other.derived());
31 | }
32 |
33 | template
34 | template
35 | void Flagged::solveTriangularInPlace(const MatrixBase& other) const
36 | {
37 | m_matrix.template triangularView().solveInPlace(other.derived());
38 | }
39 |
40 | } // end namespace Eigen
41 |
42 | #endif // EIGEN_TRIANGULAR_SOLVER2_H
43 |
--------------------------------------------------------------------------------
/algorithm/eigen/IterativeLinearSolvers:
--------------------------------------------------------------------------------
1 | #ifndef EIGEN_ITERATIVELINEARSOLVERS_MODULE_H
2 | #define EIGEN_ITERATIVELINEARSOLVERS_MODULE_H
3 |
4 | #include "SparseCore"
5 | #include "OrderingMethods"
6 |
7 | #include "src/Core/util/DisableStupidWarnings.h"
8 |
9 | /**
10 | * \defgroup IterativeLinearSolvers_Module IterativeLinearSolvers module
11 | *
12 | * This module currently provides iterative methods to solve problems of the form \c A \c x = \c b, where \c A is a squared matrix, usually very large and sparse.
13 | * Those solvers are accessible via the following classes:
14 | * - ConjugateGradient for selfadjoint (hermitian) matrices,
15 | * - BiCGSTAB for general square matrices.
16 | *
17 | * These iterative solvers are associated with some preconditioners:
18 | * - IdentityPreconditioner - not really useful
19 | * - DiagonalPreconditioner - also called JAcobi preconditioner, work very well on diagonal dominant matrices.
20 | * - IncompleteILUT - incomplete LU factorization with dual thresholding
21 | *
22 | * Such problems can also be solved using the direct sparse decomposition modules: SparseCholesky, CholmodSupport, UmfPackSupport, SuperLUSupport.
23 | *
24 | * \code
25 | * #include
26 | * \endcode
27 | */
28 |
29 | #include "src/misc/Solve.h"
30 | #include "src/misc/SparseSolve.h"
31 |
32 | #include "src/IterativeLinearSolvers/IterativeSolverBase.h"
33 | #include "src/IterativeLinearSolvers/BasicPreconditioners.h"
34 | #include "src/IterativeLinearSolvers/ConjugateGradient.h"
35 | #include "src/IterativeLinearSolvers/BiCGSTAB.h"
36 | #include "src/IterativeLinearSolvers/IncompleteLUT.h"
37 |
38 | #include "src/Core/util/ReenableStupidWarnings.h"
39 |
40 | #endif // EIGEN_ITERATIVELINEARSOLVERS_MODULE_H
41 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/SparseCore/SparseRedux.h:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // Copyright (C) 2008 Gael Guennebaud
5 | //
6 | // This Source Code Form is subject to the terms of the Mozilla
7 | // Public License v. 2.0. If a copy of the MPL was not distributed
8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 |
10 | #ifndef EIGEN_SPARSEREDUX_H
11 | #define EIGEN_SPARSEREDUX_H
12 |
13 | namespace Eigen {
14 |
15 | template
16 | typename internal::traits::Scalar
17 | SparseMatrixBase::sum() const
18 | {
19 | eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix");
20 | Scalar res(0);
21 | for (Index j=0; j
28 | typename internal::traits >::Scalar
29 | SparseMatrix<_Scalar,_Options,_Index>::sum() const
30 | {
31 | eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix");
32 | return Matrix::Map(&m_data.value(0), m_data.size()).sum();
33 | }
34 |
35 | template
36 | typename internal::traits >::Scalar
37 | SparseVector<_Scalar,_Options,_Index>::sum() const
38 | {
39 | eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix");
40 | return Matrix::Map(&m_data.value(0), m_data.size()).sum();
41 | }
42 |
43 | } // end namespace Eigen
44 |
45 | #endif // EIGEN_SPARSEREDUX_H
46 |
--------------------------------------------------------------------------------
/algorithm/DynamicFusion/cudpp/ModerGpuWrapper.cu:
--------------------------------------------------------------------------------
1 | #include "ModerGpuWrapper.h"
2 | #include "moderngpu\include\util\mgpucontext.h"
3 | #include "moderngpu\include\moderngpu.cuh"
4 | #include
5 | #include
6 | #include
7 | using namespace mgpu;
8 |
9 |
10 | namespace modergpu_wrapper
11 | {
12 | ContextPtr g_context;
13 |
14 | static void create_context()
15 | {
16 | if (g_context.get() == nullptr)
17 | g_context = CreateCudaDevice(0);
18 | }
19 |
20 | void mergesort(int* val, int count)
21 | {
22 | create_context();
23 | MergesortKeys(val, count, *g_context);
24 | }
25 |
26 | void mergesort(float* val, int count)
27 | {
28 | create_context();
29 | MergesortKeys(val, count, *g_context);
30 | }
31 |
32 | void mergesort_by_key(int* keys_global, int* values_global, int count)
33 | {
34 | create_context();
35 | MergesortPairs(keys_global, values_global, count, *g_context);
36 | }
37 | void mergesort_by_key(int* keys_global, float* values_global, int count)
38 | {
39 | create_context();
40 | MergesortPairs(keys_global, values_global, count, *g_context);
41 | }
42 | void mergesort_by_key(float* keys_global, int* values_global, int count)
43 | {
44 | create_context();
45 | MergesortPairs(keys_global, values_global, count, *g_context);
46 | }
47 | void mergesort_by_key(float* keys_global, float* values_global, int count)
48 | {
49 | create_context();
50 | MergesortPairs(keys_global, values_global, count, *g_context);
51 | }
52 | void mergesort_by_key(int* keys_global, float4* values_global, int count)
53 | {
54 | create_context();
55 | MergesortPairs(keys_global, values_global, count, *g_context);
56 | }
57 |
58 | void inclusive_scan_by_key(int* key_d, float4* value_d, float4* dst_d, int n)
59 | {
60 |
61 | }
62 | }
--------------------------------------------------------------------------------
/algorithm/eigen/src/Eigen2Support/Memory.h:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // Copyright (C) 2011 Benoit Jacob
5 | //
6 | // This Source Code Form is subject to the terms of the Mozilla
7 | // Public License v. 2.0. If a copy of the MPL was not distributed
8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 |
10 | #ifndef EIGEN2_MEMORY_H
11 | #define EIGEN2_MEMORY_H
12 |
13 | namespace Eigen {
14 |
15 | inline void* ei_aligned_malloc(size_t size) { return internal::aligned_malloc(size); }
16 | inline void ei_aligned_free(void *ptr) { internal::aligned_free(ptr); }
17 | inline void* ei_aligned_realloc(void *ptr, size_t new_size, size_t old_size) { return internal::aligned_realloc(ptr, new_size, old_size); }
18 | inline void* ei_handmade_aligned_malloc(size_t size) { return internal::handmade_aligned_malloc(size); }
19 | inline void ei_handmade_aligned_free(void *ptr) { internal::handmade_aligned_free(ptr); }
20 |
21 | template inline void* ei_conditional_aligned_malloc(size_t size)
22 | {
23 | return internal::conditional_aligned_malloc(size);
24 | }
25 | template inline void ei_conditional_aligned_free(void *ptr)
26 | {
27 | internal::conditional_aligned_free(ptr);
28 | }
29 | template inline void* ei_conditional_aligned_realloc(void* ptr, size_t new_size, size_t old_size)
30 | {
31 | return internal::conditional_aligned_realloc(ptr, new_size, old_size);
32 | }
33 |
34 | template inline T* ei_aligned_new(size_t size)
35 | {
36 | return internal::aligned_new(size);
37 | }
38 | template inline void ei_aligned_delete(T *ptr, size_t size)
39 | {
40 | return internal::aligned_delete(ptr, size);
41 | }
42 |
43 | } // end namespace Eigen
44 |
45 | #endif // EIGEN2_MACROS_H
46 |
--------------------------------------------------------------------------------
/algorithm/eigen/CholmodSupport:
--------------------------------------------------------------------------------
1 | #ifndef EIGEN_CHOLMODSUPPORT_MODULE_H
2 | #define EIGEN_CHOLMODSUPPORT_MODULE_H
3 |
4 | #include "SparseCore"
5 |
6 | #include "src/Core/util/DisableStupidWarnings.h"
7 |
8 | extern "C" {
9 | #include
10 | }
11 |
12 | /** \ingroup Support_modules
13 | * \defgroup CholmodSupport_Module CholmodSupport module
14 | *
15 | * This module provides an interface to the Cholmod library which is part of the suitesparse package.
16 | * It provides the two following main factorization classes:
17 | * - class CholmodSupernodalLLT: a supernodal LLT Cholesky factorization.
18 | * - class CholmodDecomposiiton: a general L(D)LT Cholesky factorization with automatic or explicit runtime selection of the underlying factorization method (supernodal or simplicial).
19 | *
20 | * For the sake of completeness, this module also propose the two following classes:
21 | * - class CholmodSimplicialLLT
22 | * - class CholmodSimplicialLDLT
23 | * Note that these classes does not bring any particular advantage compared to the built-in
24 | * SimplicialLLT and SimplicialLDLT factorization classes.
25 | *
26 | * \code
27 | * #include
28 | * \endcode
29 | *
30 | * In order to use this module, the cholmod headers must be accessible from the include paths, and your binary must be linked to the cholmod library and its dependencies.
31 | * The dependencies depend on how cholmod has been compiled.
32 | * For a cmake based project, you can use our FindCholmod.cmake module to help you in this task.
33 | *
34 | */
35 |
36 | #include "src/misc/Solve.h"
37 | #include "src/misc/SparseSolve.h"
38 |
39 | #include "src/CholmodSupport/CholmodSupport.h"
40 |
41 |
42 | #include "src/Core/util/ReenableStupidWarnings.h"
43 |
44 | #endif // EIGEN_CHOLMODSUPPORT_MODULE_H
45 |
46 |
--------------------------------------------------------------------------------
/algorithm/Renderable/AbstractMesh.cpp:
--------------------------------------------------------------------------------
1 | #include "AbstractMesh.h"
2 | #include "Error.h"
3 |
4 | const Float3 AbstractMesh::SELECT_COLOR = Float3(175.f/255.f,175.f/255.f,48.f/255.f);
5 | const Float3 AbstractMesh::NON_SEL_COLOR = Float3(0.0f,0.0f,0.0f);
6 | AbstractMesh::AbstractMesh(void):Renderable()
7 | {
8 | }
9 |
10 | AbstractMesh::~AbstractMesh(void)
11 | {
12 | }
13 |
14 | void AbstractMesh::getNormals(vector& store)const
15 | {
16 | if(normals.size()==0)
17 | {
18 | Logger::warning("Empty Normals, In TriMesh::getNormals()\n");
19 | return;
20 | }
21 | if(store.size() != this->normals.size())
22 | store.resize(normals.size());
23 | memcpy(&store[0], &normals[0], normals.size()*sizeof(normals[0]));
24 | }
25 | void AbstractMesh::getVertices(vector& store)const
26 | {
27 | if(vertices.size()==0)
28 | {
29 | Logger::warning("Empty Mesh, In TriMesh::getVertices()\n");
30 | return;
31 | }
32 | if(store.size() != this->vertices.size())
33 | store.resize(vertices.size());
34 | memcpy(&store[0], &vertices[0], vertices.size()*sizeof(vertices[0]));
35 | }
36 |
37 | void AbstractMesh::setVertices(const vector& input, bool isNormalsGen)
38 | {
39 | if(input.size() != this->vertices.size())
40 | {
41 | vertices.resize(input.size());
42 | isVertSelected.resize(input.size());
43 | colors.resize(input.size());
44 | }
45 | memcpy(&vertices[0], &input[0], vertices.size()*sizeof(vertices[0]));
46 | memset(&isVertSelected[0], 0, isVertSelected.size()*sizeof(isVertSelected[0]));
47 | for(int i=0; i<(int)colors.size(); i++)
48 | colors[i] = AbstractMesh::NON_SEL_COLOR;
49 |
50 | if(isNormalsGen)
51 | {
52 | generateNormals();
53 | }
54 | }
55 |
56 | void AbstractMesh::setVertexSelected(int i, bool select)
57 | {
58 | isVertSelected[i]=(select ? 1:0);
59 | if(isVertSelected[i]) colors[i] = SELECT_COLOR;
60 | else colors[i] = NON_SEL_COLOR;
61 | }
--------------------------------------------------------------------------------
/algorithm/eigen/Geometry:
--------------------------------------------------------------------------------
1 | #ifndef EIGEN_GEOMETRY_MODULE_H
2 | #define EIGEN_GEOMETRY_MODULE_H
3 |
4 | #include "Core"
5 |
6 | #include "src/Core/util/DisableStupidWarnings.h"
7 |
8 | #include "SVD"
9 | #include "LU"
10 | #include
11 |
12 | #ifndef M_PI
13 | #define M_PI 3.14159265358979323846
14 | #endif
15 |
16 | /** \defgroup Geometry_Module Geometry module
17 | *
18 | *
19 | *
20 | * This module provides support for:
21 | * - fixed-size homogeneous transformations
22 | * - translation, scaling, 2D and 3D rotations
23 | * - quaternions
24 | * - \ref MatrixBase::cross() "cross product"
25 | * - \ref MatrixBase::unitOrthogonal() "orthognal vector generation"
26 | * - some linear components: parametrized-lines and hyperplanes
27 | *
28 | * \code
29 | * #include
30 | * \endcode
31 | */
32 |
33 | #include "src/Geometry/OrthoMethods.h"
34 | #include "src/Geometry/EulerAngles.h"
35 |
36 | #if EIGEN2_SUPPORT_STAGE > STAGE20_RESOLVE_API_CONFLICTS
37 | #include "src/Geometry/Homogeneous.h"
38 | #include "src/Geometry/RotationBase.h"
39 | #include "src/Geometry/Rotation2D.h"
40 | #include "src/Geometry/Quaternion.h"
41 | #include "src/Geometry/AngleAxis.h"
42 | #include "src/Geometry/Transform.h"
43 | #include "src/Geometry/Translation.h"
44 | #include "src/Geometry/Scaling.h"
45 | #include "src/Geometry/Hyperplane.h"
46 | #include "src/Geometry/ParametrizedLine.h"
47 | #include "src/Geometry/AlignedBox.h"
48 | #include "src/Geometry/Umeyama.h"
49 |
50 | #if defined EIGEN_VECTORIZE_SSE
51 | #include "src/Geometry/arch/Geometry_SSE.h"
52 | #endif
53 | #endif
54 |
55 | #ifdef EIGEN2_SUPPORT
56 | #include "src/Eigen2Support/Geometry/All.h"
57 | #endif
58 |
59 | #include "src/Core/util/ReenableStupidWarnings.h"
60 |
61 | #endif // EIGEN_GEOMETRY_MODULE_H
62 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */
63 |
64 |
--------------------------------------------------------------------------------
/algorithm/DynamicFusion/cudpp/thrust_wrapper.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | namespace thrust_wrapper
9 | {
10 | void sort_by_key(int* key_d, float4* value_d, int n);
11 | void sort_by_key(float* key_d, int* value_d, int n);
12 | void sort_by_key(int* key_d, int* value_d, int n);
13 | void sort_by_key(int* key_d, float* value_d, int n);
14 |
15 | void stable_sort_by_key(int* key_d, float4* value_d, int n);
16 | void stable_sort_by_key(float* key_d, int* value_d, int n);
17 |
18 | void exclusive_scan(const int* in, int* out, int n);
19 | void exclusive_scan(const unsigned int* in, unsigned int* out, int n);
20 |
21 | void inclusive_scan_by_key(int* key_d, float4* value_d, float4* dst_d, int n);
22 |
23 | size_t unique_by_key(int* key_d, float4* value_d, int n);
24 |
25 | // the input value are counting iterators from @input_count_begin
26 | size_t unique_counting_by_key_copy(const int* key_d, int input_count_begin,
27 | int* out_key_d, int* out_value_d, int n);
28 |
29 | // out[map[i]] = in[i];
30 | void scatter(const int* in_d, const int* map_d, int* out_d, int n);
31 |
32 | // out[i] = in[map[i])
33 | void gather(const int* in_d, const int* map_d, int* out_d, int n);
34 | void gather(const float4* in_d, const int* map_d, float4* out_d, int n);
35 |
36 | // xyzwxyzw...xyzw -> xxx...yyy...zzz
37 | void seperate_channels(const float4* xyzw_d, float* x_d, float* y_d, float* z_d, int n);
38 |
39 | // ptr_d[i] = begin+i
40 | void make_counting_array(int* ptr_d, int n, int begin=0);
41 |
42 | void copy(int* dst, const int* src, int size);
43 | void copy(float* dst, const float* src, int size);
44 |
45 | // ptr_d[i] = value
46 | void assign(int* ptr_d, int value, int n);
47 | void assign(float* ptr_d, float value, int n);
48 | void assign(float4* ptr_d, float4 value, int n);
49 | }
--------------------------------------------------------------------------------
/algorithm/eigen/SparseLU:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // Copyright (C) 2012 Désiré Nuentsa-Wakam
5 | // Copyright (C) 2012 Gael Guennebaud
6 | //
7 | // This Source Code Form is subject to the terms of the Mozilla
8 | // Public License v. 2.0. If a copy of the MPL was not distributed
9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 |
11 | #ifndef EIGEN_SPARSELU_MODULE_H
12 | #define EIGEN_SPARSELU_MODULE_H
13 |
14 | #include "SparseCore"
15 |
16 | /**
17 | * \defgroup SparseLU_Module SparseLU module
18 | * This module defines a supernodal factorization of general sparse matrices.
19 | * The code is fully optimized for supernode-panel updates with specialized kernels.
20 | * Please, see the documentation of the SparseLU class for more details.
21 | */
22 |
23 | #include "src/misc/Solve.h"
24 | #include "src/misc/SparseSolve.h"
25 |
26 | // Ordering interface
27 | #include "OrderingMethods"
28 |
29 | #include "src/SparseLU/SparseLU_gemm_kernel.h"
30 |
31 | #include "src/SparseLU/SparseLU_Structs.h"
32 | #include "src/SparseLU/SparseLU_SupernodalMatrix.h"
33 | #include "src/SparseLU/SparseLUImpl.h"
34 | #include "src/SparseCore/SparseColEtree.h"
35 | #include "src/SparseLU/SparseLU_Memory.h"
36 | #include "src/SparseLU/SparseLU_heap_relax_snode.h"
37 | #include "src/SparseLU/SparseLU_relax_snode.h"
38 | #include "src/SparseLU/SparseLU_pivotL.h"
39 | #include "src/SparseLU/SparseLU_panel_dfs.h"
40 | #include "src/SparseLU/SparseLU_kernel_bmod.h"
41 | #include "src/SparseLU/SparseLU_panel_bmod.h"
42 | #include "src/SparseLU/SparseLU_column_dfs.h"
43 | #include "src/SparseLU/SparseLU_column_bmod.h"
44 | #include "src/SparseLU/SparseLU_copy_to_ucol.h"
45 | #include "src/SparseLU/SparseLU_pruneL.h"
46 | #include "src/SparseLU/SparseLU_Utils.h"
47 | #include "src/SparseLU/SparseLU.h"
48 |
49 | #endif // EIGEN_SPARSELU_MODULE_H
50 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/Core/arch/Default/Settings.h:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // Copyright (C) 2008-2010 Gael Guennebaud
5 | // Copyright (C) 2006-2008 Benoit Jacob
6 | //
7 | // This Source Code Form is subject to the terms of the Mozilla
8 | // Public License v. 2.0. If a copy of the MPL was not distributed
9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 |
11 |
12 | /* All the parameters defined in this file can be specialized in the
13 | * architecture specific files, and/or by the user.
14 | * More to come... */
15 |
16 | #ifndef EIGEN_DEFAULT_SETTINGS_H
17 | #define EIGEN_DEFAULT_SETTINGS_H
18 |
19 | /** Defines the maximal loop size to enable meta unrolling of loops.
20 | * Note that the value here is expressed in Eigen's own notion of "number of FLOPS",
21 | * it does not correspond to the number of iterations or the number of instructions
22 | */
23 | #ifndef EIGEN_UNROLLING_LIMIT
24 | #define EIGEN_UNROLLING_LIMIT 100
25 | #endif
26 |
27 | /** Defines the threshold between a "small" and a "large" matrix.
28 | * This threshold is mainly used to select the proper product implementation.
29 | */
30 | #ifndef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD
31 | #define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 8
32 | #endif
33 |
34 | /** Defines the maximal width of the blocks used in the triangular product and solver
35 | * for vectors (level 2 blas xTRMV and xTRSV). The default is 8.
36 | */
37 | #ifndef EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH
38 | #define EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH 8
39 | #endif
40 |
41 |
42 | /** Defines the default number of registers available for that architecture.
43 | * Currently it must be 8 or 16. Other values will fail.
44 | */
45 | #ifndef EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS
46 | #define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 8
47 | #endif
48 |
49 | #endif // EIGEN_DEFAULT_SETTINGS_H
50 |
--------------------------------------------------------------------------------
/algorithm/DynamicFusion/SparseVolume.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "definations.h"
4 |
5 | #include "voxelhash\voxel_hashing_internal.h"
6 | #include
7 | #include "voxelhash\chunk.h"
8 |
9 | namespace dfusion
10 | {
11 | class SparseVolume
12 | {
13 | friend class DynamicFusionProcessor;
14 | public:
15 | SparseVolume();
16 | ~SparseVolume();
17 |
18 | void init(int3 resolution, float voxel_size, float3 origion);
19 |
20 | /**
21 | set the size of each voxel
22 | */
23 | void setVoxelSize(float voxel_size);
24 | float getVoxelSize()const{ return voxel_size_; }
25 | float getBlockSize()const{ return getVoxelSize()*BLOCK_DIM; }
26 |
27 | /** \brief Sets Tsdf truncation distance. Must be greater than 2 * volume_voxel_size
28 | * \param[in] distance TSDF truncation distance
29 | */
30 | void setTsdfTruncDist(float distance);
31 | float getTsdfTruncDist()const{ return tranc_dist_; }
32 |
33 | protected:
34 | void allocate(int3 resolution, float voxel_size, float3 origion);
35 | private:
36 | float voxel_size_;
37 | float3 origion_;
38 | int3 resolution_;
39 | float tranc_dist_;
40 |
41 | int hash_entry_size_;
42 | int voxel_block_size_;
43 | int voxel_block_number_;
44 | int selected_hash_entry_number_;
45 | int selected_voxel_block_number_;
46 | float active_region_offset_;
47 | float active_region_radius_;
48 | DeviceArray hash_entry_;
49 | DeviceArray selected_hash_entry_;
50 | DeviceArray voxel_block_;
51 | DeviceArray voxel_block_buffer_;
52 | DeviceArray hash_bucket_atomic_lock_;
53 | DeviceArray available_voxel_block_;
54 | DeviceArray hash_parameters_;
55 | thrust::device_vector hash_entry_scan_;
56 | DeviceArray delete_hash_entry_;
57 | DeviceArray chunk_on_CPU_;
58 | DeviceArray selected_voxel_block_vertex_list_;
59 | std::vector chunk_;
60 | std::vector selected_hash_entry_h_;
61 | std::vector voxel_block_buffer_h_;
62 | };
63 | }
64 |
--------------------------------------------------------------------------------
/algorithm/eigen/src/Eigen2Support/QR.h:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // Copyright (C) 2008 Gael Guennebaud
5 | // Copyright (C) 2011 Benoit Jacob
6 | //
7 | // This Source Code Form is subject to the terms of the Mozilla
8 | // Public License v. 2.0. If a copy of the MPL was not distributed
9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 |
11 | #ifndef EIGEN2_QR_H
12 | #define EIGEN2_QR_H
13 |
14 | namespace Eigen {
15 |
16 | template
17 | class QR : public HouseholderQR
18 | {
19 | public:
20 |
21 | typedef HouseholderQR Base;
22 | typedef Block MatrixRBlockType;
23 |
24 | QR() : Base() {}
25 |
26 | template
27 | explicit QR(const T& t) : Base(t) {}
28 |
29 | template
30 | bool solve(const MatrixBase& b, ResultType *result) const
31 | {
32 | *result = static_cast(this)->solve(b);
33 | return true;
34 | }
35 |
36 | MatrixType matrixQ(void) const {
37 | MatrixType ret = MatrixType::Identity(this->rows(), this->cols());
38 | ret = this->householderQ() * ret;
39 | return ret;
40 | }
41 |
42 | bool isFullRank() const {
43 | return true;
44 | }
45 |
46 | const TriangularView
47 | matrixR(void) const
48 | {
49 | int cols = this->cols();
50 | return MatrixRBlockType(this->matrixQR(), 0, 0, cols, cols).template triangularView();
51 | }
52 | };
53 |
54 | /** \return the QR decomposition of \c *this.
55 | *
56 | * \sa class QR
57 | */
58 | template
59 | const QR::PlainObject>
60 | MatrixBase::qr() const
61 | {
62 | return QR(eval());
63 | }
64 |
65 | } // end namespace Eigen
66 |
67 | #endif // EIGEN2_QR_H
68 |
--------------------------------------------------------------------------------
/algorithm/eigen/SparseCore:
--------------------------------------------------------------------------------
1 | #ifndef EIGEN_SPARSECORE_MODULE_H
2 | #define EIGEN_SPARSECORE_MODULE_H
3 |
4 | #include "Core"
5 |
6 | #include "src/Core/util/DisableStupidWarnings.h"
7 |
8 | #include
9 | #include