-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcalibration.h
executable file
·54 lines (46 loc) · 1.6 KB
/
calibration.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
* Modification by Tomasz Mankowski 2017
*
* Copyright (c) 2001, Carlos E. Vidales. All rights reserved.
*
* This sample program was written and put in the public domain
* by Carlos E. Vidales. The program is provided "as is"
* without warranty of any kind, either expressed or implied.
* If you choose to use the program within your own products
* you do so at your own risk, and assume the responsibility
* for servicing, repairing or correcting the program should
* it prove defective in any manner.
* You may copy and distribute the program's source code in any
* medium, provided that you also include in each copy an
* appropriate copyright notice and disclaimer of warranty.
* You may also modify this program and distribute copies of
* it provided that you include prominent notices stating
* that you changed the file(s) and the date of any change,
* and that you do not charge any royalties or licenses for
* its use.
*/
#ifndef _CALIBRATE_H_
#define _CALIBRATE_H_
#include <math.h>
#include <stdint.h>
#include "point.h"
class calibration
{
struct calibMatrix
{
int64_t An, /* A = An/Divider */
Bn, /* B = Bn/Divider */
Cn, /* C = Cn/Divider */
Dn, /* D = Dn/Divider */
En, /* E = En/Divider */
Fn, /* F = Fn/Divider */
Divider;
};
public:
calibration() {};
int setCalibrationMatrix(point *display, point *screen) ;
point getDisplayPoint(point &screenPtr) ;
private:
calibMatrix matrix;
};
#endif /* _CALIBRATE_H_ */