OpenNI 1.5.7
Public Member Functions | List of all members

#include <XnCppWrapper.h>

Inheritance diagram for xn::DepthGenerator:
Inheritance graph
[legend]

Public Member Functions

 DepthGenerator (XnNodeHandle hNode=NULL)
 
 DepthGenerator (const NodeWrapper &other)
 
XnStatus Create (Context &context, Query *pQuery=NULL, EnumerationErrors *pErrors=NULL)
 
void GetMetaData (DepthMetaData &metaData) const
 
const XnDepthPixelGetDepthMap () const
 
XnDepthPixel GetDeviceMaxDepth () const
 
XnStatus GetFieldOfView (XnFieldOfView &FOV) const
 
XnStatus RegisterToFieldOfViewChange (StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
 
void UnregisterFromFieldOfViewChange (XnCallbackHandle hCallback)
 
XnStatus ConvertProjectiveToRealWorld (XnUInt32 nCount, const XnPoint3D aProjective[], XnPoint3D aRealWorld[]) const
 
XnStatus ConvertRealWorldToProjective (XnUInt32 nCount, const XnPoint3D aRealWorld[], XnPoint3D aProjective[]) const
 
const UserPositionCapability GetUserPositionCap () const
 
UserPositionCapability GetUserPositionCap ()
 
- Public Member Functions inherited from xn::MapGenerator
 MapGenerator (XnNodeHandle hNode=NULL)
 
 MapGenerator (const NodeWrapper &other)
 
XnUInt32 GetSupportedMapOutputModesCount () const
 
XnStatus GetSupportedMapOutputModes (XnMapOutputMode *aModes, XnUInt32 &nCount) const
 
XnStatus SetMapOutputMode (const XnMapOutputMode &OutputMode)
 
XnStatus GetMapOutputMode (XnMapOutputMode &OutputMode) const
 
XnUInt32 GetBytesPerPixel () const
 
XnStatus RegisterToMapOutputModeChange (StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
 
void UnregisterFromMapOutputModeChange (XnCallbackHandle hCallback)
 
const CroppingCapability GetCroppingCap () const
 
CroppingCapability GetCroppingCap ()
 
GeneralIntCapability GetBrightnessCap ()
 
GeneralIntCapability GetContrastCap ()
 
GeneralIntCapability GetHueCap ()
 
GeneralIntCapability GetSaturationCap ()
 
GeneralIntCapability GetSharpnessCap ()
 
GeneralIntCapability GetGammaCap ()
 
GeneralIntCapability GetWhiteBalanceCap ()
 
GeneralIntCapability GetBacklightCompensationCap ()
 
GeneralIntCapability GetGainCap ()
 
GeneralIntCapability GetPanCap ()
 
GeneralIntCapability GetTiltCap ()
 
GeneralIntCapability GetRollCap ()
 
GeneralIntCapability GetZoomCap ()
 
GeneralIntCapability GetExposureCap ()
 
GeneralIntCapability GetAutoExposureCap ()
 
GeneralIntCapability GetIrisCap ()
 
GeneralIntCapability GetFocusCap ()
 
GeneralIntCapability GetLowLightCompensationCap ()
 
AntiFlickerCapability GetAntiFlickerCap ()
 
- Public Member Functions inherited from xn::Generator
 Generator (XnNodeHandle hNode=NULL)
 
 Generator (const NodeWrapper &other)
 
XnStatus StartGenerating ()
 
XnBool IsGenerating () const
 
XnStatus StopGenerating ()
 
XnStatus RegisterToGenerationRunningChange (StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
 
void UnregisterFromGenerationRunningChange (XnCallbackHandle hCallback)
 
XnStatus RegisterToNewDataAvailable (StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
 
void UnregisterFromNewDataAvailable (XnCallbackHandle hCallback)
 
XnBool IsNewDataAvailable (XnUInt64 *pnTimestamp=NULL) const
 
XnStatus WaitAndUpdateData ()
 
XnBool IsDataNew () const
 
const void * GetData ()
 
XnUInt32 GetDataSize () const
 
XnUInt64 GetTimestamp () const
 
XnUInt32 GetFrameID () const
 
const MirrorCapability GetMirrorCap () const
 
MirrorCapability GetMirrorCap ()
 
const AlternativeViewPointCapability GetAlternativeViewPointCap () const
 
AlternativeViewPointCapability GetAlternativeViewPointCap ()
 
const FrameSyncCapability GetFrameSyncCap () const
 
FrameSyncCapability GetFrameSyncCap ()
 
- Public Member Functions inherited from xn::ProductionNode
 ProductionNode (XnNodeHandle hNode=NULL)
 
 ProductionNode (const NodeWrapper &other)
 
NodeInfo GetInfo () const
 
XnStatus AddNeededNode (ProductionNode &needed)
 
XnStatus RemoveNeededNode (ProductionNode &needed)
 
void GetContext (Context &context) const
 
Context GetContext () const
 
XnBool IsCapabilitySupported (const XnChar *strCapabilityName) const
 
XnStatus SetIntProperty (const XnChar *strName, XnUInt64 nValue)
 
XnStatus SetRealProperty (const XnChar *strName, XnDouble dValue)
 
XnStatus SetStringProperty (const XnChar *strName, const XnChar *strValue)
 
XnStatus SetGeneralProperty (const XnChar *strName, XnUInt32 nBufferSize, const void *pBuffer)
 
XnStatus GetIntProperty (const XnChar *strName, XnUInt64 &nValue) const
 
XnStatus GetRealProperty (const XnChar *strName, XnDouble &dValue) const
 
XnStatus GetStringProperty (const XnChar *strName, XnChar *csValue, XnUInt32 nBufSize) const
 
XnStatus GetGeneralProperty (const XnChar *strName, XnUInt32 nBufferSize, void *pBuffer) const
 
XnStatus LockForChanges (XnLockHandle *phLock)
 
void UnlockForChanges (XnLockHandle hLock)
 
XnStatus LockedNodeStartChanges (XnLockHandle hLock)
 
void LockedNodeEndChanges (XnLockHandle hLock)
 
const ErrorStateCapability GetErrorStateCap () const
 
ErrorStateCapability GetErrorStateCap ()
 
GeneralIntCapability GetGeneralIntCap (const XnChar *strCapability)
 
- Public Member Functions inherited from xn::NodeWrapper
 NodeWrapper (XnNodeHandle hNode)
 
 NodeWrapper (const NodeWrapper &other)
 
NodeWrapperoperator= (const NodeWrapper &other)
 
 ~NodeWrapper ()
 
 operator XnNodeHandle () const
 
XnNodeHandle GetHandle () const
 
XnBool operator== (const NodeWrapper &other)
 
XnBool operator!= (const NodeWrapper &other)
 
XnBool IsValid () const
 
const XnChar * GetName () const
 
XnStatus AddRef ()
 
void Release ()
 
void SetHandle (XnNodeHandle hNode)
 
void TakeOwnership (XnNodeHandle hNode)
 

Detailed Description

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:

Constructor & Destructor Documentation

◆ DepthGenerator() [1/2]

xn::DepthGenerator::DepthGenerator ( XnNodeHandle  hNode = NULL)
inline

Ctor

Parameters
[in]hNodeNode handle

◆ DepthGenerator() [2/2]

xn::DepthGenerator::DepthGenerator ( const NodeWrapper other)
inline

Member Function Documentation

◆ ConvertProjectiveToRealWorld()

XnStatus xn::DepthGenerator::ConvertProjectiveToRealWorld ( XnUInt32  nCount,
const XnPoint3D  aProjective[],
XnPoint3D  aRealWorld[] 
) const
inline

Converts a list of points from projective coordinates to real world coordinates.

Parameters
[in]nCountNumber of points to convert.
[in]aProjectiveArray of projective point coordinates.
[in,out]aRealWorldArray to be filled with real-world point coordinates.

See Coordinate Systems for futher information.

◆ ConvertRealWorldToProjective()

XnStatus xn::DepthGenerator::ConvertRealWorldToProjective ( XnUInt32  nCount,
const XnPoint3D  aRealWorld[],
XnPoint3D  aProjective[] 
) const
inline

Converts a list of points from real world coordinates to projective coordinates.

Parameters
[in]nCountNumber of points to convert.
[in]aRealWorldArray of projective point coordinates.
[in,out]aProjectiveArray to be filled with real-world point coordinates.

See Coordinate Systems for futher information.

◆ Create()

XnStatus xn::DepthGenerator::Create ( Context context,
Query pQuery = NULL,
EnumerationErrors pErrors = NULL 
)
inline

Creates a DepthGenerator node from available production node alternatives.

Remarks:

For full details and usage, see Understanding the Create() method.

◆ GetDepthMap()

const XnDepthPixel* xn::DepthGenerator::GetDepthMap ( ) const
inline

Gets the current depth-map. This map is updated after a call to xnWaitAndUpdateData(). For full details and usage, see xnGetDepthMap

◆ GetDeviceMaxDepth()

XnDepthPixel xn::DepthGenerator::GetDeviceMaxDepth ( ) const
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.

◆ GetFieldOfView()

XnStatus xn::DepthGenerator::GetFieldOfView ( XnFieldOfView FOV) const
inline

Gets the dimensions of the field of view (FOV) of the hardware sensor.

Parameters
[out]FOVA 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.

◆ GetMetaData()

void xn::DepthGenerator::GetMetaData ( DepthMetaData metaData) const
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.

Parameters
[out]metaDataStructure 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.

◆ GetUserPositionCap() [1/2]

const UserPositionCapability xn::DepthGenerator::GetUserPositionCap ( ) const
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().

◆ GetUserPositionCap() [2/2]

UserPositionCapability xn::DepthGenerator::GetUserPositionCap ( )
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().

◆ RegisterToFieldOfViewChange()

XnStatus xn::DepthGenerator::RegisterToFieldOfViewChange ( StateChangedHandler  handler,
void *  pCookie,
XnCallbackHandle hCallback 
)
inline

Registers an event handler for the 'Field-Of-View Change' event.

Parameters
[in]handlerCallback function to be invoked when the event is raised.
[in]pCookieUser's cookie, to be delivered to the callback.
[out]hCallbackHandle to the callback to be used for unregistering it.

For full details and usage of the parameters, see Registering to Events.

◆ UnregisterFromFieldOfViewChange()

void xn::DepthGenerator::UnregisterFromFieldOfViewChange ( XnCallbackHandle  hCallback)
inline

Unregisters the event handler for the 'Field-Of-View Change' event.

Parameters
[in]hCallbackHandle received from registration.

For full details and usage of the parameter, see Unregistering from Events .


The documentation for this class was generated from the following file: