diff options
author | fcolin | 2011-11-18 12:14:12 +0000 |
---|---|---|
committer | fcolin | 2011-11-18 12:14:12 +0000 |
commit | 6bcf419d2e8f739b432d4790d1ba9d48ab65365b (patch) | |
tree | 92815e16f189c8e328dff4fcfa38ebe1d0217fdd /ARMFCaptureD3D/Calibration.h | |
parent | 487e963b081d7ffe2ddf489e11d927982c9101a6 (diff) | |
download | amilis-master.zip amilis-master.tar.gz amilis-master.tar.bz2 amilis-master.tar.xz |
Diffstat (limited to 'ARMFCaptureD3D/Calibration.h')
-rw-r--r-- | ARMFCaptureD3D/Calibration.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/ARMFCaptureD3D/Calibration.h b/ARMFCaptureD3D/Calibration.h new file mode 100644 index 0000000..a7c5c6e --- /dev/null +++ b/ARMFCaptureD3D/Calibration.h @@ -0,0 +1,31 @@ +
+#pragma once
+#include <cstdio>
+#include <map>
+#include <vector>
+#include <set>
+
+class Calibration
+{
+
+ double a1, b1, c1, a3, b3, a2, b2, c2;
+ double cal[4][2];
+ double dots[4][2];
+ bool cal_set[4];
+ bool calib_points_ok;
+ bool calibrated;
+ void RazCalibration();
+
+public:
+ typedef enum { TopLeft, TopRight, BottomLeft, BottomRight } Corners;
+
+ Calibration(double width, double height, double calibInset = 0);
+ void SetCalibrationPoint(Corners i, double x, double y);
+
+ void translateCoords(double X, double Y, double *cx, double *cy);
+ bool Calibrate();
+ void SaveCalibration( std::string filename );
+ bool RestoreCalibration(std::string filename);
+
+};
+
|