diff --git a/applications/reconstruct/CMakeLists.txt b/applications/reconstruct/CMakeLists.txt index 1e55c671c87487b995b0dd772495ff8a612a8c78..57b0e38dbdec2cc93cea9894599ecfd9fd05d8c3 100644 --- a/applications/reconstruct/CMakeLists.txt +++ b/applications/reconstruct/CMakeLists.txt @@ -6,14 +6,9 @@ set(REPSRC src/main.cpp src/voxel_scene.cpp src/scene_rep_hash_sdf.cu - src/compactors.cu - src/garbage.cu - src/integrators.cu #src/ray_cast_sdf.cu src/voxel_render.cu src/camera_util.cu - src/voxel_hash.cu - src/voxel_hash.cpp #src/ray_cast_sdf.cpp src/registration.cpp #src/virtual_source.cpp @@ -22,6 +17,7 @@ set(REPSRC src/mls.cu src/depth_camera.cu src/depth_camera.cpp + src/ilw.cpp ) add_executable(ftl-reconstruct ${REPSRC}) diff --git a/applications/reconstruct/src/ilw.cpp b/applications/reconstruct/src/ilw.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1ca6312afb269bdd7a22b99a56c587c7b6b9c548 --- /dev/null +++ b/applications/reconstruct/src/ilw.cpp @@ -0,0 +1,37 @@ +#include "ilw.hpp" + +using ftl::ILW; +using ftl::detail::ILWData; + +ILW::ILW() { + +} + +ILW::~ILW() { + +} + +bool ILW::process(ftl::rgbd::FrameSet &fs) { + _phase0(fs); + + for (int i=0; i<2; ++i) { + _phase1(fs); + for (int j=0; j<3; ++j) { + _phase2(fs); + } + } + + return true; +} + +bool ILW::_phase0(ftl::rgbd::FrameSet &fs) { + // Clear points channel... +} + +bool ILW::_phase1(ftl::rgbd::FrameSet &fs) { + // Run correspondence kernel to find points +} + +bool ILW::_phase2(ftl::rgbd::FrameSet &fs) { + // Run energies and motion kernel +} diff --git a/applications/reconstruct/src/ilw.cu b/applications/reconstruct/src/ilw.cu new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/applications/reconstruct/src/ilw.hpp b/applications/reconstruct/src/ilw.hpp index 200b4734726f2a495aaf51e457bb13940993731f..0914905e5a500580c17ee4fe8e7bf108a33e7611 100644 --- a/applications/reconstruct/src/ilw.hpp +++ b/applications/reconstruct/src/ilw.hpp @@ -1,8 +1,21 @@ #ifndef _FTL_RECONSTRUCT_ILW_HPP_ #define _FTL_RECONSTRUCT_ILW_HPP_ +#include <ftl/cuda_common.hpp> +#include <ftl/rgbd/frameset.hpp> +#include <vector> + namespace ftl { +namespace detail { +struct ILWData{ + // x,y,z + confidence + ftl::cuda::TextureObject<float4> correspondence; + + ftl::cuda::TextureObject<float4> points; +}; +} + /** * For a set of sources, perform Iterative Lattice Warping to correct the * location of points between the cameras. The algorithm finds possible @@ -18,18 +31,27 @@ class ILW { ~ILW(); /** - * Set a physical scene that is composed of a set of source cameras. - */ - void setScene(ftl::CameraSetScene *); - - /** - * Take a frameset and perform the iterative lattice warping to update - * a scene object. + * Take a frameset and perform the iterative lattice warping. */ bool process(ftl::rgbd::FrameSet &fs); private: - ftl::CameraSetScene *scene_; + /* + * Initialise data. + */ + bool _phase0(ftl::rgbd::FrameSet &fs); + + /* + * Find possible correspondences and a confidence value. + */ + bool _phase1(ftl::rgbd::FrameSet &fs); + + /* + * Calculate energies and move the points. + */ + bool _phase2(ftl::rgbd::FrameSet &fs); + + std::vector<detail::ILWData> data_; }; }