forked from andyli/PyOpenNI
-
Notifications
You must be signed in to change notification settings - Fork 0
Current features
justinfx edited this page Jul 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.
- SceneAnalyzer (in progress): analyzes a depth map and is able to associate each pixel with the background or the user it belongs to.
- 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.
- AudioGenerator (in progress): generates sound (audio) readen from a device.
-
MapGenerator: these kind of nodes generate data in form of 2D maps.
- Recorder: Can record the data from all Production Nodes in the context and write them to a file for playback later.
- Player (partially complete): Reads in a previously recorded .oni format file and plays it back to the Production Nodes as the data source. Currently has a few methods exposed for setting the source, and the playback speed.
-
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.
- DepthMap: wraps an entire 2D-map of depth.
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(). -
Map data wrapping: wrap the array in a Python container, and let the user
access it through the
[]operator, either by passing an absolute index, or by supplying the coordinates of a pixel, i.e:map[x,y]
- 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/.