-
Notifications
You must be signed in to change notification settings - Fork 0
/
camera.cpp
executable file
·34 lines (32 loc) · 1.1 KB
/
camera.cpp
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
#include "camera.h"
void Camera::PrintCameraParameters ( const string& prefix )
{
cout << prefix << "Camera [" << _name << "]:" << endl;
cout << prefix << "\tCenter:" << endl;
cout << prefix << "\t\tu0 = " << _intrinsics[3] << endl;
cout << prefix << "\t\tv0 = " << _intrinsics[4] << endl;
cout << prefix << "\tAffine:" << endl;
cout << prefix << "\t\tc = " << _intrinsics[0] << endl;
cout << prefix << "\t\td = " << _intrinsics[1] << endl;
cout << prefix << "\t\te = " << _intrinsics[2] << endl;
cout << prefix << "\tPoly parameters:" << endl;
cout << prefix << "\t\t[ ";
for ( int i=0; i<POLY_SIZE; i++ )
{
cout << _intrinsics[5+i] << " ";
}
cout << "]" << endl;
cout << prefix << "\tInverse poly parameters:" << endl;
cout << prefix << "\t\t[ ";
for ( int i=0; i<INV_POLY_SIZE; i++ )
{
cout << _intrinsics[10+i] << " ";
}
cout << "]" << endl;
}
void Camera::CopyIntrinsicsFrom ( const Camera& cam )
{
double intrinsics[TOTAL_SIZE];
cam.GetIntrinsicParameters ( intrinsics );
SetIntrinsicsParameters ( intrinsics );
}