![]() |
OpenNI 1.5.4
|
#include <XnCppWrapper.h>
Purpose: A DepthGenerator node generates depth maps. Each pixel value of a depth map represents a distance from the sensor's plane in millimeters.
Usage: Instantiate the class and call Create() to create a DepthGenerator node.
This class is at the first level of classes in the OpenNI class hierarchy that is typically instantiated to create an actual node. (Examples of other classes at the first level are xn::ImageGenerator and xn::SceneAnalyzer).
Data output: Depth maps and associated configuration data. Access via the node's xn::DepthMetaData object.
Overview:
A DepthGenerator node generates a depth map as an array of pixels, where each pixel is a depth value representing a distance from the sensor's plane in millimeters. This is the Z-coordinate of the X-Y-Z coordinate of each user pixel. A smaller depth value indicates a scene point that is closer to the hardware sensor device; and a larger depth value indicates a scene point that is a further away from the sensor. A zero depth value indicates that the DepthGenerator node did not succeed in obtaining a valid depth reading.
Typically, the process of generating 3D data begins by using a sensor device that produces raw output data. Dedicated middleware is then used to process this raw output, and produce a higher-level output, which can then be understood and used by the application.
In a typical OpenNI production graph, a DepthGenerator node takes input directly from a sensor device and generates a depth map. Other generator nodes further along the production graph (dependant on the DepthGenerator node) take input from the DepthGenerator node's output. However, alternative dependency configurations are also possible.
The DepthGenerator node's data and associated configuration are accessed through its frame object (i.e., its xn::DepthMetaData object).
Summary of Main Features:
|
inline |
Ctor
[in] | hNode | Node handle |
|
inline |
|
inline |
Converts a list of points from projective coordinates to real world coordinates.
[in] | nCount | Number of points to convert. |
[in] | aProjective | Array of projective point coordinates. |
[in,out] | aRealWorld | Array to be filled with real-world point coordinates. |
See Coordinate Systems for futher information.
|
inline |
Converts a list of points from real world coordinates to projective coordinates.
[in] | nCount | Number of points to convert. |
[in] | aRealWorld | Array of projective point coordinates. |
[in,out] | aProjective | Array to be filled with real-world point coordinates. |
See Coordinate Systems for futher information.
|
inline |
Creates a DepthGenerator node from available production node alternatives.
Remarks:
For full details and usage, see create_method.
|
inline |
Gets the current depth-map. This map is updated after a call to xnWaitAndUpdateData(). For full details and usage, see xnGetDepthMap
|
inline |
Gets the maximum depth value that the DepthGenerator node can generate. The maximum depth value is a hardware specification of the sensor.
Remarks:
A typical maximum depth supports up to 10 meters of depth. Units are in millimeters, so the maximum depth value for 10 meters of depth would range from 0 to 10,000.
|
inline |
Gets the dimensions of the field of view (FOV) of the hardware sensor.
[out] | FOV | A struct to be filled with the field of view of the hardware sensor. |
Remarks:
This method gets the dimensions of the field of view in radians. Radians are used for the output form since they are a spherical measurement and the FOV is defined in terms of the angle of width and height that the sensor sees, e.g., 0.524 radians (30 degrees) above and below, and 1.047 radians (60 degrees) left and right.
This method is useful for developers building algorithms to convert between real world and productive coordinate systems. Although OpenNI offers its own functionality for converting real-world and productive coordinate systems, some developers may wish to build their own conversion functions for reasons of optimization.
|
inline |
Gets the depth generator node's latest frame object, saving it in the xn::DepthMetaData object. This frame object is a snapshot of the generated depth map data and its associated configuration information at a certain point in time. This saved frame object provides fast and easy access to the depth generator node's data and configuration information.
[out] | metaData | Structure to be filled with the frame object. |
Remarks:
This method is central in the use of the DepthGenerator node. Once the DepthGenerator node is generating data, after each 'Update Data' call, the application calls this method to get the node's frame object, which contains the data and all its associated properties.
|
inline |
Gets an UserPositionCapability object for accessing User Position functionality. It is the application responsibility to check first if XN_CAPABILITY_USER_POSITION is supported by calling IsCapabilitySupported().
|
inline |
Gets an UserPositionCapability object for accessing User Position functionality. It is the application responsibility to check first if XN_CAPABILITY_USER_POSITION is supported by calling IsCapabilitySupported().
|
inline |
Registers an event handler for the 'Field-Of-View Change' event.
[in] | handler | Callback function to be invoked when the event is raised. |
[in] | pCookie | User's cookie, to be delivered to the callback. |
[out] | hCallback | Handle to the callback to be used for unregistering it. |
For full details and usage of the parameters, see Registering to Events.
|
inline |
Unregisters the event handler for the 'Field-Of-View Change' event.
[in] | hCallback | Handle received from registration. |
For full details and usage of the parameter, see Unregistering from Events .