kinetcl - KineTcl - API
Welcome to KineTcl, a binding of the OpenNI framework providing Tcl with access to MS Kinect (tm), and related sensor systems.
This sections documents the global commands in the ::kinetcl namespace and ensemble.
This command deactivates the event deferal, aka lockout mode. Any OpenNI/kinetcl events which were prevented from entering Tcl's event queue are now moved into it.
The result of the command is the empty string.
This command activates the event deferal, aka lockout mode. Any OpenNI/kinetcl events occuring while this mode is active are prevented from entering Tcl's event queue until the next invokation of ::kinetcl estop.
The result of the command is the empty string.
This command activates data processing and generation in all known generator nodes.
The result of the command is the empty string.
This command deactivates data processing and generation in all known generator nodes.
The result of the command is the empty string.
This command waits for all generator nodes to have new data and then updates them all.
The result of the command is the empty string.
This command waits for any of the generator nodes to have new data and then updates them all.
The result of the command is the empty string.
This command updates all generator nodes, without any waiting.
The result of the command is the empty string.
This command waits for the specified generator node to have new data and then updates all nodes.
The result of the command is the empty string.
This command returns the global error state of OpenNI as string.
This command returns the current value of the global mirror flag. If the argument is specified the global mirror flag is set to its value, and all existing nodes supporting mirroring are reconfigured to reflect the new state.
This sections documents the class ::kinetcl base, the (abstract) base class for all OpenNI production nodes.
This class actually inherits from ::kinetcl nodeevents for the management of events generated by OpenNI node instances. See section Node Events.
They may have the following capabilities:
This command creates a new instance of the node base. Note that it is impossible to create such an instance on its own. It can be done only as part of constructing the instance of a concrete class. The API provided by the instance, i.e. the set of available methods and their semantics is described in the next subsection.
This method returns the capabilities of the instance, or, if option -all was specified, the set of all possible capabilities.
The result is a list containing the names of the capabilities.
This method checks if the named capability is supported by the instance or not.
The result is a boolean value, true if the capability is supported, and false else.
This method returns a dictionary containing OpenNI's description of the node. They keys of the dictinary, and the associated values are
The OpenNI type of the node, which is either one of
invalid
device
depth
image
audio
ir
user
recorder
player
gesture
scene
hands
codec
production
generator
map
script
or an integer number. The latter is used for unknown custom types OpenNI has no name for.
The name of the vendor supplying the library which implements the node.
The name OpenNI has given to the node. This is the same as returned by method node-name.
The version of the library implementing the node (see also the key vendor) as a 4-element list containing major, minor version number, maintenance id, and build number, in this order.
The node's creation detail information.
This method returns a string holding the OpenNI name of the node.
This method associates the given command prefix with the named event and arranges for the execution of the command prefix when the event in question occurs.
The result of the method is an opaque token representing the binding. It can only be used as argument of method unbind, see below, to remove the binding again.
The command prefix is expected to have the following signature:
Each event supported by a specific node class is explained in the documentation of that class.
This method takes a token as returned by method bind (see above), and removes the binding it represents. Afterward the command prefix from bind is not invoked anymore when the event the binding was for occurs.
The result of the method is an empty string.
This sections documents the class ::kinetcl generator, the (abstract) base class for all OpenNI generator nodes.
This class inherits from ::kinetcl base. See section Base.
They may have the following capabilities:
This command creates a new instance of the generator. Note that it is impossible to create such an instance on its own. It can be done only as part of constructing the instance of a concrete class. The API provided by the instance, i.e. the set of available methods and their semantics is described in the next subsection.
This method causes the instance to start generating output. It implies the activation of all dependencies as well.
The result of the method is the empty string.
This method causes the instance to stop generating output.
The result of the method is the empty string.
This method tests if the instance is generating output.
The result of the method is a boolean value, true if the instance is generating output, and false else.
This method causes the instance to update its output to the newest available. If no new output was available the method blocks until this happens.
The result of the method is the empty string.
This method tests if the instance has new output available it could be updated to. I.e. it checks if the method update would block or not.
The result of the method is a boolean value, true if the instance has new data (i.e. update would not block), and false else.
This method tests if the instance's current input frame is new, i.e. unchanged since the last call to method update.
The result of the method is a boolean value, true if the instance if the current frame is still new, and false else.
The result of the method is the empty string.
This method returns the id of the input frame currently handled by the instance.
The result of the method is an integer number.
This method returns the time of the input frame currently handled by the instance, in microseconds.
The result of the method is an integer number.
This class supports the events below. These names can be used as the event argument of method bind defined by our super-class ::kinetcl::base.
This event is generated in response to activity changes, i.e. the instance starting and stopping the generation of output.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This event is generated in response to the availability of new data, i.e the instance having new output available for the user.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This sections documents the class ::kinetcl map, the (abstract) base class for all OpenNI map generator nodes.
This class inherits from ::kinetcl generator and its superclasses. See section Generator.
They may have the following capabilities:
This command creates a new instance of the map generator. Note that it is impossible to create such an instance on its own. It can be done only as part of constructing the instance of a concrete class. The API provided by the instance, i.e. the set of available methods and their semantics is described in the next subsection.
This method returns the number of bytes per pixel in the map.
This method returns the map output modes supported by the instance.
The result of the method is a list of modes. Each mode is a 3-element list reporting the x- and y-resolution of the map in pixels, and the associated frame rate in frames per second, in this order. All elements are integer numbers.
This form of the method reports the currently set map output mode.
The result of the method is a 3-element list reporting the x- and y-resolution of the map in pixels, and the associated frame rate in frames per second, in this order. All elements are integer numbers.
This form of the method changes the map output mode to the specified resolution and frame rate. The method throws an error if the combination is not supported by the instance.
The result of the method is an empty string.
This class supports the events below. These names can be used as the event argument of method bind defined by our super-class ::kinetcl::base.
This event is generated in response to mode changes, i.e. reconfiguration of the instance's output mode.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This sections documents the class ::kinetcl generator, the concrete class for all OpenNI depth generator nodes.
This class inherits from ::kinetcl generator and its superclasses. See section Generator.
A depth generator is a generator providing depth maps, i.e. images where each pixel value describes the distance of the pixel from the sensor.
This command creates a new depth generator instance and returns the fully qualified name of the instance command. The API provided by that command, i.e. the set of available methods and their semantics is described in the next subsection.
This method destroys the depth generator instance and releases all associated resources, including the instance command. Note that resources used by multiple instances are released only when the last instance using them is destroyed.
The result of the method is the empty string.
This method returns the max depth the node is able to generate. The result is an integer number.
This method returns the field of view the node is able to generate, in radians. The result is a 2-element list containing the horizontal and vertical fields of view, in this order.
This method returns a dictionary holding information about the depth maps produced by the node. The keys found in this dictionary, and the associated values are:
The value is a dictionary holding information about the map produced by the node. The keys found in this dictionary, and the associated values are:
The pixel format of the depth maps produced by the node. The possible values are:
3 bytes/pixel red/green/blue.
Lumincance/2-Chroma, chroma in reduced horizontal resolution.
1 byte/pixel, 256 grey levels.
2 byte/pixel, 65536 grey levels, depths, or labels.
Motion JPEG compressed image.
The formats yuv422 and mjpeg are not supported by kinetcl.
The frame rate of the node, in frames per second.
The full resolution of the produced depth maps. The value is a 2-element list containing the horizontal and vertical resolution in pixels, in this order.
The location of the produced depth map within the full depth map. The value is a 2-element list containing the horizontal and vertical position in pixels, in this order. This can differ from {0 0} if and only if cropping is active.
The value is a dictionary holding information about the output produced by the node. The keys found in this dictionary, and the associated values are:
The id of the current frame.
The isNew flag of the current frame.
The size of the frame, in bytes. Together with the resolution of the frame we can compute the number of bytes per pixel in the map.
The time-code of the current frame.
The current resolution of the produced depth maps. This may be less than the full resolution (see above), if cropping is active. The value is a 2-element list containing the horizontal and vertical resolution in pixels, in this order.
The max depth the node is able to generate. An integer number. This is the same value as returned by method max-depth.
Notes:
Depth maps are in pixel format grey16.
This method returns a crimp image of type grey16 where the value of each pixel represents the distance of the pixel from the sensor, in millimeters.
This method converts one or more 3D points from sensor coordinates to real world coordinates.
The result of the method is a list holding the conversion results. Each point in both arguments and result is a 3-element list containing the point's X-, Y-, and Z-coordinates, in this order.
This method converts one or more 3D points from real world coordinates to sensor coordinates.
The result of the method is a list holding the conversion results. Each point in both arguments and result is a 3-element list containing the point's X-, Y-, and Z-coordinates, in this order.
This class supports the events below. These names can be used as the event argument of method bind defined by our super-class ::kinetcl::base.
This event is generated in response to depthfov changes, i.e. reconfiguration of the device's field of view.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This sections documents the class ::kinetcl image, the concrete class for all OpenNI image generator nodes.
This class inherits from ::kinetcl map and its superclasses. See section Map Generator.
An image generator is a map generator providing plain images, where each pixel value describes the color (or luminance) of the pixel.
This command creates a new image generator instance and returns the fully qualified name of the instance command. The API provided by that command, i.e. the set of available methods and their semantics is described in the next subsection.
This method destroys the image generator instance and releases all associated resources, including the instance command. Note that resources used by multiple instances are released only when the last instance using them is destroyed.
The result of the method is the empty string.
This method returns a list of the pixel formats supported by the node.
For the list of possible pixel formats see below, under method meta.
This method returns the name of the currently active pixel format. If the argument format is present the node is reconfigured to report the images in the specified format.
For the list of possible pixel formats see below, under method meta.
This method returns a dictionary holding information about the image maps produced by the node. The keys found in this dictionary, and the associated values are:
The value is a dictionary holding information about the map produced by the node. The keys found in this dictionary, and the associated values are:
The pixel format of the depth maps produced by the node. The possible values are:
3 bytes/pixel red/green/blue.
Lumincance/2-Chroma, chroma in reduced horizontal resolution.
1 byte/pixel, 256 grey levels.
2 byte/pixel, 65536 grey levels, depths, or labels.
Motion JPEG compressed image.
The formats yuv422 and mjpeg are not supported by kinetcl.
The frame rate of the node, in frames per second.
The full resolution of the produced depth maps. The value is a 2-element list containing the horizontal and vertical resolution in pixels, in this order.
The location of the produced depth map within the full depth map. The value is a 2-element list containing the horizontal and vertical position in pixels, in this order. This can differ from {0 0} if and only if cropping is active.
The value is a dictionary holding information about the output produced by the node. The keys found in this dictionary, and the associated values are:
The id of the current frame.
The isNew flag of the current frame.
The size of the frame, in bytes. Together with the resolution of the frame we can compute the number of bytes per pixel in the map.
The time-code of the current frame.
The current resolution of the produced depth maps. This may be less than the full resolution (see above), if cropping is active. The value is a 2-element list containing the horizontal and vertical resolution in pixels, in this order.
Notes:
Image maps are usually in pixel format rgb24.
This method returns a crimp image containing the current image map. The crimp type of the image depends on the currently active pixel format:
--> rgb
--> grey8
--> grey16
This class supports the events below. These names can be used as the event argument of method bind defined by our super-class ::kinetcl::base.
This event is generated in response to changes of the pixel format used for the images generated by the instance.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This sections documents the class ::kinetcl ir, the concrete class for all OpenNI IR image generator nodes.
This class inherits from ::kinetcl map and its superclasses. See section Map Generator.
An IR image generator is a map generator providing infrared images.
This command creates a new ir image generator instance and returns the fully qualified name of the instance command. The API provided by that command, i.e. the set of available methods and their semantics is described in the next subsection.
This method destroys the ir image generator instance and releases all associated resources, including the instance command. Note that resources used by multiple instances are released only when the last instance using them is destroyed.
The result of the method is the empty string.
This sections documents the class ::kinetcl gesture, the concrete class for all OpenNI gesture generator nodes.
This class inherits from ::kinetcl generator and its superclasses. See section Generator.
A genestur generator identifies and tracks gestures performed by the users within the field of view of the sensor.
This command creates a new gesture generator instance and returns the fully qualified name of the instance command. The API provided by that command, i.e. the set of available methods and their semantics is described in the next subsection.
This method destroys the gesture generator instance and releases all associated resources, including the instance command. Note that resources used by multiple instances are released only when the last instance using them is destroyed.
The result of the method is the empty string.
This method activates the gesture, i.e. causes the instance to start looking for it in the input.
The box describes the area where to look for it, in real-world coordinates. It is a 2-element list of 3-element lists of x-, y-, and z-coordinates. The 1st 3D coordinate describes the left-bottom-near corner of the box, whereas the 2nd describes the right-top-far corner.
If not specified the box encompasses the whole field of view.
The result of the method is the empty string.
This method deactivates the gesture, i.e. causes the instance to stop looking for it in the input.
The result of the method is the empty string.
This method tests if the named gesture is supported by the instance.
The result is a boolean value, true if the gesture is supported, and false else.
This method tests if the named gesture supports progess reporting during recognition.
The result is a boolean value, true if the gesture supports progress reporting, and false else.
This method returns a list containing the names of all gestures supported by the instance.
This method returns a list containing the names of all gestures that are currently active.
This class supports the events below. These names can be used as the event argument of method bind defined by our super-class ::kinetcl::base.
This event is generated in response to the recognition of named a gesture.
The detail dictionary of this event contains:
The name of the gesture which was recognized
The position where the gesture was recognized. This is a 3-element list of floating point values containing the real world x-, y-, and z-coordinates of the position, in this order.
The position of the hand at the end of the gesture. This is a 3-element list of floating point values containing the real world x-, y-, and z-coordinates of the position, in this order.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This event is generated in response to the system's progress in recognizing a gesture.
The detail dictionary of this event contains:
The name of the gesture whose recognition is in progress.
The current position of the hand performing the gesture. This is a 3-element list of floating point values containing the real world x-, y-, and z-coordinates of the position, in this order.
The percentage of the gesture already performed.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This event is generated in response to the (de)activation of the recognition of named gestures.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This event is generated in response to the completion of stages in a gesture's recognition.
The detail dictionary of this event contains:
The name of the gesture whose recognition is in progress.
The current position of the hand performing the gesture. This is a 3-element list of floating point values containing the real world x-, y-, and z-coordinates of the position, in this order.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This event is generated in response to the system's readiness to enter the next stage in the recognition of a gesture.
The detail dictionary of this event contains:
The name of the gesture whose recognition is in progress.
The current position of the hand performing the gesture. This is a 3-element list of floating point values containing the real world x-, y-, and z-coordinates of the position, in this order.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This sections documents the class ::kinetcl scene, the concrete class for all OpenNI scene analyzer nodes.
This class inherits from ::kinetcl map and its superclasses. See section Map Generator.
A scene analyzer segments a scene, identifying the floor and other connected areas (i.e. users) in the view of the sensor.
This command creates a new scene analyzer instance and returns the fully qualified name of the instance command. The API provided by that command, i.e. the set of available methods and their semantics is described in the next subsection.
This method destroys the scene analyzer instance and releases all associated resources, including the instance command. Note that resources used by multiple instances are released only when the last instance using them is destroyed.
The result of the method is the empty string.
This method returns a dictionary holding information about the scene segmentation produced by the node. The keys found in this dictionary, and the associated values are:
The value is a dictionary holding information about the map produced by the node. The keys found in this dictionary, and the associated values are:
The pixel format of the depth maps produced by the node. The possible values are:
3 bytes/pixel red/green/blue.
Lumincance/2-Chroma, chroma in reduced horizontal resolution.
1 byte/pixel, 256 grey levels.
2 byte/pixel, 65536 grey levels, depths, or labels.
Motion JPEG compressed image.
The formats yuv422 and mjpeg are not supported by kinetcl.
The frame rate of the node, in frames per second.
The full resolution of the produced depth maps. The value is a 2-element list containing the horizontal and vertical resolution in pixels, in this order.
The location of the produced depth map within the full depth map. The value is a 2-element list containing the horizontal and vertical position in pixels, in this order. This can differ from {0 0} if and only if cropping is active.
The value is a dictionary holding information about the output produced by the node. The keys found in this dictionary, and the associated values are:
The id of the current frame.
The isNew flag of the current frame.
The size of the frame, in bytes. Together with the resolution of the frame we can compute the number of bytes per pixel in the map.
The time-code of the current frame.
The current resolution of the produced depth maps. This may be less than the full resolution (see above), if cropping is active. The value is a 2-element list containing the horizontal and vertical resolution in pixels, in this order.
Notes:
Scene segmentations are in pixel format grey16.
This method returns a crimp image of type grey16 containing the current scene segmentation. Each pixel is labeled with the id of the user it belongs to, or 0 if it is background.
This method returns a dictionary describing the floor, as a combination of a point on the floor, plus the normal vector to specify orientation. The two keys in the dictionary are
A point on the floor, in real world coordinates. The value is a 3-element list containing the x-, y-, and z-coordinates, in this order.
The normal vector describing the orientation. The value is a 3-element list containing the real world x-, y-, and z-coordinates, in this order.
This sections documents the class ::kinetcl user, the concrete class for all OpenNI user generator nodes.
This class inherits from ::kinetcl generator and its superclasses. See section Generator.
A user generator identifies and tracks users within the field of view of the sensor.
They may have the following capabilities:
This command creates a new user generator instance and returns the fully qualified name of the instance command. The API provided by that command, i.e. the set of available methods and their semantics is described in the next subsection.
This method destroys the user generator instance and releases all associated resources, including the instance command. Note that resources used by multiple instances are released only when the last instance using them is destroyed.
The result of the method is the empty string.
This method returns the number of users currently tracked by the user generator instance.
This method returns a list containing the ids of the users currently tracked by the user generator instance.
This method returns the center location for the user specified by its id, as a 3-element list, i.e. vector, of floating point coordinates. The coordinates are specified in the order of X, Y, and Z.
The method will throw an error if the user id is not valid.
This method returns a crimp image of type grey16 where all pixels representing the user are set to the user's id, and everything else set to 0.
This class supports the events below. These names can be used as the event argument of method bind defined by our super-class ::kinetcl::base.
This event is generated in response to a user re-entering the scene.
The detail dictionary of this event contains:
The numerical id of the user the event was generated for.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This event is generated in response to a user existing the scene.
The detail dictionary of this event contains:
The numerical id of the user the event was generated for.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This event is generated in response to the recognition of a new user.
The detail dictionary of this event contains:
The numerical id of the user the event was generated for.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This event is generated in response to the loss of a user (after exiting the scene).
The detail dictionary of this event contains:
The numerical id of the user the event was generated for.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This sections documents the class ::kinetcl hands, the concrete class for all OpenNI hand generator nodes.
This class inherits from ::kinetcl generator and its superclasses. See section Generator.
A hand generator identifies and tracks the hands of the users within the field of view of the sensor.
This command creates a new hands generator instance and returns the fully qualified name of the instance command. The API provided by that command, i.e. the set of available methods and their semantics is described in the next subsection.
This method destroys the hands generator instance and releases all associated resources, including the instance command. Note that resources used by multiple instances are released only when the last instance using them is destroyed.
The result of the method is the empty string.
This method sets the smoothing factor for hand tracking, a floating point value between 0 and 1. The former disables smoothing, the latter implies infinite smoothing.
The result of the method is an empty string.
This method activates the tracking of a hand at the point. The point must be a 3-element list containing the X, Y, and Z coordinates, in this order.
The result of the method is an empty string.
This method stops tracking of the hand specified by the id.
The result of the method is an empty string.
This method stops the tracking of all hands known to the node.
The result of the method is an empty string.
This class supports the events below. These names can be used as the event argument of method bind defined by our super-class ::kinetcl::base.
This event is generated in response to the creation of a new tracked hand.
The detail dictionary of this event contains:
The id of the tracked hand.
The position of the hand. This is a 3-element list of floating point values containing the real world x-, y-, and z-coordinates of the position, in this order.
A timestamp.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This event is generated in response to the movement of an existing tracked hand.
The detail dictionary of this event contains:
The id of the tracked hand.
The position of the hand. This is a 3-element list of floating point values containing the real world x-, y-, and z-coordinates of the position, in this order.
A timestamp.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This event is generated in response to the removal of a hand from tracking.
The detail dictionary of this event contains:
The id of the lost hand.
A timestamp.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This sections documents the class ::kinetcl audio, the concrete class for all OpenNI audio generator nodes.
This class inherits from ::kinetcl generator and its superclasses. See section Generator.
An audio generator provides access to the stream of sound data from the sensor.
This command creates a new audio generator instance and returns the fully qualified name of the instance command. The API provided by that command, i.e. the set of available methods and their semantics is described in the next subsection.
This method destroys the audio generator instance and releases all associated resources, including the instance command. Note that resources used by multiple instances are released only when the last instance using them is destroyed.
The result of the method is the empty string.
This sections documents the class ::kinetcl recorder, the concrete class for all OpenNI recorder nodes.
This class inherits from ::kinetcl base. See section Base.
A recorder watches the stream of sensor information in the system and serializes it to a file. A player node may in the future read this information and replay it.
This command creates a new recorder instance and returns the fully qualified name of the instance command. The API provided by that command, i.e. the set of available methods and their semantics is described in the next subsection.
This method destroys the recorder instance and releases all associated resources, including the instance command. Note that resources used by multiple instances are released only when the last instance using them is destroyed.
The result of the method is the empty string.
This sections documents the class ::kinetcl player, the concrete class for all OpenNI player nodes.
This class inherits from ::kinetcl base. See section Base.
A player read a stream of sensor information from a file and injects it into the system, faking the existence of a sensor.
This command creates a new player instance and returns the fully qualified name of the instance command. The API provided by that command, i.e. the set of available methods and their semantics is described in the next subsection.
This method destroys the player instance and releases all associated resources, including the instance command. Note that resources used by multiple instances are released only when the last instance using them is destroyed.
The result of the method is the empty string.
This method sets the speed of playback as a ratio of the time passed in the recording. I.e. a speed of 1 implies playback at the same frame/rate as recorded, whereas a speed < 1 causes slow-motion, and a speed > 1 fast-forward.
The result of the method is the empty string.
This method returns the speed of playback, as a ratio of the time passed in the recording.
The result of the method is a floating point number.
This method activates or deactivates repeating mode. If repeating is activated (bool is true) the player will automatically rewind to the beginning of the recording when reaching the end, and continue playing.
The result of the method is the empty string.
This method tests if the player has reached the end of the recording, or not. Note that this is never true when the player is in repeating mode, however "eof" events are still triggered.
The result of the method is boolean value, true if the player is at the end of the recording, and false else.
This method returns the name of the format supported by the player instance.
This method causes the player to explicitly advance to the next frame.
The result of the method is the empty string.
This class supports the events below. These names can be used as the event argument of method bind defined by our super-class ::kinetcl::base.
This event is generated in response to the player reaching the end of the recording (even when it loops).
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This sections documents the class ::kinetcl script, the concrete class for all OpenNI recorder nodes.
This class inherits from ::kinetcl base. See section Base.
A script node can run scripts (sic!), and manages the life-time of all nodes created by such.
This command creates a new script instance and returns the fully qualified name of the instance command. The API provided by that command, i.e. the set of available methods and their semantics is described in the next subsection.
This method destroys the script instance and releases all associated resources, including the instance command. Note that resources used by multiple instances are released only when the last instance using them is destroyed.
The result of the method is the empty string.
This sections documents the various capabilities a production node may have. The main classes will all refer to the sub-sections found here.
Should an instance support alternate viewpoints the following methods become available. This support can checked by invoking the inherited method is-capable-of for the capability name alternative-viewpoint.
This method tests if the instance is able to use the viewpoint of the the other production node. This argument is the object command of another kinetcl instance.
The result is a boolean value, true if the viewpoint of node is supported, and false else.
This method sets the instance's viewpoint to the view of the other production node. This argument is the object command of another kinetcl instance.
The result of the method is an empty string. An error is thrown if the node's viewpoint is not supported.
This method sets the instance's viewpoint back to its own viewpoint.
The result of the method is an empty string.
This method tests if the instance is currently using the viewpoint of the other production node. This argument is the object command of another kinetcl instance.
The result is a boolean value, true if the viewpoint of node is in use, and false else.
This capability supports the events below. These names can be used as the event argument of method bind defined by base class ::kinetcl::base.
This event is generated in response to viewpoint changes, i.e. when the instance takes or drops the viewpoint of another node.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
Should an instance support anti-flicker behaviour the following methods become available. This support can checked by invoking the inherited method is-capable-of for the capability name antiflicker.
In this form the method returns the current anti-flicker settings.
The result is either the string off, or the powerline frequency the node is synchronized to.
In this form the method changes the anit-flicker settings. The allowed values for frequency are 50, 60, and off. The latter disables the anti-flicker system.
The result is an empty string.
This capability supports the events below. These names can be used as the event argument of method bind defined by base class ::kinetcl::base.
This event is generated in response to reconfiguration of the instance's powerline frequency setting.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
Should an instance support cropping the following methods become available. This support can checked by invoking the inherited method is-capable-of for the capability name cropping.
In this form the method returns the current crop settings.
The result is a list of 4-elements containing the x- and y-offset of the crop rectangle, and its horizontal and vertical dimensions, in this order.
In this form the method sets the crop rectangle to the specified x- and y-offset of the crop rectangle, and its horizontal and vertical dimensions
The result is an empty string.
This method deactivates any croppping set on the instance.
The result of the method is an empty string.
This capability supports the events below. These names can be used as the event argument of method bind defined by base class ::kinetcl::base.
This event is generated in response to reconfiguration of the instance's crop region.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
Should an instance support frame synchronization the following methods become available. This support can checked by invoking the inherited method is-capable-of for the capability name framesync.
This method tests if the instance is able to synchronize its generation of frames with the the other production node. This argument is the object command of another kinetcl instance.
The result is a boolean value, true if the viewpoint of node is supported, and false else.
This method causes the instance's to synchronize its frame generation with the other production node. This argument is the object command of another kinetcl instance.
The result of the method is an empty string. An error is thrown if the instance is not able to synchronize with node.
This method causes the instance's to decouple its frame generation from the other production node. This argument is the object command of another kinetcl instance.
The result of the method is an empty string.
This method tests if the instance is currently synchronized to the other production node. This argument is the object command of another kinetcl instance.
The result is a boolean value, true if the instance is synchronized to node, and false else.
This capability supports the events below. These names can be used as the event argument of method bind defined by base class ::kinetcl::base.
This event is generated in response to frame synchronization changes, i.e. when the instance starts or stops synchronization with another node.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
Should an instance support the events for hands touching the edge of the field of view the following methods become available. This support can checked by invoking the inherited method is-capable-of for the capability name hand-touching-fov-edge.
This capability supports the events below. These names can be used as the event argument of method bind defined by base class ::kinetcl::base.
This event is generated in response to hands coming into contact with the edge of the field of view (a box).
The detail dictionary of this event contains:
The numerical id of the hand the event was generated for.
The position of the hand when it touched the edge. This is a 3-element list of floating point values containing the real world x-, y-, and z-coordinates of the position, in this order.
The timestamp is a floating point value in seconds.
The direction is one of
illegal
left
right
up
down
forward
backward
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
Should an instance support mirroring the following methods become available. This support can checked by invoking the inherited method is-capable-of for the capability name mirror.
In this form the method returns the current state of the instance's mirror flag.
The result is a boolean value, true if the instance generates mirrored frames, and false else.
In this form the method (un)sets the instance's mirror flag.
The result is an empty string.
This capability supports the events below. These names can be used as the event argument of method bind defined by base class ::kinetcl::base.
This event is generated in response to reconfiguration of the instance's mirror flag.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
Should an instance support pose detection the following methods become available. This support can checked by invoking the inherited method is-capable-of for the capability name user-pose-detection.
This method returns a list containing the names of the supported user poses.
This method tests if the named user pose is supported by the instance.
The result is a boolean value, true if the pose is supported, and false else.
This method activates the detection of the named pose for the specified user.
The result of the method is an empty string.
This method deactivates the detection of the named pose for the specified user.
The result of the method is an empty string.
This method deactivates the detection of any poses for the specified user.
The result of the method is an empty string.
This method queries the status of the detection of the named pose for the specified user.
The result of the method is 3-element string containing, in the named order
The state of the user with respect to the pose, one of in, out, or undefined
The status of the detection progress.
The possible stati are
ok
no-user
top-fov
side-fov
error
no-tracking
A timestamp telling us when the user entered the pose, if it is in the pose. If the user is out of the pose 0 is returned here.
This capability supports the events below. These names can be used as the event argument of method bind defined by base class ::kinetcl::base.
This event is generated in response to a user entering a pose.
The detail dictionary of this event contains:
The name of the pose the event was generated for.
The numerical id of the user the event was generated for.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This event is generated in response to a user exiting a pose.
The detail dictionary of this event contains:
The name of the pose the event was generated for.
The numerical id of the user the event was generated for.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This event is generated in response to the system's progress in the detection of a pose for a user.
The detail dictionary of this event contains:
The name of the pose the event was generated for.
The numerical id of the user the event was generated for.
The status of the pose detection engine.
The possible stati are
ok
no-user
top-fov
side-fov
error
no-tracking
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
Should an instance support skeleton and joint tracking the following methods become available. This support can checked by invoking the inherited method is-capable-of for the capability name user-skeleton.
This method tests if the skeleton tracking requires the user to enter a pose for calibration.
The result is a boolean value, true if entering a pose is required, and false else. NOTE: XXX. The C API to query the name of the required pose looks to be borken, or underspecified. Research required.
This method tests if the skeleton tracking supports the named profile.
The result is a boolean value, true if the profile is supported, and false else.
The accepted profile names are
none
all
upper
lower
heads-hands
This method activates the named profile. This will result in joints getting activated or deactivated, as per the profile.
The accepted profile names are described above, at is-profile-available.
The result of the method is an empty string.
This method sets the skeleton smoothing factor, a floating point value.
The result of the method is an empty string.
This method activates the tracking of the skeleton for the user specified by the id.
The result of the method is an empty string.
This method stops tracking of the skeleton for the user specified by the id.
The result of the method is an empty string.
This method discards the calibration of the skeleton for the user specified by the id.
The result of the method is an empty string.
This method tests if the skeleton for the user id is currently tracked.
The result is a boolean value, true if tracking is active, and false else.
This method tests if the skeleton for the user id is calibrated.
The result is a boolean value, true if the skeleton is calbrated, and false else.
This method tests if calibration of the skeleton for the user id is currently in progress.
The result is a boolean value, true if calibration is in progress, and false else.
This method requests calibration of the skeleton for the user specified by the id.
The result of the method is an empty string.
If the boolean flag force is set any previous calibration data is discarded.
This method stops a calibration in progress, for the user specified by the id.
The result of the method is an empty string.
This method saves the calibration data for the skeleton of the user specified by the id into the file path. The format of the calibration data is not documented.
The result of the method is an empty string.
This method loads the calibration data for the skeleton of the user specified by the id from the file path. The format of the calibration data is not documented.
The result of the method is an empty string.
This method saves the calibration data for the skeleton of the user specified by the id into the in-memory storage identified by the slot number.
The result of the method is an empty string.
This method loads the calibration data for the skeleton of the user specified by the id from the in-memory storage identified by the slot number.
The result of the method is an empty string.
This method clears the in-memory calibration data storage identified by the slot number.
The result of the method is an empty string.
This method tests if the in-memory storage identified by the slot number contains skeleton calibration data.
The result is a boolean value, true if the slot is occupied, and false else.
This method tests if the skeleton tracking supports the named joint.
The result is a boolean value, true if the joint is supported, and false else.
The accepted joint names are
head
neck
torso
waist
left-collar
left-shoulder
left-elbow
left-wrist
left-hand
left-fingertip
right-collar
right-shoulder
right-elbow
right-wrist
right-hand
right-fingertip
left-hip
left-knee
left-ankle
left-foot
right-hip
right-knee
right-ankle
right-foot
This method tests if the the named joint is actively tracked.
The result is a boolean value, true if the joint is active, and false else.
The accepted joint names are described above, at is-joint-available.
This method (de)activates the named joint.
The accepted joint names are described above, at is-joint-available.
The result of the method is an empty string.
This method returns a list containig the names of all currently active joints.
The possible joint names are described above, at is-joint-available.
This method retrieves position and orientation data for the user specified by id and the named joint.
The accepted joint names are described above, at is-joint-available.
The result of the command is a 2-element list containing, in the order specified:
A 2-element list containing, in the order specified:
A floating point value representing the system's confidence in the position information.
A 3-element list of floating point values representing the x-, y-, and z-position of the joint.
A 2-element list containing, in the order specified:
A floating point value representing the system's confidence in the orientation information.
A 9-element list of floating point values representating the rotation matrix for the joint.
This method retrieves the position and orientation data for all joints of the user specified by id. In other words, the whole skeleton, as available and active.
The result of the method is a dictionary mapping joint names to position and orientation, given in the format returned by method get-joint.
Joints which are either not available or not actively tracked will not be found in the dictionary.
This capability supports the events below. These names can be used as the event argument of method bind defined by base class ::kinetcl::base.
This event is generated in response to joint changes, i.e. the (de)activation of specific joints.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This event is generated in response to the start of skeleton calibration for a user.
The detail dictionary of this event contains:
The numerical id of the user the event was generated for.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This event is generated in response to the completion of skeleton calibration for a user.
The detail dictionary of this event contains:
The numerical id of the user the event was generated for.
The status of the calibration engine.
The possible stati are
ok
no-user
arm
leg
head
torso
top-fov
side-fov
pose
manual-abort
manual-reset
timeout
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This event is generated in response to the system's progress in the calibration of the skeleton for a user.
The detail dictionary of this event contains:
The numerical id of the user the event was generated for.
The status of the calibration engine.
The possible stati are
ok
no-user
arm
leg
head
torso
top-fov
side-fov
pose
manual-abort
manual-reset
timeout
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
Should an instance support the backlight-compensation setting the following methods become available. This support can checked by invoking the inherited method is-capable-of for the capability name backlight-compensation.
In this form the method returns the current state of the instance's backlight-compensation setting.
The result is an integer.
In this form the method changes the instance's backlight-compensation setting to the specified value.
The result is an empty string.
This method returns a dictionary describing the allowed domain of values for the capability. The keys and associated values are:
The value is an integer number, the minimal value the setting is allowed to have.
The value is an integer number, the maximal value the setting is allowed to have.
The value is an integer number, the default value the setting will have after node construction.
The value is an integer number, the difference between two legal values of the setting. The difference between min and max is a multiple of this value.
A boolean value. If true the setting supports automatic adjustment during operation of the node, otherwise not.
This capability supports the events below. These names can be used as the event argument of method bind defined by base class ::kinetcl::base.
This event is generated in response to backlight-compensation changes, i.e. reconfiguration of the instance's backlight-compensation setting.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
Should an instance support the brightness setting the following methods become available. This support can checked by invoking the inherited method is-capable-of for the capability name brightness.
In this form the method returns the current state of the instance's brightness setting.
The result is an integer.
In this form the method changes the instance's brightness setting to the specified value.
The result is an empty string.
This method returns a dictionary describing the allowed domain of values for the capability. The keys and associated values are:
The value is an integer number, the minimal value the setting is allowed to have.
The value is an integer number, the maximal value the setting is allowed to have.
The value is an integer number, the default value the setting will have after node construction.
The value is an integer number, the difference between two legal values of the setting. The difference between min and max is a multiple of this value.
A boolean value. If true the setting supports automatic adjustment during operation of the node, otherwise not.
This capability supports the events below. These names can be used as the event argument of method bind defined by base class ::kinetcl::base.
This event is generated in response to brightness changes, i.e. reconfiguration of the instance's brightness setting.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
Should an instance support the color-temperature setting the following methods become available. This support can checked by invoking the inherited method is-capable-of for the capability name color-temperature.
In this form the method returns the current state of the instance's color-temperature setting.
The result is an integer.
In this form the method changes the instance's color-temperature setting to the specified value.
The result is an empty string.
This method returns a dictionary describing the allowed domain of values for the capability. The keys and associated values are:
The value is an integer number, the minimal value the setting is allowed to have.
The value is an integer number, the maximal value the setting is allowed to have.
The value is an integer number, the default value the setting will have after node construction.
The value is an integer number, the difference between two legal values of the setting. The difference between min and max is a multiple of this value.
A boolean value. If true the setting supports automatic adjustment during operation of the node, otherwise not.
This capability supports the events below. These names can be used as the event argument of method bind defined by base class ::kinetcl::base.
This event is generated in response to color-temperature changes, i.e. reconfiguration of the instance's color-temperature setting.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
Should an instance support the contrast setting the following methods become available. This support can checked by invoking the inherited method is-capable-of for the capability name contrast.
In this form the method returns the current state of the instance's contrast setting.
The result is an integer.
In this form the method changes the instance's contrast setting to the specified value.
The result is an empty string.
This method returns a dictionary describing the allowed domain of values for the capability. The keys and associated values are:
The value is an integer number, the minimal value the setting is allowed to have.
The value is an integer number, the maximal value the setting is allowed to have.
The value is an integer number, the default value the setting will have after node construction.
The value is an integer number, the difference between two legal values of the setting. The difference between min and max is a multiple of this value.
A boolean value. If true the setting supports automatic adjustment during operation of the node, otherwise not.
This capability supports the events below. These names can be used as the event argument of method bind defined by base class ::kinetcl::base.
This event is generated in response to contrast changes, i.e. reconfiguration of the instance's contrast setting.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
Should an instance support the exposure setting the following methods become available. This support can checked by invoking the inherited method is-capable-of for the capability name exposure.
In this form the method returns the current state of the instance's exposure setting.
The result is an integer.
In this form the method changes the instance's exposure setting to the specified value.
The result is an empty string.
This method returns a dictionary describing the allowed domain of values for the capability. The keys and associated values are:
The value is an integer number, the minimal value the setting is allowed to have.
The value is an integer number, the maximal value the setting is allowed to have.
The value is an integer number, the default value the setting will have after node construction.
The value is an integer number, the difference between two legal values of the setting. The difference between min and max is a multiple of this value.
A boolean value. If true the setting supports automatic adjustment during operation of the node, otherwise not.
This capability supports the events below. These names can be used as the event argument of method bind defined by base class ::kinetcl::base.
This event is generated in response to exposure changes, i.e. reconfiguration of the instance's exposure setting.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
Should an instance support the focus setting the following methods become available. This support can checked by invoking the inherited method is-capable-of for the capability name focus.
In this form the method returns the current state of the instance's focus setting.
The result is an integer.
In this form the method changes the instance's focus setting to the specified value.
The result is an empty string.
This method returns a dictionary describing the allowed domain of values for the capability. The keys and associated values are:
The value is an integer number, the minimal value the setting is allowed to have.
The value is an integer number, the maximal value the setting is allowed to have.
The value is an integer number, the default value the setting will have after node construction.
The value is an integer number, the difference between two legal values of the setting. The difference between min and max is a multiple of this value.
A boolean value. If true the setting supports automatic adjustment during operation of the node, otherwise not.
This capability supports the events below. These names can be used as the event argument of method bind defined by base class ::kinetcl::base.
This event is generated in response to focus changes, i.e. reconfiguration of the instance's focus setting.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
Should an instance support the gain setting the following methods become available. This support can checked by invoking the inherited method is-capable-of for the capability name gain.
In this form the method returns the current state of the instance's gain setting.
The result is an integer.
In this form the method changes the instance's gain setting to the specified value.
The result is an empty string.
This method returns a dictionary describing the allowed domain of values for the capability. The keys and associated values are:
The value is an integer number, the minimal value the setting is allowed to have.
The value is an integer number, the maximal value the setting is allowed to have.
The value is an integer number, the default value the setting will have after node construction.
The value is an integer number, the difference between two legal values of the setting. The difference between min and max is a multiple of this value.
A boolean value. If true the setting supports automatic adjustment during operation of the node, otherwise not.
This capability supports the events below. These names can be used as the event argument of method bind defined by base class ::kinetcl::base.
This event is generated in response to gain changes, i.e. reconfiguration of the instance's gain setting.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
Should an instance support the gamma setting the following methods become available. This support can checked by invoking the inherited method is-capable-of for the capability name gamma.
In this form the method returns the current state of the instance's gamma setting.
The result is an integer.
In this form the method changes the instance's gamma setting to the specified value.
The result is an empty string.
This method returns a dictionary describing the allowed domain of values for the capability. The keys and associated values are:
The value is an integer number, the minimal value the setting is allowed to have.
The value is an integer number, the maximal value the setting is allowed to have.
The value is an integer number, the default value the setting will have after node construction.
The value is an integer number, the difference between two legal values of the setting. The difference between min and max is a multiple of this value.
A boolean value. If true the setting supports automatic adjustment during operation of the node, otherwise not.
This capability supports the events below. These names can be used as the event argument of method bind defined by base class ::kinetcl::base.
This event is generated in response to gamma changes, i.e. reconfiguration of the instance's gamma setting.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
Should an instance support the hue setting the following methods become available. This support can checked by invoking the inherited method is-capable-of for the capability name hue.
In this form the method returns the current state of the instance's hue setting.
The result is an integer.
In this form the method changes the instance's hue setting to the specified value.
The result is an empty string.
This method returns a dictionary describing the allowed domain of values for the capability. The keys and associated values are:
The value is an integer number, the minimal value the setting is allowed to have.
The value is an integer number, the maximal value the setting is allowed to have.
The value is an integer number, the default value the setting will have after node construction.
The value is an integer number, the difference between two legal values of the setting. The difference between min and max is a multiple of this value.
A boolean value. If true the setting supports automatic adjustment during operation of the node, otherwise not.
This capability supports the events below. These names can be used as the event argument of method bind defined by base class ::kinetcl::base.
This event is generated in response to hue changes, i.e. reconfiguration of the instance's hue setting.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
Should an instance support the iris setting the following methods become available. This support can checked by invoking the inherited method is-capable-of for the capability name iris.
In this form the method returns the current state of the instance's iris setting.
The result is an integer.
In this form the method changes the instance's iris setting to the specified value.
The result is an empty string.
This method returns a dictionary describing the allowed domain of values for the capability. The keys and associated values are:
The value is an integer number, the minimal value the setting is allowed to have.
The value is an integer number, the maximal value the setting is allowed to have.
The value is an integer number, the default value the setting will have after node construction.
The value is an integer number, the difference between two legal values of the setting. The difference between min and max is a multiple of this value.
A boolean value. If true the setting supports automatic adjustment during operation of the node, otherwise not.
This capability supports the events below. These names can be used as the event argument of method bind defined by base class ::kinetcl::base.
This event is generated in response to iris changes, i.e. reconfiguration of the instance's iris setting.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
Should an instance support the lowlight-compensation setting the following methods become available. This support can checked by invoking the inherited method is-capable-of for the capability name lowlight-compensation.
In this form the method returns the current state of the instance's lowlight-compensation setting.
The result is an integer.
In this form the method changes the instance's lowlight-compensation setting to the specified value.
The result is an empty string.
This method returns a dictionary describing the allowed domain of values for the capability. The keys and associated values are:
The value is an integer number, the minimal value the setting is allowed to have.
The value is an integer number, the maximal value the setting is allowed to have.
The value is an integer number, the default value the setting will have after node construction.
The value is an integer number, the difference between two legal values of the setting. The difference between min and max is a multiple of this value.
A boolean value. If true the setting supports automatic adjustment during operation of the node, otherwise not.
This capability supports the events below. These names can be used as the event argument of method bind defined by base class ::kinetcl::base.
This event is generated in response to lowlight-compensation changes, i.e. reconfiguration of the instance's lowlight-compensation setting.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
Should an instance support the pan setting the following methods become available. This support can checked by invoking the inherited method is-capable-of for the capability name pan.
In this form the method returns the current state of the instance's pan setting.
The result is an integer.
In this form the method changes the instance's pan setting to the specified value.
The result is an empty string.
This method returns a dictionary describing the allowed domain of values for the capability. The keys and associated values are:
The value is an integer number, the minimal value the setting is allowed to have.
The value is an integer number, the maximal value the setting is allowed to have.
The value is an integer number, the default value the setting will have after node construction.
The value is an integer number, the difference between two legal values of the setting. The difference between min and max is a multiple of this value.
A boolean value. If true the setting supports automatic adjustment during operation of the node, otherwise not.
This capability supports the events below. These names can be used as the event argument of method bind defined by base class ::kinetcl::base.
This event is generated in response to pan changes, i.e. reconfiguration of the instance's pan setting.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
Should an instance support the roll setting the following methods become available. This support can checked by invoking the inherited method is-capable-of for the capability name roll.
In this form the method returns the current state of the instance's roll setting.
The result is an integer.
In this form the method changes the instance's roll setting to the specified value.
The result is an empty string.
This method returns a dictionary describing the allowed domain of values for the capability. The keys and associated values are:
The value is an integer number, the minimal value the setting is allowed to have.
The value is an integer number, the maximal value the setting is allowed to have.
The value is an integer number, the default value the setting will have after node construction.
The value is an integer number, the difference between two legal values of the setting. The difference between min and max is a multiple of this value.
A boolean value. If true the setting supports automatic adjustment during operation of the node, otherwise not.
This capability supports the events below. These names can be used as the event argument of method bind defined by base class ::kinetcl::base.
This event is generated in response to roll changes, i.e. reconfiguration of the instance's roll setting.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
Should an instance support the saturation setting the following methods become available. This support can checked by invoking the inherited method is-capable-of for the capability name saturation.
In this form the method returns the current state of the instance's saturation setting.
The result is an integer.
In this form the method changes the instance's saturation setting to the specified value.
The result is an empty string.
This method returns a dictionary describing the allowed domain of values for the capability. The keys and associated values are:
The value is an integer number, the minimal value the setting is allowed to have.
The value is an integer number, the maximal value the setting is allowed to have.
The value is an integer number, the default value the setting will have after node construction.
The value is an integer number, the difference between two legal values of the setting. The difference between min and max is a multiple of this value.
A boolean value. If true the setting supports automatic adjustment during operation of the node, otherwise not.
This capability supports the events below. These names can be used as the event argument of method bind defined by base class ::kinetcl::base.
This event is generated in response to saturation changes, i.e. reconfiguration of the instance's saturation setting.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
Should an instance support the sharpness setting the following methods become available. This support can checked by invoking the inherited method is-capable-of for the capability name sharpness.
In this form the method returns the current state of the instance's sharpness setting.
The result is an integer.
In this form the method changes the instance's sharpness setting to the specified value.
The result is an empty string.
This method returns a dictionary describing the allowed domain of values for the capability. The keys and associated values are:
The value is an integer number, the minimal value the setting is allowed to have.
The value is an integer number, the maximal value the setting is allowed to have.
The value is an integer number, the default value the setting will have after node construction.
The value is an integer number, the difference between two legal values of the setting. The difference between min and max is a multiple of this value.
A boolean value. If true the setting supports automatic adjustment during operation of the node, otherwise not.
This capability supports the events below. These names can be used as the event argument of method bind defined by base class ::kinetcl::base.
This event is generated in response to sharpness changes, i.e. reconfiguration of the instance's sharpness setting.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
Should an instance support the tilt setting the following methods become available. This support can checked by invoking the inherited method is-capable-of for the capability name tilt.
In this form the method returns the current state of the instance's tilt setting.
The result is an integer.
In this form the method changes the instance's tilt setting to the specified value.
The result is an empty string.
This method returns a dictionary describing the allowed domain of values for the capability. The keys and associated values are:
The value is an integer number, the minimal value the setting is allowed to have.
The value is an integer number, the maximal value the setting is allowed to have.
The value is an integer number, the default value the setting will have after node construction.
The value is an integer number, the difference between two legal values of the setting. The difference between min and max is a multiple of this value.
A boolean value. If true the setting supports automatic adjustment during operation of the node, otherwise not.
This capability supports the events below. These names can be used as the event argument of method bind defined by base class ::kinetcl::base.
This event is generated in response to tilt changes, i.e. reconfiguration of the instance's tilt setting.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
Should an instance support the zoom setting the following methods become available. This support can checked by invoking the inherited method is-capable-of for the capability name zoom.
In this form the method returns the current state of the instance's zoom setting.
The result is an integer.
In this form the method changes the instance's zoom setting to the specified value.
The result is an empty string.
This method returns a dictionary describing the allowed domain of values for the capability. The keys and associated values are:
The value is an integer number, the minimal value the setting is allowed to have.
The value is an integer number, the maximal value the setting is allowed to have.
The value is an integer number, the default value the setting will have after node construction.
The value is an integer number, the difference between two legal values of the setting. The difference between min and max is a multiple of this value.
A boolean value. If true the setting supports automatic adjustment during operation of the node, otherwise not.
This capability supports the events below. These names can be used as the event argument of method bind defined by base class ::kinetcl::base.
This event is generated in response to zoom changes, i.e. reconfiguration of the instance's zoom setting.
The detail dictionary of this event is empty.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This sections documents the class ::kinetcl ventbase, a base class supplying general event management facilities.
This class has no superclasses, i.e it inherit nothing.
It itself is used by the classes ::kinetcl nodeevents (described in section Node Events) and ::kinetcl joints (described in section Joint Events.
This command creates a new instance of the class, either automatically named (new), or explicitly (create). The API provided by the instance, i.e. the set of available methods and their semantics is described in the next subsection.
This method binds the command prefix cmdprefix to the specified event and returns an opaque token for the binding.
The system ensures that everybody with an interest in the event (i.e. having to know if there are bindings or not) is notified and can take action.
The result of the method is an opaque token.
The command prefix is expected to have the following signature:
This method removes the event binding represented by the opaque token, a result of a call to method bind above.
The system ensures that everybody with an interest in the event (i.e. having to know if there are bindings or not) is notified and can take action.
The result of the method is an empty string.
This method generates the named event, ensuring that all bindings are called and supplied with the given details. The structure of said details depends on the event in question.
This is an abstract method which can be overridden by derived classes. As is it does nothing.
It is invoked when the instance becomes known as having bindings for any event.
The result of the method is ignored.
This is an abstract method which can be overridden by derived classes. As is it does nothing.
It is invoked when the instance becomes known as having no bindings anymore, for no events.
The result of the method is ignored.
This is an abstract method which can be overridden by derived classes. As is it does nothing.
It is invoked when the named event becomes known as having bindings.
The result of the method is ignored.
This is an abstract method which can be overridden by derived classes. As is it does nothing.
It is invoked when the named event becomes known as having no bindings anymore.
The result of the method is ignored.
This is a method for use by derived classes. It takes a list of event names and arranges for notification when bindings to the instance and these events come into existence or are removed.
This information is used to drive the invokations of the abstract methods above, i.e. bound, unbound, event-bound, and event-unbound.
The result of the method is an empty string.
This sections documents the class ::kinetcl nodeevents, a base class supplying the event management for all OpenNI production nodes dervided from class ::kinetcl base described in section Base.
This class inherits from ::kinetcl eventbase for the overall management of events. See section Event Base.
This command creates a new instance of the class, either automatically named (new), or explicitly (create). The API provided by the instance, i.e. the set of available methods and their semantics is described in the next subsection.
This method introspects the C-level OpenNI instance node and registers all callbacks it exposes (via a method pair set-callback-*, unset-callback-*) as events the instance is able to generate.
It further remembers the mapping from event names to the node instances generating them.
The result of the method is an empty string.
This sections documents the class ::kinetcl joints, a class providing proper event based tracking of user skeletons.
This class inherits from ::kinetcl eventbase for the overall management of the events it generates. See section Event Base.
Instances of the class rely on a (possibly external) instance of class ::kinetcl user (See section User Generator) and its events for the basic aquisition and tracking of users.
This command creates a new instance of the class, either automatically named (new), or explicitly (create). The API provided by the instance, i.e. the set of available methods and their semantics is described in the next subsection.
If the argument user is specified then it must be an instance of class ::kinetcl user. See section User Generator for details. In the future we may relax these restriction to require only API cmopatibility.
If no such instance is specified the new instance will itself create such an instance.
This user generator is used to get the basic events for tracking users and skeletons the instance will then transform into more suitable form and events.
Note that any instance methods invoked and not known to the class (see below for the known API) are delegated to the user generator for handling, making the instance look like an extended user generator.
In this form the method returns the value of the confidence threshold used to distinguish between good and ignorable joint locations. The default is 0.5.
In this form the method configures the instance to use the new value of the confidence threshold used to distinguish between good and ignorable joint locations. This value must be a floating point number in the range 0..1.
The method returns the instance command of the user generator provinding the raw information about users and skeletons. This is either the generator specified at instance construction time, or the internally created generator.
This method returns the location of the named joint for the specified user (id).
This information comes out of an internal cache maintained by the instance, to avoid having to go to the underlying user generator.
The result of the method is a 3D location in world coordinates.
This method returns the location of all joints currently known for the specified user (id).
This information comes out of an internal cache maintained by the instance, to avoid having to go to the underlying user generator.
The result of the method is a dictionary mapping joint names to 3D locations in world coordinates.
This class supports the events below. These names can be used as the event argument of method bind defined by our super-class ::kinetcl::base.
This event is generated in response to the appearance of new users in the scene.
The detail dictionary of this event contains:
The numerical id of the user the event was generated for.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This event is generated in response to the user moving in the scene.
The detail dictionary of this event contains:
The numerical id of the user the event was generated for.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This event is generated in response to the disappearance of users from the scene.
The detail dictionary of this event contains:
The numerical id of the user the event was generated for.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This event is generated in response to the appearance of a user's joint (confident position).
The detail dictionary of this event contains:
The numerical id of the user the event was generated for.
The name of the joint the event was generated for.
The current position of the joint. This is a 3-element list of floating point values containing the real world x-, y-, and z-coordinates of the position, in this order.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This event is generated in response to the user's joint's movement in the scene.
The detail dictionary of this event contains:
The numerical id of the user the event was generated for.
The name of the joint the event was generated for.
The current position of the joint. This is a 3-element list of floating point values containing the real world x-, y-, and z-coordinates of the position, in this order.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This event is generated in response to the disappearance of a user's joint (non-confident position).
The detail dictionary of this event contains:
The numerical id of the user the event was generated for.
The name of the joint the event was generated for.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This sections documents the class ::kinetcl stance, a class for the recognition of stances, also known as poses or body gestures. Events are generated whenever a user enters or leaves a stance.
This was in general inspired by the concept of FAAST body gestures mentioned at http://fivedots.coe.psu.ac.th/~ad/jg/nui1610/index.html.
This class inherits from ::kinetcl eventbase for the overall management of the events it generates. See section Event Base.
Instances of the class rely on an external instance of class ::kinetcl joints (See section Joint Events) and its events for the tracking of users and their skeleton joints.
Multiple instances can trivially share the same joint tracker instance, given that the communication from tracker to recognizer is by events and bindings.
This command creates a new instance of the class, either automatically named (new), or explicitly (create). The API provided by the instance, i.e. the set of available methods and their semantics is described in the next subsection.
The joints argument must be a joint tracking object which is API compatible to instances of class ::kinetcl joints.
This tracker is monitored for the creation, movement and destruction of users, in response to which the referenced user and its joints are run through the stance recognizer.
This method defines a new stance to be recognized by the instance, identified by name. The script is the recognizer for the stance and is invoked whenever a user moved, as this may have caused her to either enter or exit the stance.
The context and commands available to this script are explained in detail in section Stance Recognition Language.
The script has to return a boolean value, true if the stance is recognized, and false otherwise.
Events are send whenever this information changes (per-user).
Note that a user can be in multiple stances at the same time.
The result of the method is the empty string.
This method removes the named stance from the instance, stopping its future recognition.
The result of the method is the empty string.
This method extends the gesture recognition language used by the instance with a named measure(ment), a cacheable piece of information about a user's skeleton.
The value of the measure is computed once, per user, by invoking the script. The result of the script is the value of the measurement.
The context and commands available to this script are explained in detail in section Stance Recognition Language.
The set of predefined measures is explained in section Predefined Measurements.
The result of the method is the empty string.
This class supports the events below. These names can be used as the event argument of method bind defined by our super-class ::kinetcl::base.
This event is generated in response to a user entering a recognized stance.
The detail dictionary of this event contains:
The numerical id of the user the event was generated for.
The name of the stance the event is for.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
This event is generated in response to a user leaving a recognized stance.
The detail dictionary of this event contains:
The numerical id of the user the event was generated for.
The name of the stance the event is for.
Note that events are not told the actual state of the instance. If this information is required then it is the receiver's responsibility to query the state using the appropriate query methods.
All stance recognition and measurement scripts are executed within a namespace which provides the commands below:
All of Tcl's builtin math functions and operators.
All named measurements of the instance running the script, as commands taking no arguments and returning the value of the measurement.
These commands return the location of the named joint in world coordinates, for the user the script is invoked for. If the joint is not defined for that user, the script is aborted, and the gesture's enter/exit state is not changed.
In this form the commands take the names of two joints, determine their locations and then compute the euclidean distance between them, or the distance along the named axes.
For the names of the possible joints see the command names above.
The result of the commands is a floating point value, the computed distance.
In this form the commands take the names of a single segment and compute it length, either the full euclidean distance between its joints, or the length along the named axes.
The following segments are known:
left-hand -- left-elbow
left-elbow -- left-shoulder
left-foot -- left-knee
left-knee -- left-hip
right-hand -- right-elbow
right-elbow -- right-shoulder
right-foot -- right-knee
right-knee -- right-hip
The commands take the names of two joints or of one segment (which maps to two joints), determine their locations and then check if these locations are aligned with the primary axes of the coordinate system.
The result of the commands is a boolean value, true if the relationship holds, and false otherwise.
The commands take the names of two joints or of one segment (which maps to two joints), determine their locations and then check if these locations are aligned with the primary axes of the coordinate system, and in the described relationship.
The result of the commands is a boolean value, true if the relationship holds, and false otherwise.
The commands take the names of two joints or of one segment (which maps to two joints), determine their locations and then check if these locations are in the described relationship.
The result of the commands is a boolean value, true if the relationship holds, and false otherwise.
All instances of ::kinetcl stance know the following measurements:
The distance from left soulder to neck.
The distance from left shoulder to left elbow.
The distance from left hand to left elbow.
The distance from right soulder to neck.
The distance from right shoulder to right elbox.
The distance from right hand to right elbow.
The minimum of both neck lengths above.
The minimum of both upper arm lengths above.
The minimum of both lower arm lengths above.
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such at the KineTcl Tracker. Please also report any ideas for enhancements you may have for either package and/or documentation.
3rd party library binding
Copyright © 2012 Andreas Kupries
Copyright © 2012 Documentation, Andreas Kupries