mf
Media Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Public Member Functions | Protected Member Functions | Friends | List of all members
mf::projection_camera Class Reference

Pin-hole camera with projection to a planar image space. More...

#include <projection_camera.h>

Inheritance diagram for mf::projection_camera:
mf::depth_camera mf::camera mf::space_object mf::projection_image_camera< Depth >

Classes

struct  image_parameters
 

Public Member Functions

 projection_camera (const pose &, const projection_view_frustum &, const image_parameters &)
 
 projection_camera (const pose &, const Eigen_mat3 &intrinsic, const depth_projection_parameters &, const ndsize< 2 > &)
 
 projection_camera (const projection_camera &)=default
 
projection_cameraoperator= (const projection_camera &)=default
 
const projection_view_frustumrelative_frustum () const
 
const depth_projection_parametersdepth_parameters () const
 
image_coordinates_type project (const Eigen_vec3 &p) const override
 Project point p to image coordinates. More...
 
real depth (const Eigen_vec3 &p) const override
 
Eigen_vec3 ray_direction (const image_coordinates_type &c) const override
 Direction vector of ray pointing to point corresponding to image coordinates c. More...
 
Eigen_vec3 point (const image_coordinates_type &c, real depth) const override
 
- Public Member Functions inherited from mf::depth_camera
virtual real depth (const spherical_coordinates &sp) const
 
- Public Member Functions inherited from mf::camera
 camera (const camera &)=default
 
cameraoperator= (const camera &)=default
 
virtual ~camera ()=default
 
Eigen_affine3 view_transformation () const
 Extrinsic parameters of camera. More...
 
Eigen_vec3 center_ray_direction () const
 Direction vector of ray -Z pointing straight out camera. More...
 
Eigen_vec3 ray_direction (const spherical_coordinates &sp) const
 Direction vector of ray pointing to point with spherical coordinates sp. More...
 
Eigen_vec3 ray_direction (const Eigen_vec3 &p) const
 Direction vector of ray pointing to point p. More...
 
float distance_sq (const Eigen_vec3 &p) const
 Squared distance of 3D point p to camera center. More...
 
float distance (const Eigen_vec3 &p) const
 Distance of 3D point p to camera center. More...
 
spherical_coordinates to_spherical (const Eigen_vec3 &p) const
 Convert 3D point cartesian coordinates p to spherical. More...
 
Eigen_vec3 point (const spherical_coordinates &sp) const
 Convert 3D point spherical coordinates sp to cartesian. More...
 
virtual image_coordinates_type project (const spherical_coordinates &sp) const
 Project point with spherical coordinates sp to image coordinates. More...
 
- Public Member Functions inherited from mf::space_object
 space_object (const pose &=pose())
 
 space_object (const pose &, space_object &par)
 
 space_object (const space_object &)
 
space_objectoperator= (const space_object &)
 
virtual ~space_object ()
 
bool has_parent_space_object () const
 
const space_objectparent_space_object () const
 
space_objectparent_space_object ()
 
const poserelative_pose () const
 
pose absolute_pose () const
 
void set_relative_pose (const pose &)
 
void set_no_relative_pose ()
 
Eigen_affine3 transformation_from (const space_object &) const
 
Eigen_affine3 transformation_to (const space_object &) const
 
void set_parent (space_object &, const pose &new_relative_pose=pose())
 
void set_no_parent (const pose &new_pose=pose())
 
void make_sibling (const space_object &, const pose &new_pose=pose())
 
template<typename Transformation >
void transform (const Transformation &t)
 
template<typename Transformation >
void transform (const Transformation &rt, const space_object &relative_to)
 
void move (const Eigen_vec3 &t)
 
void move (float x, float y, float z)
 
void move_x (float x)
 
void move_y (float y)
 
void move_z (float z)
 
void rotate_x_axis (angle a, const Eigen_vec3 &c=Eigen_vec3::Zero())
 
void rotate_y_axis (angle a, const Eigen_vec3 &c=Eigen_vec3::Zero())
 
void rotate_z_axis (angle a, const Eigen_vec3 &c=Eigen_vec3::Zero())
 
void look_at (const space_object &)
 
virtual bounding_box box () const
 

Protected Member Functions

void do_update_pose () override
 
- Protected Member Functions inherited from mf::camera
 camera ()=default
 
 camera (const pose &)
 

Friends

Eigen_projective3 homography_transformation (const projection_camera &from, const projection_camera &to)
 

Additional Inherited Members

- Public Types inherited from mf::camera
using image_coordinates_type = Eigen_vec2
 2D image coordinates, range and scale defined by subclass. More...
 

Detailed Description

Pin-hole camera with projection to a planar image space.

Defined using projection_view_frustum. Image coordinates for points within frustum are in range [-1, +1].

Constructor & Destructor Documentation

mf::projection_camera::projection_camera ( const pose ps,
const projection_view_frustum fr,
const image_parameters ipar 
)
mf::projection_camera::projection_camera ( const pose ps,
const Eigen_mat3 intrinsic,
const depth_projection_parameters dpar,
const ndsize< 2 > &  img_sz 
)
mf::projection_camera::projection_camera ( const projection_camera )
default

Member Function Documentation

real mf::projection_camera::depth ( const Eigen_vec3 p) const
inlineoverridevirtual

Implements mf::depth_camera.

const depth_projection_parameters& mf::projection_camera::depth_parameters ( ) const
inline
void mf::projection_camera::do_update_pose ( )
overrideprotectedvirtual

Reimplemented from mf::space_object.

projection_camera& mf::projection_camera::operator= ( const projection_camera )
default
Eigen_vec3 mf::projection_camera::point ( const image_coordinates_type c,
real  depth 
) const
inlineoverridevirtual

Implements mf::depth_camera.

image_coordinates_type mf::projection_camera::project ( const Eigen_vec3 p) const
inlineoverridevirtual

Project point p to image coordinates.

Implemented by subclass.

Implements mf::camera.

Eigen_vec3 mf::projection_camera::ray_direction ( const image_coordinates_type c) const
inlineoverridevirtual

Direction vector of ray pointing to point corresponding to image coordinates c.

Implemented by subclass.

Implements mf::camera.

const projection_view_frustum& mf::projection_camera::relative_frustum ( ) const
inline

Friends And Related Function Documentation

Eigen_projective3 homography_transformation ( const projection_camera from,
const projection_camera to 
)
friend

The documentation for this class was generated from the following files: