From 6bcf419d2e8f739b432d4790d1ba9d48ab65365b Mon Sep 17 00:00:00 2001 From: fcolin Date: Fri, 18 Nov 2011 12:14:12 +0000 Subject: --- ARMFCaptureD3D/Calibration.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 ARMFCaptureD3D/Calibration.h (limited to 'ARMFCaptureD3D/Calibration.h') 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 +#include +#include +#include + +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); + +}; + -- cgit v1.1