MVE - Multi-View Environment mve-devel
Loading...
Searching...
No Matches
camera.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015, Simon Fuhrmann
3 * TU Darmstadt - Graphics, Capture and Massively Parallel Computing
4 * All rights reserved.
5 *
6 * This software may be modified and distributed under the terms
7 * of the BSD 3-Clause license. See the LICENSE.txt file for details.
8 */
9
10#ifndef MVE_CAMERA_HEADER
11#define MVE_CAMERA_HEADER
12
13#include <string>
14
15#include "mve/defines.h"
16
18
24{
25public:
29 CameraInfo (void);
30
36 void fill_camera_pos (float* pos) const;
37
43 void fill_camera_translation (float* trans) const;
44
49 void fill_viewing_direction (float* viewdir) const;
50
54 void fill_world_to_cam (float* mat) const;
55
59 void fill_cam_to_world (float* mat) const;
60
65 void fill_world_to_cam_rot (float* mat) const;
66
71 void fill_cam_to_world_rot (float* mat) const;
72
76 void set_transformation (float const* mat);
77
93 void fill_calibration (float* mat, float width, float height) const;
94
101 void fill_inverse_calibration (float* mat,
102 float width, float height) const;
103
120 void fill_reprojection (CameraInfo const& destination,
121 float src_width, float src_height, float dst_width, float dst_height,
122 float* mat, float* vec) const;
123
125 std::string get_rotation_string (void) const;
126
128 std::string get_translation_string (void) const;
129
131 void set_rotation_from_string (std::string const& rot_string);
132
134 void set_translation_from_string (std::string const& trans_string);
135
139 void fill_gl_viewtrans (float* mat) const;
140
144 void fill_gl_projection (float* mat, float width, float height,
145 float znear, float zfar) const;
146
150 void debug_print (void) const;
151
152public:
153 /* Intrinsic camera parameters. */
154
156 float flen;
158 float ppoint[2];
160 float paspect;
162 float dist[2];
163
164 /* Extrinsic camera parameters. */
165
167 float trans[3];
169 float rot[9];
170};
171
173
174#endif /* MVE_CAMERA_HEADER */
#define MVE_NAMESPACE_BEGIN
Definition defines.h:13
#define MVE_NAMESPACE_END
Definition defines.h:14
Per-view camera information with various helper functions.
Definition camera.h:24
float paspect
Pixel aspect ratio pixel_width / pixel_height.
Definition camera.h:160
float flen
Focal length.
Definition camera.h:156