Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Static Private Attributes | Friends | List of all members
Leap::Mask Class Reference

#include <Leap.h>

Inheritance diagram for Leap::Mask:
Inheritance graph
[legend]

Public Member Functions

def __eq__ (self, arg2)
 
def __init__ (self)
 
def __ne__ (self, arg2)
 
def __str__ (self)
 
def data (self, dst)
 
def data (self)
 
LEAP_EXPORT const unsigned char * data () const
 
void data (unsigned char *dst) const
 
void * dataPointer () const
 
LEAP_EXPORT int height () const
 
LEAP_EXPORT int32_t id () const
 
LEAP_EXPORT bool isValid () const
 
 Mask (MaskImplementation *)
 
LEAP_EXPORT Mask ()
 
LEAP_EXPORT int offsetX () const
 
LEAP_EXPORT int offsetY () const
 
LEAP_EXPORT bool operator!= (const Mask &) const
 
LEAP_EXPORT bool operator== (const Mask &) const
 
LEAP_EXPORT int64_t sequenceId () const
 
std::string toString () const
 
LEAP_EXPORT int width () const
 
- Public Member Functions inherited from Leap::Interface
def __init__ (self, args, kwargs)
 

Static Public Member Functions

static LEAP_EXPORT const Maskinvalid ()
 

Public Attributes

 this
 

Static Public Attributes

 data
 
 data_pointer = _swig_property(LeapPython.Mask_data_pointer_get)
 
 height = _swig_property(LeapPython.Mask_height_get)
 
 id = _swig_property(LeapPython.Mask_id_get)
 
 invalid = staticmethod(LeapPython.Mask_invalid)
 
 is_valid = _swig_property(LeapPython.Mask_is_valid_get)
 
 offset_x = _swig_property(LeapPython.Mask_offset_x_get)
 
 offset_y = _swig_property(LeapPython.Mask_offset_y_get)
 
 sequence_id = _swig_property(LeapPython.Mask_sequence_id_get)
 
 width = _swig_property(LeapPython.Mask_width_get)
 

Private Member Functions

LEAP_EXPORT const char * toCString () const
 

Static Private Attributes

 __getattr__ = lambdaself,name:_swig_getattr(self, Mask, name)
 
 __repr__ = _swig_repr
 
 __setattr__ = lambdaself,name,value:_swig_setattr(self, Mask, name, value)
 
 __swig_destroy__ = LeapPython.delete_Mask
 
dictionary __swig_getmethods__ = {}
 
dictionary __swig_setmethods__ = {}
 

Friends

LEAP_EXPORT friend std::ostream & operator<< (std::ostream &, const Mask &)
 

Additional Inherited Members

- Protected Member Functions inherited from Leap::Interface
template<typename T >
T * get () const
 
LEAP_EXPORT Interface (void *owner)
 
LEAP_EXPORT Interface (Implementation *reference, void *owner)
 
LEAP_EXPORT Interface (const Interface &rhs)
 
 Interface (class SharedObject *object)
 
LEAP_EXPORT Interfaceoperator= (const Interface &rhs)
 
virtual LEAP_EXPORT ~Interface ()
 
- Static Protected Member Functions inherited from Leap::Interface
static LEAP_EXPORT void deleteCString (const char *cstr)
 
- Protected Attributes inherited from Leap::Interface
class SharedObject * m_object
 

Detailed Description

Note: This class is an experimental API for internal use only. It may be removed without warning.

A bitmap mask defining areas of an image in which a finger or part of a hand is in front of the tracked quad. The mask is a subset of the camera image containing a the region including the quad. Pixels in the mask representing the hand have the value 255. Pixels in the rest of the mask have the value 0.

Two masks are provided for every Leap Motion frame. The mask with the id of 0 is for the left image. The right image has id 1.

The mask corresponds to the uncorrected image from the camera sensor. If you correct the image for distortion before displaying it, you should also correct the mask.

Since
2.2.6

Definition at line 3327 of file Leap.h.

Constructor & Destructor Documentation

Leap::Mask::Mask ( MaskImplementation *  )
LEAP_EXPORT Leap::Mask::Mask ( )

Constructs a new Mask object. Do not use. Get Mask objects from TrackedQuad.

Since
2.2.6
def Leap.Mask.__init__ (   self)

Definition at line 1336 of file Leap.py.

Member Function Documentation

def Leap.Mask.__eq__ (   self,
  arg2 
)

Definition at line 1349 of file Leap.py.

def Leap.Mask.__ne__ (   self,
  arg2 
)

Definition at line 1352 of file Leap.py.

def Leap.Mask.__str__ (   self)

Definition at line 1355 of file Leap.py.

def Leap.Mask.data (   self,
  dst 
)

Definition at line 1343 of file Leap.py.

def Leap.Mask.data (   self)

