forked from andyli/PyOpenNI
-
Notifications
You must be signed in to change notification settings - Fork 0
Current features
jmendeth edited this page Feb 14, 2012
·
4 revisions
Here's the complete list of features exposed:
- Context: represents a Context in OpenNI.
-
ProductionNode: represents a production node.
-
Generator: represents a node that generates new data.
-
MapGenerator: these kind of nodes generate data in form of 2D maps.
- ImageGenerator: generates images (color maps) readen from a device.
- DepthGenerator: generates depth maps readen from a device.
- UserGenerator: it's able to detect different players that interact in the scene, basing on a provided depth map.
- GestureGenerator: it's able to detect various gestures, normally arm gestures.
-
MapGenerator: these kind of nodes generate data in form of 2D maps.
-
Generator: represents a node that generates new data.
-
Capability: represents a capability supported by a specific production node.
- PoseDetectionCapability: supported by user generators. It's able to detect specific poses from a user.
- SkeletonCapability: supported by user generators. Once calibrated, it's able to track a user's skeleton (either all or a part of it).
- Version: Carries a version of a program (though it's mainly used to contain an OpenNI version). It can be represented into text.
- OpenNIError: it is thrown by any method when some kind of failure occurs. It contains the status which caused the error and provides methods to get its corresponding name or error message.
These classes, due to its simplicity, aren't directly exposed to Python. Instead, they are converted into simple tuples, sets, or lists.
- XnUInt32XYPair: a pair of (unsigned) integers designing the X and Y coordinates of a 2D size, point, normal, ...
- Xn3DVector: three floating-point numbers designing the X, Y and Z coordinate of a 3D point, normal, size, ...
- XnRGB24Pixel: three (unsigned) bytes designing the red, green and blue components of a color.
- XnMatrix3X3: an array of 9 floating-point numbers, designing a 3x3 matrix.
-
Exception wrapping: this powerful feature checks the status returned by
OpenNI methods, instead of returning it. If the status is different than
XN_STATUS_OK, it throws anOpenNIErrorcontaining the status. This allows notable simplification of your Python code (having a singleexceptvs. checking every status), and is also used in the Java wrapper. - Callbacks: Allows you to register your own functions with OpenNI, so they will get called when OpenNI detects a certain event.
- Polymorphism: if you want to handle a particular type of node that is not currently exposed, PyOpenNI will pick the class that best matches its type.
-
Version info: ability to lookup OpenNI version through
version()and PyOpenNI version throughbindings_version().
- ProductionNodeType: the different types of production nodes.
- PixelFormat: the different formats for every pixel in a map.
- SkeletonJoint: the different joints in a skeleton.
- SkeletonProfile: different profiles for the skeleton tracking (area to track, enabled joints, ...).
- CalibrationStatus: indicates different status in the skeleton calibration process (the currently calibrating area, if the process succeeded or failed, ...)
- DefResolution: contains common sizes / resolutions used for maps.
Docstrings for the generated classes, methods and properties are enabled.
Some classes are fully documented, but there are still a lot of docstrings to add.
You can have a look at the docstrings through Python's help(...) system.
We have various samples to demostrate and introduce the user to PyOpenNI.
These can be found under the examples/ folder.
Want to start a PyOpenNI script quickly? Have also a look at examples/templates/.