plastimatch
Loading...
Searching...
No Matches
proj_matrix.h
Go to the documentation of this file.
1/* -----------------------------------------------------------------------
2 See COPYRIGHT.TXT and LICENSE.TXT for copyright and license information
3 ----------------------------------------------------------------------- */
4#ifndef _proj_matrix_h_
5#define _proj_matrix_h_
6
7#include "plmbase_config.h"
8#include <string>
9
11public:
12 Proj_matrix ();
13
14public:
15 double ic[2]; /* Image Center: ic[0] = x, ic[1] = y */
16 double matrix[12]; /* Projection matrix */
17 double sad; /* Distance: Source To Axis */
18 double sid; /* Distance: Source to Image */
19 double cam[3]; /* Location of camera */
20 double nrm[3]; /* Ray from image center to source */
21
22 double extrinsic[16];
23 double intrinsic[12];
24
25public:
26 std::string get ();
27 void get_nrm (double nrm[3]);
28 void get_pdn (double pdn[3]);
29 void get_prt (double prt[3]);
30
31 void set (
32 const double* cam,
33 const double* tgt,
34 const double* vup,
35 double sid,
36 const double* ic,
37 const double* ps
38 );
39 void set (const std::string& s);
40
41 /* Project 3D coordinate xyz of cartesian space
42 into 2D coordinate ij coordinate on projection plane.
43 In this version, the inputs and outputs are homogenous,
44 not cartesian. */
45 void project_h (double* ij, const double* xyz) const;
46 /* Project 3D coordinate xyz of cartesian space
47 into 2D coordinate ij coordinate on projection plane.
48 In this version, the inputs and outputs are cartesian,
49 not homogenous. */
50 void project (double* ij, const double* xyz) const;
51
52 void save (const char *fn);
53 void debug ();
54 Proj_matrix* clone ();
55};
56
57#endif
Definition proj_matrix.h:10
double sad
Definition proj_matrix.h:17
double sid
Definition proj_matrix.h:18
#define PLMBASE_API
Definition plmbase_config.h:19