-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplugin.hpp
More file actions
60 lines (45 loc) · 1.64 KB
/
plugin.hpp
File metadata and controls
60 lines (45 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#pragma once
#include "illixr/plugin.hpp"
#include "illixr/switchboard.hpp"
#include "illixr/data_format/scene_reconstruction.hpp"
#include "illixr/data_format/mesh.hpp"
#include "illixr/relative_clock.hpp"
#include "illixr/phonebook.hpp"
#include "ITMLib/Core/ITMBasicEngine.h"
#include "ORUtils/FileUtils.h"
#include <filesystem>
//pyh only extracted partial updated mesh
//uncomment if you want to see what the full mesh looks like
#define ACTIVE_SCENE
#define PARALLEL_COMPRESSION
//pyh need to set env variable COMPRESSION_PARALLELIM & FPS
using namespace ILLIXR;
class infinitam : public plugin {
public:
infinitam(const std::string& name_, phonebook *pb_);
void process_frame(switchboard::ptr<const data_format::scene_recon_type>& datum);
~infinitam() override {
sr_latency_.close();
}
private:
//ILLIXR related variables
const std::shared_ptr<switchboard> switchboard_;
//for parallel
switchboard::writer<data_format::mesh_type> mesh_writer_;
switchboard::writer<data_format::vb_type> vb_list_;
std::unique_ptr<ORUtils::MemoryBlock<ITMLib::ITMMesh::Triangle>> cpu_triangles_;
//InfiniTAM related variables
ITMLib::ITMRGBDCalib *calib_;
ITMLib::ITMMainEngine *main_engine_;
ITMUChar4Image *input_RGB_image_;
ITMShortImage *input_raw_depth_image_;
ITMLib::ITMLibSettings *internal_settings_;
ITMLib::ITMMesh *mesh_;
std::string scene_number_;
std::string merge_name_;
unsigned frame_count_;
unsigned fps_ = 15;
unsigned thread_count_;
std::ofstream sr_latency_;
const std::string data_path_ = std::filesystem::current_path().string() + "/recorded_data";
};