From 40acf9ddc8f700b45d05bb2098be23a93c3bfa6a Mon Sep 17 00:00:00 2001 From: cathook Date: Fri, 27 Jun 2014 18:24:38 +0800 Subject: fix dimension size error --- doc/html/BinaryIndexTree_8h.html | 4 +- doc/html/BinaryIndexTree_8h_source.html | 4 +- doc/html/Bitmap_8h.html | 4 +- doc/html/Bitmap_8h_source.html | 486 +++++------ doc/html/BundleAdjustment_8h.html | 17 +- doc/html/BundleAdjustment_8h.js | 10 +- doc/html/BundleAdjustment_8h_source.html | 131 +-- doc/html/BundleAdjustment__LM_8h.html | 9 +- doc/html/BundleAdjustment__LM_8h_source.html | 795 +++++++++--------- doc/html/Camera_8h.html | 4 +- doc/html/Camera_8h_source.html | 332 ++++---- doc/html/Color3__Space_8h.html | 4 +- doc/html/Color3__Space_8h_source.html | 16 +- doc/html/DisjointSet_8h.html | 4 +- doc/html/DisjointSet_8h_source.html | 4 +- doc/html/Eye_8h.html | 4 +- doc/html/Eye_8h_source.html | 42 +- doc/html/FeaturePoint_8h.html | 6 +- doc/html/FeaturePoint_8h_source.html | 390 ++++----- doc/html/FeaturePointsDetector_8h.html | 4 +- doc/html/FeaturePointsDetector_8h_source.html | 4 +- doc/html/FeaturePointsDetector__Harris_8h.html | 10 +- .../FeaturePointsDetector__Harris_8h_source.html | 634 +++++++-------- doc/html/FeaturePointsMatch_8h.html | 4 +- doc/html/FeaturePointsMatch_8h_source.html | 4 +- doc/html/FeaturePointsMatch__K__Match_8h.html | 4 +- .../FeaturePointsMatch__K__Match_8h_source.html | 6 +- doc/html/HI.html | 75 ++ doc/html/HIJ.html | 72 ++ doc/html/HIxx.html | 72 ++ doc/html/HSL__Space_8h.html | 7 +- doc/html/HSL__Space_8h.js | 1 + doc/html/HSL__Space_8h_source.html | 196 ++--- doc/html/HSV__Space_8h.html | 7 +- doc/html/HSV__Space_8h.js | 1 + doc/html/HSV__Space_8h_source.html | 176 ++-- doc/html/HashTable_8h.html | 4 +- doc/html/HashTable_8h_source.html | 4 +- doc/html/IdentityPoints_8h.html | 9 +- doc/html/IdentityPoints_8h_source.html | 566 +++++++------ doc/html/KD__Tree_8h.html | 4 +- doc/html/KD__Tree_8h_source.html | 4 +- doc/html/LinearTransformation_8h.html | 4 +- doc/html/LinearTransformation_8h_source.html | 10 +- doc/html/LinearTransformations_8h.html | 4 +- doc/html/LinearTransformations_8h_source.html | 12 +- doc/html/Matrix_8h.html | 4 +- doc/html/Matrix_8h_source.html | 707 ++++++++-------- doc/html/MergeableHeap_8h.html | 4 +- doc/html/MergeableHeap_8h_source.html | 4 +- doc/html/ObjArray_8h.html | 4 +- doc/html/ObjArray_8h_source.html | 4 +- doc/html/ObjBase_8h.html | 4 +- doc/html/ObjBase_8h_source.html | 4 +- doc/html/ObjDictionary_8h.html | 4 +- doc/html/ObjDictionary_8h_source.html | 4 +- doc/html/ObjProperties_8h.html | 4 +- doc/html/ObjProperties_8h_source.html | 4 +- doc/html/ObjSelector_8h.html | 4 +- doc/html/ObjSelector_8h_source.html | 4 +- doc/html/ObjTypes_8h.html | 4 +- doc/html/ObjTypes_8h_source.html | 4 +- doc/html/Photo_8h.html | 4 +- doc/html/Photo_8h_source.html | 60 +- doc/html/RGB__Space_8h.html | 10 +- doc/html/RGB__Space_8h.js | 2 + doc/html/RGB__Space_8h_source.html | 50 +- doc/html/SegmentTree_8h.html | 4 +- doc/html/SegmentTree_8h_source.html | 4 +- doc/html/Self_8h.html | 29 +- doc/html/Self_8h.js | 5 + doc/html/Self_8h_source.html | 415 +++++----- doc/html/SplayTree_8h.html | 4 +- doc/html/SplayTree_8h_source.html | 4 +- doc/html/Transformation_8h.html | 4 +- doc/html/Transformation_8h_source.html | 4 +- doc/html/Transformations_8h.html | 4 +- doc/html/Transformations_8h_source.html | 6 +- doc/html/Usage_8h.html | 4 +- doc/html/Usage_8h_source.html | 45 +- doc/html/VP__Tree_8h.html | 4 +- doc/html/VP__Tree_8h_source.html | 4 +- doc/html/Vector_8h.html | 4 +- doc/html/Vector_8h_source.html | 32 +- doc/html/Vectors_8h.html | 4 +- doc/html/Vectors_8h_source.html | 894 ++++++++++----------- doc/html/ViewPort_8h.html | 4 +- doc/html/ViewPort_8h_source.html | 6 +- doc/html/WatchBall_8h.html | 4 +- doc/html/WatchBall_8h_source.html | 326 ++++---- doc/html/YUV__Space_8h.html | 7 +- doc/html/YUV__Space_8h.js | 1 + doc/html/YUV__Space_8h_source.html | 90 ++- doc/html/annotated.html | 16 +- doc/html/classdouble.html | 4 +- doc/html/classes.html | 68 +- doc/html/classint.html | 4 +- doc/html/classmeow_1_1BallProjection-members.html | 4 +- doc/html/classmeow_1_1BallProjection.html | 34 +- doc/html/classmeow_1_1BinaryIndexTree-members.html | 4 +- doc/html/classmeow_1_1BinaryIndexTree.html | 4 +- doc/html/classmeow_1_1Bitmap-members.html | 79 +- doc/html/classmeow_1_1Bitmap.html | 107 ++- doc/html/classmeow_1_1Bitmap.js | 1 + .../classmeow_1_1BundleAdjustment-members.html | 8 +- doc/html/classmeow_1_1BundleAdjustment.html | 64 +- doc/html/classmeow_1_1BundleAdjustment.js | 4 +- .../classmeow_1_1BundleAdjustment__LM-members.html | 8 +- doc/html/classmeow_1_1BundleAdjustment__LM.html | 87 +- doc/html/classmeow_1_1BundleAdjustment__LM.js | 4 +- doc/html/classmeow_1_1Camera-members.html | 22 +- doc/html/classmeow_1_1Camera.html | 146 ++-- doc/html/classmeow_1_1Camera.js | 18 +- doc/html/classmeow_1_1Color3__Space-members.html | 4 +- doc/html/classmeow_1_1Color3__Space.html | 4 +- doc/html/classmeow_1_1DisjointSet-members.html | 4 +- doc/html/classmeow_1_1DisjointSet.html | 4 +- doc/html/classmeow_1_1Eye-members.html | 12 +- doc/html/classmeow_1_1Eye.html | 36 +- doc/html/classmeow_1_1Eye.js | 8 +- doc/html/classmeow_1_1FeaturePoint-members.html | 65 +- doc/html/classmeow_1_1FeaturePoint.html | 429 +++++----- doc/html/classmeow_1_1FeaturePoint.js | 51 +- doc/html/classmeow_1_1FeaturePoint.png | Bin 789 -> 1018 bytes ...classmeow_1_1FeaturePointsDetector-members.html | 4 +- doc/html/classmeow_1_1FeaturePointsDetector.html | 6 +- ...w_1_1FeaturePointsDetector__Harris-members.html | 65 +- ...classmeow_1_1FeaturePointsDetector__Harris.html | 154 ++-- .../classmeow_1_1FeaturePointsDetector__Harris.js | 3 +- .../classmeow_1_1FeaturePointsMatch-members.html | 4 +- doc/html/classmeow_1_1FeaturePointsMatch.html | 4 +- ...ow_1_1FeaturePointsMatch__K__Match-members.html | 4 +- .../classmeow_1_1FeaturePointsMatch__K__Match.html | 4 +- doc/html/classmeow_1_1HSLf__Space-members.html | 4 +- doc/html/classmeow_1_1HSLf__Space.html | 4 +- doc/html/classmeow_1_1HSVf__Space-members.html | 4 +- doc/html/classmeow_1_1HSVf__Space.html | 4 +- doc/html/classmeow_1_1HashTableList-members.html | 4 +- doc/html/classmeow_1_1HashTableList.html | 4 +- doc/html/classmeow_1_1IdentityPoints-members.html | 74 +- doc/html/classmeow_1_1IdentityPoints.html | 690 +++++++++------- doc/html/classmeow_1_1IdentityPoints.js | 66 +- doc/html/classmeow_1_1IdentityPoints.png | Bin 736 -> 850 bytes doc/html/classmeow_1_1KD__Tree-members.html | 4 +- doc/html/classmeow_1_1KD__Tree.html | 4 +- .../classmeow_1_1LinearTransformation-members.html | 4 +- doc/html/classmeow_1_1LinearTransformation.html | 4 +- doc/html/classmeow_1_1Matrix-members.html | 103 +-- doc/html/classmeow_1_1Matrix.html | 132 +-- doc/html/classmeow_1_1Matrix.js | 1 + doc/html/classmeow_1_1MergeableHeap-members.html | 4 +- doc/html/classmeow_1_1MergeableHeap.html | 4 +- doc/html/classmeow_1_1ObjArray-members.html | 4 +- doc/html/classmeow_1_1ObjArray.html | 4 +- doc/html/classmeow_1_1ObjBase-members.html | 4 +- doc/html/classmeow_1_1ObjBase.html | 48 +- doc/html/classmeow_1_1ObjBase.png | Bin 10087 -> 10642 bytes doc/html/classmeow_1_1ObjDictionary-members.html | 4 +- doc/html/classmeow_1_1ObjDictionary.html | 4 +- doc/html/classmeow_1_1ObjProperties-members.html | 4 +- doc/html/classmeow_1_1ObjProperties.html | 4 +- doc/html/classmeow_1_1ObjSelector-members.html | 4 +- doc/html/classmeow_1_1ObjSelector.html | 4 +- doc/html/classmeow_1_1ObjType-members.html | 4 +- doc/html/classmeow_1_1ObjType.html | 4 +- doc/html/classmeow_1_1Photo-members.html | 12 +- doc/html/classmeow_1_1Photo.html | 44 +- doc/html/classmeow_1_1Photo.js | 8 +- doc/html/classmeow_1_1PhotoProjection-members.html | 4 +- doc/html/classmeow_1_1PhotoProjection.html | 4 +- doc/html/classmeow_1_1RGBf__Space-members.html | 4 +- doc/html/classmeow_1_1RGBf__Space.html | 4 +- doc/html/classmeow_1_1RGBi__Space-members.html | 4 +- doc/html/classmeow_1_1RGBi__Space.html | 4 +- .../classmeow_1_1ReaderWriter__double-members.html | 4 +- doc/html/classmeow_1_1ReaderWriter__double.html | 4 +- .../classmeow_1_1ReaderWriter__int-members.html | 4 +- doc/html/classmeow_1_1ReaderWriter__int.html | 4 +- ...classmeow_1_1ReaderWriter__size__t-members.html | 4 +- doc/html/classmeow_1_1ReaderWriter__size__t.html | 4 +- .../classmeow_1_1ReaderWriter__string-members.html | 4 +- doc/html/classmeow_1_1ReaderWriter__string.html | 4 +- doc/html/classmeow_1_1Rotation3D-members.html | 4 +- doc/html/classmeow_1_1Rotation3D.html | 4 +- doc/html/classmeow_1_1SegmentTree-members.html | 4 +- doc/html/classmeow_1_1SegmentTree.html | 4 +- doc/html/classmeow_1_1Self-members.html | 21 +- doc/html/classmeow_1_1Self.html | 231 +----- doc/html/classmeow_1_1Self.js | 3 +- doc/html/classmeow_1_1SplayTree-members.html | 4 +- doc/html/classmeow_1_1SplayTree.html | 4 +- .../classmeow_1_1SplayTree_1_1Element-members.html | 4 +- doc/html/classmeow_1_1SplayTree_1_1Element.html | 4 +- .../classmeow_1_1SplayTree__Range-members.html | 4 +- doc/html/classmeow_1_1SplayTree__Range.html | 4 +- ...eow_1_1SplayTree__Range_1_1Element-members.html | 4 +- .../classmeow_1_1SplayTree__Range_1_1Element.html | 4 +- doc/html/classmeow_1_1Transformation-members.html | 4 +- doc/html/classmeow_1_1Transformation.html | 14 +- doc/html/classmeow_1_1Usage-members.html | 4 +- doc/html/classmeow_1_1Usage.html | 4 +- doc/html/classmeow_1_1VP__Tree-members.html | 4 +- doc/html/classmeow_1_1VP__Tree.html | 4 +- doc/html/classmeow_1_1Vector-members.html | 4 +- doc/html/classmeow_1_1Vector.html | 4 +- doc/html/classmeow_1_1Vector2D-members.html | 109 +-- doc/html/classmeow_1_1Vector2D.html | 138 ++-- doc/html/classmeow_1_1Vector2D.js | 1 + doc/html/classmeow_1_1Vector3D-members.html | 111 +-- doc/html/classmeow_1_1Vector3D.html | 170 ++-- doc/html/classmeow_1_1Vector3D.js | 1 + doc/html/classmeow_1_1ViewPort-members.html | 4 +- doc/html/classmeow_1_1ViewPort.html | 4 +- doc/html/classmeow_1_1WatchBall-members.html | 20 +- doc/html/classmeow_1_1WatchBall.html | 170 ++-- doc/html/classmeow_1_1WatchBall.js | 16 +- doc/html/classmeow_1_1YUVf__Space-members.html | 4 +- doc/html/classmeow_1_1YUVf__Space.html | 4 +- doc/html/dir_115d3279a93b9c99d8f569a34543848f.html | 4 +- doc/html/dir_540a4c8f2977878a343351220ffba92b.html | 4 +- doc/html/dir_77e0ab67466b1e7d76f50725a5ab9910.html | 4 +- doc/html/dir_92fecd8d02dd5e7a67429447fdf0f60f.html | 4 +- doc/html/dir_92fecd8d02dd5e7a67429447fdf0f60f.js | 4 +- doc/html/dir_a17ff8dcb3a1c1b842af541700214096.html | 4 +- doc/html/dir_a57e9e528cb28fd6752031b735908fb6.html | 4 +- doc/html/dir_f6840b2fecd08a3779df34f0add0e074.html | 4 +- doc/html/files.html | 4 +- doc/html/functions.html | 16 +- doc/html/functions_b.html | 10 +- doc/html/functions_c.html | 38 +- doc/html/functions_d.html | 15 +- doc/html/functions_e.html | 15 +- doc/html/functions_enum.html | 4 +- doc/html/functions_eval.html | 7 +- doc/html/functions_f.html | 14 +- doc/html/functions_func.html | 16 +- doc/html/functions_func_b.html | 10 +- doc/html/functions_func_c.html | 36 +- doc/html/functions_func_d.html | 15 +- doc/html/functions_func_e.html | 13 +- doc/html/functions_func_f.html | 10 +- doc/html/functions_func_g.html | 4 +- doc/html/functions_func_h.html | 4 +- doc/html/functions_func_i.html | 38 +- doc/html/functions_func_j.html | 4 +- doc/html/functions_func_k.html | 4 +- doc/html/functions_func_l.html | 4 +- doc/html/functions_func_m.html | 4 +- doc/html/functions_func_n.html | 4 +- doc/html/functions_func_o.html | 18 +- doc/html/functions_func_p.html | 42 +- doc/html/functions_func_q.html | 4 +- doc/html/functions_func_r.html | 14 +- doc/html/functions_func_s.html | 15 +- doc/html/functions_func_t.html | 8 +- doc/html/functions_func_u.html | 4 +- doc/html/functions_func_v.html | 4 +- doc/html/functions_func_w.html | 8 +- doc/html/functions_func_x.html | 4 +- doc/html/functions_func_y.html | 4 +- doc/html/functions_func_z.html | 4 +- doc/html/functions_func_~.html | 14 +- doc/html/functions_g.html | 4 +- doc/html/functions_h.html | 4 +- doc/html/functions_i.html | 52 +- doc/html/functions_j.html | 4 +- doc/html/functions_k.html | 4 +- doc/html/functions_l.html | 4 +- doc/html/functions_m.html | 16 +- doc/html/functions_n.html | 4 +- doc/html/functions_o.html | 18 +- doc/html/functions_p.html | 49 +- doc/html/functions_q.html | 4 +- doc/html/functions_r.html | 19 +- doc/html/functions_rela.html | 4 +- doc/html/functions_s.html | 13 +- doc/html/functions_t.html | 8 +- doc/html/functions_type.html | 29 +- doc/html/functions_u.html | 4 +- doc/html/functions_v.html | 4 +- doc/html/functions_vars.html | 8 +- doc/html/functions_w.html | 8 +- doc/html/functions_x.html | 4 +- doc/html/functions_y.html | 4 +- doc/html/functions_z.html | 4 +- doc/html/functions_~.html | 14 +- doc/html/globals.html | 7 +- doc/html/globals_defs.html | 7 +- doc/html/hierarchy.html | 79 +- doc/html/hierarchy.js | 11 +- doc/html/index.html | 43 +- doc/html/mainpage_8dox.html | 74 ++ doc/html/math_2utility_8h.html | 4 +- doc/html/math_2utility_8h_source.html | 4 +- doc/html/methods_8h.html | 4 +- doc/html/methods_8h_source.html | 8 +- doc/html/namespacemembers.html | 22 +- doc/html/namespacemembers_enum.html | 8 +- doc/html/namespacemembers_eval.html | 10 +- doc/html/namespacemembers_func.html | 6 +- doc/html/namespacemembers_type.html | 4 +- doc/html/namespacemembers_vars.html | 4 +- doc/html/namespacemeow.html | 333 ++++++-- doc/html/namespacemeow.js | 2 +- doc/html/namespaces.html | 4 +- doc/html/navtree.js | 15 +- doc/html/navtreeindex0.js | 500 ++++++------ doc/html/navtreeindex1.js | 500 ++++++------ doc/html/navtreeindex2.js | 500 ++++++------ doc/html/navtreeindex3.js | 500 ++++++------ doc/html/navtreeindex4.js | 500 ++++++------ doc/html/navtreeindex5.js | 184 +++-- doc/html/pages.html | 79 ++ doc/html/pages_8dox.html | 74 ++ .../structmeow_1_1EyesReferenceInfo-members.html | 83 ++ doc/html/structmeow_1_1EyesReferenceInfo.html | 318 ++++++++ doc/html/structmeow_1_1EyesReferenceInfo.js | 10 + doc/html/structmeow_1_1PairToPair-members.html | 4 +- doc/html/structmeow_1_1PairToPair.html | 4 +- doc/html/structmeow_1_1SceneInfo-members.html | 4 +- doc/html/structmeow_1_1SceneInfo.html | 4 +- doc/html/stylesheet.css | 2 +- doc/html/utility_8h.html | 4 +- doc/html/utility_8h_source.html | 4 +- 324 files changed, 8507 insertions(+), 7109 deletions(-) create mode 100644 doc/html/HI.html create mode 100644 doc/html/HIJ.html create mode 100644 doc/html/HIxx.html create mode 100644 doc/html/Self_8h.js create mode 100644 doc/html/mainpage_8dox.html create mode 100644 doc/html/pages.html create mode 100644 doc/html/pages_8dox.html create mode 100644 doc/html/structmeow_1_1EyesReferenceInfo-members.html create mode 100644 doc/html/structmeow_1_1EyesReferenceInfo.html create mode 100644 doc/html/structmeow_1_1EyesReferenceInfo.js (limited to 'doc') diff --git a/doc/html/BinaryIndexTree_8h.html b/doc/html/BinaryIndexTree_8h.html index 93a851d..27301f8 100644 --- a/doc/html/BinaryIndexTree_8h.html +++ b/doc/html/BinaryIndexTree_8h.html @@ -28,7 +28,7 @@ Logo
Templates -- Meow -  204.13.18 +  1.2.9
A C++ template contains kinds of interesting classes and functions
@@ -85,7 +85,7 @@ Namespaces @@ -356,7 +362,7 @@ $(document).ready(function(){initNavTree('Bitmap_8h_source.html','');}); @@ -94,7 +97,7 @@ Enumerations @@ -138,7 +149,7 @@ $(document).ready(function(){initNavTree('BundleAdjustment_8h_source.html','');}
-
#include "Eye.h"
-#include "BundleAdjustment.h"
+
#include "BundleAdjustment.h"
+#include "Eye.h"
#include "../math/methods.h"
#include "../math/Vector.h"
#include "../math/Matrix.h"
@@ -75,6 +75,7 @@ $(document).ready(function(){initNavTree('BundleAdjustment__LM_8h.html','');});

Classes

class  meow::BundleAdjustment_LM< Pixel > + 利用 Levenberg-Marquardt Method去推估相機旋轉角度與焦距 More...
  @@ -61,416 +61,403 @@ $(document).ready(function(){initNavTree('BundleAdjustment__LM_8h_source.html',' Go to the documentation of this file.
1 #ifndef BundleAdjustment_LM_H__
2 #define BundleAdjustment_LM_H__
3 
-
4 #include "Eye.h"
-
5 
-
6 #include "BundleAdjustment.h"
-
7 
-
8 #include "../math/methods.h"
-
9 #include "../math/Vector.h"
-
10 #include "../math/Matrix.h"
-
11 #include "../math/utility.h"
-
12 
-
13 #include "../oo/ObjBase.h"
-
14 
-
15 #include <algorithm>
-
16 
-
17 namespace meow {
-
18 
-
19 template<class Pixel>
-
20 class BundleAdjustment_LM: public BundleAdjustment<Pixel> {
-
21 private:
-
22  struct MatchPair {
-
23  size_t from_i;
-
24  Matrix<double> from_m;
-
25  size_t to_i;
-
26  Matrix<double> to_m;
-
27  };
-
28 
-
29  class NoOffsetController {
-
30  private:
-
31  std::vector<MatchPair >* pairs_;
-
32  std::vector<Rotation3D <double> >* rot_;
-
33  std::vector<PhotoProjection<double> >* pho_;
- -
35  bool flag;
-
36  public:
-
37  NoOffsetController(std::vector<MatchPair >* pairs,
-
38  std::vector<Rotation3D<double> >* rot,
-
39  std::vector<PhotoProjection<double> >* pho,
-
40  bool fg):
-
41  pairs_(pairs), rot_(rot), pho_(pho), bll_(3.0, 1.0), flag(fg) {
-
42  }
-
43  Vector<double> init() {
-
44  if (flag == false) {
-
45  Vector<double> v(4, 0.0);
-
46  int i = (*pho_).size() - 1, n = 0;
-
47  v.entry(n++, (*pho_)[i].focal());
-
48  v.entry(n++, (*rot_)[i].theta(0));
-
49  v.entry(n++, (*rot_)[i].theta(1));
-
50  v.entry(n++, (*rot_)[i].theta(2));
-
51  return v;
-
52  }
-
53  Vector<double> v((*rot_).size() * 4, 0.0);
-
54  for (size_t n = 0, i = 0, I = (*rot_).size(); i < I; ++i) {
-
55  v.entry(n++, (*pho_)[i].focal());
-
56  v.entry(n++, (*rot_)[i].theta(0));
-
57  v.entry(n++, (*rot_)[i].theta(1));
-
58  v.entry(n++, (*rot_)[i].theta(2));
-
59  }
-
60  return v;
-
61  }
-
62  Vector<double> residure(Vector<double> const& v) {
-
63  for (size_t n = 0, i = 0, I = (*rot_).size(); i < I; ++i) {
-
64  if (flag == false && i != I - 1) continue;
-
65  (*pho_)[i].focal(v(n++));
-
66  (*rot_)[i].theta(0, v(n++));
-
67  (*rot_)[i].theta(1, v(n++));
-
68  (*rot_)[i].theta(2, v(n++));
-
69  }
-
70  for (typename std::vector<MatchPair>::iterator
-
71  it = (*pairs_).begin(), ed = (*pairs_).end(); it != ed; ++it) {
-
72  (*it).from_m.entry(2, 0, -(*pho_)[(*it).from_i].focal());
-
73  (*it). to_m.entry(2, 0, -(*pho_)[(*it). to_i].focal());
-
74  }
-
75  //
-
76  Vector<double> ret((*pairs_).size() * 2, 0.0);
-
77  size_t n = 0;
-
78  for (typename std::vector<MatchPair>::iterator
-
79  it = (*pairs_).begin(), ed = (*pairs_).end(); it != ed; ++it, ++n) {
-
80  Matrix<double> tr(
-
81  (*it).to_m
-
82  -
-
83  (*pho_)[(*it).to_i].transformate(
-
84  (*rot_)[(*it).to_i].transformate(
-
85  (*rot_)[(*it).from_i].transformateInv(
-
86  bll_.transformate(
-
87  (*it).from_m
-
88  )
-
89  )
-
90  )
-
91  )
-
92  );
-
93  ret.entry(n * 2 , tr(0, 0));
-
94  ret.entry(n * 2 + 1, tr(1, 0));
-
95  }
-
96  //*
-
97  //for (size_t i = 0; i < ret.dimension(); i++) {
-
98  // printf("(%-9.1f ", ret(i));
-
99  // if (i % 8 == 7) printf("\n");
-
100  //}
-
101  //printf("\n");
-
102  printf("re = %20.5f ?? %f\n", ret.length2(), 25.0 * (*pairs_).size());
-
103  // */
-
104  return ret;
-
105  }
-
106  Matrix<double> jacobian() const {
-
107  Matrix<double> ret;
-
108  if (flag == false) {
-
109  ret.reset((*pairs_).size() * 2, 4, 0.0);
-
110  }
-
111  else {
-
112  ret.reset((*pairs_).size() * 2, (*rot_).size() * 4, 0.0);
-
113  }
-
114  size_t n = 0;
-
115  for (typename std::vector<MatchPair>::iterator
-
116  it = (*pairs_).begin(), ed = (*pairs_).end(); it != ed; ++it, ++n) {
-
117  Matrix<double> tr_A( bll_ .transformate((*it).from_m));
-
118  Matrix<double> tr_B((*rot_)[(*it).from_i].transformateInv(tr_A));
-
119  Matrix<double> tr_C((*rot_)[(*it). to_i].transformate (tr_B));
-
120  Matrix<double> ja_A((*pho_)[(*it). to_i].jacobian (tr_C));
-
121  Matrix<double> ja_B((*rot_)[(*it). to_i].jacobian (tr_B));
-
122  Matrix<double> ja_C((*rot_)[(*it).from_i].jacobianInv(tr_A));
-
123  Matrix<double> m;
-
124  int fr = (flag == false ? 0 : (*it).from_i);
-
125  int to = (flag == false ? 0 : (*it). to_i);
-
126  if (flag != false || (*it).from_i == (*rot_).size() - 1) {
-
127  m = ja_A * ja_B * ja_C * bll_.jacobian((*it).from_m).col(2);
-
128  ret.entry(n * 2 , fr * 4, m(0, 0));
-
129  ret.entry(n * 2 + 1, fr * 4, m(1, 0));
-
130  for (size_t k = 0; k < 3; ++k) {
-
131  m = ja_A * ja_B * (*rot_)[(*it).from_i].jacobianInv(tr_A, k);
-
132  ret.entry(n * 2 , fr * 4 + 1 + k, m(0, 0));
-
133  ret.entry(n * 2 + 1, fr * 4 + 1 + k, m(1, 0));
-
134  }
-
135  }
-
136  if (flag != false || (*it).to_i == (*rot_).size() - 1) {
-
137  m = (*pho_)[(*it).to_i].jacobian(tr_C, 0);
-
138  ret.entry(n * 2 , to * 4, m(0, 0));
-
139  ret.entry(n * 2 + 1, to * 4, m(1, 0));
-
140  for (size_t k = 0; k < 3; ++k) {
-
141  m = ja_A * (*rot_)[(*it).to_i].jacobian(tr_B, k);
-
142  ret.entry(n * 2 , to * 4 + 1 + k, m(0, 0));
-
143  ret.entry(n * 2 + 1, to * 4 + 1 + k, m(1, 0));
-
144  }
-
145  }
-
146  }
-
147  return ret;
-
148  }
-
149  Matrix<double> identity() const {
-
150  if (flag == false) {
-
151  Matrix<double> ret(4, 4, 0.0);
-
152  ret.identitied();
-
153  return ret;
-
154  }
-
155  Matrix<double> ret((*rot_).size() * 4, (*rot_).size() * 4, 0.0);
-
156  ret.identitied();
-
157  return ret;
-
158  }
-
159  };
-
160 
-
161  struct Myself {
-
162  double t_;
-
163 
-
164  Myself(): t_(5.0) {
+
4 
+
5 #include "BundleAdjustment.h"
+
6 
+
7 #include "Eye.h"
+
8 
+
9 #include "../math/methods.h"
+
10 #include "../math/Vector.h"
+
11 #include "../math/Matrix.h"
+
12 #include "../math/utility.h"
+
13 
+
14 #include "../oo/ObjBase.h"
+
15 
+
16 #include <algorithm>
+
17 
+
18 namespace meow {
+
19 
+
25 template<class Pixel>
+
26 class BundleAdjustment_LM: public BundleAdjustment<Pixel> {
+
27 private:
+
28  /*
+
29  struct MatchPair {
+
30  size_t from_i;
+
31  Matrix<double> from_m;
+
32  size_t to_i;
+
33  Matrix<double> to_m;
+
34  };
+
35 
+
36  class NoOffsetController {
+
37  private:
+
38  std::vector<MatchPair >* pairs_;
+
39  std::vector<Rotation3D <double> >* rot_;
+
40  std::vector<PhotoProjection<double> >* pho_;
+
41  BallProjection<double> bll_;
+
42  bool flag;
+
43  public:
+
44  NoOffsetController(std::vector<MatchPair >* pairs,
+
45  std::vector<Rotation3D<double> >* rot,
+
46  std::vector<PhotoProjection<double> >* pho,
+
47  bool fg):
+
48  pairs_(pairs), rot_(rot), pho_(pho), bll_(3.0, 1.0), flag(fg) {
+
49  }
+
50  Vector<double> init() {
+
51  if (flag == false) {
+
52  Vector<double> v(4, 0.0);
+
53  int i = (*pho_).size() - 1, n = 0;
+
54  v.scalar(n++, (*pho_)[i].focal());
+
55  v.scalar(n++, (*rot_)[i].theta(0));
+
56  v.scalar(n++, (*rot_)[i].theta(1));
+
57  v.scalar(n++, (*rot_)[i].theta(2));
+
58  return v;
+
59  }
+
60  Vector<double> v((*rot_).size() * 4, 0.0);
+
61  for (size_t n = 0, i = 0, I = (*rot_).size(); i < I; ++i) {
+
62  v.scalar(n++, (*pho_)[i].focal());
+
63  v.scalar(n++, (*rot_)[i].theta(0));
+
64  v.scalar(n++, (*rot_)[i].theta(1));
+
65  v.scalar(n++, (*rot_)[i].theta(2));
+
66  }
+
67  return v;
+
68  }
+
69  Vector<double> residure(Vector<double> const& v) {
+
70  for (size_t n = 0, i = 0, I = (*rot_).size(); i < I; ++i) {
+
71  if (flag == false && i != I - 1) continue;
+
72  (*pho_)[i].focal(v(n++));
+
73  (*rot_)[i].theta(0, v(n++));
+
74  (*rot_)[i].theta(1, v(n++));
+
75  (*rot_)[i].theta(2, v(n++));
+
76  }
+
77  for (typename std::vector<MatchPair>::iterator
+
78  it = (*pairs_).begin(), ed = (*pairs_).end(); it != ed; ++it) {
+
79  (*it).from_m.entry(2, 0, -(*pho_)[(*it).from_i].focal());
+
80  (*it). to_m.entry(2, 0, -(*pho_)[(*it). to_i].focal());
+
81  }
+
82  //
+
83  Vector<double> ret((*pairs_).size() * 2, 0.0);
+
84  size_t n = 0;
+
85  for (typename std::vector<MatchPair>::iterator
+
86  it = (*pairs_).begin(), ed = (*pairs_).end(); it != ed; ++it, ++n) {
+
87  Matrix<double> tr(
+
88  (*it).to_m
+
89  -
+
90  (*pho_)[(*it).to_i].transformate(
+
91  (*rot_)[(*it).to_i].transformate(
+
92  (*rot_)[(*it).from_i].transformateInv(
+
93  bll_.transformate(
+
94  (*it).from_m
+
95  )
+
96  )
+
97  )
+
98  )
+
99  );
+
100  ret.scalar(n * 2 , tr(0, 0));
+
101  ret.scalar(n * 2 + 1, tr(1, 0));
+
102  }
+
103  //*
+
104  //for (size_t i = 0; i < ret.dimension(); i++) {
+
105  // printf("(%-9.1f ", ret(i));
+
106  // if (i % 8 == 7) printf("\n");
+
107  //}
+
108  //printf("\n");
+
109  printf("re = %20.5f ?? %f\n", ret.length2(), 25.0 * (*pairs_).size());
+
110  // */
+
111  return ret;
+
112  }
+
113  Matrix<double> jacobian() const {
+
114  Matrix<double> ret;
+
115  if (flag == false) {
+
116  ret.reset((*pairs_).size() * 2, 4, 0.0);
+
117  }
+
118  else {
+
119  ret.reset((*pairs_).size() * 2, (*rot_).size() * 4, 0.0);
+
120  }
+
121  size_t n = 0;
+
122  for (typename std::vector<MatchPair>::iterator
+
123  it = (*pairs_).begin(), ed = (*pairs_).end(); it != ed; ++it, ++n) {
+
124  Matrix<double> tr_A( bll_ .transformate((*it).from_m));
+
125  Matrix<double> tr_B((*rot_)[(*it).from_i].transformateInv(tr_A));
+
126  Matrix<double> tr_C((*rot_)[(*it). to_i].transformate (tr_B));
+
127  Matrix<double> ja_A((*pho_)[(*it). to_i].jacobian (tr_C));
+
128  Matrix<double> ja_B((*rot_)[(*it). to_i].jacobian (tr_B));
+
129  Matrix<double> ja_C((*rot_)[(*it).from_i].jacobianInv(tr_A));
+
130  Matrix<double> m;
+
131  int fr = (flag == false ? 0 : (*it).from_i);
+
132  int to = (flag == false ? 0 : (*it). to_i);
+
133  if (flag != false || (*it).from_i == (*rot_).size() - 1) {
+
134  m = ja_A * ja_B * ja_C * bll_.jacobian((*it).from_m).col(2);
+
135  ret.entry(n * 2 , fr * 4, m(0, 0));
+
136  ret.entry(n * 2 + 1, fr * 4, m(1, 0));
+
137  for (size_t k = 0; k < 3; ++k) {
+
138  m = ja_A * ja_B * (*rot_)[(*it).from_i].jacobianInv(tr_A, k);
+
139  ret.entry(n * 2 , fr * 4 + 1 + k, m(0, 0));
+
140  ret.entry(n * 2 + 1, fr * 4 + 1 + k, m(1, 0));
+
141  }
+
142  }
+
143  if (flag != false || (*it).to_i == (*rot_).size() - 1) {
+
144  m = (*pho_)[(*it).to_i].jacobian(tr_C, 0);
+
145  ret.entry(n * 2 , to * 4, m(0, 0));
+
146  ret.entry(n * 2 + 1, to * 4, m(1, 0));
+
147  for (size_t k = 0; k < 3; ++k) {
+
148  m = ja_A * (*rot_)[(*it).to_i].jacobian(tr_B, k);
+
149  ret.entry(n * 2 , to * 4 + 1 + k, m(0, 0));
+
150  ret.entry(n * 2 + 1, to * 4 + 1 + k, m(1, 0));
+
151  }
+
152  }
+
153  }
+
154  return ret;
+
155  }
+
156  Matrix<double> identity() const {
+
157  if (flag == false) {
+
158  Matrix<double> ret(4, 4, 0.0);
+
159  ret.identitied();
+
160  return ret;
+
161  }
+
162  Matrix<double> ret((*rot_).size() * 4, (*rot_).size() * 4, 0.0);
+
163  ret.identitied();
+
164  return ret;
165  }
-
166 
-
167  Myself(Myself const& m): t_(m.t_) {
-
168  }
-
169 
-
170  ~Myself() {
-
171  }
-
172  };
-
173 
-
174  Self<Myself> const self;
-
175 
-
176 public:
- -
178  }
-
179 
- -
181  self(b.self, Self<Myself>::COPY_FROM) {
-
182  }
+
166  };
+
167  // */
+
168 
+
169  struct Myself {
+
170  double t_;
+
171 
+
172  Myself(): t_(5.0) {
+
173  }
+
174 
+
175  Myself(Myself const& m): t_(m.t_) {
+
176  }
+
177 
+
178  ~Myself() {
+
179  }
+
180  };
+
181 
+
182  Self<Myself> const self;
183 
- -
185  }
-
186 
- -
188  self().copyFrom(b.self);
-
189  return *this;
+
184 public:
+ +
186  }
+
187 
+ +
189  self(b.self, Self<Myself>::COPY_FROM) {
190  }
191 
- -
193  self().referenceFrom(b.self);
-
194  return *this;
-
195  }
-
196 
-
197  double threshold() const {
-
198  return self->t_;
-
199  }
-
200 
-
201  double threshold(double t) {
-
202  self()->t_ = t;
-
203  return threshold();
-
204  }
-
205 
-
206  bool adjustEye(std::vector<SceneInfo<Pixel> >* seq) const {
-
207  // check
-
208  size_t N = (*seq).size();
-
209  for (size_t i = 0; i < N; ++i) {
-
210  if ( (*seq)[i].flag & CAN_OFFSET ) return false;
-
211  if (!((*seq)[i].flag & CAN_ROTATE)) return false;
-
212  if (!((*seq)[i].flag & CAN_ZOOM )) return false;
-
213  }
-
214  // get all pairs
- -
216  std::vector<FPS_K> beg(N), end(N);
-
217  FPS_K it1, it2;
-
218  for (size_t i = 0; i < N; ++i) {
-
219  beg[i] = (*seq)[i].eye->camera().fixedPoints2D().identityPoints().begin();
-
220  end[i] = (*seq)[i].eye->camera().fixedPoints2D().identityPoints().end ();
-
221  }
-
222  std::vector<std::vector<std::vector<MatchPair> > > all_pairs(N);
-
223  for (size_t i = 0; i < N; ++i) {
-
224  all_pairs[i].resize(N);
-
225  for (size_t j = 0; j < N; ++j) {
-
226  if (i == j) continue;
-
227  for (it1 = beg[i], it2 = beg[j]; it1 != end[i] && it2 != end[j]; ) {
-
228  if (it1->first < it2->first) ++it1;
-
229  else if(it1->first > it2->first) ++it2;
-
230  else {
-
231  MatchPair tmp;
-
232  tmp.from_i = i;
-
233  tmp.from_m = it1->second.matrix();
-
234  tmp.from_m.rows(3, -(*seq)[i].eye->camera().photo().focal());
-
235  tmp. to_i = j;
-
236  tmp. to_m = it2->second.matrix();
-
237  tmp. to_m.rows(3, -(*seq)[j].eye->camera().photo().focal());
-
238  all_pairs[i][j].push_back(tmp);
-
239  ++it1;
-
240  ++it2;
-
241  }
-
242  }
-
243  }
-
244  }
-
245  //
-
246  std::vector<MatchPair > pairs;
-
247  std::vector<Rotation3D <double> > rot;
-
248  std::vector<PhotoProjection<double> > pho;
-
249  std::vector<int > sum (N, 0);
-
250  std::vector<int > big (N, 0);
-
251  std::vector<int > real(N);
-
252  std::vector<int > rev (N);
-
253  // first!!
-
254  int best = -1, best_ct = -1;
-
255  for (size_t i = 0; i < N; ++i) {
-
256  int d = 0;
-
257  for (size_t j = 0; j < N; ++j) {
-
258  d += all_pairs[i][j].size();
-
259  }
-
260  if (best_ct < d) {
-
261  best_ct = d;
-
262  best = i;
-
263  }
-
264  real[i] = i;
-
265  big [i] = i;
-
266  }
-
267  for (size_t i = 0; i < N; ++i) {
-
268  // update else
-
269  real[i] = best;
-
270  rev[best] = i;
-
271  for (size_t j = 0; j < N; ++j) {
-
272  if ((int)j == best) {
-
273  sum[j] = -1;
-
274  continue;
-
275  }
-
276  if (sum[j] < 0) continue;
-
277  sum[j] += all_pairs[best][j].size();
-
278  if (all_pairs[j][big[j]].size() < all_pairs[j][best].size())
-
279  big[j] = best;
-
280  }
-
281  // add me
-
282  printf("%d same as %d\n", best, big[best]);
-
283  if (big[best] == best) {
-
284  rot.push_back((*seq)[big[best]].eye->camera() .rotation());
-
285  pho.push_back((*seq)[big[best]].eye->camera().photo().projection());
-
286  }
-
287  else {
-
288  rot.push_back(rot[rev[big[best]]]);
-
289  pho.push_back(pho[rev[big[best]]]);
-
290  }
-
291  for (size_t j = 0; j < N; ++j) {
-
292  if (sum[j] >= 0) continue;
-
293  for (size_t k = 0, K = all_pairs[best][j].size(); k < K; ++k) {
-
294  all_pairs[best][j][k].from_i = rev[all_pairs[best][j][k].from_i];
-
295  all_pairs[best][j][k]. to_i = rev[all_pairs[best][j][k]. to_i];
-
296  pairs.push_back(all_pairs[best][j][k]);
-
297  }
-
298  for (size_t k = 0, K = all_pairs[j][best].size(); k < K; ++k) {
-
299  all_pairs[j][best][k].from_i = rev[all_pairs[j][best][k].from_i];
-
300  all_pairs[j][best][k]. to_i = rev[all_pairs[j][best][k]. to_i];
-
301  pairs.push_back(all_pairs[j][best][k]);
-
302  }
-
303  }
-
304  for (size_t j = 0; j < N; ++j) { printf("%4d ", sum[j]); } printf("\n");
-
305  for (size_t j = 0; j < N; ++j) { printf("%4d ", big[j]); } printf("\n");
-
306  for (size_t j = 0; j < N; ++j) { printf("%4d ", real[j]); } printf("\n");
-
307  printf("\n");
-
308  // bundle adjustment
-
309  if (i > 0) {
-
310  NoOffsetController ct1(&pairs, &rot, &pho, false);
-
311  ct1.residure(levenbergMarquardtTraining(ct1, ct1.init(),
-
312  7.3, 1.0,
-
313  squ(threshold()) * pairs.size(),
-
314  7, 1000));
-
315  /*
-
316  NoOffsetController ct2(&pairs, &rot, &pho, true);
-
317  ct2.residure(levenbergMarquardtTraining(ct2, ct2.init(),
-
318  0.1 * pairs.size(), 1.0,
-
319  squ(threshold()) * pairs.size(),
-
320  7, 1000));
-
321  // */
-
322  }
-
323  // find next
-
324  best_ct = 0;
-
325  for (size_t j = 0; j < N; ++j) {
-
326  if (best_ct < sum[j]) {
-
327  best = j;
-
328  best_ct = sum[j];
-
329  }
-
330  }
-
331  getchar();
-
332  //if (i == N - 2) break;
-
333  }
-
334  // feedback
-
335  for (size_t i = 0; i < N; ++i) {
-
336  int id = real[i];
-
337  (*seq)[id].eye->cameraGet() .rotation (rot[i]);
-
338  (*seq)[id].eye->cameraGet().photoGet().projection(pho[i]);
-
339  //if (i == N - 2) break;
-
340  }
-
341  return true;
-
342  }
-
343 
-
344  bool adjustFixedPoint(std::vector<SceneInfo<Pixel> >* seq) const {
-
345  return false;
-
346  }
-
347 
-
348  bool write(FILE* f, bool bin, unsigned int fg) const {
-
349  return false;
-
350  }
-
351 
-
352  bool read(FILE* f, bool bin, unsigned int fg) const {
-
353  return false;
-
354  }
-
355 
-
356  ObjBase* create() const {
-
357  return new BundleAdjustment_LM;
-
358  }
-
359 
-
360  ObjBase* copyFrom(ObjBase const* o) {
-
361  return &(copyFrom(*(BundleAdjustment_LM const*)o));
-
362  }
-
363 
-
364  char const* ctype() const {
-
365  return typeid(*this).name();
-
366  }
-
367 
-
368  std::string type() const {
-
369  return std::string(ctype());
-
370  }
-
371 };
-
372 
-
373 } // meow
-
374 
-
375 #endif // BundleAdjustment_LM_H__
-
Matrix col(size_t c) const
Return the c -th column.
Definition: Matrix.h:263
- -
Vector< Scalar > levenbergMarquardtTraining(Function &f, Vector< Scalar > const &init, Scalar const &init_mu, Scalar const &mu_pow, Scalar const &er_max, int retry_number, int counter)
Definition: methods.h:183
- -
Scalar length2() const
same as (*this).dot(*this)
Definition: Vector.h:204
- - -
char const * ctype() const
用C-style string回傳這個class的type name
- - - -
std::string type() const
用std::string回傳這個class的type name
-
bool write(FILE *f, bool bin, unsigned int fg) const
將物件寫入檔案, 預設implement為直接回傳 false
-
BundleAdjustment_LM & referenceFrom(BundleAdjustment_LM const &b)
+ +
193  }
+
194 
+ +
196  self().copyFrom(b.self);
+
197  return *this;
+
198  }
+
199 
+ +
201  self().referenceFrom(b.self);
+
202  return *this;
+
203  }
+
204 
+
205  double threshold() const {
+
206  return self->t_;
+
207  }
+
208 
+
209  double threshold(double t) {
+
210  self()->t_ = t;
+
211  return threshold();
+
212  }
+
213 
+
214  bool adjustEyes(std::vector<EyesReferenceInfo<Pixel> > seq) const {
+
215  // check
+
216  size_t N = seq.size();
+
217  for (size_t i = 0; i < N; ++i) {
+
218  if ( seq[i].flag & CAN_OFFSET ) return false;
+
219  if (!(seq[i].flag & CAN_ROTATE)) return false;
+
220  if (!(seq[i].flag & CAN_ZOOM )) return false;
+
221  if (i > 0 && seq[i - 1].eye.offset() != seq[i].eye.offset()) return false;
+
222  }
+
223  return false;
+
224 
+
225  /*
+
226  std::vector<std::vector<Vector3D<double> > > points;
+
227  // reference
+
228  std::vector<Rotation3D <double> > rots(N);
+
229  std::vector<PhotoProjection<double> > phos(N, PhotoProjection<double>(3));
+
230  for (size_t i = 0; i < N; ++i) {
+
231  rots[i].referenceFrom(seq[i].eye.cameraGet().rotationGet());
+
232  phos[i].referenceFrom(seq[i].eye.cameraGet().photoGet().projectionGet());
+
233  }
+
234 
+
235  // get all pairs
+
236  typedef typename Camera<Pixel>::FixedPoints2D::IdentityPointsMapIterK FPS_K;
+
237  std::vector<FPS_K> beg(N), end(N);
+
238  for (size_t i = 0; i < N; ++i) {
+
239  beg[i] = seq[i].eye.cameraGet().fixedPoints2DGet().pointsGet().begin();
+
240  end[i] = seq[i].eye.cameraGet().fixedPoints2DGet().pointsGet().end ();
+
241  }
+
242 
+
243  FPS_K it1, it2;
+
244  std::vector<std::vector<std::vector<MatchPair> > > all_pairs(N);
+
245  for (size_t i = 0; i < N; ++i) {
+
246  all_pairs[i].resize(N);
+
247  for (size_t j = 0; j < N; ++j) {
+
248  if (i == j) continue;
+
249  for (it1 = beg[i], it2 = beg[j]; it1 != end[i] && it2 != end[j]; ) {
+
250  if (it1->first < it2->first) ++it1;
+
251  else if(it1->first > it2->first) ++it2;
+
252  else {
+
253  MatchPair tmp;
+
254  tmp.from_i = i;
+
255  tmp.from_m = it1->second.matrix();
+
256  tmp.from_m.rows(3, -seq[i].eye.camera().photo().focal());
+
257  tmp. to_i = j;
+
258  tmp. to_m = it2->second.matrix();
+
259  tmp. to_m.rows(3, -seq[j].eye.camera().photo().focal());
+
260  all_pairs[i][j].push_back(tmp);
+
261  ++it1;
+
262  ++it2;
+
263  }
+
264  }
+
265  }
+
266  }
+
267  //
+
268  std::vector<MatchPair > pairs;
+
269  std::vector<Rotation3D <double> > rot;
+
270  std::vector<PhotoProjection<double> > pho;
+
271  std::vector<int > sum (N, 0);
+
272  std::vector<int > big (N, 0);
+
273  std::vector<int > real(N);
+
274  std::vector<int > rev (N);
+
275  // first!!
+
276  int best = -1, best_ct = -1;
+
277  for (size_t i = 0; i < N; ++i) {
+
278  int d = 0;
+
279  for (size_t j = 0; j < N; ++j) {
+
280  d += all_pairs[i][j].size();
+
281  }
+
282  if (best_ct < d) {
+
283  best_ct = d;
+
284  best = i;
+
285  }
+
286  real[i] = i;
+
287  big [i] = i;
+
288  }
+
289  for (size_t i = 0; i < N; ++i) {
+
290  // update else
+
291  real[i] = best;
+
292  rev[best] = i;
+
293  for (size_t j = 0; j < N; ++j) {
+
294  if ((int)j == best) {
+
295  sum[j] = -1;
+
296  continue;
+
297  }
+
298  if (sum[j] < 0) continue;
+
299  sum[j] += all_pairs[best][j].size();
+
300  if (all_pairs[j][big[j]].size() < all_pairs[j][best].size())
+
301  big[j] = best;
+
302  }
+
303  // add me
+
304  printf("%d same as %d\n", best, big[best]);
+
305  if (big[best] == best) {
+
306  rot.push_back((*seq)[big[best]].eye->camera() .rotation());
+
307  pho.push_back((*seq)[big[best]].eye->camera().photo().projection());
+
308  }
+
309  else {
+
310  rot.push_back(rot[rev[big[best]]]);
+
311  pho.push_back(pho[rev[big[best]]]);
+
312  }
+
313  for (size_t j = 0; j < N; ++j) {
+
314  if (sum[j] >= 0) continue;
+
315  for (size_t k = 0, K = all_pairs[best][j].size(); k < K; ++k) {
+
316  all_pairs[best][j][k].from_i = rev[all_pairs[best][j][k].from_i];
+
317  all_pairs[best][j][k]. to_i = rev[all_pairs[best][j][k]. to_i];
+
318  pairs.push_back(all_pairs[best][j][k]);
+
319  }
+
320  for (size_t k = 0, K = all_pairs[j][best].size(); k < K; ++k) {
+
321  all_pairs[j][best][k].from_i = rev[all_pairs[j][best][k].from_i];
+
322  all_pairs[j][best][k]. to_i = rev[all_pairs[j][best][k]. to_i];
+
323  pairs.push_back(all_pairs[j][best][k]);
+
324  }
+
325  }
+
326  if (i > 0) {
+
327  NoOffsetController ct1(&pairs, &rot, &pho, false);
+
328  ct1.residure(levenbergMarquardtTraining(ct1, ct1.init(),
+
329  7.3, 1.0,
+
330  squ(threshold()) * pairs.size(),
+
331  7, 1000));
+
332  }
+
333  best_ct = 0;
+
334  for (size_t j = 0; j < N; ++j) {
+
335  if (best_ct < sum[j]) {
+
336  best = j;
+
337  best_ct = sum[j];
+
338  }
+
339  }
+
340  }
+
341  return true;
+
342  // */
+
343  }
+
344 
+
345  bool adjustFixedPoints(std::vector<EyesReferenceInfo<Pixel> > seq) const {
+
346  return false;
+
347  }
+
348 
+
349  bool write(FILE* f, bool bin, unsigned int fg) const {
+
350  return false;
+
351  }
+
352 
+
353  bool read(FILE* f, bool bin, unsigned int fg) const {
+
354  return false;
+
355  }
+
356 
+
357  ObjBase* create() const {
+
358  return new BundleAdjustment_LM;
+
359  }
+
360 
+
361  ObjBase* copyFrom(ObjBase const* o) {
+
362  return &(copyFrom(*(BundleAdjustment_LM const*)o));
+
363  }
+
364 
+
365  char const* ctype() const {
+
366  return typeid(*this).name();
+
367  }
+
368 
+
369  std::string type() const {
+
370  return std::string(ctype());
+
371  }
+
372 };
+
373 
+
374 } // meow
+
375 
+
376 #endif // BundleAdjustment_LM_H__
+
這邊定義Bundle-Adjustment就是利用一系列場景來反推算出相機資訊 (包含拍攝座標, 角度與焦距) 或是在已知相機資訊的情況下推算出底片中 物體如何移動.
+ + + +
char const * ctype() const
用C-style string回傳這個class的type name
+
記住每個 Eye 的reference以及Flag
+
利用 Levenberg-Marquardt Method去推估相機旋轉角度與焦距
+
std::string type() const
用std::string回傳這個class的type name
+
bool write(FILE *f, bool bin, unsigned int fg) const
將物件寫入檔案, 預設implement為直接回傳 false
+
BundleAdjustment_LM & referenceFrom(BundleAdjustment_LM const &b)
一切物件的Base, 並要求每個物件都要有read, write, create, ... 等功能
Definition: ObjBase.h:15
-
vector
Definition: Vector.h:19
+ +
bool adjustFixedPoints(std::vector< EyesReferenceInfo< Pixel > > seq) const
推算場景中的物體資訊
- -
ObjBase * copyFrom(ObjBase const *o)
複製, 預設使用operator=
-
bool adjustFixedPoint(std::vector< SceneInfo< Pixel > > *seq) const
- -
BundleAdjustment_LM(BundleAdjustment_LM const &b)
- - +
ObjBase * copyFrom(ObjBase const *o)
複製, 預設使用operator=
+ +
BundleAdjustment_LM(BundleAdjustment_LM const &b)
+
改變焦距
+
bool adjustEyes(std::vector< EyesReferenceInfo< Pixel > > seq) const
推算相機資訊
-
bool read(FILE *f, bool bin, unsigned int fg) const
-
Matrix & identitied()
Let itself be an identity matrix.
Definition: Matrix.h:351
-
Entry entry(size_t r, size_t c) const
Access the entry at r x c.
Definition: Matrix.h:196
+
bool read(FILE *f, bool bin, unsigned int fg) const
+
Matrix & identitied()
Let itself be an identity matrix.
Definition: Matrix.h:366
+
Entry entry(size_t r, size_t c) const
Access the entry at r x c.
Definition: Matrix.h:211
- - - -
void reset(size_t r, size_t c, Entry const &e)
reset the size of the matrix to r x c with entry all be e
Definition: Matrix.h:110
-
bool adjustEye(std::vector< SceneInfo< Pixel > > *seq) const
-
IdentityPointsMap::const_iterator IdentityPointsMapIterK
-
BundleAdjustment_LM & copyFrom(BundleAdjustment_LM const &b)
-
ObjBase * create() const
回傳一個new出來的物件, 預設implement為直接回傳 NULL
-
T squ(T const &x)
x*x
Definition: utility.h:67
+ + +
void reset(size_t r, size_t c, Entry const &e)
reset the size of the matrix to r x c with entry all be e
Definition: Matrix.h:115
+
BundleAdjustment_LM & copyFrom(BundleAdjustment_LM const &b)
+
ObjBase * create() const
回傳一個new出來的物件, 預設implement為直接回傳 NULL
@@ -478,7 +465,7 @@ $(document).ready(function(){initNavTree('BundleAdjustment__LM_8h_source.html',' @@ -89,7 +89,7 @@ Namespaces @@ -74,151 +74,151 @@ $(document).ready(function(){initNavTree('Camera_8h_source.html','');});
22 template<class Pixel>
23 class Camera: public ObjBase {
24 public:
- +
26 private:
27  struct Myself {
28  Photo<Pixel> photo_;
29  Rotation3D<double> rot_;
30  FixedPoints2D fixed2D_;
31 
-
32  Myself() {
-
33  fixed2D_.dimension(2);
-
34  }
+
32  Myself(): fixed2D_(2) {
+
33  }
+
34 
35  Myself(Myself const& v):
36  photo_(v.photo_), rot_(v.rot_), fixed2D_(v.fixed2D_) {
37  }
-
38  ~Myself() {
-
39  }
-
40  };
-
41 
-
42  Self<Myself> const self;
-
43 public:
-
47  Camera(): self() {
-
48  }
-
49 
-
53  Camera(Camera const& b): self(b.self, Self<Myself>::COPY_FROM) {
-
54  }
-
55 
-
59  ~Camera() {
-
60  }
-
61 
-
65  Camera& copyFrom(Camera const& b) {
-
66  self().copyFrom(b.self);
-
67  return *this;
-
68  }
-
69 
- -
74  self().referenceFrom(b.self);
-
75  return *this;
-
76  }
-
77 
-
81  Photo<Pixel> const& photo() const {
-
82  return self->photo_;
-
83  }
-
84 
- -
89  return self()->photo_;
-
90  }
-
91 
-
95  Photo<Pixel> const& photo(Photo<Pixel> const& pho) {
-
96  self()->photo_.copyFrom(pho);
-
97  return photo();
-
98  }
-
99 
-
103  Rotation3D<double> const& rotation() const {
-
104  return self->rot_;
-
105  }
-
106 
- -
111  return self()->rot_;
-
112  }
-
113 
- -
118  self()->rot_.copyFrom(rot);
-
119  return rotation();
-
120  }
-
121 
-
125  FixedPoints2D const& fixedPoints2D() const {
-
126  return self->fixed2D_;
-
127  }
-
128 
- -
133  return self()->fixed2D_;
-
134  }
-
135 
-
139  FixedPoints2D const& fixedPoints2D(FixedPoints2D const& fps2d) const {
-
140  if (fps2d.dimension() == 2) {
-
141  self()->fixed2D_.copyFrom(fps2d);
-
142  }
-
143  return fixedPoints2D();
-
144  }
-
145 
- -
150  return self->fixed2D_.identityPoint(i);
-
151  }
-
152 
-
156  bool inside(Vector3D<double> p) const {
-
157  return self->photo_.inside(
-
158  Vector3D<double>(rotation().transformate(p.matrix())));
-
159  }
-
160 
-
164  Pixel color(Vector3D<double> p) const {
-
165  return self->photo_.color(
-
166  Vector3D<double>(rotation().transformate(p.matrix())));
-
167  }
-
168 
-
172  Camera& operator=(Camera const& b) {
-
173  return copyFrom(b);
-
174  }
-
175 
-
180  bool write(FILE* f, bool bin, unsigned int fg) const {
-
181  if (bin) {
-
182  double tmp;
-
183  for (size_t i = 0; i < 3; ++i) {
-
184  if (fwrite(&(tmp = rotation().theta(i)), sizeof(tmp), 1, f) < 1)
-
185  return false;
-
186  }
-
187  }
-
188  else {
-
189  for (size_t i = 0; i < 3; ++i) {
-
190  if (fprintf(f, "%f ", rotation().theta(i)) < 1) return false;
-
191  }
-
192  fprintf(f, "\n");
-
193  }
-
194  return (fixedPoints2D().write(f, bin, fg) && photo().write(f, bin, fg));
-
195  }
-
196 
-
201  bool read(FILE* f, bool bin, unsigned int fg) {
-
202  if (bin) {
-
203  double tmp;
-
204  for (size_t i = 0; i < 3; ++i) {
-
205  if (fread(&tmp, sizeof(tmp), 1, f) < 1) {
-
206  return false;
-
207  }
-
208  rotationGet().theta(i, tmp);
-
209  }
-
210  }
-
211  else {
-
212  double a;
-
213  for (size_t i = 0; i < 3; ++i) {
-
214  if (fscanf(f, "%lf", &a) < 1) return false;
-
215  rotationGet().theta(i, a);
-
216  }
-
217  }
-
218  return (fixedPoints2DGet().read(f, bin, fg) && photoGet().read(f, bin, fg));
-
219  }
-
220 
-
225  ObjBase* create() const {
-
226  return new Camera();
-
227  }
-
228 
-
237  ObjBase* copyFrom(ObjBase const* b) {
-
238  return &(copyFrom(*(Camera*)b));
-
239  }
-
240 
-
245  char const* ctype() const{
-
246  static char const* ptr = typeid(*this).name();
-
247  return ptr;
+
38 
+
39  ~Myself() {
+
40  }
+
41  };
+
42 
+
43  Self<Myself> const self;
+
44 public:
+
48  Camera(): self() {
+
49  }
+
50 
+
54  Camera(Camera const& b): self(b.self, Self<Myself>::COPY_FROM) {
+
55  }
+
56 
+
60  ~Camera() {
+
61  }
+
62 
+
66  Camera& copyFrom(Camera const& b) {
+
67  self().copyFrom(b.self);
+
68  return *this;
+
69  }
+
70 
+ +
75  self().referenceFrom(b.self);
+
76  return *this;
+
77  }
+
78 
+
82  Photo<Pixel> photo() const {
+
83  return self->photo_;
+
84  }
+
85 
+ +
90  return self()->photo_;
+
91  }
+
92 
+ +
97  self()->photo_.copyFrom(pho);
+
98  return photo();
+
99  }
+
100 
+ +
105  return self->rot_;
+
106  }
+
107 
+ +
112  return self()->rot_;
+
113  }
+
114 
+ +
119  self()->rot_.copyFrom(rot);
+
120  return rotation();
+
121  }
+
122 
+ +
127  return self->fixed2D_;
+
128  }
+
129 
+ +
134  return self()->fixed2D_;
+
135  }
+
136 
+ +
141  if (fps2d.dimension() == 2) {
+
142  self()->fixed2D_.copyFrom(fps2d);
+
143  }
+
144  return fixedPoints2D();
+
145  }
+
146 
+ +
151  return self->fixed2D_.identityPoint(i);
+
152  }
+
153 
+
157  bool inside(Vector3D<double> const& p) const {
+
158  return self->photo_.inside(
+
159  Vector3D<double>(rotation().transformate(p.matrix())));
+
160  }
+
161 
+
165  Pixel color(Vector3D<double> const& p) const {
+
166  return self->photo_.color(
+
167  Vector3D<double>(rotation().transformate(p.matrix())));
+
168  }
+
169 
+
173  Camera& operator=(Camera const& b) {
+
174  return copyFrom(b);
+
175  }
+
176 
+
181  bool write(FILE* f, bool bin, unsigned int fg) const {
+
182  if (bin) {
+
183  double tmp;
+
184  for (size_t i = 0; i < 3; ++i) {
+
185  if (fwrite(&(tmp = rotation().theta(i)), sizeof(tmp), 1, f) < 1)
+
186  return false;
+
187  }
+
188  }
+
189  else {
+
190  for (size_t i = 0; i < 3; ++i) {
+
191  if (fprintf(f, "%f ", rotation().theta(i)) < 1) return false;
+
192  }
+
193  fprintf(f, "\n");
+
194  }
+
195  return (fixedPoints2D().write(f, bin, fg) && photo().write(f, bin, fg));
+
196  }
+
197 
+
202  bool read(FILE* f, bool bin, unsigned int fg) {
+
203  if (bin) {
+
204  double tmp;
+
205  for (size_t i = 0; i < 3; ++i) {
+
206  if (fread(&tmp, sizeof(tmp), 1, f) < 1) {
+
207  return false;
+
208  }
+
209  rotationGet().theta(i, tmp);
+
210  }
+
211  }
+
212  else {
+
213  double a;
+
214  for (size_t i = 0; i < 3; ++i) {
+
215  if (fscanf(f, "%lf", &a) < 1) return false;
+
216  rotationGet().theta(i, a);
+
217  }
+
218  }
+
219  return (fixedPoints2DGet().read(f, bin, fg) && photoGet().read(f, bin, fg));
+
220  }
+
221 
+
226  ObjBase* create() const {
+
227  return new Camera();
+
228  }
+
229 
+
238  ObjBase* copyFrom(ObjBase const* b) {
+
239  return &(copyFrom(*(Camera const*)b));
+
240  }
+
241 
+
246  char const* ctype() const{
+
247  return typeid(*this).name();
248  }
249 
254  std::string type() const {
@@ -229,46 +229,46 @@ $(document).ready(function(){initNavTree('Camera_8h_source.html','');});
259 } // meow
260 
261 #endif // gra_Camera_H__
-
FixedPoints2D const & fixedPoints2D(FixedPoints2D const &fps2d) const
設定FixedPoint
Definition: Camera.h:139
-
Rotation3D< double > const & rotation(Rotation3D< double > const &rot)
設定rotation
Definition: Camera.h:117
-
Photo< Pixel > const & photo() const
取得 photo
Definition: Camera.h:81
Rotation3D & copyFrom(Rotation3D const &b)
Copy data.
+
size_t dimension() const
回傳dimension
Scalar const & theta(size_t i) const
Get the i -th theta.
Camera.
Definition: Camera.h:23
std::string type() const
回傳class的type
Definition: Camera.h:254
- -
IdentityPoints & copyFrom(IdentityPoints const &b)
複製資料
-
Camera & copyFrom(Camera const &b)
複製資料
Definition: Camera.h:65
-
Camera & operator=(Camera const &b)
same as copyFrom(b)
Definition: Camera.h:172
-
Pixel color(Vector3D< double > p) const
取得底片color
Definition: Camera.h:164
-
bool write(FILE *f, bool bin, unsigned int fg) const
將資料寫入檔案
Definition: Camera.h:180
-
Rotation3D< double > & rotationGet()
取得rotation (non-constant)
Definition: Camera.h:110
+
Photo< Pixel > photo() const
取得 photo
Definition: Camera.h:82
+
把一個 std::map<Identity, Point > 包起來
+
Rotation3D< double > rotation(Rotation3D< double > const &rot)
設定rotation
Definition: Camera.h:118
+
Camera & copyFrom(Camera const &b)
複製資料
Definition: Camera.h:66
+
bool inside(Vector3D< double > const &p) const
詢問某點是否在底片範圍內
Definition: Camera.h:157
+
Camera & operator=(Camera const &b)
same as copyFrom(b)
Definition: Camera.h:173
+
Rotation3D< double > rotation() const
取得rotation
Definition: Camera.h:104
+
bool write(FILE *f, bool bin, unsigned int fg) const
將資料寫入檔案
Definition: Camera.h:181
+
Rotation3D< double > & rotationGet()
取得rotation (non-constant)
Definition: Camera.h:111
-
FixedPoints2D const & fixedPoints2D() const
取得所有FixedPoint
Definition: Camera.h:125
-
Photo< Pixel > & photoGet()
取得 photo (non-constant)
Definition: Camera.h:88
-
Photo< Pixel > const & photo(Photo< Pixel > const &pho)
設定 photo
Definition: Camera.h:95
+
Photo< Pixel > & photoGet()
取得 photo (non-constant)
Definition: Camera.h:89
一切物件的Base, 並要求每個物件都要有read, write, create, ... 等功能
Definition: ObjBase.h:15
+
Photo< Pixel > photo(Photo< Pixel > const &pho)
設定 photo
Definition: Camera.h:96
vector
Definition: Vector.h:19
-
ObjBase * create() const
new一個自己
Definition: Camera.h:225
-
char const * ctype() const
回傳class的type
Definition: Camera.h:245
-
Matrix< Scalar > matrix() const
return a 3x1 matrix form of itself
Definition: Vectors.h:486
+
ObjBase * create() const
new一個自己
Definition: Camera.h:226
+
char const * ctype() const
回傳class的type
Definition: Camera.h:246
+
Matrix< Scalar > matrix() const
return a 3x1 matrix form of itself
Definition: Vectors.h:433
-
Vector< double > fixedPoint2D(int i)
取得編號為i的fixed points 2d
Definition: Camera.h:149
-
Camera()
constructor
Definition: Camera.h:47
+
Vector< double > fixedPoint2D(int i)
取得編號為i的fixed points 2d
Definition: Camera.h:150
+
Pixel color(Vector3D< double > const &p) const
取得底片color
Definition: Camera.h:165
+
Camera()
constructor
Definition: Camera.h:48
底片
Definition: Photo.h:31
-
ObjBase * copyFrom(ObjBase const *b)
複製資料
Definition: Camera.h:237
+
ObjBase * copyFrom(ObjBase const *b)
複製資料
Definition: Camera.h:238
+
FixedPoints2D fixedPoints2D(FixedPoints2D const &fps2d) const
設定FixedPoint
Definition: Camera.h:140
-
size_t dimension() const
回傳dimension
-
bool read(FILE *f, bool bin, unsigned int fg)
將資料讀入
Definition: Camera.h:201
+
IdentityPoints & copyFrom(IdentityPoints const &b)
複製資料
+
FixedPoints2D fixedPoints2D() const
取得所有FixedPoint
Definition: Camera.h:126
+
bool read(FILE *f, bool bin, unsigned int fg)
將資料讀入
Definition: Camera.h:202
-
Camera & referenceFrom(Camera const &b)
參照
Definition: Camera.h:73
-
Camera(Camera const &b)
copy constructor
Definition: Camera.h:53
-
FixedPoints2D & fixedPoints2DGet() const
取得所有FixedPoint(non-constant reference)
Definition: Camera.h:132
-
bool inside(Vector3D< double > p) const
詢問某點是否在底片範圍內
Definition: Camera.h:156
-
Rotation3D< double > const & rotation() const
取得rotation
Definition: Camera.h:103
-
~Camera()
destructor
Definition: Camera.h:59
-
IdentityPoints< int, double > FixedPoints2D
Definition: Camera.h:25
+
Camera & referenceFrom(Camera const &b)
參照
Definition: Camera.h:74
+
Camera(Camera const &b)
copy constructor
Definition: Camera.h:54
+
FixedPoints2D & fixedPoints2DGet() const
取得所有FixedPoint(non-constant reference)
Definition: Camera.h:133
+
~Camera()
destructor
Definition: Camera.h:60
+
IdentityPoints< int, double, Vector2D< double > > FixedPoints2D
Definition: Camera.h:25
@@ -276,7 +276,7 @@ $(document).ready(function(){initNavTree('Camera_8h_source.html','');}); @@ -86,7 +86,7 @@ Namespaces @@ -141,25 +141,25 @@ $(document).ready(function(){initNavTree('Color3__Space_8h_source.html','');});
146 } // meow
147 
148 #endif // colors_Color3_Space_H__
-
Scalar & xGet()
access x with non constant reference
Definition: Vectors.h:320
+
Scalar & xGet()
access x with non-constant reference
Definition: Vectors.h:290
Vector3D< T > const & maxV() const
maximum bound of each channels.
Definition: Color3_Space.h:68
Color3_Space(Vector3D< T > const &min_bound, Vector3D< T > const &max_bound, Vector3D< T > const &init_value)
Constructor.
Definition: Color3_Space.h:31
-
Scalar & zGet()
access z with non constant reference
Definition: Vectors.h:330
+
Scalar & zGet()
access z with non-constant reference
Definition: Vectors.h:292
T const & min(size_t id) const
Return the minimum of the i -th channel.
Definition: Color3_Space.h:99
-
Scalar const & z() const
access z
Definition: Vectors.h:315
+
Scalar const & z() const
access z
Definition: Vectors.h:288
T & valGet(size_t id)
Get the non-constant reference of value of the i -th channel.
Definition: Color3_Space.h:139
T const & max(size_t id) const
Return the maximum of the i -th channel.
Definition: Color3_Space.h:107
-
Scalar const & y() const
access y
Definition: Vectors.h:310
+
Scalar const & y() const
access y
Definition: Vectors.h:287
Base class of color space with 3 channels.
Definition: Color3_Space.h:18
Vector3D< T > min_
Definition: Color3_Space.h:20
virtual ~Color3_Space()
Destructor.
Definition: Color3_Space.h:60
Vector3D< T > const & minV() const
minimum bound of each channels.
Definition: Color3_Space.h:63
-
Scalar & yGet()
access y with non constant reference
Definition: Vectors.h:325
+
Scalar & yGet()
access y with non-constant reference
Definition: Vectors.h:291
Vector3D< T > const & valV() const
value of each channels.
Definition: Color3_Space.h:73
Color3_Space(Color3_Space const &b)
Copy constructor.
Definition: Color3_Space.h:42
Vector3D< T > max_
Definition: Color3_Space.h:21
-
Scalar const & x() const
access x
Definition: Vectors.h:305
+
Scalar const & x() const
access x
Definition: Vectors.h:286
T const & val(size_t i, T const &c)
Set the value of i -th channel.
Definition: Color3_Space.h:127
Vector3D< T > const & valV(Vector3D< T > const &vv)
Set the value of each channels.
Definition: Color3_Space.h:83
Color3_Space< T > & copyFrom(Color3_Space< T > const &b)
Copy method.
Definition: Color3_Space.h:54
@@ -173,7 +173,7 @@ $(document).ready(function(){initNavTree('Color3__Space_8h_source.html','');}); @@ -85,7 +85,7 @@ Namespaces @@ -145,7 +145,7 @@ $(document).ready(function(){initNavTree('DisjointSet_8h_source.html','');}); @@ -85,7 +85,7 @@ Namespaces @@ -112,7 +112,7 @@ $(document).ready(function(){initNavTree('Eye_8h_source.html','');});
57  return *this;
58  }
59 
-
60  Camera<Pixel> const& camera() const {
+
61  return self->cam_;
62  }
63 
@@ -120,12 +120,12 @@ $(document).ready(function(){initNavTree('Eye_8h_source.html','');});
65  return self()->cam_;
66  }
67 
-
68  Camera<Pixel> const& camera(Camera<Pixel> const& c) {
+
69  self()->cam_.copyFrom(c);
-
70  return camera();
+
70  return camera();
71  }
72 
-
73  Vector3D<double> const& offset() const {
+
74  return self->ofs_;
75  }
76 
@@ -133,13 +133,13 @@ $(document).ready(function(){initNavTree('Eye_8h_source.html','');});
78  return self()->ofs_;
79  }
80 
- +
82  self()->ofs_ = ofs;
-
83  return offset();
+
83  return offset();
84  }
85 
86  bool inside(Vector3D<double> const& v) const {
-
87  return camera().inside(v - offset());
+
87  return camera().inside(v - offset());
88  }
89 
90  Eye& operator=(Eye const& e) {
@@ -150,17 +150,17 @@ $(document).ready(function(){initNavTree('Eye_8h_source.html','');});
99  if (bin) {
100  double tmp;
101  for (size_t i = 0; i < 3; ++i) {
-
102  if (fwrite(&(tmp = offset()(i)), sizeof(tmp), 1, f) < 1)
+
102  if (fwrite(&(tmp = offset()(i)), sizeof(tmp), 1, f) < 1)
103  return false;
104  }
105  }
106  else {
107  for (size_t i = 0; i < 3; ++i) {
-
108  if (fprintf(f, "%f ", offset()(i)) < 1) return false;
+
108  if (fprintf(f, "%f ", offset()(i)) < 1) return false;
109  }
110  fprintf(f, "\n");
111  }
-
112  return camera().write(f, bin, fg);
+
112  return camera().write(f, bin, fg);
113  }
114 
119  bool read(FILE* f, bool bin, unsigned int fg) {
@@ -184,7 +184,7 @@ $(document).ready(function(){initNavTree('Eye_8h_source.html','');});
141  }
142 
151  ObjBase* copyFrom(ObjBase const* b) {
-
152  return &(copyFrom(*(Eye*)b));
+
152  return &(copyFrom(*(Eye const*)b));
153  }
154 
159  char const* ctype() const{
@@ -199,35 +199,35 @@ $(document).ready(function(){initNavTree('Eye_8h_source.html','');});
172 } // meow
173 
174 #endif // Eye_H__
+
Vector3D< double > offset() const
Definition: Eye.h:73
+
Camera< Pixel > camera() const
Definition: Eye.h:60
Eye & operator=(Eye const &e)
Definition: Eye.h:90
Camera.
Definition: Camera.h:23
ObjBase * copyFrom(ObjBase const *b)
複製資料
Definition: Eye.h:151
Eye & copyFrom(Eye const &e)
Definition: Eye.h:50
Vector3D< double > & offsetGet()
Definition: Eye.h:77
-
Scalar const & z() const
access z
Definition: Vectors.h:315
+
Scalar const & z() const
access z
Definition: Vectors.h:288
bool read(FILE *f, bool bin, unsigned int fg)
將資料讀入
Definition: Eye.h:119
-
Vector3D & xyz(Scalar const &sx, Scalar const &sy, Scalar const &sz)
modify x and y
Definition: Vectors.h:353
+
Vector3D & xyz(Scalar const &sx, Scalar const &sy, Scalar const &sz)
modify x, y and z
Definition: Vectors.h:299
bool write(FILE *f, bool bin, unsigned int fg) const
將資料寫入檔案
Definition: Eye.h:98
-
Camera< Pixel > const & camera(Camera< Pixel > const &c)
Definition: Eye.h:68
~Eye()
Definition: Eye.h:47
char const * ctype() const
回傳class的type
Definition: Eye.h:159
ObjBase * create() const
new一個自己
Definition: Eye.h:139
-
Scalar const & y() const
access y
Definition: Vectors.h:310
+
Scalar const & y() const
access y
Definition: Vectors.h:287
Eye(Camera< Pixel > const &c, Vector3D< double > const &o)
Definition: Eye.h:44
一切物件的Base, 並要求每個物件都要有read, write, create, ... 等功能
Definition: ObjBase.h:15
Eye()
Definition: Eye.h:38
Camera< Pixel > & cameraGet()
Definition: Eye.h:64
-
Camera< Pixel > const & camera() const
Definition: Eye.h:60
-
Scalar const & x() const
access x
Definition: Vectors.h:305
+
Scalar const & x() const
access x
Definition: Vectors.h:286
Eye & referenceFrom(Eye const &e)
Definition: Eye.h:55
-
Vector3D< double > const & offset() const
Definition: Eye.h:73
Eye(Eye const &b)
Definition: Eye.h:41
+
Vector3D< double > offset(Vector3D< double > const &ofs)
Definition: Eye.h:81
bool inside(Vector3D< double > const &v) const
Definition: Eye.h:86
+
Camera< Pixel > camera(Camera< Pixel > const &c)
Definition: Eye.h:68
一個 Camera 加上一個offset transformation
Definition: Eye.h:17
-
Vector3D< double > const & offset(Vector3D< double > const &ofs)
Definition: Eye.h:81
std::string type() const
回傳class的type
Definition: Eye.h:167
@@ -236,7 +236,7 @@ $(document).ready(function(){initNavTree('Eye_8h_source.html','');}); @@ -72,7 +72,7 @@ $(document).ready(function(){initNavTree('FeaturePoint_8h.html','');});

