SyB3R - Synthetic Benchmark for 3D Reconstruction
CameraShake.h
1 #ifndef CAMERASHAKE_H
2 #define CAMERASHAKE_H
3 
4 #include <Eigen/Dense>
5 #include <boost/filesystem.hpp>
6 
7 #include <vector>
8 #include <string>
9 #include <initializer_list>
10 
11 #include <iostream>
12 
13 #include <random>
14 
15 namespace tinyxml2 {
16  class XMLElement;
17 }
18 
19 
20 namespace syb3r {
21 namespace models {
22 
24 {
25  public:
26  static LinearCameraShake readFromXML(tinyxml2::XMLElement *rootNode); // these only work for extern templates
27  static LinearCameraShake readFromXML(const boost::filesystem::path &filename);
28  void writeToXML(tinyxml2::XMLElement *rootNode) const;
29  void writeToXML(const boost::filesystem::path &filename) const;
30 
31 
32  LinearCameraShake(float k, float theta) : m_k(k), m_theta(theta) { }
33 
34  void computeGammaParametersInPixels(float exposureTime, float imageWidth_pixels, float imageWidth_mm, float focalLength_mm, float &k, float &theta) const;
35  std::gamma_distribution<float> getMotionBlurInPixels(float exposureTime, float imageWidth_pixels, float imageWidth_mm, float focalLength_mm) const;
36  protected:
37  float m_k;
38  float m_theta;
39 };
40 
41 namespace Eos400D_Andy_Standing_noCoffee_linear {
42 extern LinearCameraShake cameraShake1_50th;
43 extern LinearCameraShake cameraShake1_10th;
44 
45 }
46 
47 }
48 }
49 
50 #endif // CAMERASHAKE_H
Definition: CameraPathEvaluation.cpp:10
Definition: Camera.h:6
Definition: CameraShake.h:23