#include <Leap.h>
Public Member Functions | |
def | __eq__ |
def | __init__ |
def | __ne__ |
def | __str__ |
def | data |
def | data |
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 |
Static Public Member Functions | |
static LEAP_EXPORT const Mask & | invalid () |
Public Attributes | |
this | |
Static Public Attributes | |
tuple | data_pointer = _swig_property(LeapPython.Mask_data_pointer_get) |
tuple | height = _swig_property(LeapPython.Mask_height_get) |
tuple | id = _swig_property(LeapPython.Mask_id_get) |
tuple | invalid = staticmethod(LeapPython.Mask_invalid) |
tuple | is_valid = _swig_property(LeapPython.Mask_is_valid_get) |
tuple | offset_x = _swig_property(LeapPython.Mask_offset_x_get) |
tuple | offset_y = _swig_property(LeapPython.Mask_offset_y_get) |
tuple | sequence_id = _swig_property(LeapPython.Mask_sequence_id_get) |
tuple | width = _swig_property(LeapPython.Mask_width_get) |
Private Member Functions | |
LEAP_EXPORT const char * | toCString () const |
Static Private Attributes | |
tuple | __getattr__ = lambdaself,name:_swig_getattr(self, Mask, name) |
__repr__ = _swig_repr | |
tuple | __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 &) |
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 * | ) |
def Leap::Mask::__init__ | ( | self | ) |
def Leap::Mask::__eq__ | ( | self, | |
arg2 | |||
) |
def Leap::Mask::__ne__ | ( | self, | |
arg2 | |||
) |
def Leap::Mask::__str__ | ( | self | ) |
def Leap::Mask::data | ( | self, | |
dst | |||
) |
def Leap::Mask::data | ( | self | ) |
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.
void Leap::Mask::data | ( | unsigned char * | dst | ) | const [inline] |
void* Leap::Mask::dataPointer | ( | ) | const [inline] |
LEAP_EXPORT int Leap::Mask::height | ( | ) | const |
LEAP_EXPORT int32_t Leap::Mask::id | ( | ) | const |
An id indicating whether the mask goes with the left (0) or right (1) image.
static LEAP_EXPORT const Mask& Leap::Mask::invalid | ( | ) | [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 |
LEAP_EXPORT int Leap::Mask::offsetY | ( | ) | const |
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.
LEAP_EXPORT const char* Leap::Mask::toCString | ( | ) | const [private] |
std::string Leap::Mask::toString | ( | ) | const [inline] |
LEAP_EXPORT int Leap::Mask::width | ( | ) | const |
LEAP_EXPORT friend std::ostream& operator<< | ( | std::ostream & | , |
const Mask & | |||
) | [friend] |
Writes a brief, human readable description of the Mask object.
tuple Leap::Mask::__getattr__ = lambdaself,name:_swig_getattr(self, Mask, name) [static, private] |
Reimplemented from Leap::Interface.
Leap::Mask::__repr__ = _swig_repr [static, private] |
tuple Leap::Mask::__setattr__ = lambdaself,name,value:_swig_setattr(self, Mask, name, value) [static, private] |
Reimplemented from Leap::Interface.
Leap::Mask::__swig_destroy__ = LeapPython.delete_Mask [static, private] |
dictionary Leap::Mask::__swig_getmethods__ = {} [static, private] |
Reimplemented from Leap::Interface.
dictionary Leap::Mask::__swig_setmethods__ = {} [static, private] |
Reimplemented from Leap::Interface.
tuple Leap::Mask::data_pointer = _swig_property(LeapPython.Mask_data_pointer_get) [static] |
tuple Leap::Mask::height = _swig_property(LeapPython.Mask_height_get) [static] |
tuple Leap::Mask::id = _swig_property(LeapPython.Mask_id_get) [static] |
tuple Leap::Mask::invalid = staticmethod(LeapPython.Mask_invalid) [static] |
tuple Leap::Mask::is_valid = _swig_property(LeapPython.Mask_is_valid_get) [static] |
tuple Leap::Mask::offset_x = _swig_property(LeapPython.Mask_offset_x_get) [static] |
tuple Leap::Mask::offset_y = _swig_property(LeapPython.Mask_offset_y_get) [static] |
tuple Leap::Mask::sequence_id = _swig_property(LeapPython.Mask_sequence_id_get) [static] |
tuple Leap::Mask::width = _swig_property(LeapPython.Mask_width_get) [static] |