@@ -89,7 +90,7 @@ Namespaces

Templates -- Meow -  204.13.18 +  1.2.9
A C++ template contains kinds of interesting classes and functions
Templates -- Meow -  204.13.18 +  1.2.9
A C++ template contains kinds of interesting classes and functions
Templates -- Meow -  204.13.18 +  1.2.9
A C++ template contains kinds of interesting classes and functions
Templates -- Meow -  204.13.18 +  1.2.9
A C++ template contains kinds of interesting classes and functions
Templates -- Meow -  204.13.18 +  1.2.9
A C++ template contains kinds of interesting classes and functions
Templates -- Meow -  204.13.18 +  1.2.9
A C++ template contains kinds of interesting classes and functions
Templates -- Meow -  204.13.18 +  1.2.9
A C++ template contains kinds of interesting classes and functions
Templates -- Meow -  204.13.18 +  1.2.9
A C++ template contains kinds of interesting classes and functions
Templates -- Meow -  204.13.18 +  1.2.9
A C++ template contains kinds of interesting classes and functions
Templates -- Meow -  204.13.18 +  1.2.9
A C++ template contains kinds of interesting classes and functions
- +

Classes

class  meow::FeaturePoint< Scalar, Description >
class  meow::FeaturePoint< Scalar, Description, Position, Feature >
 特徵點 More...
 
