#include <Leap.h>
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 Mask & | invalid () |
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 Interface & | operator= (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 |
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.
Leap::Mask::Mask | ( | MaskImplementation * | ) |
LEAP_EXPORT Leap::Mask::Mask | ( | ) |
Constructs a new Mask object. Do not use. Get Mask objects from TrackedQuad.
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.
LEAP_EXPORT int Leap::Mask::height | ( | ) | const |
The height of the mask in Image pixels.
LEAP_EXPORT int32_t Leap::Mask::id | ( | ) | const |
An id indicating whether the mask goes with the left (0) or right (1) image.
|
static |
An invalid Mask object.
LEAP_EXPORT bool Leap::Mask::isValid | ( | ) | const |
Reports whether this is a valid Mask object.
LEAP_EXPORT int Leap::Mask::offsetX | ( | ) | const |
The offset of the mask from the left edge of the Image in pixels.
LEAP_EXPORT int Leap::Mask::offsetY | ( | ) | const |
The offset of the mask from the top edge of the Image in pixels.
LEAP_EXPORT bool Leap::Mask::operator!= | ( | const Mask & | ) | const |
Compares two Mask objects for inequality.
LEAP_EXPORT bool Leap::Mask::operator== | ( | const Mask & | ) | const |
Compares two Mask objects for equality.
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.
|
private |
LEAP_EXPORT int Leap::Mask::width | ( | ) | const |
The width of the mask in Image pixels.
|
friend |
Writes a brief, human readable description of the Mask object.
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |