-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin.hpp
More file actions
42 lines (33 loc) · 1.49 KB
/
plugin.hpp
File metadata and controls
42 lines (33 loc) · 1.49 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
#pragma once
#include "illixr/phonebook.hpp"
#include "illixr/plugin.hpp"
#include "illixr/switchboard.hpp"
#include "mediapipe/framework/calculator_graph.h"
#include "hand_tracking_publisher.hpp"
#if !MEDIAPIPE_DISABLE_GPU
#include "mediapipe/gpu/gl_calculator_helper.h"
#endif
#include <opencv2/opencv.hpp>
namespace ILLIXR {
class hand_tracking : public plugin {
public:
[[maybe_unused]] hand_tracking(const std::string& name_, phonebook* pb_);
~hand_tracking() override;
void process(const switchboard::ptr<const data_format::cam_base_type>& frame);
void start() override;
void stop() override;
private:
ht::cam_type get_cam_type();
const std::shared_ptr<switchboard> switchboard_;
std::map<data_format::image::image_type, mediapipe::CalculatorGraph*> graph_;
ht::cam_type cam_type_;
hand_tracking_publisher publisher_;
std::string ht_config_file_;
ht::input_type input_type_;
image_map current_images_;
bool first_person_ = true;
#if !MEDIAPIPE_DISABLE_GPU
std::map<data_format::image::image_type, mediapipe::GlCalculatorHelper> gpu_helper_;
#endif
};
} // namespace ILLIXR