summaryrefslogtreecommitdiff
path: root/ARMFCaptureD3D/Calibration.h
diff options
context:
space:
mode:
authorfcolin2011-11-18 12:14:12 +0000
committerfcolin2011-11-18 12:14:12 +0000
commit6bcf419d2e8f739b432d4790d1ba9d48ab65365b (patch)
tree92815e16f189c8e328dff4fcfa38ebe1d0217fdd /ARMFCaptureD3D/Calibration.h
parent487e963b081d7ffe2ddf489e11d927982c9101a6 (diff)
downloadamilis-6bcf419d2e8f739b432d4790d1ba9d48ab65365b.zip
amilis-6bcf419d2e8f739b432d4790d1ba9d48ab65365b.tar.gz
amilis-6bcf419d2e8f739b432d4790d1ba9d48ab65365b.tar.bz2
amilis-6bcf419d2e8f739b432d4790d1ba9d48ab65365b.tar.xz
Diffstat (limited to 'ARMFCaptureD3D/Calibration.h')
-rw-r--r--ARMFCaptureD3D/Calibration.h31
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);
+
+};
+