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

Camera which handles mapping to image coordinates, base class. More...

#include <image_camera.h>

Inheritance diagram for mf::image_camera:
mf::depth_image_camera< Depth > mf::projection_image_camera< Depth >

Public Types

using pixel_coordinates_type = ndptrdiff< 2 >
 
using image_coordinates_type = typename camera::image_coordinates_type
 

Public Member Functions

 image_camera (const image_camera &)=default
 
real image_aspect_ratio () const
 
const ndsize< 2 > & image_size () const
 
std::size_t image_number_of_pixels () const
 
bool pixel_coordinates_flipped () const
 
void flip_pixel_coordinates ()
 
void set_image_width (std::size_t)
 Set image width, and adjust height to keep same aspect ratio. More...
 
void set_image_height (std::size_t)
 Set image height, and adjust width to keep same aspect ratio. More...
 
ndspan< 2 > image_span () const
 
image_coordinates_type to_image (pixel_coordinates_type pix) const
 
pixel_coordinates_type to_pixel (image_coordinates_type im) const
 

Protected Member Functions

 image_camera (const ndsize< 2 > &)
 

Detailed Description

Camera which handles mapping to image coordinates, base class.

Handles mapping between 2D real image coordinates and integer pixel coordinates, and bounds checking. Does not add scaling or offset, image coordinates map to center point of the square pixel. Pixel coordinates can be flipped.

Member Typedef Documentation

Constructor & Destructor Documentation

mf::image_camera::image_camera ( const ndsize< 2 > &  sz)
explicitprotected
mf::image_camera::image_camera ( const image_camera )
default

Member Function Documentation

void mf::image_camera::flip_pixel_coordinates ( )
real mf::image_camera::image_aspect_ratio ( ) const
std::size_t mf::image_camera::image_number_of_pixels ( ) const
inline
const ndsize<2>& mf::image_camera::image_size ( ) const
inline
ndspan<2> mf::image_camera::image_span ( ) const
inline
bool mf::image_camera::pixel_coordinates_flipped ( ) const
inline
void mf::image_camera::set_image_height ( std::size_t  imh)

Set image height, and adjust width to keep same aspect ratio.

void mf::image_camera::set_image_width ( std::size_t  imw)

Set image width, and adjust height to keep same aspect ratio.

image_coordinates_type mf::image_camera::to_image ( pixel_coordinates_type  pix) const
inline
pixel_coordinates_type mf::image_camera::to_pixel ( image_coordinates_type  im) const
inline

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