SyB3R - Synthetic Benchmark for 3D Reconstruction
ImagePostprocessor.h
1 #ifndef IMAGEPOSTPROCESSOR_H
2 #define IMAGEPOSTPROCESSOR_H
3 
4 #include <memory>
5 
6 #include <string>
7 #include <Eigen/Dense>
8 #include <map>
9 #include <string>
10 
11 namespace syb3r {
12 
13 namespace data {
14  class Dataset;
15  class Image;
16 }
17 
18 namespace synthesis {
19 
20 class ImagePostprocessorStep;
21 
26 {
27  public:
28  inline void set(std::string key, const Eigen::Vector3f &value) {
29  m_vec3fAttribs[std::move(key)] = value;
30  }
31  inline void set(std::string key, float value) {
32  m_floatAttribs[std::move(key)] = value;
33  }
34  inline void set(std::string key, int value) {
35  m_intAttribs[std::move(key)] = value;
36  }
37  inline void set(std::string key, bool value) {
38  m_boolAttribs[std::move(key)] = value;
39  }
40 
41  const Eigen::Vector3f &getVec3f(const std::string &key) const {
42  return m_vec3fAttribs.at(key);
43  }
44  float getFloat(const std::string &key) const {
45  return m_floatAttribs.at(key);
46  }
47  int getInt(const std::string &key) const {
48  return m_intAttribs.at(key);
49  }
50  bool getBool(const std::string &key) const {
51  return m_boolAttribs.at(key);
52  }
53  protected:
54  std::map<std::string, Eigen::Vector3f> m_vec3fAttribs;
55  std::map<std::string, float> m_floatAttribs;
56  std::map<std::string, int> m_intAttribs;
57  std::map<std::string, bool> m_boolAttribs;
58 };
59 
65 {
66  public:
69 
73 
76  void appendStep(ImagePostprocessorStep *step);
77 
79  void process(const data::Image &inputImage, const std::string &output) const;
82  void process(const data::Dataset &dataset, const std::string &outputPath, std::vector<std::string> &outputFilenames) const;
83 
84  void setupDefaultEOS400();
85  void setupOldEOS400();
86  protected:
87  std::vector<std::unique_ptr<ImagePostprocessorStep>> m_ppSteps;
88 };
89 
90 }
91 }
92 
93 #endif // IMAGEPOSTPROCESSOR_H
Definition: CameraPathEvaluation.cpp:10
Definition: Image.h:21
Reads the hdr images from cycles, bakes all post processing effects into them and stores them as jpg ...
Definition: ImagePostprocessor.h:64
Definition: ImagePostprocessorStep.h:33
Definition: Dataset.h:25
Stores basic information in key/value pairs.
Definition: ImagePostprocessor.h:25
ImageProperties initialProperties
The initial set of properties that the processing of each image starts with.
Definition: ImagePostprocessor.h:72