OpenNI 1.5.7

#include <XnCppWrapper.h>

Inheritance diagram for xn::DepthMetaData:

Public Member Functions

 DepthMetaData ()
void InitFrom (const DepthMetaData &other)
XnStatus InitFrom (const DepthMetaData &other, XnUInt32 nXRes, XnUInt32 nYRes, const XnDepthPixel *pExternalBuffer)
XnStatus CopyFrom (const DepthMetaData &other)
XnStatus ReAdjust (XnUInt32 nXRes, XnUInt32 nYRes, const XnDepthPixel *pExternalBuffer=NULL)
XnDepthPixel ZRes () const
XnDepthPixel & ZRes ()
const XnDepthPixel * Data () const
const XnDepthPixel *& Data ()
XnDepthPixel * WritableData ()
const xn::DepthMap & DepthMap () const
xn::DepthMap & WritableDepthMap ()
const XnDepthPixel & operator[] (XnUInt32 nIndex) const
const XnDepthPixel & operator() (XnUInt32 x, XnUInt32 y) const
const XnDepthMetaData * GetUnderlying () const
XnDepthMetaData * GetUnderlying ()

Additional Inherited Members

Detailed Description

For saving the frame object (data and configuration) from the DepthGenerator node. This frameobject is a snapshot of the DepthGenerator's generated depth map and its associated configuration information at a certain point in time. This saved frame object provides fast and easy access to the DepthGenerator node's data and configuration information.

It is important to get a good understanding of the purpose and design of the OpenNI metadata objects. For a comprehensive overview of OpenNI metadata objects, see Frame Objects and Metadata Objects.

The DepthGenerator node generates depth data of the FOV. This is the Z-coordinate of the X-Y-Z coordinate of each point. The Z-axis is the distance, in millimeters from the sensor plane. A smaller depth value indicates a scene point that is a closer to the sensor, and a larger depth value indicates a scene point that is further away from the sensor. A zero depth value indicates that the DepthGenerator node did not succeed in obtaining a valid depth reading.

DepthMetaData's xn::DepthMetaData::Data() method provides the actual depth data. This method returns the pointer to the first depth pixel in the map.

The pixel format of depth map is XnDepthPixel, i.e. 16-bit values.

DepthMetaData provides the ZRes property to contain the depth resolution. This is the maximum value of a pixel (plus one).

DepthMetaData is similar to ImageMetaData; they are both metadata for a type of map.

Constructor & Destructor Documentation

◆ DepthMetaData()

xn::DepthMetaData::DepthMetaData ( )
inline

Ctor.

Member Function Documentation

◆ CopyFrom()

XnStatus xn::DepthMetaData::CopyFrom ( const DepthMetaData & other)
inline

Performs a deep-copy of another metadata object (including duplication of the data buffer).

Parameters
[in]othersource object

◆ Data() [1/2]

const XnDepthPixel *& xn::DepthMetaData::Data ( )
inline

Returns the depth map.

Remarks

This method returns a pointer to the first depth pixel in the map. The depth map is implemented as a row-major order compact layout of pixels in the map.

The pixel format of the map is XnDepthPixel, i.e. 16-bit integer values.

This method is reimplemented from the xn::OutputMetaData class.

◆ Data() [2/2]

const XnDepthPixel * xn::DepthMetaData::Data ( ) const
inline

Returns the depth map.

Remarks

This method returns a pointer to the first depth pixel in the map. The depth map is implemented as a row-major order compact layout of pixels in the map.

The pixel format of the map is XnDepthPixel, i.e. 16-bit integer values.

This method is reimplemented from the xn::OutputMetaData class.

◆ DepthMap()

const xn::DepthMap & xn::DepthMetaData::DepthMap ( ) const
inline

Gets a light object wrapping the depth map

◆ GetUnderlying() [1/2]

XnDepthMetaData * xn::DepthMetaData::GetUnderlying ( )
inline

Gets the C object that is wrapped by this object.

◆ GetUnderlying() [2/2]

const XnDepthMetaData * xn::DepthMetaData::GetUnderlying ( ) const
inline

Gets the C object that is wrapped by this object.

◆ InitFrom() [1/2]

void xn::DepthMetaData::InitFrom ( const DepthMetaData & other)
inline

Shallow-Copies a DepthMetaData object.

Parameters
[in]othersource object.
Remarks
Note that the data buffer is not copied, and that both object will point to the same buffer.

◆ InitFrom() [2/2]

XnStatus xn::DepthMetaData::InitFrom ( const DepthMetaData & other,
XnUInt32 nXRes,
XnUInt32 nYRes,
const XnDepthPixel * pExternalBuffer )
inline

Shallow copies another DepthMetaData object, and then readjustsit.

Parameters
[in]otherSource object
[in]nXResRequested number of columns in the map
[in]nYResRequested number of rows in the map
[in]pExternalBufferOptional. An external buffer matching requested resolution. If NULL, A buffer will be allocated.

◆ operator()()

const XnDepthPixel & xn::DepthMetaData::operator() ( XnUInt32 x,
XnUInt32 y ) const
inline

Gets the value of a single pixel of the frame map by its X and Y coordinates.

Parameters
[in]xX-coordinate of the pixel in the map
[in]yY-coordinate of the pixel in the map

◆ operator[]()

const XnDepthPixel & xn::DepthMetaData::operator[] ( XnUInt32 nIndex) const
inline

Gets the value of a single pixel of the frame map by its index in the array.

Parameters
[in]nIndexThe index of the pixel in the buffer.

◆ ReAdjust()

XnStatus xn::DepthMetaData::ReAdjust ( XnUInt32 nXRes,
XnUInt32 nYRes,
const XnDepthPixel * pExternalBuffer = NULL )
inline

Changes dimensions of the pixel-map.

Parameters
[in]nXResNumber of columns in the map
[in]nYResNumber of rows in the map
[in]pExternalBufferOptional. An external buffer to be used. If NULL is passed, a buffer will be allocated.

◆ WritableData()

XnDepthPixel * xn::DepthMetaData::WritableData ( )
inline

Gets a pointer to the writable buffer (see Frame Objects and Metadata Objects).

◆ WritableDepthMap()

xn::DepthMap & xn::DepthMetaData::WritableDepthMap ( )
inline

Gets a light object wrapping the writable depth map

◆ ZRes() [1/2]

XnDepthPixel & xn::DepthMetaData::ZRes ( )
inline

Gets the maximum depth (depth resolution) that the DepthGenerator node can produce. This is the same as the resolution of the depth axis (i.e., DepthGenerator::GetDeviceMaxDepth() + 1).

◆ ZRes() [2/2]

XnDepthPixel xn::DepthMetaData::ZRes ( ) const
inline

Gets the maximum depth (depth resolution) that the DepthGenerator node can produce. This is the same as the resolution of the depth axis (i.e., DepthGenerator::GetDeviceMaxDepth() + 1).


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