mf
Media Framework
|
Camera which handles mapping to image coordinates, base class. More...
#include <image_camera.h>
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 > &) | |
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.
using mf::image_camera::image_coordinates_type = typename camera::image_coordinates_type |
|
explicitprotected |
|
default |
void mf::image_camera::flip_pixel_coordinates | ( | ) |
real mf::image_camera::image_aspect_ratio | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
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.
|
inline |
|
inline |