Templates -- Meow  1.2.10
A C++ template contains kinds of interesting classes and functions
BundleAdjustment.h
Go to the documentation of this file.
1 #ifndef BundleAdjustment_H__
2 #define BundleAdjustment_H__
3 
4 #include "Eye.h"
5 
6 #include "../oo/ObjBase.h"
7 
8 namespace meow {
9 
14  CAN_OFFSET = 0x01,
15  CAN_ROTATE = 0x02,
16  CAN_ZOOM = 0x04
17 };
18 
22 template<class Pixel>
24  unsigned long flag;
26 
31  }
32 
37  EyesReferenceInfo(Eye<Pixel>& e, unsigned long f): flag(f), eye() {
38  eye.referenceFrom(e);
39  }
40 
45  eye.referenceFrom(si.eye);
46  }
47 
52  }
53 
58  flag = e.flag;
59  eye.referenceFrom(e.eye);
60  return *this;
61  }
62 };
63 
69 template<class Pixel>
70 class BundleAdjustment: public ObjBase {
71 protected:
73  }
74 public:
75  virtual ~BundleAdjustment() {
76  }
77 
84  virtual
85  bool adjustEyes(std::vector<EyesReferenceInfo<Pixel> > seq) const {
86  return false;
87  }
88 
97  virtual
98  bool adjustFixedPoints(std::vector<EyesReferenceInfo<Pixel> > seq) const {
99  return false;
100  }
101 };
102 
103 } // meow
104 
105 #endif // BundleAdjustment_H__
這邊定義Bundle-Adjustment就是利用一系列場景來反推算出相機資訊 (包含拍攝座標, 角度與焦距) 或是在已知相機資訊的情況下推算出底片中 物體如何移動.
EyesReferenceInfo & operator=(EyesReferenceInfo const &e)
copy operator, still use reference method
virtual bool adjustFixedPoints(std::vector< EyesReferenceInfo< Pixel > > seq) const
推算場景中的物體資訊
記住每個 Eye 的reference以及Flag
EyesReferenceInfo()
constructor with nothing
一切物件的Base, 並要求每個物件都要有read, write, create, ... 等功能
Definition: ObjBase.h:15
virtual bool adjustEyes(std::vector< EyesReferenceInfo< Pixel > > seq) const
推算相機資訊
EyesReferenceInfoFlags
列舉每個 Eye 可以有哪些種類的移動
Eye< Pixel > eye
reference
改變焦距
unsigned long flag
Flag, 定義如EyesReferenceInfoFlags.
EyesReferenceInfo(EyesReferenceInfo const &si)
constructor with another EyesReferenceInfo
一個 Camera 加上一個offset transformation
Definition: Eye.h:17
EyesReferenceInfo(Eye< Pixel > &e, unsigned long f)
constructor with flag and an Eye object. Here we will let memember '.eye' reference from the specify ...