mf
Media Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
depth_camera.h
Go to the documentation of this file.
1 #ifndef MF_DEPTH_CAMERA_H_
2 #define MF_DEPTH_CAMERA_H_
3 
4 #include "camera.h"
5 
6 namespace mf {
7 
9 class depth_camera : public camera {
10 protected:
11  using camera::camera;
12 
13 public:
14  virtual real depth(const Eigen_vec3& p) const = 0;
15 
16  virtual real depth(const spherical_coordinates& sp) const {
17  return this->depth(camera::point(sp));
18  }
19 
20  virtual Eigen_vec3 point(const image_coordinates_type& c, real depth) const = 0;
21 };
22 
23 }
24 
25 #endif
Eigen_vec2 image_coordinates_type
2D image coordinates, range and scale defined by subclass.
Definition: camera.h:25
float real
Real number type.
Definition: common.h:48
virtual Eigen_vec3 point(const image_coordinates_type &c, real depth) const =0
Eigen_vec3 point(const spherical_coordinates &sp) const
Convert 3D point spherical coordinates sp to cartesian.
Definition: camera.cc:29
Camera which defines mapping from 3D spatial coordinates to 2D image coordinates. ...
Definition: camera.h:16
virtual real depth(const spherical_coordinates &sp) const
Definition: depth_camera.h:16
camera()=default
Camera which maps 3D coordinates of point to depth value in addition to the 2D image coordinates...
Definition: depth_camera.h:9
virtual real depth(const Eigen_vec3 &p) const =0
Spherical coordinates.
Definition: spherical_coordinates.h:16
Eigen_mat< 3, 1 > Eigen_vec3
Definition: eigen.h:25