Definition at line 1378 of file Leap.py.

LEAP_EXPORT const unsigned char* Leap::Mask::data ( ) const

The pixels of the mask.

Pixels with the value of 255 represent areas of the image where a finger or part of a hand is in front of the quad. The rest of the mask has the value 0.

Since
2.2.6
void Leap::Mask::data ( unsigned char *  dst) const
inline

Definition at line 3367 of file Leap.h.

void* Leap::Mask::dataPointer ( ) const
inline

Definition at line 3372 of file Leap.h.

LEAP_EXPORT int Leap::Mask::height ( ) const

The height of the mask in Image pixels.

Since
2.2.6
LEAP_EXPORT int32_t Leap::Mask::id ( ) const

An id indicating whether the mask goes with the left (0) or right (1) image.

Since
2.2.6
static LEAP_EXPORT const Mask& Leap::Mask::invalid ( )
static

An invalid Mask object.

Since
2.2.6
LEAP_EXPORT bool Leap::Mask::isValid ( ) const

Reports whether this is a valid Mask object.

Since
2.2.6
LEAP_EXPORT int Leap::Mask::offsetX ( ) const

The offset of the mask from the left edge of the Image in pixels.

Since
2.2.6
LEAP_EXPORT int Leap::Mask::offsetY ( ) const

The offset of the mask from the top edge of the Image in pixels.

Since
2.2.6
LEAP_EXPORT bool Leap::Mask::operator!= ( const Mask ) const

Compares two Mask objects for inequality.

Since
2.2.6
LEAP_EXPORT bool Leap::Mask::operator== ( const Mask ) const

Compares two Mask objects for equality.

Since
2.2.6
LEAP_EXPORT int64_t Leap::Mask::sequenceId ( ) const

An id value based on the sequence in which the mask is produced. Corresponds to the Image sequence id.

Since
2.2.6
LEAP_EXPORT const char* Leap::Mask::toCString ( ) const
private
std::string Leap::Mask::toString ( ) const
inline

Definition at line 3430 of file Leap.h.

LEAP_EXPORT int Leap::Mask::width ( ) const

The width of the mask in Image pixels.

Since
2.2.6

Friends And Related Function Documentation

LEAP_EXPORT friend std::ostream& operator<< ( std::ostream &  ,
const Mask  
)
friend

Writes a brief, human readable description of the Mask object.

Since
2.2.6

Member Data Documentation

Leap.Mask.__getattr__ = lambdaself,name:_swig_getattr(self, Mask, name)
staticprivate

Definition at line 1333 of file Leap.py.

Leap.Mask.__repr__ = _swig_repr
staticprivate

Definition at line 1334 of file Leap.py.

Leap.Mask.__setattr__ = lambdaself,name,value:_swig_setattr(self, Mask, name, value)
staticprivate

Definition at line 1329 of file Leap.py.

Leap.Mask.__swig_destroy__ = LeapPython.delete_Mask
staticprivate

Definition at line 1388 of file Leap.py.

dictionary Leap.Mask.__swig_getmethods__ = {}
staticprivate

Definition at line 1330 of file Leap.py.

dictionary Leap.Mask.__swig_setmethods__ = {}
staticprivate

Definition at line 1326 of file Leap.py.

Leap.Mask.data
static

Definition at line 1383 of file Leap.py.

Leap.Mask.data_pointer = _swig_property(LeapPython.Mask_data_pointer_get)
static

Definition at line 1387 of file Leap.py.

Leap.Mask.height = _swig_property(LeapPython.Mask_height_get)
static

Definition at line 1368 of file Leap.py.

Leap.Mask.id = _swig_property(LeapPython.Mask_id_get)
static

Definition at line 1362 of file Leap.py.

Leap.Mask.invalid = staticmethod(LeapPython.Mask_invalid)
static

Definition at line 1347 of file Leap.py.

Leap.Mask.is_valid = _swig_property(LeapPython.Mask_is_valid_get)
static

Definition at line 1377 of file Leap.py.

Leap.Mask.offset_x = _swig_property(LeapPython.Mask_offset_x_get)
static

Definition at line 1371 of file Leap.py.

Leap.Mask.offset_y = _swig_property(LeapPython.Mask_offset_y_get)
static

Definition at line 1374 of file Leap.py.

Leap.Mask.sequence_id = _swig_property(LeapPython.Mask_sequence_id_get)
static

Definition at line 1359 of file Leap.py.

Leap.Mask.this

Definition at line 1341 of file Leap.py.

Leap.Mask.width = _swig_property(LeapPython.Mask_width_get)
static

Definition at line 1365 of file Leap.py.


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


leap_motion
Author(s): Florian Lier , Mirza Shah , Isaac IY Saito
autogenerated on Tue Jun 2 2020 03:58:01