farm-ng-core
sophus::ImageSize Struct Reference

Image size, hence its width and height. More...

#include <image_size.h>

Public Member Functions

 ImageSize ()=default
 
 ImageSize (int width, int height)
 
auto area () const -> size_t
 
auto contains (Eigen::Vector2i const &obs, int border=0) const -> bool
 Returns true if obs is within image. More...
 
auto contains (Eigen::Vector2f const &obs, float border=0.f) const -> bool
 
auto contains (Eigen::Vector2d const &obs, double border=0.0) const -> bool
 
auto isEmpty () const -> bool
 
auto array () const -> Eigen::Array2< int >
 
auto iwidth () const -> int
 
auto iheight () const -> int
 

Static Public Member Functions

static auto from (Eigen::Array2< int > const &arr) -> ImageSize
 

Public Attributes

int width = 0
 Horizontal width of images, i.e. number of columns. More...
 
int height = 0
 Vertical height of images, i.e. number of rows. More...
 

Detailed Description

Image size, hence its width and height.

Constructor & Destructor Documentation

◆ ImageSize() [1/2]

sophus::ImageSize::ImageSize ( )
default

◆ ImageSize() [2/2]

sophus::ImageSize::ImageSize ( int  width,
int  height 
)
inline

Member Function Documentation

◆ area()

auto sophus::ImageSize::area ( ) const -> size_t
inline

◆ array()

auto sophus::ImageSize::array ( ) const -> Eigen::Array2<int>
inline

◆ contains() [1/3]

auto sophus::ImageSize::contains ( Eigen::Vector2d const &  obs,
double  border = 0.0 
) const -> bool

◆ contains() [2/3]

auto sophus::ImageSize::contains ( Eigen::Vector2f const &  obs,
float  border = 0.f 
) const -> bool

◆ contains() [3/3]

auto sophus::ImageSize::contains ( Eigen::Vector2i const &  obs,
int  border = 0 
) const -> bool

Returns true if obs is within image.

Positive border makes the image frame smaller.

◆ from()

static auto sophus::ImageSize::from ( Eigen::Array2< int > const &  arr) -> ImageSize
inlinestatic

◆ iheight()

auto sophus::ImageSize::iheight ( ) const -> int
inline

◆ isEmpty()

auto sophus::ImageSize::isEmpty ( ) const -> bool
inline

◆ iwidth()

auto sophus::ImageSize::iwidth ( ) const -> int
inline

Member Data Documentation

◆ height

int sophus::ImageSize::height = 0

Vertical height of images, i.e. number of rows.

◆ width

int sophus::ImageSize::width = 0

Horizontal width of images, i.e. number of columns.


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