-
Notifications
You must be signed in to change notification settings - Fork 5.8k
GSoC 2017: dynamicfusion #1349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 4.x
Are you sure you want to change the base?
GSoC 2017: dynamicfusion #1349
Changes from 3 commits
0e38002
11bbe6e
7c12c24
cd918ef
26cbdcd
1974106
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,82 +1,65 @@ | ||
cmake_minimum_required(VERSION 3.5.0) | ||
|
||
# ---[ Configurations types | ||
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Possible configurations" FORCE) | ||
set(the_description "Non-rigid 3D reconstruction") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -DFORCE_INLINERS -D_MWAITXINTRIN_H_INCLUDED") | ||
if (DEFINED CMAKE_BUILD_TYPE) | ||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${CMAKE_CONFIGURATION_TYPES}) | ||
endif() | ||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile) | ||
find_package(Doxygen) | ||
if(DOXYGEN_FOUND) | ||
|
||
set(DOXYGEN_INPUT ${SOURCE_FILES}) | ||
set(DOXYGEN_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) | ||
|
||
add_custom_command( | ||
OUTPUT ${DOXYGEN_OUTPUT} | ||
COMMAND ${CMAKE_COMMAND} -E echo_append "Building API Documentation..." | ||
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_INPUT} | ||
COMMAND ${CMAKE_COMMAND} -E echo "Done." | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
DEPENDS ${DOXYGEN_INPUT} | ||
) | ||
|
||
add_custom_target(apidoc ALL DEPENDS ${DOXYGEN_OUTPUT}) | ||
|
||
add_custom_target(apidoc_forced | ||
COMMAND ${CMAKE_COMMAND} -E echo_append "Building API Documentation..." | ||
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_INPUT} | ||
COMMAND ${CMAKE_COMMAND} -E echo "Done." | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
) | ||
|
||
endif(DOXYGEN_FOUND) | ||
endif() | ||
|
||
# ---[ Solution name | ||
project(kfusion C CXX) | ||
|
||
# ---[ utility | ||
# | ||
## ---[ Solution name | ||
# | ||
## ---[ utility | ||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules/") | ||
include(cmake/Utils.cmake) | ||
include(cmake/Targets.cmake) | ||
|
||
# ---[ find dependencies | ||
find_package(OpenCV REQUIRED COMPONENTS core viz highgui calib3d) | ||
#include(cmake/Targets.cmake) | ||
# | ||
## ---[ find dependencies | ||
find_package(CUDA REQUIRED) | ||
find_package(OpenNI) | ||
#find_package(OpenNI) | ||
find_package(Ceres REQUIRED) | ||
include_directories(${OpenCV_INCLUDE_DIRS} ${CERES_INCLUDE_DIRS} ${Boost_INCLUDE_DIR} ${CUDA_INCLUDE_DIRS} ${OPENNI_INCLUDE_DIR} "kfusion/src/utils" "kfusion/include/nanoflann") | ||
if(OPENNI_FOUND) | ||
message("FOUND OPENNI AT: ${OPENNI_INCLUDE_DIR}") | ||
endif() | ||
# ---[ misc settings | ||
if(USE_PROJECT_FOLDERS) | ||
set_property(GLOBAL PROPERTY USE_FOLDERS ON) | ||
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMakeTargets") | ||
endif() | ||
|
||
# ---[ cuda settings | ||
set(HAVE_CUDA 1) | ||
list(APPEND CUDA_NVCC_FLAGS "-gencode;arch=compute_20,code=sm_20;-gencode;arch=compute_20,code=sm_21;-gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_61,code=sm_61") | ||
|
||
if(UNIX OR APPLE) | ||
list(APPEND CUDA_NVCC_FLAGS "-Xcompiler;-fPIC;") | ||
endif() | ||
|
||
warnings_disable(CMAKE_CXX_FLAGS /wd4985) | ||
|
||
add_subdirectory(kfusion) | ||
add_subdirectory(apps) | ||
include_directories(${CERES_INCLUDE_DIRS} ${Boost_INCLUDE_DIR} ${CUDA_INCLUDE_DIRS} ${OPENNI_INCLUDE_DIR} "kfusion/src/utils" "kfusion/include/nanoflann") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it possible to use existing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll look into porting from nanoflann to flann at some point later |
||
#if(OPENNI_FOUND) | ||
# message("FOUND OPENNI AT: ${OPENNI_INCLUDE_DIR}") | ||
#endif() | ||
## ---[ misc settings | ||
#if(USE_PROJECT_FOLDERS) | ||
# set_property(GLOBAL PROPERTY USE_FOLDERS ON) | ||
# set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMakeTargets") | ||
#endif() | ||
# | ||
## ---[ cuda settings | ||
#set(HAVE_CUDA 1) | ||
#list(APPEND CUDA_NVCC_FLAGS "-gencode;arch=compute_20,code=sm_20;-gencode;arch=compute_20,code=sm_21;-gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_61,code=sm_61") | ||
# | ||
#if(UNIX OR APPLE) | ||
# list(APPEND CUDA_NVCC_FLAGS "-Xcompiler;-fPIC;") | ||
#endif() | ||
# | ||
#warnings_disable(CMAKE_CXX_FLAGS /wd4985) | ||
# | ||
#set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "--ftz=true;--prec-div=false;--prec-sqrt=false") | ||
#add_module_library(kfusion) | ||
#if(OPENNI_FOUND) | ||
# target_compile_definitions(kfusion PRIVATE OPENNI_FOUND=1) | ||
#endif() | ||
#target_link_libraries(kfusion ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${OPENNI_LIBRARY} ${CERES_LIBRARIES}) | ||
#add_subdirectory(apps) | ||
# | ||
#if(BUILD_TESTS) | ||
# find_package(GTest REQUIRED) | ||
# if( GTEST_FOUND ) | ||
# message( "Found Gtest at ${GTEST_ROOT}") | ||
# message( "GTest Libs: ${GTEST_BOTH_LIBRARIES}") | ||
# message( "GTest Include: ${GTEST_INCLUDE_DIRS}") | ||
# include_directories(${GTEST_INCLUDE_DIRS}) | ||
# add_subdirectory(tests) | ||
# endif() | ||
#endif() | ||
find_package(Boost REQUIRED COMPONENTS system filesystem program_options) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like the Boost is not needed anymore. |
||
ocv_define_module(dynamicfusion opencv_core opencv_calib3d opencv_viz opencv_highgui) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see any Note that all samples will receive dependency on |
||
|
||
if(BUILD_TESTS) | ||
find_package(GTest REQUIRED) | ||
if( GTEST_FOUND ) | ||
message( "Found Gtest at ${GTEST_ROOT}") | ||
message( "GTest Libs: ${GTEST_BOTH_LIBRARIES}") | ||
message( "GTest Include: ${GTEST_INCLUDE_DIRS}") | ||
include_directories(${GTEST_INCLUDE_DIRS}) | ||
add_subdirectory(tests) | ||
endif() | ||
endif() | ||
ocv_warnings_disable(CMAKE_CXX_FLAGS | ||
-Wundef | ||
-Wshadow | ||
-Wsign-compare | ||
-Wmissing-declarations | ||
-Wunused-but-set-variable | ||
-Wunused-parameter | ||
-Wunused-function | ||
) |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@InProceedings{Newcombe_2015_CVPR, | ||
author = {Newcombe, Richard A. and Fox, Dieter and Seitz, Steven M.}, | ||
title = {DynamicFusion: Reconstruction and Tracking of Non-Rigid Scenes in Real-Time}, | ||
booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)}, | ||
month = {June}, | ||
year = {2015} | ||
} | ||
|
||
@inbook{innmann2016volume, | ||
author = "Innmann, Matthias and Zollh{\"o}fer, Michael and Nie{\ss}ner, Matthias and Theobalt, Christian | ||
and Stamminger, Marc", | ||
editor = "Leibe, Bastian and Matas, Jiri and Sebe, Nicu and Welling, Max", | ||
title = "VolumeDeform: Real-Time Volumetric Non-rigid Reconstruction", | ||
bookTitle = "Computer Vision -- ECCV 2016: 14th European Conference, Amsterdam, The Netherlands, | ||
October 11-14, 2016, Proceedings, Part VIII", | ||
year = "2016", | ||
publisher = "Springer International Publishing", | ||
address = "Cham", | ||
pages = "362--379", | ||
isbn = "978-3-319-46484-8", | ||
doi = "10.1007/978-3-319-46484-8_22", | ||
url = "http://dx.doi.org/10.1007/978-3-319-46484-8_22" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#ifndef OPENCV_DYNAMICFUSION_HPP | ||
#define OPENCV_DYNAMICFUSION_HPP | ||
#include <opencv2/kfusion/kinfu.hpp> | ||
#include <opencv2/kfusion/cuda/tsdf_volume.hpp> | ||
#endif //OPENCV_DYNAMICFUSION_HPP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should not use
REQUIRED
option, instead just check whether the dependency has been found and disable your module if it can not be built without it:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to use existing
HAVE_CUDA
variable, check the documentation at the beginning of https://github.com/opencv/opencv/blob/master/cmake/FindCUDA.cmake