curfil  ..
 All Classes Functions Variables Typedefs Friends Groups Pages
Public Member Functions | Static Public Attributes | List of all members
curfil::Depth Class Reference

Wrapper class that represent a depth value as it occurs in RGB-D images. More...

#include <image.h>

Public Member Functions

 Depth (const int &value)
 Depth (const double &value)
bool isValid () const
float getFloatValue () const
int getIntValue () const
Depth operator- (const Depth &other) const
Depth operator+ (const Depth &other) const
Depthoperator+= (const Depth &other)

Static Public Attributes

static const Depth INVALID
 Static value used when the depth is invalid, e.gs outside the image.

Detailed Description

Wrapper class that represent a depth value as it occurs in RGB-D images.

The internal representation is an int that represent the depth (distance) in millimeter precision.

A depth of zero represents an invalid depth that can be used to represent a missing depth value as it occurs in RGB-D cameras such as the Microsoft Kinect.

Definition at line 79 of file image.h.

Constructor & Destructor Documentation

curfil::Depth::Depth ( const int &  value)
inlineexplicit
Parameters
valuethe depth (distance) in millimeter

Definition at line 89 of file image.h.

curfil::Depth::Depth ( const double &  value)
inlineexplicit
Parameters
valuethe depth (distance) in meter

Definition at line 96 of file image.h.

Member Function Documentation

float curfil::Depth::getFloatValue ( ) const
inline
Returns
the depth in meter as a float.

Definition at line 116 of file image.h.

int curfil::Depth::getIntValue ( ) const
inline
Returns
the depth in millimeter. can be zero which indicates an invalid depth

Definition at line 124 of file image.h.

bool curfil::Depth::isValid ( ) const
inline
Returns
true if and only if the depth is strictly greater than zero and represents a valid depth measure

Definition at line 109 of file image.h.

Depth curfil::Depth::operator+ ( const Depth other) const
inline
Returns
the combined depth values

Definition at line 139 of file image.h.

Depth& curfil::Depth::operator+= ( const Depth other)
inline
Returns
the depth after adding to it another value

Definition at line 147 of file image.h.

Depth curfil::Depth::operator- ( const Depth other) const
inline
Returns
the difference in depth

Definition at line 131 of file image.h.


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