@@ -88,7 +88,7 @@ Namespaces @@ -72,194 +72,216 @@ $(document).ready(function(){initNavTree('FeaturePoint_8h_source.html','');});
12 
13 namespace meow {
14 
-
20 template<class Scalar, class Description>
-
21 class FeaturePoint: public ObjBase {
-
22 private:
-
23  Vector<Scalar> pos_;
- -
25 public:
- -
30  }
-
31 
-
35  FeaturePoint(size_t pDim, size_t dDim):
-
36  pos_(pDim, Scalar(0)), des_(dDim, Description(0)) {
-
37  }
-
38 
- -
43  pos_(fp.pos_), des_(fp.des_) {
-
44  }
-
45 
- -
50  }
-
51 
- -
56  pos_.copyFrom(fp.pos_);
-
57  des_.copyFrom(fp.des_);
-
58  return *this;
+
20 template<class Scalar, class Description,
+
21 class Position = Vector<Scalar>, class Feature = Vector<Description> >
+
22 
+
23 class FeaturePoint: public ObjBase {
+
24 private:
+
25  Position pos_;
+
26  Feature des_;
+
27 public:
+ +
32  }
+
33 
+
37  FeaturePoint(size_t pDim, size_t dDim):
+
38  pos_(pDim, Scalar(0)), des_(dDim, Description(0)) {
+
39  }
+
40 
+
44  FeaturePoint(Position const& v, Feature const& d):
+
45  pos_(v), des_(d) {
+
46  }
+
47 
+ +
52  pos_(fp.pos_), des_(fp.des_) {
+
53  }
+
54 
+
59  }
60 
- -
65  pos_.referenceFrom(fp.pos_);
-
66  des_.referenceFrom(fp.des_);
+ +
65  pos_.copyFrom(fp.pos_);
+
66  des_.copyFrom(fp.des_);
67  return *this;
68  }
69 
-
73  Vector<Scalar> const& position() const {
-
74  return pos_;
-
75  }
-
76 
- -
81  return pos_;
-
82  }
-
83 
- -
88  return des_;
-
89  }
-
90 
- -
95  return des_;
-
96  }
-
97 
-
101  Vector<Scalar> const& position(Vector<Scalar> const& p) const {
-
102  pos_.copyFrom(p);
-
103  return position();
-
104  }
-
105 
- -
110  des_.copyFrom(d);
-
111  return description();
-
112  }
-
113 
-
117  Scalar position(size_t index) const {
-
118  return pos_(index);
-
119  }
-
120 
-
124  Description description(size_t i) const {
-
125  return des_(i);
-
126  }
-
127 
-
131  Scalar position(size_t i, Scalar const& s) {
-
132  pos_.entry(i, s);
-
133  return position(i);
-
134  }
-
135 
-
139  Description description(size_t i, Description const& d) {
-
140  des_.entry(i, d);
-
141  return description(i);
-
142  }
-
143 
- -
148  return copyFrom(fp);
-
149  }
-
150 
-
154  Scalar const& operator()(size_t i) const {
-
155  return position(i);
-
156  }
-
157 
-
161  Description operator[](size_t i) const {
-
162  return description(i);
-
163  }
-
164 
-
165  bool write(FILE* f, bool bin, unsigned int fg) const {
-
166  if (bin) {
-
167  double tmp;
-
168  for (size_t i = 0, I = position().dimension(); i < I; ++i) {
-
169  if (fwrite(&(tmp = position(i)), sizeof(tmp), 1, f) < 1) return false;
-
170  }
-
171  for (size_t i = 0, I = description().dimension(); i < I; ++i) {
-
172  if (fwrite(&(tmp = description(i)), sizeof(tmp), 1, f) < 1)
-
173  return false;
-
174  }
-
175  }
-
176  else {
-
177  for (size_t i = 0, I = position().dimension(); i < I; ++i) {
-
178  if (fprintf(f, "%f ", (double)position(i)) < 1) return false;
-
179  }
-
180  fprintf(f, "\n");
-
181  for (size_t i = 0, I = description().dimension(); i < I; ++i) {
-
182  if (fprintf(f, "%f ", (double)description(i)) < 1) return false;
-
183  }
-
184  fprintf(f, "\n");
-
185  }
-
186  return true;
-
187  }
-
188 
-
189  bool read (FILE* f, bool bin, unsigned int fg) {
-
190  if (bin) {
-
191  double tmp;
-
192  for (size_t i = 0, I = position().dimension(); i < I; ++i) {
-
193  if (fread(&tmp, sizeof(tmp), 1, f) < 1) return false;
-
194  position(i, tmp);
-
195  }
-
196  for (size_t i = 0, I = description().dimension(); i < I; ++i) {
-
197  if (fread(&tmp, sizeof(tmp), 1, f) < 1) return false;
-
198  description(i, tmp);
-
199  }
-
200  }
-
201  else {
-
202  double tmp;
-
203  for (size_t i = 0, I = position().dimension(); i < I; ++i) {
-
204  if (fscanf(f, "%lf", &tmp) < 1) return false;
-
205  position(i, tmp);
-
206  }
-
207  for (size_t i = 0, I = description().dimension(); i < I; ++i) {
-
208  if (fscanf(f, "%lf", &tmp) < 1) return false;
-
209  description(i, tmp);
-
210  }
-
211  }
-
212  return true;
-
213  }
-
214 
-
215  ObjBase* create() const {
-
216  return new FeaturePoint();
-
217  }
-
218 
-
219  ObjBase* copyFrom(ObjBase const& b) {
-
220  return &(copyFrom(*(FeaturePoint*)b));
-
221  }
-
222 
-
223  char const* ctype() const {
-
224  return typeid(*this).name();
-
225  }
-
226 
-
227  std::string type() const {
-
228  return std::string(ctype());
-
229  }
-
230 };
-
231 
-
232 } // meow
-
233 
-
234 #endif // gra_FeaturePoint_H__
-
Scalar position(size_t i, Scalar const &s)
修改position的第i個scalar
Definition: FeaturePoint.h:131
-
FeaturePoint()
constructor
Definition: FeaturePoint.h:29
-
FeaturePoint & operator=(FeaturePoint const &fp)
same as copyFrom(fp)
Definition: FeaturePoint.h:147
-
~FeaturePoint()
destructor
Definition: FeaturePoint.h:49
-
Vector< Description > const & description() const
回傳description
Definition: FeaturePoint.h:87
-
FeaturePoint(FeaturePoint const &fp)
constructor
Definition: FeaturePoint.h:42
-
bool write(FILE *f, bool bin, unsigned int fg) const
將物件寫入檔案, 預設implement為直接回傳 false
Definition: FeaturePoint.h:165
-
Vector< Description > & descriptionGet()
回傳description (non-const reference)
Definition: FeaturePoint.h:94
-
Scalar const & operator()(size_t i) const
same as position(i)
Definition: FeaturePoint.h:154
-
Vector< Scalar > const & position(Vector< Scalar > const &p) const
修改position
Definition: FeaturePoint.h:101
-
FeaturePoint(size_t pDim, size_t dDim)
constructor
Definition: FeaturePoint.h:35
-
Vector & copyFrom(Vector const &v)
copy from ...
Definition: Vector.h:83
-
Scalar position(size_t index) const
回傳position的第i個scalar
Definition: FeaturePoint.h:117
-
ObjBase * create() const
回傳一個new出來的物件, 預設implement為直接回傳 NULL
Definition: FeaturePoint.h:215
+ +
74  pos_.referenceFrom(fp.pos_);
+
75  des_.referenceFrom(fp.des_);
+
76  return *this;
+
77  }
+
78 
+
82  Position position() const {
+
83  return pos_;
+
84  }
+
85 
+
89  Position& positionGet() {
+
90  return pos_;
+
91  }
+
92 
+
96  Feature description() const {
+
97  return des_;
+
98  }
+
99 
+
103  Feature& descriptionGet() {
+
104  return des_;
+
105  }
+
106 
+
110  Position position(Position const& p) {
+
111  pos_.copyFrom(p);
+
112  return position();
+
113  }
+
114 
+
118  Feature description(Feature const& d) {
+
119  des_.copyFrom(d);
+
120  return description();
+
121  }
+
122 
+
126  Scalar position(size_t index) const {
+
127  return pos_(index);
+
128  }
+
129 
+
133  Description description(size_t index) const {
+
134  return des_(index);
+
135  }
+
136 
+
140  Scalar position(size_t i, Scalar const& s) {
+
141  pos_.scalar(i, s);
+
142  return position(i);
+
143  }
+
144 
+
148  Description description(size_t i, Description const& d) {
+
149  des_.scalar(i, d);
+
150  return description(i);
+
151  }
+
152 
+ +
157  return copyFrom(fp);
+
158  }
+
159 
+
163  Scalar const& operator()(size_t i) const {
+
164  return position(i);
+
165  }
+
166 
+
170  Description operator[](size_t i) const {
+
171  return description(i);
+
172  }
+
173 
+
174  bool write(FILE* f, bool bin, unsigned int fg) const {
+
175  if (bin) {
+
176  double tmp;
+
177  int a, b;
+
178  a = position().dimension();
+
179  b = description().dimension();
+
180  if (fwrite(&a, sizeof(a), 1, f) < 1) return false;
+
181  if (fwrite(&b, sizeof(b), 1, f) < 1) return false;
+
182  for (size_t i = 0, I = position().dimension(); i < I; ++i) {
+
183  if (fwrite(&(tmp = position(i)), sizeof(tmp), 1, f) < 1) return false;
+
184  }
+
185  for (size_t i = 0, I = description().dimension(); i < I; ++i) {
+
186  if (fwrite(&(tmp = description(i)), sizeof(tmp), 1, f) < 1)
+
187  return false;
+
188  }
+
189  }
+
190  else {
+
191  int a, b;
+
192  a = position().dimension();
+
193  b = description().dimension();
+
194  if (fprintf(f, "%d %d\n", a, b) < 2) return false;
+
195  for (size_t i = 0, I = position().dimension(); i < I; ++i) {
+
196  if (fprintf(f, "%f ", (double)position(i)) < 1) return false;
+
197  }
+
198  fprintf(f, "\n");
+
199  for (size_t i = 0, I = description().dimension(); i < I; ++i) {
+
200  if (fprintf(f, "%f ", (double)description(i)) < 1) return false;
+
201  }
+
202  fprintf(f, "\n");
+
203  }
+
204  return true;
+
205  }
+
206 
+
207  bool read (FILE* f, bool bin, unsigned int fg) {
+
208  if (bin) {
+
209  double tmp;
+
210  int a, b;
+
211  if (fread(&a, sizeof(a), 1, f) < 1) return false;
+
212  if (fread(&b, sizeof(b), 1, f) < 1) return false;
+
213  position(Position(a, Scalar(0)));
+
214  description(Feature(b, Description(0)));
+
215  for (size_t i = 0, I = position().dimension(); i < I; ++i) {
+
216  if (fread(&tmp, sizeof(tmp), 1, f) < 1) return false;
+
217  position(i, tmp);
+
218  }
+
219  for (size_t i = 0, I = description().dimension(); i < I; ++i) {
+
220  if (fread(&tmp, sizeof(tmp), 1, f) < 1) return false;
+
221  description(i, tmp);
+
222  }
+
223  }
+
224  else {
+
225  double tmp;
+
226  int a, b;
+
227  if (fscanf(f, "%d %d", &a, &b) < 2) return false;
+
228  position(Position(a, Scalar(0)));
+
229  description(Feature(b, Description(0)));
+
230  for (size_t i = 0, I = position().dimension(); i < I; ++i) {
+
231  if (fscanf(f, "%lf", &tmp) < 1) return false;
+
232  position(i, tmp);
+
233  }
+
234  for (size_t i = 0, I = description().dimension(); i < I; ++i) {
+
235  if (fscanf(f, "%lf", &tmp) < 1) return false;
+
236  description(i, tmp);
+
237  }
+
238  }
+
239  return true;
+
240  }
+
241 
+
242  ObjBase* create() const {
+
243  return new FeaturePoint();
+
244  }
+
245 
+
246  ObjBase* copyFrom(ObjBase const& b) {
+
247  return &(copyFrom(*(FeaturePoint const*)b));
+
248  }
+
249 
+
250  char const* ctype() const {
+
251  return typeid(*this).name();
+
252  }
+
253 
+
254  std::string type() const {
+
255  return std::string(ctype());
+
256  }
+
257 };
+
258 
+
259 } // meow
+
260 
+
261 #endif // gra_FeaturePoint_H__
+
FeaturePoint(FeaturePoint const &fp)
constructor
Definition: FeaturePoint.h:51
+
Scalar position(size_t index) const
回傳position的第i個scalar
Definition: FeaturePoint.h:126
+
Description description(size_t index) const
回傳description的第i個Description
Definition: FeaturePoint.h:133
+
Description description(size_t i, Description const &d)
修改description的第i個Description
Definition: FeaturePoint.h:148
+
char const * ctype() const
用C-style string回傳這個class的type name
Definition: FeaturePoint.h:250
+
Feature description() const
回傳description
Definition: FeaturePoint.h:96
+
FeaturePoint(Position const &v, Feature const &d)
constructor
Definition: FeaturePoint.h:44
+
Position position(Position const &p)
修改position
Definition: FeaturePoint.h:110
+
FeaturePoint & referenceFrom(FeaturePoint const &fp)
參照
Definition: FeaturePoint.h:73
+
Scalar position(size_t i, Scalar const &s)
修改position的第i個scalar
Definition: FeaturePoint.h:140
一切物件的Base, 並要求每個物件都要有read, write, create, ... 等功能
Definition: ObjBase.h:15
-
vector
Definition: Vector.h:19
-
ObjBase * copyFrom(ObjBase const &b)
Definition: FeaturePoint.h:219
-
Vector< Scalar > & positionGet()
回傳position (non-const reference)
Definition: FeaturePoint.h:80
-
Description description(size_t i, Description const &d)
修改description的第i個Description
Definition: FeaturePoint.h:139
-
Description operator[](size_t i) const
same as description(i)
Definition: FeaturePoint.h:161
-
std::string type() const
用std::string回傳這個class的type name
Definition: FeaturePoint.h:227
-
char const * ctype() const
用C-style string回傳這個class的type name
Definition: FeaturePoint.h:223
-
FeaturePoint & copyFrom(FeaturePoint const &fp)
複製
Definition: FeaturePoint.h:55
-
Vector< Scalar > const & position() const
回傳position
Definition: FeaturePoint.h:73
-
Description description(size_t i) const
回傳description的第i個Description
Definition: FeaturePoint.h:124
-
Vector< Description > const & description(Vector< Description > const &d)
修改description
Definition: FeaturePoint.h:109
- -
Vector & referenceFrom(Vector const &v)
reference from ...
Definition: Vector.h:89
-
FeaturePoint & referenceFrom(FeaturePoint const &fp)
參照
Definition: FeaturePoint.h:64
-
bool read(FILE *f, bool bin, unsigned int fg)
將物件從檔案讀出, 預設implement為直接回傳 false
Definition: FeaturePoint.h:189
+
Description operator[](size_t i) const
same as description(i)
Definition: FeaturePoint.h:170
+
ObjBase * copyFrom(ObjBase const &b)
Definition: FeaturePoint.h:246
+
bool write(FILE *f, bool bin, unsigned int fg) const
將物件寫入檔案, 預設implement為直接回傳 false
Definition: FeaturePoint.h:174
+
~FeaturePoint()
destructor
Definition: FeaturePoint.h:58
+
std::string type() const
用std::string回傳這個class的type name
Definition: FeaturePoint.h:254
+
Feature description(Feature const &d)
修改description
Definition: FeaturePoint.h:118
+
Position position() const
回傳position
Definition: FeaturePoint.h:82
+
FeaturePoint & copyFrom(FeaturePoint const &fp)
複製
Definition: FeaturePoint.h:64
+
Feature & descriptionGet()
回傳description (non-const reference)
Definition: FeaturePoint.h:103
+
FeaturePoint(size_t pDim, size_t dDim)
constructor
Definition: FeaturePoint.h:37
+
FeaturePoint & operator=(FeaturePoint const &fp)
same as copyFrom(fp)
Definition: FeaturePoint.h:156
+
bool read(FILE *f, bool bin, unsigned int fg)
將物件從檔案讀出, 預設implement為直接回傳 false
Definition: FeaturePoint.h:207
+ +
Position & positionGet()
回傳position (non-const reference)
Definition: FeaturePoint.h:89
+
ObjBase * create() const
回傳一個new出來的物件, 預設implement為直接回傳 NULL
Definition: FeaturePoint.h:242
+
Scalar const & operator()(size_t i) const
same as position(i)
Definition: FeaturePoint.h:163
+
FeaturePoint()
constructor
Definition: FeaturePoint.h:31
@@ -267,7 +289,7 @@ $(document).ready(function(){initNavTree('FeaturePoint_8h_source.html','');}); @@ -85,7 +85,7 @@ Namespaces @@ -99,7 +99,7 @@ $(document).ready(function(){initNavTree('FeaturePointsDetector_8h_source.html', @@ -66,15 +66,17 @@ $(document).ready(function(){initNavTree('FeaturePointsDetector__Harris_8h.html' #include "Bitmap.h"
#include "FeaturePoint.h"
#include "../dsa/DisjointSet.h"
+#include "../math/utility.h"
#include "../Self.h"
#include <vector>
+#include <algorithm>

Go to the source code of this file.

Templates -- Meow -  204.13.18 +  1.2.9
A C++ template contains kinds of interesting classes and functions
Templates -- Meow -  204.13.18 +  1.2.9
A C++ template contains kinds of interesting classes and functions
Templates -- Meow -  204.13.18 +  1.2.9
A C++ template contains kinds of interesting classes and functions
Templates -- Meow -  204.13.18 +  1.2.9
A C++ template contains kinds of interesting classes and functions
- +

Classes

class  meow::FeaturePointsDetector_Harris< Pixel >
 Harris corner detect. More...
 Harris-Corner-Detect algorithm for finding feature points. More...
 

@@ -98,7 +100,7 @@ Macros

-

Definition at line 25 of file FeaturePointsDetector_Harris.h.

+

Definition at line 27 of file FeaturePointsDetector_Harris.h.

@@ -109,7 +111,7 @@ Macros
@@ -409,7 +399,7 @@ $(document).ready(function(){initNavTree('FeaturePointsDetector__Harris_8h_sourc @@ -83,7 +104,7 @@ Namespaces @@ -260,7 +301,7 @@ $(document).ready(function(){initNavTree('Self_8h_source.html','');}); @@ -1579,7 +1611,7 @@ template<class Scalar>

Let itself rotate theta degree.

-

Definition at line 471 of file Vectors.h.

+

Definition at line 418 of file Vectors.h.

@@ -1609,7 +1641,7 @@ template<class Scalar>

access the i -th scalar (0 => x, 1 => y, 2 => z) {

-

Definition at line 361 of file Vectors.h.

+

Definition at line 307 of file Vectors.h.

@@ -1649,7 +1681,7 @@ template<class Scalar>

modivy the i -th scalar (0 => x, 1 => y, 2 => z)

-

Definition at line 366 of file Vectors.h.

+

Definition at line 313 of file Vectors.h.

@@ -1679,7 +1711,7 @@ template<class Scalar>

return (*this)-v

-

Definition at line 391 of file Vectors.h.

+

Definition at line 338 of file Vectors.h.

@@ -1709,7 +1741,7 @@ template<class Scalar>

Let itself substract v.

-

Definition at line 396 of file Vectors.h.

+

Definition at line 343 of file Vectors.h.

@@ -1738,7 +1770,7 @@ template<class Scalar>

access x

-

Definition at line 305 of file Vectors.h.

+

Definition at line 286 of file Vectors.h.

@@ -1768,7 +1800,7 @@ template<class Scalar>

modify x

-

Definition at line 335 of file Vectors.h.

+

Definition at line 294 of file Vectors.h.

@@ -1795,9 +1827,9 @@ template<class Scalar>
-

access x with non constant reference

+

access x with non-constant reference

-

Definition at line 320 of file Vectors.h.

+

Definition at line 290 of file Vectors.h.

@@ -1841,9 +1873,9 @@ template<class Scalar>
-

modify x and y

+

modify x, y and z

-

Definition at line 353 of file Vectors.h.

+

Definition at line 299 of file Vectors.h.

@@ -1872,7 +1904,7 @@ template<class Scalar>

access y

-

Definition at line 310 of file Vectors.h.

+

Definition at line 287 of file Vectors.h.

@@ -1902,7 +1934,7 @@ template<class Scalar>

modify y

-

Definition at line 341 of file Vectors.h.

+

Definition at line 295 of file Vectors.h.

@@ -1929,9 +1961,9 @@ template<class Scalar>
-

access y with non constant reference

+

access y with non-constant reference

-

Definition at line 325 of file Vectors.h.

+

Definition at line 291 of file Vectors.h.

@@ -1960,7 +1992,7 @@ template<class Scalar>

access z

-

Definition at line 315 of file Vectors.h.

+

Definition at line 288 of file Vectors.h.

@@ -1990,7 +2022,7 @@ template<class Scalar>

modify z

-

Definition at line 347 of file Vectors.h.

+

Definition at line 296 of file Vectors.h.

@@ -2017,9 +2049,9 @@ template<class Scalar>
-

access z with non constant reference

+

access z with non-constant reference

-

Definition at line 330 of file Vectors.h.

+

Definition at line 292 of file Vectors.h.

@@ -2033,7 +2065,7 @@ template<class Scalar>

RGBf_Space to HSVf_Space

-

Definition at line 86 of file HSV_Space.h.

+

Definition at line 93 of file HSV_Space.h.

@@ -742,7 +879,7 @@ template<class T >

YUVf_Space to RGBf_Space

-

Definition at line 99 of file YUV_Space.h.

+

Definition at line 106 of file YUV_Space.h.

@@ -780,7 +917,7 @@ template<class T >

YUVf_Space to HSVf_Space

-

Definition at line 109 of file HSV_Space.h.

+

Definition at line 116 of file HSV_Space.h.

@@ -818,7 +955,7 @@ template<class T >

YUVf_Space to HSLf_Space

-

Definition at line 109 of file HSL_Space.h.

+

Definition at line 116 of file HSL_Space.h.

@@ -856,11 +993,11 @@ template<class T >

RGBi_Space to YUVf_Space

-

Definition at line 114 of file YUV_Space.h.

+

Definition at line 121 of file YUV_Space.h.

- +
@@ -876,8 +1013,8 @@ template<class T > - - + + @@ -892,13 +1029,13 @@ template<class T >
HSVf_Space * hsv RGBf_Space * rgb 
-

HSLf_Space to HSVf_Space

+

HSLf_Space to RGBf_Space

-

Definition at line 118 of file HSV_Space.h.

+

Definition at line 125 of file HSL_Space.h.

- +
@@ -914,8 +1051,8 @@ template<class T > - - + + @@ -930,9 +1067,9 @@ template<class T >
RGBf_Space * rgb HSVf_Space * hsv 
-

HSLf_Space to RGBf_Space

+

HSLf_Space to HSVf_Space

-

Definition at line 118 of file HSL_Space.h.

+

Definition at line 125 of file HSV_Space.h.

@@ -970,7 +1107,7 @@ template<class T >

YUVf_Space to RGBi_Space

-

Definition at line 123 of file YUV_Space.h.

+

Definition at line 130 of file YUV_Space.h.

@@ -1008,11 +1145,11 @@ template<class T >

HSVf_Space to RGBf_Space

-

Definition at line 127 of file HSV_Space.h.

+

Definition at line 134 of file HSV_Space.h.

- +
@@ -1022,14 +1159,14 @@ template<class T > - - + + - + @@ -1044,10 +1181,48 @@ template<class T >
void meow::colorTransformate (RGBi_Space const & a, RGBf_Space const & in,
RGBf_Space * b out 
-

RGBi_Space to RGBf_Space

+

RGBf_Space to RGBf_Space

Definition at line 149 of file RGB_Space.h.

+
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void meow::colorTransformate (RGBi_Space const & in,
RGBi_Space * out 
)
+
+inline
+
+ +

RGBi_Space to RGBi_Space

+ +

Definition at line 156 of file RGB_Space.h.

+
@@ -1084,11 +1259,11 @@ template<class T >

HSVf_Space to YUVf_Space

-

Definition at line 151 of file HSV_Space.h.

+

Definition at line 158 of file HSV_Space.h.

- +
@@ -1098,13 +1273,13 @@ template<class T > - + - + @@ -1120,9 +1295,9 @@ template<class T >
void meow::colorTransformate (RGBf_Space const & RGBi_Space const &  a,
RGBi_Space * RGBf_Space *  b 
-

RGBf_Space to RGBi_Space

+

RGBi_Space to RGBf_Space

-

Definition at line 159 of file RGB_Space.h.

+

Definition at line 163 of file RGB_Space.h.

@@ -1160,7 +1335,7 @@ template<class T >

HSLf_Space to YUVf_Space

-

Definition at line 160 of file HSL_Space.h.

+

Definition at line 167 of file HSL_Space.h.

@@ -1198,7 +1373,45 @@ template<class T >

HSVf_Space to HSLf_Space

-

Definition at line 160 of file HSV_Space.h.

+

Definition at line 167 of file HSV_Space.h.

+ + + + +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void meow::colorTransformate (RGBf_Space const & a,
RGBi_Space * b 
)
+
+inline
+
+ +

RGBf_Space to RGBi_Space

+ +

Definition at line 173 of file RGB_Space.h.

@@ -1236,7 +1449,7 @@ template<class T >

HSLf_Space to RGBi_Space

-

Definition at line 169 of file HSL_Space.h.

+

Definition at line 176 of file HSL_Space.h.

@@ -1274,11 +1487,11 @@ template<class T >

HSVf_Space to RGBi_Space

-

Definition at line 169 of file HSV_Space.h.

+

Definition at line 176 of file HSV_Space.h.

- +
@@ -1294,8 +1507,8 @@ template<class T > - - + + @@ -1310,13 +1523,13 @@ template<class T >
HSLf_Space * hsl HSVf_Space * hsv 
-

RGBi_Space to HSLf_Space

+

RGBi_Space to HSVf_Space

-

Definition at line 179 of file HSL_Space.h.

+

Definition at line 186 of file HSV_Space.h.

- +
@@ -1332,8 +1545,8 @@ template<class T > - - + + @@ -1348,9 +1561,9 @@ template<class T >
HSVf_Space * hsv HSLf_Space * hsl 
-

RGBi_Space to HSVf_Space

+

RGBi_Space to HSLf_Space

-

Definition at line 179 of file HSV_Space.h.

+

Definition at line 186 of file HSL_Space.h.

@@ -2310,7 +2523,7 @@ template<class T >