marker_map_config.h
Go to the documentation of this file.
1 //
2 // Created by privacy on 31.08.16.
3 //
4 
5 #ifndef TUW_MARKER_POSE_ESTIMATION_MARKER_MAP_CONFIG_H
6 #define TUW_MARKER_POSE_ESTIMATION_MARKER_MAP_CONFIG_H
7 
8 #include "opencv2/opencv.hpp"
9 
10 class MarkerMapDetails;
11 
12 class MarkerDetails;
13 
15 
16 public:
17  std::vector<MarkerMapDetails> markerMaps;
18 
20 
21  void write(cv::FileStorage &fs) const;
22 
23  void read(const cv::FileNode &node);
24 
25  static MarkerMapConfig readFromFile(std::string path);
26 
27  static void writeFromFile(std::string path, MarkerMapConfig markerMapConfig);
28 
29 };
30 
31 static void write(cv::FileStorage &fs, const std::string &, const MarkerMapConfig &x) {
32  x.write(fs);
33 }
34 
35 static void read(const cv::FileNode &node, MarkerMapConfig &x,
36  const MarkerMapConfig &default_value = MarkerMapConfig()) {
37  if (node.empty())
38  x = default_value;
39  else
40  x.read(node);
41 }
42 
43 
45 public:
47 
48  int id;
49  std::string type;
50  std::vector<MarkerDetails> markers;
51 
52  void write(cv::FileStorage &fs) const;
53 
54  void read(const cv::FileNode &node);
55 };
56 
57 static void write(cv::FileStorage &fs, const std::string &, const MarkerMapDetails &x) {
58  x.write(fs);
59 }
60 
61 static void read(const cv::FileNode &node, MarkerMapDetails &x,
62  const MarkerMapDetails &default_value = MarkerMapDetails()) {
63  if (node.empty())
64  x = default_value;
65  else
66  x.read(node);
67 }
68 
69 
71 public:
72  int id;
73  std::string type;
74  cv::Mat position;
75  cv::Mat rotation;
76 
77  MarkerDetails();
78 
79  void write(cv::FileStorage &fs) const;
80 
81  void read(const cv::FileNode &node);
82 };
83 
84 static void write(cv::FileStorage &fs, const std::string &, const MarkerDetails &x) {
85  x.write(fs);
86 }
87 
88 static void read(const cv::FileNode &node, MarkerDetails &x,
89  const MarkerDetails &default_value = MarkerDetails()) {
90  if (node.empty())
91  x = default_value;
92  else
93  x.read(node);
94 }
95 
96 
97 #endif //TUW_MARKER_POSE_ESTIMATION_MARKER_MAP_CONFIG_H
std::vector< MarkerMapDetails > markerMaps
void read(const cv::FileNode &node)
void write(cv::FileStorage &fs) const
std::string type
std::vector< MarkerDetails > markers
void write(cv::FileStorage &fs) const
static void writeFromFile(std::string path, MarkerMapConfig markerMapConfig)
static MarkerMapConfig readFromFile(std::string path)
def default_value(type)
void write(cv::FileStorage &fs) const
void read(const cv::FileNode &node)
void read(const cv::FileNode &node)


tuw_marker_pose_estimation
Author(s): Lukas Pfeifhofer
autogenerated on Mon Jun 10 2019 15:42:13